Skip to content

Commit 4c0f3bf

Browse files
Eric Friedpierreprinettimriedem
committed
common: autogenerate docs
$namespace = openstack.common The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. This incorporates a correction to `openstack versions show`: The command `openstack versions show --help` showed a copy/paste error, using <region-name> for the metavar for both --service and --status. Fix. Change-Id: I7658fed40d71f4c20ee27908ade433534657cfe5 Co-Authored-By: Pierre Prinetti <pierreprinetti@redhat.com> Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>
1 parent c7dbe85 commit 4c0f3bf

9 files changed

Lines changed: 56 additions & 494 deletions

File tree

doc/source/cli/command-objects/availability-zone.rst

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,5 @@ compute and network services.
77

88
Block Storage v2, Compute v2, Network v2
99

10-
availability zone list
11-
----------------------
12-
13-
List availability zones and their status
14-
15-
.. program availability zone list
16-
.. code:: bash
17-
18-
openstack availability zone list
19-
[--compute]
20-
[--network]
21-
[--volume]
22-
[--long]
23-
24-
.. option:: --compute
25-
26-
List compute availability zones
27-
28-
.. option:: --network
29-
30-
List network availability zones
31-
32-
.. option:: --volume
33-
34-
List volume availability zones
35-
36-
.. option:: --long
37-
38-
List additional fields in output
10+
.. autoprogram-cliff:: openstack.common
11+
:command: availability zone list

doc/source/cli/command-objects/configuration.rst

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,5 @@ Available for all services
66

77
.. _configuration-show:
88

9-
configuration show
10-
------------------
11-
12-
Show the current openstack client configuration. This command is a little
13-
different from other show commands because it does not take a resource name
14-
or id to show. The command line options, such as --os-cloud, can be used to
15-
show different configurations.
16-
17-
.. program:: configuration show
18-
.. code:: bash
19-
20-
openstack configuration show
21-
[--mask | --unmask]
22-
23-
.. option:: --mask
24-
25-
Attempt to mask passwords (default)
26-
27-
.. option:: --unmask
28-
29-
Show password in clear text
9+
.. autoprogram-cliff:: openstack.common
10+
:command: configuration show

doc/source/cli/command-objects/extension.rst

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,6 @@ extension
55
Many OpenStack server APIs include API extensions that enable
66
additional functionality.
77

8-
extension list
9-
--------------
108

11-
List API extensions
12-
13-
.. program:: extension list
14-
.. code:: bash
15-
16-
openstack extension list
17-
[--compute]
18-
[--identity]
19-
[--network]
20-
[--volume]
21-
[--long]
22-
23-
.. option:: --compute
24-
25-
List extensions for the Compute API
26-
27-
.. option:: --identity
28-
29-
List extensions for the Identity API
30-
31-
.. option:: --network
32-
33-
List extensions for the Network API
34-
35-
.. option:: --volume
36-
37-
List extensions for the Block Storage API
38-
39-
.. option:: --long
40-
41-
List additional fields in output
42-
43-
extension show
44-
--------------
45-
46-
Show API extension
47-
48-
.. program:: extension show
49-
.. code:: bash
50-
51-
openstack extension show
52-
<extension>
53-
54-
.. _extension_show:
55-
.. describe:: <extension>
56-
57-
Extension to display. Currently, only network extensions are supported.
58-
(Name or Alias)
9+
.. autoprogram-cliff:: openstack.common
10+
:command: extension *

doc/source/cli/command-objects/limits.rst

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,6 @@ The Compute and Block Storage APIs have resource usage limits.
66

77
Compute v2, Block Storage v1
88

9-
limits show
10-
-----------
119

12-
Show compute and block storage limits
13-
14-
.. program:: limits show
15-
.. code:: bash
16-
17-
openstack limits show
18-
--absolute | --rate
19-
[--reserved]
20-
[--project <project>]
21-
[--domain <domain>]
22-
23-
.. option:: --absolute
24-
25-
Show absolute limits
26-
27-
.. option:: --rate
28-
29-
Show rate limits
30-
31-
.. option:: --reserved
32-
33-
Include reservations count [only valid with :option:`--absolute`]
34-
35-
.. option:: --project <project>
36-
37-
Show limits for a specific project (name or ID) [only valid with :option:`--absolute`]
38-
39-
.. option:: --domain <domain>
40-
41-
Domain the project belongs to (name or ID) [only valid with :option:`--absolute`]
10+
.. autoprogram-cliff:: openstack.common
11+
:command: limits *

doc/source/cli/command-objects/project-purge.rst

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,6 @@ Clean resources associated with a specific project.
66

77
Block Storage v1, v2; Compute v2; Image v1, v2
88

9-
project purge
10-
-------------
11-
12-
Clean resources associated with a project
13-
14-
.. program:: project purge
15-
.. code:: bash
16-
17-
openstack project purge
18-
[--dry-run]
19-
[--keep-project]
20-
[--auth-project | --project <project>]
21-
[--project-domain <project-domain>]
22-
23-
.. option:: --dry-run
24-
25-
List a project's resources
26-
27-
.. option:: --keep-project
28-
29-
Clean project resources, but don't delete the project.
30-
31-
.. option:: --auth-project
32-
33-
Delete resources of the project used to authenticate
34-
35-
.. option:: --project <project>
36-
37-
Project to clean (name or ID)
38-
39-
.. option:: --project-domain <project-domain>
409

41-
Domain the project belongs to (name or ID). This can be
42-
used in case collisions between project names exist.
10+
.. autoprogram-cliff:: openstack.common
11+
:command: project purge

0 commit comments

Comments
 (0)