X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fopnfv_tests%2Fopenstack%2Fsnaps%2Fsnaps_utils.py;h=309f9db16f7d0e30ba6be37a2636c08f4e1b46c9;hb=d20297e509ad127b237a90ba5cedbc2500bae753;hp=a25ad3e0d4294bf849405fba2961a3bf65857daf;hpb=1ac822083026d42ebe5f1a96e4eb0d34eed613c8;p=functest.git diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py index a25ad3e0d..309f9db16 100644 --- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py +++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py @@ -5,18 +5,15 @@ # # http://www.apache.org/licenses/LICENSE-2.0 -import functest.utils.functest_utils as ft_utils -from snaps.openstack.tests import openstack_tests from snaps.openstack.utils import neutron_utils -def get_ext_net_name(): +def get_ext_net_name(os_creds): """ Returns the first external network name + :param: os_creds: an instance of snaps OSCreds object :return: """ - os_env_file = ft_utils.get_functest_config('general.openstack.creds') - os_creds = openstack_tests.get_credentials(os_env_file=os_env_file) neutron = neutron_utils.neutron_client(os_creds) ext_nets = neutron_utils.get_external_networks(neutron) - return ext_nets[0]['network']['name'] + return ext_nets[0].name