~gandelman-a/charms/precise/keystone/fix-grant-role

Viewing all changes in revision 32.

  • Committer: Adam Gandelman
  • Date: 2012-08-08 20:27:36 UTC
  • Revision ID: adamg@canonical.com-20120808202736-fndvnla9uxo8x82r
Make utils.grant_role() more idempotent.

Keystone+keystoneclient have recently changed to now throw errors when
a role is assigned to a user+tenant more than once.  Account for this
by checking user+tenant's role assignments before attempting to assign.

The changes to keystone+keystoneclient happened in folsom, but this operation
is supported in the Essex release as well, so applying to the precise charm
branch to avoid an early delta between precise + quantal branches (which doesn't
exist yet).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: