diff --git a/barbicanclient/common/auth.py b/barbicanclient/common/auth.py index 6017626e..d49900a7 100644 --- a/barbicanclient/common/auth.py +++ b/barbicanclient/common/auth.py @@ -22,7 +22,7 @@ class AuthException(Exception): self.message = message -class KeystoneAuth(object): +class KeystoneAuthV2(object): def __init__(self, auth_url='', username='', password='', tenant_name='', tenant_id=''): if not all([auth_url, username, password, tenant_name or tenant_id]): diff --git a/barbicanclient/keep.py b/barbicanclient/keep.py index f873df1d..9f570c66 100644 --- a/barbicanclient/keep.py +++ b/barbicanclient/keep.py @@ -228,10 +228,12 @@ class Keep: tenant_id=args.os_tenant_id) elif all([args.os_auth_url, args.os_username, args.os_password, args.os_tenant_name]): - self._keystone = auth.KeystoneAuth(auth_url=args.os_auth_url, - username=args.os_username, - password=args.os_password, - tenant_name=args.os_tenant_name) + self._keystone = auth.KeystoneAuthV2( + auth_url=args.os_auth_url, + username=args.os_username, + password=args.os_password, + tenant_name=args.os_tenant_name + ) self.client = client.Client(auth_plugin=self._keystone, endpoint=args.endpoint, tenant_id=args.tenant_id) diff --git a/barbicanclient/test/common/test_auth.py b/barbicanclient/test/common/test_auth.py index d91e9701..640301ea 100644 --- a/barbicanclient/test/common/test_auth.py +++ b/barbicanclient/test/common/test_auth.py @@ -20,4 +20,4 @@ from barbicanclient.common import auth class WhenTestingKeystoneAuthentication(unittest.TestCase): def test_endpoint_username_password_tenant_are_required(self): with self.assertRaises(ValueError): - keystone = auth.KeystoneAuth() + keystone = auth.KeystoneAuthV2()