From ecc4f2eb7b8a930d1059cdd5ae2c99e4d4d4df5e Mon Sep 17 00:00:00 2001 From: Richard Lee Date: Thu, 6 Mar 2014 17:06:26 -0600 Subject: [PATCH] Add missing tenant_id to Keystone init KeystoneAuthV2 takes a tenant_id param that was not being used for anything. This passes it along to the keystoneclient. Co-Authored-By: Anderson Mesquita Change-Id: I2cb622d4035600c09512fd3824e03da1fe5f9738 --- barbicanclient/common/auth.py | 1 + barbicanclient/test/common/test_auth.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/barbicanclient/common/auth.py b/barbicanclient/common/auth.py index 43134862..ff26ddb2 100644 --- a/barbicanclient/common/auth.py +++ b/barbicanclient/common/auth.py @@ -57,6 +57,7 @@ class KeystoneAuthV2(AuthPluginBase): self._keystone = keystone or ksclient.Client(username=username, password=password, tenant_name=tenant_name, + tenant_id=tenant_id, auth_url=auth_url, insecure=insecure) self._barbican_url = None diff --git a/barbicanclient/test/common/test_auth.py b/barbicanclient/test/common/test_auth.py index bc1e0792..c2ef0ff8 100644 --- a/barbicanclient/test/common/test_auth.py +++ b/barbicanclient/test/common/test_auth.py @@ -29,11 +29,13 @@ class WhenTestingKeystoneAuthentication(unittest.TestCase): self.auth_url = 'https://www.yada.com' self.username = 'user' self.password = 'pw' + self.tenant_name = 'tenant' self.tenant_id = '1234' self.keystone_auth = auth.KeystoneAuthV2(auth_url=self.auth_url, username=self.username, password=self.password, + tenant_name=self.tenant_name, tenant_id=self.tenant_id, keystone= self.keystone_client)