OpenStack Common Client Library
Unfortunately, nova, keystone, cinder, and glance clients are very inconsistent. A lot of code was copied between all these clients instead of moving it to a common library. The code was edited without synchronization between clients, so, they have different behaviour:
* keystoneclient reissues authorization request if the token is expired but glanceclient doesn't;
* novaclient supports authorization plugins while the others don't;
* all client constructors use different parameters (api_key in nova or password in keystone and so on);
* keystoneclient authenticates immediately in __init__, while novaclient does it lazily during first method call;
* keystone- and novaclient can manage service catalogs and accept keystone's auth URI while glanceclient allows endpoints only;
* keystoneclient can support authorization with an unscoped token but novaclient doesn't;
* novaclient uses class composition while keystoneclient uses inheritance: composition allows sharing common token and service catalog between several clients.
That is worth to note that glanceclient still uses httplib instead of more convenient python-requests.
There is python-
The basic library can be used by python-
An sample implementation of the basic library was written in Jun, 2012 and is accessible at https:/
Here is an example how to use the library from oslo-incubator:
from openstack.
http_client = HttpClient(
from novaclient.
print Client(
from keystoneclient.
print Client(
This blueprint is a reorganization of older blueprints https:/
Blueprint information
- Status:
- Complete
- Approver:
- Mark McLoughlin
- Priority:
- Medium
- Drafter:
- Alexej Ababilov
- Direction:
- Approved
- Assignee:
- Alexej Ababilov
- Definition:
- Approved
- Series goal:
- Accepted for havana
- Implementation:
- Implemented
- Milestone target:
- 2013.2
- Started by
- Alexej Ababilov
- Completed by
- Mark McLoughlin
Related branches
Related bugs
Sprints
Whiteboard
First part: https:/
Second part: https:/
Alessio - since the second patch got merged, what remains to be done before we can mark his as implemented?
Second part doesn't look merged to me --ttx
I'm pretty sure the second part relates to the common-cli-utils blueprint
Also, Adam Young appears to have some sort of issue with this: https:/
-- markmc
The second part: (https:/
Work Items
Dependency tree
* Blueprints in grey have been implemented.