Use keystoneclient session objects

Registered by Jamie Lennox

Keystoneclient session objects are well entrenched now. They provide a number of benefits as they essentially hand of the process of fetching authentication tokens and dealing with the service catalog that clients often make a mess of. They provide integration with auth_token middleware and loading from CONF files so there is now a standard way to define credentials for service to service communication.

Glanceclient should accept a session object and the other parameters that session aware clients support. This will allow much easier use for service -> service communication.

This pattern has already been adopted by at least: novaclient, cinderclient, keystoneclient, neutronclient, and most of the 'newer' project clients. The current notable absences are swiftclient and glanceclient.

Glanceclient is different to other clients, it has never accepted credentials and it has custom SSL handling. We will be able to support these options for clients initiated using the current option sets, however i don't think we will be able to support it when a keystoneclient session is passed to it.

Some examples:

https://blueprints.launchpad.net/python-glanceclient/+spec/session-objects

Blueprint information

Status:
Complete
Approver:
Nikhil Komawar
Priority:
Medium
Drafter:
Jamie Lennox
Direction:
Approved
Assignee:
Jamie Lennox
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Nikhil Komawar
Completed by
Nikhil Komawar

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:session-tests,n,z

Addressed by: https://review.openstack.org/141994
    Make glanceclient accept a session object

Gerrit topic: https://review.openstack.org/#q,topic:bp/session-objects,n,z

Addressed by: https://review.openstack.org/174207
    Unorder compare in tests

(?)

Work Items

Work items:
Add spec to glance-specs repo to complement the bp for records: TODO

This blueprint contains Public information 
Everyone can see this information.