summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2018-07-16 10:57:38 -0600
committerspisarski <s.pisarski@cablelabs.com>2018-07-16 10:57:38 -0600
commit10a7ea2ecc6796a067cc6413bc4097d9c6e5815a (patch)
treeae4186b3e871819684612e09b73690c7bfa5a359
parent89a0e76315c0ec123e3674536fcda07a6c9c3c06 (diff)
Added additional check when creating a port on a network for
the external flag is not True to query the network for the given project. JIRA: SNAPS-320 Change-Id: Ie755633520fe30664fc89e9daaea6aa2d14c2e52 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--snaps/config/network.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/snaps/config/network.py b/snaps/config/network.py
index 620640f..ffafbb6 100644
--- a/snaps/config/network.py
+++ b/snaps/config/network.py
@@ -449,7 +449,6 @@ class PortConfig(object):
TODO - expand automated testing to exercise all parameters
:param neutron: the Neutron client
- :param keystone: the Keystone client
:param os_creds: the OpenStack credentials
:return: the dictionary object
"""
@@ -463,7 +462,7 @@ class PortConfig(object):
try:
network = neutron_utils.get_network(
neutron, keystone, network_name=self.network_name)
- if network and not network.shared:
+ if network and (not network.shared or not network.external):
network = neutron_utils.get_network(
neutron, keystone, network_name=self.network_name,
project_name=project_name)