mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #7396 from jahkeup/keystone-connectionargs
Fix missing connection_args for user_present's role logic.
This commit is contained in:
commit
824b8d1bde
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user