summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-01-03 03:24:11 +0000
committerGerrit Code Review <review@openstack.org>2015-01-03 03:24:11 +0000
commitcbb26724fccdbbb76913a8f2994768dea3046480 (patch)
tree40a00e64f46d0be0b51459ff3b5ebc18befd66ff
parent6698f14fdb5438d3ca99e9a4f97ddfaf39c3cc9c (diff)
parent3807354cfecd887094fe55ba7944161d75e38d21 (diff)
downloadpython-openstackclient-cbb26724fccdbbb76913a8f2994768dea3046480.tar.gz
Merge "Command docs: group"
-rw-r--r--doc/source/command-objects/group.rst46
-rw-r--r--doc/source/commands.rst2
-rw-r--r--openstackclient/identity/v3/group.py39
3 files changed, 45 insertions, 42 deletions
diff --git a/doc/source/command-objects/group.rst b/doc/source/command-objects/group.rst
index 85a0c5cd..3e7e806f 100644
--- a/doc/source/command-objects/group.rst
+++ b/doc/source/command-objects/group.rst
@@ -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)
diff --git a/doc/source/commands.rst b/doc/source/commands.rst
index e7b32ace..4b2e6355 100644
--- a/doc/source/commands.rst
+++ b/doc/source/commands.rst
@@ -84,7 +84,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
diff --git a/openstackclient/identity/v3/group.py b/openstackclient/identity/v3/group.py
index fbd8dd72..94e101f3 100644
--- a/openstackclient/identity/v3/group.py
+++ b/openstackclient/identity/v3/group.py
@@ -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