yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #09718
[Bug 1279917] [NEW] keystoneclient users.find errors out with "KeyError: users"
Public bug reported:
Given a basic test script hitting openstack running in a virtualbox:
import keystoneclient
from keystoneclient.v3 import client
keystone = client.Client(user_domain_name='default',
username='admin',
password='secret',
auth_url='http://localhost:35357/v3',
tenant_name='admin'
)
user = keystone.users.find(name='admin')
This call errors out with:
Traceback (most recent call last):
File "/home/webdev/tmp/keystone_tests.py", line 28, in <module>
user = keystone.users.find(name='admin')
File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 72, in func
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 296, in find
self.collection_key)
File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 98, in _list
data = body[response_key]
KeyError: 'users'
Adding a print statement to print the body of the response in
base.py:Manager yields:
{u'user': {u'email': u'admin@xxxxxxxxxxx', u'tenantId': u'a7ba50e02ba641279a2b919f4f824bee', u'enabled': True, u'name':
u'admin', u'id': u'1d1c161414c34a8baa50a46ab5e15924'}}
The keystone v3 api collection returns a dictionary with a 'user' key,
with a dictionary value, rather than a 'users' key (matching the
collection name) with a list value, which the generic Manager code
expects.
The keystone v3 api should return consistent responses.
** Affects: keystone
Importance: Undecided
Status: New
** Tags: keystoneapi keystoneclient v3
** Attachment added: "simple script that demonstrates the issue"
https://bugs.launchpad.net/bugs/1279917/+attachment/3979895/+files/keystone_tests.py
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1279917
Title:
keystoneclient users.find errors out with "KeyError: users"
Status in OpenStack Identity (Keystone):
New
Bug description:
Given a basic test script hitting openstack running in a virtualbox:
import keystoneclient
from keystoneclient.v3 import client
keystone = client.Client(user_domain_name='default',
username='admin',
password='secret',
auth_url='http://localhost:35357/v3',
tenant_name='admin'
)
user = keystone.users.find(name='admin')
This call errors out with:
Traceback (most recent call last):
File "/home/webdev/tmp/keystone_tests.py", line 28, in <module>
user = keystone.users.find(name='admin')
File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 72, in func
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 296, in find
self.collection_key)
File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 98, in _list
data = body[response_key]
KeyError: 'users'
Adding a print statement to print the body of the response in
base.py:Manager yields:
{u'user': {u'email': u'admin@xxxxxxxxxxx', u'tenantId': u'a7ba50e02ba641279a2b919f4f824bee', u'enabled': True, u'name':
u'admin', u'id': u'1d1c161414c34a8baa50a46ab5e15924'}}
The keystone v3 api collection returns a dictionary with a 'user' key,
with a dictionary value, rather than a 'users' key (matching the
collection name) with a list value, which the generic Manager code
expects.
The keystone v3 api should return consistent responses.
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1279917/+subscriptions
Follow ups
References