Skip to content

Commit be8cac9

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "add doc for domain command"
2 parents 3cb8b0c + d240b70 commit be8cac9

2 files changed

Lines changed: 127 additions & 12 deletions

File tree

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
======
2+
domain
3+
======
4+
5+
Identity v3
6+
7+
domain create
8+
-------------
9+
10+
Create new domain
11+
12+
.. program:: domain create
13+
.. code:: bash
14+
15+
os domain create
16+
[--description <description>]
17+
[--enable | --disable]
18+
[--or-show]
19+
<domain-name>
20+
21+
.. option:: --description <description>
22+
23+
New domain description
24+
25+
.. option:: --enable
26+
27+
Enable domain (default)
28+
29+
.. option:: --disable
30+
31+
Disable domain
32+
33+
.. option:: --or-show
34+
35+
Return existing domain
36+
37+
If the domain already exists, return the existing domain data and do not fail.
38+
39+
.. option:: <domain-name>
40+
41+
New domain name
42+
43+
domain delete
44+
-------------
45+
46+
Delete domain
47+
48+
.. program:: domain delete
49+
.. code:: bash
50+
51+
os domain delete
52+
<domain>
53+
54+
.. option:: <domain>
55+
56+
Domain to delete (name or ID)
57+
58+
domain list
59+
-----------
60+
61+
List domains
62+
63+
.. program:: domain list
64+
.. code:: bash
65+
66+
os domain list
67+
68+
domain set
69+
----------
70+
71+
Set domain properties
72+
73+
.. program:: domain set
74+
.. code:: bash
75+
76+
os domain set
77+
[--name <name>]
78+
[--description <description>]
79+
[--enable | --disable]
80+
<domain>
81+
82+
.. option:: --name <name>
83+
84+
New domain name
85+
86+
.. option:: --description <description>
87+
88+
New domain description
89+
90+
.. option:: --enable
91+
92+
Enable domain
93+
94+
.. option:: --disable
95+
96+
Disable domain
97+
98+
.. option:: <domain>
99+
100+
Domain to modify (name or ID)
101+
102+
domain show
103+
-----------
104+
105+
Show domain details
106+
107+
.. program:: domain show
108+
.. code:: bash
109+
110+
os domain show
111+
<domain>
112+
113+
.. option:: <domain>
114+
115+
Domain to display (name or ID)

‎openstackclient/identity/v3/domain.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
class CreateDomain(show.ShowOne):
32-
"""Create domain command"""
32+
"""Create new domain"""
3333

3434
log = logging.getLogger(__name__ + '.CreateDomain')
3535

@@ -42,7 +42,7 @@ def get_parser(self, prog_name):
4242
)
4343
parser.add_argument(
4444
'--description',
45-
metavar='<domain-description>',
45+
metavar='<description>',
4646
help='New domain description',
4747
)
4848
enable_group = parser.add_mutually_exclusive_group()
@@ -87,7 +87,7 @@ def take_action(self, parsed_args):
8787

8888

8989
class DeleteDomain(command.Command):
90-
"""Delete domain command"""
90+
"""Delete domain"""
9191

9292
log = logging.getLogger(__name__ + '.DeleteDomain')
9393

@@ -96,7 +96,7 @@ def get_parser(self, prog_name):
9696
parser.add_argument(
9797
'domain',
9898
metavar='<domain>',
99-
help='Name or ID of domain to delete',
99+
help='Domain to delete (name or ID)',
100100
)
101101
return parser
102102

@@ -110,7 +110,7 @@ def take_action(self, parsed_args):
110110

111111

112112
class ListDomain(lister.Lister):
113-
"""List domain command"""
113+
"""List domains"""
114114

115115
log = logging.getLogger(__name__ + '.ListDomain')
116116

@@ -126,7 +126,7 @@ def take_action(self, parsed_args):
126126

127127

128128
class SetDomain(command.Command):
129-
"""Set domain command"""
129+
"""Set domain properties"""
130130

131131
log = logging.getLogger(__name__ + '.SetDomain')
132132

@@ -135,24 +135,24 @@ def get_parser(self, prog_name):
135135
parser.add_argument(
136136
'domain',
137137
metavar='<domain>',
138-
help='Name or ID of domain to change',
138+
help='Domain to modify (name or ID)',
139139
)
140140
parser.add_argument(
141141
'--name',
142-
metavar='<new-domain-name>',
142+
metavar='<name>',
143143
help='New domain name',
144144
)
145145
parser.add_argument(
146146
'--description',
147-
metavar='<domain-description>',
147+
metavar='<description>',
148148
help='New domain description',
149149
)
150150
enable_group = parser.add_mutually_exclusive_group()
151151
enable_group.add_argument(
152152
'--enable',
153153
dest='enabled',
154154
action='store_true',
155-
help='Enable domain (default)',
155+
help='Enable domain',
156156
)
157157
enable_group.add_argument(
158158
'--disable',
@@ -185,7 +185,7 @@ def take_action(self, parsed_args):
185185

186186

187187
class ShowDomain(show.ShowOne):
188-
"""Show domain command"""
188+
"""Show domain details"""
189189

190190
log = logging.getLogger(__name__ + '.ShowDomain')
191191

@@ -194,7 +194,7 @@ def get_parser(self, prog_name):
194194
parser.add_argument(
195195
'domain',
196196
metavar='<domain>',
197-
help='Name or ID of domain to display',
197+
help='Domain to display (name or ID)',
198198
)
199199
return parser
200200

0 commit comments

Comments
 (0)