Merge lp:~yolanda.robla/charms/precise/keystone/ha-support into lp:~openstack-charmers/charms/precise/keystone/ha-support

Proposed by Yolanda Robla
Status: Merged
Approved by: Adam Gandelman
Approved revision: 70
Merged at revision: 64
Proposed branch: lp:~yolanda.robla/charms/precise/keystone/ha-support
Merge into: lp:~openstack-charmers/charms/precise/keystone/ha-support
Diff against target: 43 lines (+11/-10)
2 files modified
hooks/keystone_hooks.py (+10/-9)
revision (+1/-1)
To merge this branch: bzr merge lp:~yolanda.robla/charms/precise/keystone/ha-support
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+157834@code.launchpad.net

Description of the change

Associating user with role, when requested_roles setting is specified

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/keystone_hooks.py'
--- hooks/keystone_hooks.py 2013-04-04 23:39:30 +0000
+++ hooks/keystone_hooks.py 2013-04-09 10:00:33 +0000
@@ -211,15 +211,6 @@
211 settings = utils.relation_get_dict(relation_id=relation_id,211 settings = utils.relation_get_dict(relation_id=relation_id,
212 remote_unit=remote_unit)212 remote_unit=remote_unit)
213213
214 # Allow the remote service to request creation of any additional roles.
215 # Currently used by Swift.
216 if 'requested_roles' in settings and settings['requested_roles'] != 'None':
217 roles = settings['requested_roles'].split(',')
218 utils.juju_log('INFO',
219 "Creating requested roles: %s" % roles)
220 for role in roles:
221 create_role(role, user=config['admin-user'], tenant='admin')
222
223 # the minimum settings needed per endpoint214 # the minimum settings needed per endpoint
224 single = set(['service', 'region', 'public_url', 'admin_url',215 single = set(['service', 'region', 'public_url', 'admin_url',
225 'internal_url'])216 'internal_url'])
@@ -315,6 +306,16 @@
315 grant_role(service_username, config['admin-role'],306 grant_role(service_username, config['admin-role'],
316 config['service-tenant'])307 config['service-tenant'])
317308
309 # Allow the remote service to request creation of any additional roles.
310 # Currently used by Swift and Ceilometer.
311 if 'requested_roles' in settings and settings['requested_roles'] != 'None':
312 roles = settings['requested_roles'].split(',')
313 utils.juju_log('INFO',
314 "Creating requested roles: %s" % roles)
315 for role in roles:
316 create_role(role, service_username, config['service-tenant'])
317 grant_role(service_username, role, config['service-tenant'])
318
318 # As of https://review.openstack.org/#change,4675, all nodes hosting319 # As of https://review.openstack.org/#change,4675, all nodes hosting
319 # an endpoint(s) needs a service username and password assigned to320 # an endpoint(s) needs a service username and password assigned to
320 # the service tenant and granted admin role.321 # the service tenant and granted admin role.
321322
=== modified file 'revision'
--- revision 2013-04-04 23:39:30 +0000
+++ revision 2013-04-09 10:00:33 +0000
@@ -1,1 +1,1 @@
12131217

Subscribers

People subscribed via source and target branches