From: spisarski Date: Mon, 4 Jun 2018 15:23:53 +0000 (-0600) Subject: Fix to a router's internal subnet resoulution. X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=9f00c18a8bda11e3ffdafa53832cf4816e785196;p=snaps.git Fix to a router's internal subnet resoulution. Ensures that any subnet added to the router is available to that project. Change-Id: Iddfad14a093551bc0f4a05c52b20f02db2474d78 Signed-off-by: spisarski --- diff --git a/snaps/openstack/utils/neutron_utils.py b/snaps/openstack/utils/neutron_utils.py index 78731ae..6daa712 100644 --- a/snaps/openstack/utils/neutron_utils.py +++ b/snaps/openstack/utils/neutron_utils.py @@ -269,7 +269,7 @@ def get_subnet_by_name(neutron, keystone, subnet_name, project_name=None): if project_name: project = keystone_utils.get_project_by_id( keystone, subnet.project_id) - if project: + if project.name == project_name: return subnet else: return subnet