Add role assignment
This commit is contained in:
parent
df8f079bc7
commit
f149153c53
1 changed files with 11 additions and 2 deletions
|
|
@ -73,8 +73,17 @@ def create_user(args):
|
|||
print(f"User created - id: {args.user_id}")
|
||||
|
||||
def assign_member_role(args):
|
||||
cmd = f"openstack role add --user {args.username} --project {args.project_id} member"
|
||||
print(cmd)
|
||||
|
||||
cmd = f"role add --user {args.username} --project {args.project_id} member"
|
||||
|
||||
result = openstack_cmd(cmd)
|
||||
|
||||
|
||||
cmd = f"role assignment list --user {args.user_id} --role member -f json"
|
||||
result = json.loads(openstack_cmd(cmd))
|
||||
|
||||
if result:
|
||||
print("User has member role")
|
||||
|
||||
def create_public_network(args):
|
||||
print("creating public network - NYI")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue