[identity] many keystone cli calls

Bug #1479517 reported by Mark Vanderwiel on 2015-07-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Mark Vanderwiel

Bug Description

Using the identity cookbook register provider to create users, grant roles, I noticed it used UUID for all the keystone parameters. This requires a separate call to the keystone api to query the UUID. The keystone client (and the new openstack client) also accept the user and tenant name instead of the UUID, and it will do the query within the api library. See: https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v2_0/shell.py#L93 and
https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v2_0/shell.py#L329 and

By switching the logic to simply use the user and tenant name instead of looking up the UUID, it will save 1 cli call for create_user and 2 cli calls for grant_role without any change in current functionality. This savings will add up quickly for normal use cases, a reduction of at least 12+ cli calls for better overall conver performance.

Changed in openstack-chef:
milestone: none → kilo-rc1

Fix proposed to branch: master
Review: https://review.openstack.org/207213

Changed in openstack-chef:
status: New → In Progress

Reviewed: https://review.openstack.org/207213
Committed: https://git.openstack.org/cgit/openstack/cookbook-openstack-identity/commit/?id=0e19301c5d8743b6b36a2bcd9b37791140607f85
Submitter: Jenkins
Branch: master

commit 0e19301c5d8743b6b36a2bcd9b37791140607f85
Author: Mark Vanderwiel <email address hidden>
Date: Wed Jul 29 15:45:29 2015 -0500

    Remove unecessary calls to keystone cli

    I noticed that the create_user and grant_role actions did some
    unneeded keystone CLI calls to get UUIDs for use as parameters on
    subsequent CLI calls. Instead we can just use the user or tenant
    name directly and reduce the number of calls made and speed up the
    converge a bit.

    No change in functionality.

    Change-Id: I93deb01d183d9d50098445676c5b49b0b6ae4fea
    Closes-Bug: 1479517

Changed in openstack-chef:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers