From 3b8c9fc88aad989f195996371627099e1fcab8b8 Mon Sep 17 00:00:00 2001 From: ativelkov Date: Mon, 2 Dec 2013 18:31:05 +0400 Subject: [PATCH] Fixed a router-location bug Fixed a bug when neutron client was returning all the routers instead of the ones owned by the current tenant Change-Id: Ifc302bfe5593aa342823ef42c78b87b8011415f4 --- muranoconductor/commands/network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/muranoconductor/commands/network.py b/muranoconductor/commands/network.py index 8ad935c..d4ff0d8 100644 --- a/muranoconductor/commands/network.py +++ b/muranoconductor/commands/network.py @@ -33,6 +33,7 @@ class NeutronExecutor(CommandBase): self.cidr_waiting_per_router = {} self.router_requests = [] self.network_requests = [] + self.tenant_id = tenant_id keystone_client = ksclient.Client( endpoint=keystone_settings.auth_url, @@ -89,7 +90,8 @@ class NeutronExecutor(CommandBase): if not len(self.router_requests): return False - routers = self.neutron.list_routers().get("routers") + routers = self.neutron.list_routers(tenant_id=self.tenant_id).\ + get("routers") if not len(routers): routerId = None else: