[openstack-dev] [Keystone] Listing Domain roles (or retrieving them by name)

Johannes Grassler jgrassler at suse.de
Tue Sep 20 08:34:44 UTC 2016


Hello,

On 09/20/2016 10:15 AM, Johannes Grassler wrote:
> is there a canonical way to either
>
> * list roles in a given domain
> * or retrieve a role from a given domain by name (preferred)

Looks like there is a way:

   osc_lib.utils.find_resource(admin_client.roles, role_name,  domain_id=domain_id)

returns a role object for the role I'm looking for.

(admin_client is the Keystone client's RoleManager, role_name contains the role's name).

Cheers,

Johannes

-- 
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



More information about the OpenStack-dev mailing list