tenant_name is mishandled in get_service_auth

Bug #1595336 reported by Stephen Pietrowicz on 2016-06-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Undecided
Unassigned

Bug Description

Problem happened when executing:

====
import os
import swiftclient

conn = swiftclient.Connection(user=os.environ['OS_USERNAME'], key=os.environ['OS_PASSWORD'], authurl=os.environ['OS_AUTH_URL'], auth_version='2.0', tenant_name=os.environ['OS_TENANT_NAME'])

for container in conn.get_account()[1]:
            print container['name']

======
which gave an error about tenant_name not being set, even though it was. Changed line in

python-swiftclient/swiftclient/client.py, line 1745 in Connection.get_service_auth() which was:

            service_options['tenant_name'] = opts.get('service_project_name', None)

when it should be:

            service_options['tenant_name'] = opts.get('tenant_name', None)

---
once this fix was made, the program executed as expected.

Tim Burke (1-tim-z) wrote :

In *get_service_auth*? Were we expecting the use of service tokens? I would only expect get_service_auth to be called if a service_username was provided in the os_options dict -- see https://github.com/openstack/python-swiftclient/blob/3.0.0/swiftclient/client.py#L1478-L1481

Matthew Oliver (matt-0) wrote :

Has a question from Tim, unanswered. Waiting for more info

Changed in swift:
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Object Storage (swift) because there has been no activity for 60 days.]

Changed in swift:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers