Merge lp://staging/~thedac/charm-helpers/get-catalog into lp://staging/charm-helpers
Proposed by
David Ames
Status: | Merged |
---|---|
Merged at revision: | 752 |
Proposed branch: | lp://staging/~thedac/charm-helpers/get-catalog |
Merge into: | lp://staging/charm-helpers |
Diff against target: |
133 lines (+42/-38) 1 file modified
charmhelpers/contrib/openstack/amulet/utils.py (+42/-38) |
To merge this branch: | bzr merge lp://staging/~thedac/charm-helpers/get-catalog |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Edward Hope-Morley | Approve | ||
Review via email:
|
Description of the change
Update use of client.
Due to a bug in keystone client when using keystoneauth1.
keystoneclient.
Manually setting client.auth_ref has the side effect of populating
the service_catalog and has become the undocumented but accepted
practice.
This change adds the manual setting of auth_ref and updates the query
arguments for url_for().
To post a comment you must log in.
Unless something has changed, and it may well have done, then this is in response to https:/ /bugs.launchpad .net/python- keystoneclient/ +bug/1547331 which is about v3 keystone client having the missing service_catalog?
If so, the get_access() method forces a pre-auth and if placed on the keystone client, will then get the service catalog:
e.g.
auth = keystoneclient. auth.identity. v3.Password( ...) session. Session( auth=auth) v3.client. Client( session= sess) auth_ref = auth.get_ access( sess)
sess = keystoneclient.
keystone = keystone.
keystone.
At this point the keystone variable can be used to get the catalog:
keystone. service_ catalog. get_endpoints( )
This works (for v3) as it is in the Barbican charm's keystone v3 code. It's also backwards compatible with the v2_0 client if v2.Password(...) is used.
See https:/ /github. com/openstack/ charm-barbican/ blob/master/ src/tests/ basic_deploymen t.py#L142 as an example?
However, if this isn't the use case, then sorry for the interruption!