Use EXTERNAL_NETWORK as a fallback if no tenant network 11/71411/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 18 Nov 2020 15:16:23 +0000 (16:16 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 18 Nov 2020 15:16:23 +0000 (16:16 +0100)
It pleases the networking configuration proposed by Airship.

Change-Id: I24bc4613557c61db93d543cde730cd872e0176e0
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/openstack/rally/blacklist.yaml
functest/opnfv_tests/openstack/rally/rally.py

index bc41bb6..6df0c35 100644 (file)
@@ -30,3 +30,4 @@ functionality:
             - NeutronNetworks.create_and_delete_floating_ips
             - NeutronNetworks.create_and_list_floating_ips
             - NeutronNetworks.associate_and_dissociate_floating_ips
+            - VMTasks.dd_load_test
index 63f281b..41d8073 100644 (file)
@@ -133,7 +133,14 @@ class RallyBase(singlevm.VmReady2):
         if self.network:
             task_args['netid'] = str(self.network.id)
         else:
-            task_args['netid'] = ''
+            LOGGER.warning(
+                'No tenant network created. '
+                'Trying EXTERNAL_NETWORK as a fallback')
+            if env.get("EXTERNAL_NETWORK"):
+                network = self.cloud.get_network(env.get("EXTERNAL_NETWORK"))
+                task_args['netid'] = str(network.id) if network else ''
+            else:
+                task_args['netid'] = ''
 
         return task_args