Merge pull request #7396 from jahkeup/keystone-connectionargs

Fix missing connection_args for user_present's role logic.
This commit is contained in:
Thomas S Hatch 2013-09-21 09:21:30 -07:00
commit 824b8d1bde

View File

@ -156,13 +156,15 @@ def user_present(name,
ret['changes']['Password'] = 'Updated'
if roles:
for tenant_role in roles[0].keys():
args = {'user_name': name, 'tenant_name': tenant_role}
args = dict({'user_name': name, 'tenant_name':
tenant_role, 'profile': profile}, **connection_args)
tenant_roles = __salt__['keystone.user_role_list'](**args)
for role in roles[0][tenant_role]:
if role not in tenant_roles:
addargs = {'user': name,
'role': role,
'tenant': tenant_role}
addargs = dict({'user': name, 'role': role,
'tenant': tenant_role,
'profile': profile},
**connection_args)
newrole = __salt__['keystone.user_role_add'](**addargs)
if 'roles' in ret['changes']:
ret['changes']['roles'].append(newrole)