aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-11-18 16:16:23 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2020-11-18 16:16:23 +0100
commit5b96694ec402cede3e0ce3b57fa7e7cff281f179 (patch)
tree24e373010b9297e3607d9f69997c4e27a47b9386
parentd99e61f9eb1c4a582b71eb304259ddd3fdeb748f (diff)
Use EXTERNAL_NETWORK as a fallback if no tenant network
It pleases the networking configuration proposed by Airship. Change-Id: I24bc4613557c61db93d543cde730cd872e0176e0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--functest/opnfv_tests/openstack/rally/blacklist.yaml1
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py9
2 files changed, 9 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/rally/blacklist.yaml b/functest/opnfv_tests/openstack/rally/blacklist.yaml
index bc41bb695..6df0c35d1 100644
--- a/functest/opnfv_tests/openstack/rally/blacklist.yaml
+++ b/functest/opnfv_tests/openstack/rally/blacklist.yaml
@@ -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
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 63f281b67..41d807301 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -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