Browse code

Merge "Confirm network is created before setting public_network_id"

Jenkins authored on 2017/01/14 03:39:19
Showing 1 changed files
... ...
@@ -241,7 +241,9 @@ function configure_tempest {
241 241
 
242 242
     # the public network (for floating ip access) is only available
243 243
     # if the extension is enabled.
244
-    if is_networking_extension_supported 'external-net'; then
244
+    # If NEUTRON_CREATE_INITIAL_NETWORKS is not true, there is no network created
245
+    # and the public_network_id should not be set.
246
+    if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]] && is_networking_extension_supported 'external-net'; then
245 247
         public_network_id=$(openstack network show -f value -c id $PUBLIC_NETWORK_NAME)
246 248
     fi
247 249