diff options
author | Viktor Tikkanen <viktor.tikkanen@nokia.com> | 2016-01-07 11:59:02 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-01-11 13:44:52 +0000 |
commit | 69a7887f4eb8c931628442ab0a4d3fb298667f8e (patch) | |
tree | b1b87026b49ef9d257fd3a8eb2bb44ecfd88e81b /testcases/VIM | |
parent | 970ee3eb202a5986b2da918ef034d1a1aba4520a (diff) |
Searching for shared private networks
Tempest suite assumes that there is at least one shared private
network in the system. get_private_net() returns now first found
shared private network (instead of first found private network).
Change-Id: I892abcacff2c0349dd42444a632f71c6a14a0861
Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
(cherry picked from commit 378c1baeecdd66ea8c74f1046e2e54297d9f204d)
Diffstat (limited to 'testcases/VIM')
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_tempest.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index e551ed3b1..f056e5e9e 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -18,6 +18,7 @@ import subprocess import sys import yaml import keystoneclient.v2_0.client as ksclient +from neutronclient.v2_0 import client as neutronclient modes = ['full', 'smoke', 'baremetal', 'compute', 'data_processing', 'identity', 'image', 'network', 'object_storage', 'orchestration', @@ -65,8 +66,6 @@ TENANT_NAME = functest_yaml.get("tempest").get("identity").get("tenant_name") TENANT_DESCRIPTION = functest_yaml.get("tempest").get("identity").get("tenant_description") USER_NAME = functest_yaml.get("tempest").get("identity").get("user_name") USER_PASSWORD = functest_yaml.get("tempest").get("identity").get("user_password") -NEUTRON_PRIVATE_NET_NAME = functest_yaml.get("general"). \ - get("openstack").get("neutron_private_net_name") DEPLOYMENT_MAME = functest_yaml.get("rally").get("deployment_name") RALLY_INSTALLATION_DIR = functest_yaml.get("general").get("directories").get("dir_rally_inst") @@ -172,8 +171,16 @@ def configure_tempest(): return False logger.debug(" Updating fixed_network_name...") + private_net_name = "" + creds_neutron = functest_utils.get_credentials("neutron") + neutron_client = neutronclient.Client(**creds_neutron) + private_net = functest_utils.get_private_net(neutron_client) + if private_net is None: + logger.error("No shared private networks found.") + else: + private_net_name = private_net['name'] cmd = "crudini --set "+tempest_conf_file+" compute fixed_network_name " \ - +NEUTRON_PRIVATE_NET_NAME + +private_net_name functest_utils.execute_command(cmd,logger) logger.debug(" Updating non-admin credentials...") |