add doc for role assignment command
Change-Id: I594d444b6d1ec4e72bed03394178293737f26069
This commit is contained in:
parent
a24d6e7c6f
commit
e3ba13b320
45
doc/source/command-objects/role_assignment.rst
Normal file
45
doc/source/command-objects/role_assignment.rst
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
===============
|
||||||
|
role assignment
|
||||||
|
===============
|
||||||
|
|
||||||
|
Identity v3
|
||||||
|
|
||||||
|
role assignment list
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
List role assignments
|
||||||
|
|
||||||
|
.. program:: role assignment list
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
os role assignment list
|
||||||
|
[--role <role>]
|
||||||
|
[--user <user>]
|
||||||
|
[--group <group>]
|
||||||
|
[--domain <domain>]
|
||||||
|
[--project <project>]
|
||||||
|
[--effective]
|
||||||
|
|
||||||
|
.. option:: --role <role>
|
||||||
|
|
||||||
|
Role to filter (name or ID)
|
||||||
|
|
||||||
|
.. option:: --user <user>
|
||||||
|
|
||||||
|
User to filter (name or ID)
|
||||||
|
|
||||||
|
.. option:: --group <group>
|
||||||
|
|
||||||
|
Group to filter (name or ID)
|
||||||
|
|
||||||
|
.. option:: --domain <domain>
|
||||||
|
|
||||||
|
Domain to filter (name or ID)
|
||||||
|
|
||||||
|
.. option:: --project <project>
|
||||||
|
|
||||||
|
Project to filter (name or ID)
|
||||||
|
|
||||||
|
.. option:: --effective
|
||||||
|
|
||||||
|
Returns only effective role assignments (defaults to False)
|
@ -21,7 +21,7 @@ from openstackclient.common import utils
|
|||||||
|
|
||||||
|
|
||||||
class ListRoleAssignment(lister.Lister):
|
class ListRoleAssignment(lister.Lister):
|
||||||
"""Lists role assignments according to the given filters"""
|
"""List role assignments"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + '.ListRoleAssignment')
|
log = logging.getLogger(__name__ + '.ListRoleAssignment')
|
||||||
|
|
||||||
@ -36,29 +36,29 @@ class ListRoleAssignment(lister.Lister):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--role',
|
'--role',
|
||||||
metavar='<role>',
|
metavar='<role>',
|
||||||
help='Name or ID of role to filter',
|
help='Role to filter (name or ID)',
|
||||||
)
|
)
|
||||||
user_or_group = parser.add_mutually_exclusive_group()
|
user_or_group = parser.add_mutually_exclusive_group()
|
||||||
user_or_group.add_argument(
|
user_or_group.add_argument(
|
||||||
'--user',
|
'--user',
|
||||||
metavar='<user>',
|
metavar='<user>',
|
||||||
help='Name or ID of user to filter',
|
help='User to filter (name or ID)',
|
||||||
)
|
)
|
||||||
user_or_group.add_argument(
|
user_or_group.add_argument(
|
||||||
'--group',
|
'--group',
|
||||||
metavar='<group>',
|
metavar='<group>',
|
||||||
help='Name or ID of group to filter',
|
help='Group to filter (name or ID)',
|
||||||
)
|
)
|
||||||
domain_or_project = parser.add_mutually_exclusive_group()
|
domain_or_project = parser.add_mutually_exclusive_group()
|
||||||
domain_or_project.add_argument(
|
domain_or_project.add_argument(
|
||||||
'--domain',
|
'--domain',
|
||||||
metavar='<domain>',
|
metavar='<domain>',
|
||||||
help='Name or ID of domain to filter',
|
help='Domain to filter (name or ID)',
|
||||||
)
|
)
|
||||||
domain_or_project.add_argument(
|
domain_or_project.add_argument(
|
||||||
'--project',
|
'--project',
|
||||||
metavar='<project>',
|
metavar='<project>',
|
||||||
help='Name or ID of project to filter',
|
help='Project to filter (name or ID)',
|
||||||
)
|
)
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
Loading…
Reference in New Issue
Block a user