summaryrefslogtreecommitdiffstats
path: root/deploy/post/execute.py
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/post/execute.py')
-rw-r--r--deploy/post/execute.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/deploy/post/execute.py b/deploy/post/execute.py
index 37a67b4c..24061e0b 100644
--- a/deploy/post/execute.py
+++ b/deploy/post/execute.py
@@ -50,11 +50,12 @@ def _config_external_subnet(ext_id, network_conf):
def _create_external_network(network_file):
network_conf = NetworkConfig(network_file=network_file)
ext_name = network_conf.ext_network_name
- physnet = network_conf.ext_mapping
+ physnet = network_conf.ext_mapping if hasattr(network_conf, 'ext_mapping') else 'physnet1'
neutronclient = neutron.Neutron()
ext_id = neutronclient.create_network(ext_name,
_config_external_network(ext_name, physnet))
- neutronclient.create_subnet(_config_external_subnet(ext_id, network_conf))
+ if ext_id:
+ neutronclient.create_subnet(_config_external_subnet(ext_id, network_conf))
def _create_flavor_m1_micro():