Client should accept tenant_id as an alternative to tenant_name

Bug #1196486 reported by Phil Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Undecided
Phil Day

Bug Description

Tenant names are not necessarily unique for a User, so the client should also allow authentication by tenant_id

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-quantumclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/35116

Changed in python-neutronclient:
assignee: nobody → Phil Day (philip-day)
status: New → In Progress
Revision history for this message
yong sheng gong (gongysh) wrote :

$ keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 51c051a17638408d8969ada0ae5b9b95 | admin | True |
| e1513fde89324e70991fd69d6bee5b5e | alt_demo | True |
| 8f0175ccbe7e45599ac37b2e870439b0 | demo | True |
| 452a9af15cde4239bef3cafc35c85fe8 | invisible_to_admin | True |
| 6c68892b029a415abe6fefe1186aa5c2 | service | True |
+----------------------------------+--------------------+---------+
gongysh@gongysh-ThinkPad-T530:/opt/stack/python-quantumclient$ keystone tenant-create
usage: keystone tenant-create --name <tenant-name>
                              [--description <tenant-description>]
                              [--enabled <true|false>]
keystone tenant-create: error: argument --name is required
gongysh@gongysh-ThinkPad-T530:/opt/stack/python-quantumclient$ keystone tenant-create --name demo
Conflict occurred attempting to store project. (1062, "Duplicate entry 'default-demo' for key 'domain_id'") (HTTP 409)

Revision history for this message
yong sheng gong (gongysh) wrote :

so what do u mean by "Tenant names are not necessarily unique for a User"?

Changed in python-neutronclient:
status: In Progress → Incomplete
Revision history for this message
Phil Day (philip-day) wrote :

The Keystone v3 API introduces the concept of a domain above tenant, and within a domain you can have tenants with the same name.

I raised the same bug on the Nova client (https://review.openstack.org/#/c/34809) - Cinder and Glance already have support for tenant_id

Changed in python-neutronclient:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/35116
Committed: http://github.com/openstack/python-neutronclient/commit/037497da521b5c1cf8cb53837f9af10eb755210e
Submitter: Jenkins
Branch: master

commit 037497da521b5c1cf8cb53837f9af10eb755210e
Author: Phil Day <email address hidden>
Date: Mon Jul 1 12:01:00 2013 +0100

    Allow tenant ID for authentication

    Under the Keystone v3 API Tenant names are not necessarily uniques
    across Domains for a User, so the client should also allow
    authentication by tenant_id

    Fixes bug 1196486

    Change-Id: I3f385a19c1d3d66f5539f901796bbaa22d315762

Changed in python-neutronclient:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
milestone: none → 2.2.1-2.2.6
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.