diff options
Diffstat (limited to 'openstackclient/identity')
| -rw-r--r-- | openstackclient/identity/v3/role.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/openstackclient/identity/v3/role.py b/openstackclient/identity/v3/role.py index 58a76f8a..09e914b5 100644 --- a/openstackclient/identity/v3/role.py +++ b/openstackclient/identity/v3/role.py @@ -178,6 +178,11 @@ class CreateRole(command.ShowOne): help=_('New role name'), ) parser.add_argument( + '--description', + metavar='<description>', + help=_('Add description about the role'), + ) + parser.add_argument( '--domain', metavar='<domain>', help=_('Domain the role belongs to (name or ID)'), @@ -199,7 +204,8 @@ class CreateRole(command.ShowOne): try: role = identity_client.roles.create( - name=parsed_args.name, domain=domain_id) + name=parsed_args.name, domain=domain_id, + description=parsed_args.description) except ks_exc.Conflict: if parsed_args.or_show: @@ -450,6 +456,11 @@ class SetRole(command.Command): help=_('Role to modify (name or ID)'), ) parser.add_argument( + '--description', + metavar='<description>', + help=_('Add description about the role'), + ) + parser.add_argument( '--domain', metavar='<domain>', help=_('Domain the role belongs to (name or ID)'), @@ -473,7 +484,8 @@ class SetRole(command.Command): parsed_args.role, domain_id=domain_id) - identity_client.roles.update(role.id, name=parsed_args.name) + identity_client.roles.update(role.id, name=parsed_args.name, + description=parsed_args.description) class ShowRole(command.ShowOne): |
