From: Steve Baker Date: Tue, 2 Apr 2013 01:13:18 +0000 (+1300) Subject: Pass in endpoint url for swift auth_token auth X-Git-Tag: 2014.1~733^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=84ec72aa6770e4acd612bb18369de5aef9198d59;p=openstack-build%2Fheat-build.git 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 --- 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!")