aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r--functest/opnfv_tests/sdn/odl/odl.py11
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py12
2 files changed, 10 insertions, 13 deletions
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index f25dfe5e..25cc758e 100644
--- a/functest/opnfv_tests/sdn/odl/odl.py
+++ b/functest/opnfv_tests/sdn/odl/odl.py
@@ -26,10 +26,11 @@ import re
import sys
from six.moves import urllib
+from snaps.openstack.utils import keystone_utils
from functest.core import robotframework
+from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.utils import constants
-import functest.utils.openstack_utils as op_utils
__author__ = "Cedric Ollivier <cedric.ollivier@orange.com>"
@@ -155,8 +156,9 @@ class ODLTests(robotframework.RobotFramework):
suites = kwargs["suites"]
except KeyError:
pass
- kwargs = {'neutronurl': op_utils.get_endpoint(
- service_type='network')}
+ snaps_creds = snaps_utils.get_credentials()
+ kwargs = {'neutronurl': keystone_utils.get_endpoint(
+ snaps_creds, 'network')}
kwargs['odlip'] = urllib.parse.urlparse(
kwargs['neutronurl']).hostname
kwargs['odlwebport'] = '8080'
@@ -274,7 +276,6 @@ def main():
return result
if args['pushtodb']:
return odl.push_to_db()
- else:
- return result
+ return result
except Exception: # pylint: disable=broad-except
return robotframework.RobotFramework.EX_RUN_ERROR
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index c373eee4..283a152f 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -153,13 +153,11 @@ class JujuEpc(vnf.VnfOnBoarding):
self.__logger.info("Creating Credentials for Abot-epc .....")
user_creator = self._bypass_juju_network_discovery_bug(
'juju_network_discovery_bug')
- snaps_creds = user_creator.get_os_creds('juju_network_discovery_bug')
+ snaps_creds = user_creator.get_os_creds(self.snaps_creds.project_name)
credentials_yaml = os.path.join(self.res_dir, "credentials.yaml")
- # 'tenant_n' should habe been equal to snaps_creds.project_name
- # user_creator.get_os_creds() must be checked
creds_data = {
'pass': snaps_creds.password,
- 'tenant_n': self.snaps_creds.project_name,
+ 'tenant_n': snaps_creds.project_name,
'user_n': snaps_creds.username}
with open(credentials_yaml, 'w') as yfile:
yfile.write(CREDS_TEMPLATE2.format(**creds_data))
@@ -172,13 +170,11 @@ class JujuEpc(vnf.VnfOnBoarding):
self.__logger.info("Creating Credentials for Abot-epc .....")
user_creator = self._bypass_juju_network_discovery_bug(
'juju_network_discovery_bug')
- snaps_creds = user_creator.get_os_creds('juju_network_discovery_bug')
+ snaps_creds = user_creator.get_os_creds(self.snaps_creds.project_name)
credentials_yaml = os.path.join(self.res_dir, "credentials.yaml")
- # 'tenant_n' should habe been equal to snaps_creds.project_name
- # user_creator.get_os_creds() must be checked
creds_data = {
'pass': snaps_creds.password,
- 'tenant_n': self.snaps_creds.project_name,
+ 'tenant_n': snaps_creds.project_name,
'user_n': snaps_creds.username,
'project_domain_n': snaps_creds.project_domain_name,
'user_domain_n': snaps_creds.user_domain_name}