On 13 October 2016 at 23:19, Johannes Grassler <jgrass...@suse.de> wrote:
> I've got an existing keystoneclient.client.v3.Client object with an
> authenticated session. Now I'd like to get the identity URL this
> object uses for requesting things from Keystone. I want to use that
> URL in a trust's endpoint list in order to allow the user the client
> is authenticated as to talk to Keystone on the trustor's behalf.
> The client is authenticated as a service user and issues a GET to
> GET http://192.168.123.20/identity_admin/v3/OS-TRUST/trusts
> when the following code snippet is executed:
> (`client` is my keystoneclient.client.v3.Client instance).
> Initially I thought I could use the auth_url from the client's
> session object, i.e.
> but that turned out to be a dead end because it's the internal
> This will be useless for a trust's endpoint URL list if the
> trustee (my service user) ends up using
> to talk to Keystone. I could look up the admin URL from the catalog
> like this...
> ...but that feels rather dirty since it independently looks up the
> admin endpoint rather than plucking the identity endpoint from the
> keystone client instance. Is there a cleaner way to get that
> information directly from the keystoneclient.client.v3.Client
So this is one of those times where keystoneclient is really jno different
from the other clients and is just using the session you gave it to do the
>From the session you can do:
to get the URL from the catalog.
> Johannes Grassler, Cloud Developer
> SUSE Linux GmbH, HRB 21284 (AG Nürnberg)
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
OpenStack Development Mailing List (not for usage questions)