Keystone Client
Create a client for Keystone. Proposing both an importable python client as well as a CLI interface that could aid with troubleshooting:
Example Python API
>>> import keystoneclient as keystone
>>> session = keystone.
>>> print session.tenant
None
>>> print session.tenants()
{'a1': {'id': 'a1', 'name': 'customer-x'}, 'b2': {'id': 'b2', 'name': 'project-y'}}
>>> print session.token
43598acc-
>>> print keystone.
True
>>> session = session.
>>> print session.token
278837cd-
>>> print keystone.
True
>>> session = keystone.
>>> print session.tenant
{'id': 'a1', 'name': 'customer-x'}
>>> print keystone.
True
Keystone Example Client CLI
$ python keystoneclient.py authenticate --username="admin" --password=
{ "access": {"token": {"id": "994c75b3-
Blueprint information
- Status:
- Complete
- Approver:
- Ziad Sawalha
- Priority:
- High
- Drafter:
- Dolph Mathews
- Direction:
- Approved
- Assignee:
- Jesse Andrews
- Definition:
- New
- Series goal:
- Accepted for essex
- Implementation:
-
Implemented
- Milestone target:
-
2012.1
- Started by
- Ziad Sawalha
- Completed by
- Thierry Carrez
Related branches
Related bugs
Sprints
Whiteboard
ZNS 2011-10-21: Yes! This should also be coded into a library than can be imported into something like nova-client. We've had many requests for this and it would help teams implementing Keystone integration.
Gerrit topic: https:/
Addressed by: https:/
Adding the concept of creating a Keystone HTTP client in Python which can be used in Keystone and imported from Keystone to allow for easier Keystone integration.
Gabe Hurley has produced exactly this for the Dashboard (Horizon project) interactions with Keystone: https:/
Add the following use cases:
- specify URL for keystone when creating session
- querying API versions and extensions (code in novaclient already)
Consider:
- support providing URL to Nova and reacting to middleware response (ex 401 with www-authorization header)
Gerrit topic: https:/
Addressed by: https:/
Handle EC2 Credentials on /tokens