Added additional check when creating a port on a network for
[snaps.git] / snaps / config / network.py
index 620640f..ffafbb6 100644 (file)
@@ -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)