aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/sdn
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-08 20:37:20 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-08 21:46:25 +0100
commit2976a56f03496bcd7a8d86c51e66a8980a356352 (patch)
tree5a517b283961bf957e2f4d8183b9c6892008d144 /functest/opnfv_tests/sdn
parent181e6d6e4828711744d451185d64c5c4939824fe (diff)
Get neutron endpoint via snaps in odl
Change-Id: Iaf0e451e7f6bd7d22459f8d3509b39773527cfea Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/sdn')
-rw-r--r--functest/opnfv_tests/sdn/odl/odl.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index f25dfe5ec..25cc758ea 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