From 0e1e4857f631223f17e895b2d2c3a0bcad680865 Mon Sep 17 00:00:00 2001 From: tengqm Date: Mon, 23 Nov 2015 22:52:45 -0500 Subject: [PATCH] Fix bug introduced by openstacksdk This patch sets the default auth_plugin to 'password', it also removes the authenticator reference from client module. These code are breaking the client code. Change-Id: I7f815d3847b0bd0f5e6c3f78c2cc0efd3c80a523 --- senlinclient/common/sdk.py | 5 ++--- senlinclient/shell.py | 2 +- senlinclient/v1/client.py | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/senlinclient/common/sdk.py b/senlinclient/common/sdk.py index e68db4c5..8a4f165b 100644 --- a/senlinclient/common/sdk.py +++ b/senlinclient/common/sdk.py @@ -123,10 +123,9 @@ class Resource(base.Resource): return self -def create_connection(preferences=None, user_agent=None, **kwargs): +def create_connection(prof=None, user_agent=None, **kwargs): try: - conn = connection.Connection(profile=preferences, - user_agent=user_agent, + conn = connection.Connection(profile=prof, user_agent=user_agent, **kwargs) except exceptions.HttpException as ex: exc.parse_exception(ex.details) diff --git a/senlinclient/shell.py b/senlinclient/shell.py index e2fa630b..efc62a15 100644 --- a/senlinclient/shell.py +++ b/senlinclient/shell.py @@ -216,7 +216,7 @@ class SenlinShell(object): def _setup_senlin_client(self, api_ver, args): '''Create senlin client using given args.''' kwargs = { - 'auth_plugin': args.auth_plugin, + 'auth_plugin': args.auth_plugin or 'password', 'auth_url': args.auth_url, 'project_name': args.project_name or args.tenant_name, 'project_id': args.project_id or args.tenant_id, diff --git a/senlinclient/v1/client.py b/senlinclient/v1/client.py index 71da2df3..6943755f 100644 --- a/senlinclient/v1/client.py +++ b/senlinclient/v1/client.py @@ -28,7 +28,6 @@ class Client(object): session = conn.session self.session = session - self.auth = session.authenticator ###################################################################### # The following operations are interfaces exposed to other software