diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-11-18 16:16:23 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-11-18 16:24:05 +0100 |
commit | 261d1672bc89daad296e6c3f619753c7f5a5a6f6 (patch) | |
tree | d718886e96a17e9f8b9221237fd626fd2945f056 | |
parent | ed5d3d63667ce446623e61d0b79fc9048eb8ac90 (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>
(cherry picked from commit 5b96694ec402cede3e0ce3b57fa7e7cff281f179)
-rw-r--r-- | functest/opnfv_tests/openstack/rally/rally.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index 030409468..545474c69 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -130,7 +130,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 |