From 59f5e3dbe515e19c75c665825962effa3b88430c Mon Sep 17 00:00:00 2001 From: Nader Lahouti Date: Thu, 30 Mar 2017 11:15:42 -0700 Subject: [PATCH] Use identity v3 api Change the identity API version to v3 when sending the information to CVX as identity API v2.0 is deprecated. Change-Id: Ia494a38526a372997dcbfbe2875ff780319f324d --- networking_arista/ml2/arista_ml2.py | 2 +- .../tests/unit/ml2/test_arista_mechanism_driver.py | 8 ++++---- networking_arista/tests/unit/ml2/test_mechanism_arista.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/networking_arista/ml2/arista_ml2.py b/networking_arista/ml2/arista_ml2.py index ea5ef11..849af8e 100644 --- a/networking_arista/ml2/arista_ml2.py +++ b/networking_arista/ml2/arista_ml2.py @@ -109,7 +109,7 @@ class AristaRPCWrapperBase(object): {'protocol': self.keystone_conf.auth_protocol, 'host': self.keystone_conf.auth_host, 'port': self.keystone_conf.auth_port}) - return '%s/v2.0/' % auth_uri + return '%s/v3/' % auth_uri def _api_username(self): return cfg.CONF.ml2_arista.eapi_username diff --git a/networking_arista/tests/unit/ml2/test_arista_mechanism_driver.py b/networking_arista/tests/unit/ml2/test_arista_mechanism_driver.py index 2b7e769..789032f 100644 --- a/networking_arista/tests/unit/ml2/test_arista_mechanism_driver.py +++ b/networking_arista/tests/unit/ml2/test_arista_mechanism_driver.py @@ -282,7 +282,7 @@ class TestAristaJSONRPCWrapper(testlib_api.SqlTestCase): self.drv.register_with_eos() post_data = {'name': 'keystone', 'password': 'fun', 'tenant': 'tenant_name', 'user': 'neutron', - 'authUrl': 'abc://host:5000/v2.0/'} + 'authUrl': 'abc://host:5000/v3/'} clean_data = post_data.copy() clean_data['password'] = "*****" calls = [ @@ -1277,9 +1277,9 @@ class PositiveRPCWrapperValidConfigTestCase(testlib_api.SqlTestCase): def test_register_with_eos(self, mock_send_eapi_req): self.drv.register_with_eos() auth = utils.fake_keystone_info_class() - keystone_url = '%s://%s:%s/v2.0/' % (auth.auth_protocol, - auth.auth_host, - auth.auth_port) + keystone_url = '%s://%s:%s/v3/' % (auth.auth_protocol, + auth.auth_host, + auth.auth_port) auth_cmd = ('auth url %s user %s password %s tenant %s' % ( keystone_url, auth.admin_user, diff --git a/networking_arista/tests/unit/ml2/test_mechanism_arista.py b/networking_arista/tests/unit/ml2/test_mechanism_arista.py index 331c0bb..cfdb1e4 100644 --- a/networking_arista/tests/unit/ml2/test_mechanism_arista.py +++ b/networking_arista/tests/unit/ml2/test_mechanism_arista.py @@ -1417,7 +1417,7 @@ class fake_keystone_info_class(object): Arista Driver expects Keystone auth info. This fake information is for testing only """ - auth_uri = 'abc://host:35357/v2.0/' + auth_uri = 'abc://host:35357/v3/' identity_uri = 'abc://host:5000' admin_user = 'neutron' admin_password = 'fun'