From 92b3d1866f70bf993545022411a19719b984500b Mon Sep 17 00:00:00 2001 From: Steve McLellan Date: Thu, 8 May 2014 17:52:04 -0500 Subject: [PATCH] Fix credentials passed to tempest Tempest auth Manager recently changed to enforce the use of Credentials objects in its public interface. Change lets tempest take the CONF.identity defaults and decide how best to authorize. Change-Id: If116d8cef145c310bd3a7077b3ae9780e705dc89 Closes-Bug: 1317549 --- functionaltests/api/base.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/functionaltests/api/base.py b/functionaltests/api/base.py index 4091ff15..5a81d7e5 100644 --- a/functionaltests/api/base.py +++ b/functionaltests/api/base.py @@ -197,14 +197,10 @@ class TestCase(testtools.TestCase): def setUpClass(cls): super(TestCase, cls).setUpClass() - username = CONF.identity.username - password = CONF.identity.password - tenant_name = CONF.identity.tenant_name - - mgr = clients.Manager(username, password, tenant_name) - auth_provider = mgr.get_auth_provider(mgr.get_default_credentials()) - - cls.client = MuranoClient(auth_provider) + # If no credentials are provided, the Manager will use those + # in CONF.identity and generate an auth_provider from them + mgr = clients.Manager() + cls.client = MuranoClient(mgr.auth_provider) def setUp(self): super(TestCase, self).setUp() @@ -255,11 +251,7 @@ class NegativeTestCase(TestCase): def setUpClass(cls): super(NegativeTestCase, cls).setUpClass() - username = CONF.identity.alt_username - password = CONF.identity.alt_password - tenant_name = CONF.identity.alt_tenant_name - - mgr = clients.Manager(username, password, tenant_name) - auth_provider = mgr.get_auth_provider(mgr.get_default_credentials()) - - cls.alt_client = MuranoClient(auth_provider) + # If no credentials are provided, the Manager will use those + # in CONF.identity and generate an auth_provider from them + mgr = clients.Manager() + cls.alt_client = MuranoClient(mgr.auth_provider)