Merge "Remove tacker library from functest"
[functest.git] / functest / opnfv_tests / openstack / snaps / snaps_utils.py
index a25ad3e..309f9db 100644 (file)
@@ -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