From 84ec72aa6770e4acd612bb18369de5aef9198d59 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Tue, 2 Apr 2013 14:13:18 +1300 Subject: [PATCH] Pass in endpoint url for swift auth_token auth This aligns swift auth_token only authentication with the way Horizon does it, and avoids python-swiftclient bug #1160172 Tested by launching a stack with and without the --token-only flag Also tested using Horizon, which is auth_token only Part of blueprint auth-token-only Change-Id: I0622f76e93df4f7353fc0cc61dc962b6c8f0be11 --- heat/engine/clients.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/heat/engine/clients.py b/heat/engine/clients.py index 7f51434b..4673f4ab 100644 --- a/heat/engine/clients.py +++ b/heat/engine/clients.py @@ -123,20 +123,19 @@ class OpenStackClients(object): con = self.context args = { - 'auth_version': '2', + 'auth_version': '2.0', 'tenant_name': con.tenant, - 'authurl': con.auth_url, 'user': con.username } if con.password is not None: args['key'] = con.password + args['authurl'] = con.auth_url elif con.auth_token is not None: - args['os_options'] = { - 'tenant_id': con.tenant_id, - 'auth_token': con.auth_token, - 'tenant_name': con.tenant - } + args['key'] = None + args['authurl'] = None + args['preauthtoken'] = con.auth_token + args['preauthurl'] = self.url_for(service_type='object-store') else: logger.error("Swift connection failed, no password or " + "auth_token!") -- 2.45.2