summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwanghong <w.wanghong@huawei.com>2014-12-23 11:08:24 +0800
committerwanghong <w.wanghong@huawei.com>2014-12-24 11:55:27 +0800
commitd240b709b9f2638382daa8b18227b9baf021596d (patch)
treefad94b4a1883aef56177ce88ba581cae41c6f84b
parenta24d6e7c6f06ccaecefa0a2c6cd2c105f3cd8be5 (diff)
downloadpython-openstackclient-d240b709b9f2638382daa8b18227b9baf021596d.tar.gz
add doc for domain command
Change-Id: I8b5575a5f27362fa375746b955e1f17a5a8b29a6
-rw-r--r--doc/source/command-objects/domain.rst115
-rw-r--r--openstackclient/identity/v3/domain.py24
2 files changed, 127 insertions, 12 deletions
diff --git a/doc/source/command-objects/domain.rst b/doc/source/command-objects/domain.rst
new file mode 100644
index 00000000..057296ac
--- /dev/null
+++ b/doc/source/command-objects/domain.rst
@@ -0,0 +1,115 @@
+======
+domain
+======
+
+Identity v3
+
+domain create
+-------------
+
+Create new domain
+
+.. program:: domain create
+.. code:: bash
+
+ os domain create
+ [--description <description>]
+ [--enable | --disable]
+ [--or-show]
+ <domain-name>
+
+.. option:: --description <description>
+
+ New domain description
+
+.. option:: --enable
+
+ Enable domain (default)
+
+.. option:: --disable
+
+ Disable domain
+
+.. option:: --or-show
+
+ Return existing domain
+
+ If the domain already exists, return the existing domain data and do not fail.
+
+.. option:: <domain-name>
+
+ New domain name
+
+domain delete
+-------------
+
+Delete domain
+
+.. program:: domain delete
+.. code:: bash
+
+ os domain delete
+ <domain>
+
+.. option:: <domain>
+
+ Domain to delete (name or ID)
+
+domain list
+-----------
+
+List domains
+
+.. program:: domain list
+.. code:: bash
+
+ os domain list
+
+domain set
+----------
+
+Set domain properties
+
+.. program:: domain set
+.. code:: bash
+
+ os domain set
+ [--name <name>]
+ [--description <description>]
+ [--enable | --disable]
+ <domain>
+
+.. option:: --name <name>
+
+ New domain name
+
+.. option:: --description <description>
+
+ New domain description
+
+.. option:: --enable
+
+ Enable domain
+
+.. option:: --disable
+
+ Disable domain
+
+.. option:: <domain>
+
+ Domain to modify (name or ID)
+
+domain show
+-----------
+
+Show domain details
+
+.. program:: domain show
+.. code:: bash
+
+ os domain show
+ <domain>
+
+.. option:: <domain>
+
+ Domain to display (name or ID)
diff --git a/openstackclient/identity/v3/domain.py b/openstackclient/identity/v3/domain.py
index 9e50fe54..727f5b18 100644
--- a/openstackclient/identity/v3/domain.py
+++ b/openstackclient/identity/v3/domain.py
@@ -29,7 +29,7 @@ from openstackclient.i18n import _ # noqa
class CreateDomain(show.ShowOne):
- """Create domain command"""
+ """Create new domain"""
log = logging.getLogger(__name__ + '.CreateDomain')
@@ -42,7 +42,7 @@ class CreateDomain(show.ShowOne):
)
parser.add_argument(
'--description',
- metavar='<domain-description>',
+ metavar='<description>',
help='New domain description',
)
enable_group = parser.add_mutually_exclusive_group()
@@ -87,7 +87,7 @@ class CreateDomain(show.ShowOne):
class DeleteDomain(command.Command):
- """Delete domain command"""
+ """Delete domain"""
log = logging.getLogger(__name__ + '.DeleteDomain')
@@ -96,7 +96,7 @@ class DeleteDomain(command.Command):
parser.add_argument(
'domain',
metavar='<domain>',
- help='Name or ID of domain to delete',
+ help='Domain to delete (name or ID)',
)
return parser
@@ -110,7 +110,7 @@ class DeleteDomain(command.Command):
class ListDomain(lister.Lister):
- """List domain command"""
+ """List domains"""
log = logging.getLogger(__name__ + '.ListDomain')
@@ -126,7 +126,7 @@ class ListDomain(lister.Lister):
class SetDomain(command.Command):
- """Set domain command"""
+ """Set domain properties"""
log = logging.getLogger(__name__ + '.SetDomain')
@@ -135,16 +135,16 @@ class SetDomain(command.Command):
parser.add_argument(
'domain',
metavar='<domain>',
- help='Name or ID of domain to change',
+ help='Domain to modify (name or ID)',
)
parser.add_argument(
'--name',
- metavar='<new-domain-name>',
+ metavar='<name>',
help='New domain name',
)
parser.add_argument(
'--description',
- metavar='<domain-description>',
+ metavar='<description>',
help='New domain description',
)
enable_group = parser.add_mutually_exclusive_group()
@@ -152,7 +152,7 @@ class SetDomain(command.Command):
'--enable',
dest='enabled',
action='store_true',
- help='Enable domain (default)',
+ help='Enable domain',
)
enable_group.add_argument(
'--disable',
@@ -185,7 +185,7 @@ class SetDomain(command.Command):
class ShowDomain(show.ShowOne):
- """Show domain command"""
+ """Show domain details"""
log = logging.getLogger(__name__ + '.ShowDomain')
@@ -194,7 +194,7 @@ class ShowDomain(show.ShowOne):
parser.add_argument(
'domain',
metavar='<domain>',
- help='Name or ID of domain to display',
+ help='Domain to display (name or ID)',
)
return parser