Command docs: group

Fix up formatting for group command docs and help

Change-Id: Icda79842d52da90d5eac2b0fdbc0d576d371378d
This commit is contained in:
Dean Troyer 2014-12-31 09:56:20 -06:00
parent 8132072630
commit 3807354cfe
3 changed files with 45 additions and 42 deletions

View File

@ -16,18 +16,18 @@ Add user to group
<group>
<user>
.. option:: <group>
.. describe:: <group>
Group that user will be added to (name or ID)
Group to contain <user> (name or ID)
.. option:: <user>
.. describe:: <user>
User to add to group (name or ID)
User to add to <group> (name or ID)
group contains user
-------------------
Check user in group
Check user membership in group
.. program:: group contains user
.. code:: bash
@ -36,11 +36,11 @@ Check user in group
<group>
<user>
.. option:: <group>
.. describe:: <group>
Group to check if user belongs to (name or ID)
Group to check (name or ID)
.. option:: <user>
.. describe:: <user>
User to check (name or ID)
@ -60,7 +60,7 @@ Create new group
.. option:: --domain <domain>
References the domain ID or name which owns the group
Domain to contain new group (name or ID)
.. option:: --description <description>
@ -72,7 +72,7 @@ Create new group
If the group already exists, return the existing group data and do not fail.
.. option:: <group-name>
.. describe:: <group-name>
New group name
@ -90,9 +90,9 @@ Delete group
.. option:: --domain <domain>
Domain where group resides (name or ID)
Domain containing group(s) (name or ID)
.. option:: <group>
.. describe:: <group>
Group(s) to delete (name or ID)
@ -115,11 +115,11 @@ List groups
.. option:: --user <user>
List group memberships for <user> (name or ID)
Filter group list by <user> (name or ID)
.. option:: --long
List additional fields in output (defaults to false)
List additional fields in output
group remove user
-----------------
@ -133,13 +133,13 @@ Remove user from group
<group>
<user>
.. option:: <group>
.. describe:: <group>
Group that user will be removed from (name or ID)
Group containing <user> (name or ID)
.. option:: <user>
.. describe:: <user>
User to remove from group (name or ID)
User to remove from <group> (name or ID)
group set
---------
@ -161,20 +161,20 @@ Set group properties
.. option:: --domain <domain>
New domain that will now own the group (name or ID)
New domain to contain <group> (name or ID)
.. option:: --description <description>
New group description
.. option:: <group>
.. describe:: <group>
Group to modify (name or ID)
group show
----------
Show group details
Display group details
.. program:: group show
.. code:: bash
@ -185,8 +185,8 @@ Show group details
.. option:: --domain <domain>
Domain where group resides (name or ID)
Domain containing <group> (name or ID)
.. option:: <group>
.. describe:: <group>
Group to display (name or ID)

View File

@ -83,7 +83,7 @@ referring to both Compute and Volume quotas.
* ``endpoint``: (**Identity**) the base URL used to contact a specific service
* ``extension``: (**Compute**, **Identity**, **Volume**) OpenStack server API extensions
* ``flavor``: (**Compute**) pre-defined server configurations: ram, root disk, etc
* ``group``: Identity - a grouping of users
* ``group``: (**Identity**) a grouping of users
* ``host``: Compute - the physical computer running a hypervisor
* ``hypervisor``: Compute - the virtual machine manager
* ``identity provider``: Identity - a source of users and authentication

View File

@ -39,12 +39,12 @@ class AddUserToGroup(command.Command):
parser.add_argument(
'group',
metavar='<group>',
help='Group that user will be added to (name or ID)',
help='Group to contain <user> (name or ID)',
)
parser.add_argument(
'user',
metavar='<user>',
help='User to add to group (name or ID)',
help='User to add to <group> (name or ID)',
)
return parser
@ -68,7 +68,7 @@ class AddUserToGroup(command.Command):
class CheckUserInGroup(command.Command):
"""Check user in group"""
"""Check user membership in group"""
log = logging.getLogger(__name__ + '.CheckUserInGroup')
@ -77,7 +77,7 @@ class CheckUserInGroup(command.Command):
parser.add_argument(
'group',
metavar='<group>',
help='Group to check if user belongs to (name or ID)',
help='Group to check (name or ID)',
)
parser.add_argument(
'user',
@ -115,15 +115,18 @@ class CreateGroup(show.ShowOne):
parser.add_argument(
'name',
metavar='<group-name>',
help='New group name')
parser.add_argument(
'--description',
metavar='<description>',
help='New group description')
help='New group name',
)
parser.add_argument(
'--domain',
metavar='<domain>',
help='References the domain ID or name which owns the group')
help='Domain to contain new group (name or ID)',
)
parser.add_argument(
'--description',
metavar='<description>',
help='New group description',
)
parser.add_argument(
'--or-show',
action='store_true',
@ -173,7 +176,7 @@ class DeleteGroup(command.Command):
parser.add_argument(
'--domain',
metavar='<domain>',
help='Domain where group resides (name or ID)',
help='Domain containing group(s) (name or ID)',
)
return parser
@ -211,7 +214,7 @@ class ListGroup(lister.Lister):
parser.add_argument(
'--user',
metavar='<user>',
help='List group memberships for <user> (name or ID)',
help='Filter group list by <user> (name or ID)',
)
parser.add_argument(
'--long',
@ -259,7 +262,7 @@ class ListGroup(lister.Lister):
class RemoveUserFromGroup(command.Command):
"""Remove user to group"""
"""Remove user from group"""
log = logging.getLogger(__name__ + '.RemoveUserFromGroup')
@ -268,12 +271,12 @@ class RemoveUserFromGroup(command.Command):
parser.add_argument(
'group',
metavar='<group>',
help='Group that user will be removed from (name or ID)',
help='Group containing <user> (name or ID)',
)
parser.add_argument(
'user',
metavar='<user>',
help='User to remove from group (name or ID)',
help='User to remove from <group> (name or ID)',
)
return parser
@ -314,7 +317,7 @@ class SetGroup(command.Command):
parser.add_argument(
'--domain',
metavar='<domain>',
help='New domain that will now own the group (name or ID)')
help='New domain to contain <group> (name or ID)')
parser.add_argument(
'--description',
metavar='<description>',
@ -341,7 +344,7 @@ class SetGroup(command.Command):
class ShowGroup(show.ShowOne):
"""Show group details"""
"""Display group details"""
log = logging.getLogger(__name__ + '.ShowGroup')
@ -355,7 +358,7 @@ class ShowGroup(show.ShowOne):
parser.add_argument(
'--domain',
metavar='<domain>',
help='Domain where group resides (name or ID)',
help='Domain containing <group> (name or ID)',
)
return parser