From 05ac28aabd0e66510e963281634fc87711926d1a Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 12 May 2018 16:10:10 +0200 Subject: Update ODL testcase to OpenStack Shade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conflicts: functest/opnfv_tests/sdn/odl/odl.py functest/tests/unit/odl/test_odl.py Change-Id: I7832b5ed274e181449f9db9fb03a2d27038520ae Signed-off-by: Cédric Ollivier (cherry picked from commit c9b0a0a1bf5b30f241dee566c815d4e527ec9628) --- functest/opnfv_tests/sdn/odl/odl.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'functest/opnfv_tests') diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py index 7c61e88df..a975a081f 100644 --- a/functest/opnfv_tests/sdn/odl/odl.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -25,10 +25,10 @@ import os import re import sys +import os_client_config +import shade from six.moves import urllib -from snaps.openstack.utils import keystone_utils -from functest.opnfv_tests.openstack.snaps import snaps_utils from functest.utils import config from functest.utils import env from xtesting.core import robotframework @@ -157,9 +157,13 @@ class ODLTests(robotframework.RobotFramework): suites = kwargs["suites"] except KeyError: pass - snaps_creds = snaps_utils.get_credentials() - kwargs = {'neutronurl': keystone_utils.get_endpoint( - snaps_creds, 'network')} + cloud = shade.OperatorCloud( + cloud_config=os_client_config.get_config()) + neutron_id = cloud.search_services('neutron')[0].id + endpoint = cloud.search_endpoints( + filters={'interface': os.environ.get('OS_INTERFACE', 'public'), + 'service_id': neutron_id})[0].url + kwargs = {'neutronurl': endpoint} kwargs['odlip'] = env.get('SDN_CONTROLLER_IP') kwargs['odlwebport'] = '8080' kwargs['odlrestconfport'] = '8181' -- cgit 1.2.3-korg