Skip to content

Commit c6266b5

Browse files
author
Eric Fried
committed
compute: autogenerate docs
$namespace = openstack.compute.v2 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. Many of these were already being generated. Some were missing a few sub-subcommands, so those are added. Change-Id: I1aa4b2655bafd2f6a5d83b658742f65d180eb128
1 parent da56b8f commit c6266b5

13 files changed

Lines changed: 29 additions & 875 deletions

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

Lines changed: 2 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -7,180 +7,5 @@ criteria.
77

88
Compute v2
99

10-
aggregate add host
11-
------------------
12-
13-
Add host to aggregate
14-
15-
.. program:: aggregate add host
16-
.. code:: bash
17-
18-
openstack aggregate add host
19-
<aggregate>
20-
<host>
21-
22-
.. _aggregate_add_host-aggregate:
23-
.. describe:: <aggregate>
24-
25-
Aggregate (name or ID)
26-
27-
.. _aggregate_add_host-host:
28-
.. describe:: <host>
29-
30-
Host to add to :ref:`\<aggregate\> <aggregate_add_host-aggregate>`
31-
32-
aggregate create
33-
----------------
34-
35-
Create a new aggregate
36-
37-
.. program:: aggregate create
38-
.. code:: bash
39-
40-
openstack aggregate create
41-
[--zone <availability-zone>]
42-
[--property <key=value> [...] ]
43-
<name>
44-
45-
.. option:: --zone <availability-zone>
46-
47-
Availability zone name
48-
49-
.. option:: --property <key=value>
50-
51-
Property to add to this aggregate (repeat option to set multiple properties)
52-
53-
.. _aggregate_create-name:
54-
.. describe:: <name>
55-
56-
New aggregate name
57-
58-
aggregate delete
59-
----------------
60-
61-
Delete existing aggregate(s)
62-
63-
.. program:: aggregate delete
64-
.. code:: bash
65-
66-
openstack aggregate delete
67-
<aggregate> [<aggregate> ...]
68-
69-
.. _aggregate_delete-aggregate:
70-
.. describe:: <aggregate>
71-
72-
Aggregate(s) to delete (name or ID)
73-
74-
aggregate list
75-
--------------
76-
77-
List all aggregates
78-
79-
.. program:: aggregate list
80-
.. code:: bash
81-
82-
openstack aggregate list
83-
[--long]
84-
85-
.. option:: --long
86-
87-
List additional fields in output
88-
89-
aggregate remove host
90-
---------------------
91-
92-
Remove host from aggregate
93-
94-
.. program:: aggregate remove host
95-
.. code:: bash
96-
97-
openstack aggregate remove host
98-
<aggregate>
99-
<host>
100-
101-
.. _aggregate_remove_host-aggregate:
102-
.. describe:: <aggregate>
103-
104-
Aggregate (name or ID)
105-
106-
.. _aggregate_remove_host-host:
107-
.. describe:: <host>
108-
109-
Host to remove from :ref:`\<aggregate\> <aggregate_remove_host-aggregate>`
110-
111-
aggregate set
112-
-------------
113-
114-
Set aggregate properties
115-
116-
.. program:: aggregate set
117-
.. code:: bash
118-
119-
openstack aggregate set
120-
[--name <new-name>]
121-
[--zone <availability-zone>]
122-
[--property <key=value> [...] ]
123-
[--no-property]
124-
<aggregate>
125-
126-
.. option:: --name <name>
127-
128-
Set aggregate name
129-
130-
.. option:: --zone <availability-zone>
131-
132-
Set availability zone name
133-
134-
.. option:: --property <key=value>
135-
136-
Property to set on :ref:`\<aggregate\> <aggregate_set-aggregate>`
137-
(repeat option to set multiple properties)
138-
139-
.. option:: --no-property
140-
141-
Remove all properties from :ref:`\<aggregate\> <aggregate_set-aggregate>`
142-
(specify both :option:`--property` and :option:`--no-property` to
143-
overwrite the current properties)
144-
145-
.. _aggregate_set-aggregate:
146-
.. describe:: <aggregate>
147-
148-
Aggregate to modify (name or ID)
149-
150-
aggregate show
151-
--------------
152-
153-
Display aggregate details
154-
155-
.. program:: aggregate show
156-
.. code:: bash
157-
158-
openstack aggregate show
159-
<aggregate>
160-
161-
.. _aggregate_show-aggregate:
162-
.. describe:: <aggregate>
163-
164-
Aggregate to display (name or ID)
165-
166-
aggregate unset
167-
---------------
168-
169-
Unset aggregate properties
170-
171-
.. program:: aggregate unset
172-
.. code-block:: bash
173-
174-
openstack aggregate unset
175-
[--property <key> [...] ]
176-
<aggregate>
177-
178-
.. option:: --property <key>
179-
180-
Property to remove from :ref:`\<aggregate\> <aggregate_unset-aggregate>`
181-
(repeat option to remove multiple properties)
182-
183-
.. _aggregate_unset-aggregate:
184-
.. describe:: <aggregate>
185-
186-
Aggregate to modify (name or ID)
10+
.. autoprogram-cliff:: openstack.compute.v2
11+
:command: aggregate *

doc/source/cli/command-objects/compute-agent.rst

Lines changed: 2 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -4,99 +4,5 @@ compute agent
44

55
Compute v2
66

7-
compute agent create
8-
--------------------
9-
10-
Create compute agent
11-
12-
.. program:: compute agent create
13-
.. code:: bash
14-
15-
openstack compute agent create
16-
<os> <architecture> <version> <url> <md5hash>
17-
<hypervisor>
18-
19-
.. _compute_agent-create:
20-
.. describe:: <os>
21-
22-
Type of OS
23-
24-
.. describe:: <architecture>
25-
26-
Type of architecture
27-
28-
.. describe:: <version>
29-
30-
Version
31-
32-
.. describe:: <url>
33-
34-
URL
35-
36-
.. describe:: <md5hash>
37-
38-
MD5 hash
39-
40-
.. describe:: <hypervisor>
41-
42-
Type of hypervisor
43-
44-
compute agent delete
45-
--------------------
46-
47-
Delete compute agent(s)
48-
49-
.. program:: compute agent delete
50-
.. code:: bash
51-
52-
openstack compute agent delete <id> [<id> ...]
53-
54-
.. _compute_agent-delete:
55-
.. describe:: <id>
56-
57-
ID of agent(s) to delete
58-
59-
compute agent list
60-
------------------
61-
62-
List compute agents
63-
64-
.. program:: compute agent list
65-
.. code:: bash
66-
67-
openstack compute agent list [--hypervisor <hypervisor>]
68-
69-
.. option:: --hypervisor <hypervisor>
70-
71-
Type of hypervisor
72-
73-
compute agent set
74-
-----------------
75-
76-
Set compute agent properties
77-
78-
.. program:: agent set
79-
.. code:: bash
80-
81-
openstack compute agent set
82-
[--agent-version <version>]
83-
[--url <url]
84-
[--md5hash <md5hash>]
85-
<id>
86-
87-
.. _compute_agent-set:
88-
.. option:: --agent-version <version>
89-
90-
Version of the agent
91-
92-
.. option:: --url <url>
93-
94-
URL of the agent
95-
96-
.. option:: --md5hash <md5hash>
97-
98-
MD5 hash of the agent
99-
100-
.. describe:: <id>
101-
102-
Agent to modify (ID only)
7+
.. autoprogram-cliff:: openstack.compute.v2
8+
:command: compute agent *

doc/source/cli/command-objects/compute-service.rst

Lines changed: 2 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -4,94 +4,5 @@ compute service
44

55
Compute v2
66

7-
compute service delete
8-
----------------------
9-
10-
Delete compute service(s)
11-
12-
.. program:: compute service delete
13-
.. code:: bash
14-
15-
openstack compute service delete
16-
<service> [<service> ...]
17-
18-
.. _compute_service_delete-service:
19-
.. describe:: <service>
20-
21-
Compute service(s) to delete (ID only). If using
22-
``--os-compute-api-version`` 2.53 or greater, the ID is a UUID which can
23-
be retrieved by listing compute services using the same 2.53+ microversion.
24-
25-
compute service list
26-
--------------------
27-
28-
List compute services
29-
30-
Using ``--os-compute-api-version`` 2.53 or greater will return the ID as a
31-
UUID value which can be used to uniquely identify the service in a multi-cell
32-
deployment.
33-
34-
.. program:: compute service list
35-
.. code:: bash
36-
37-
openstack compute service list
38-
[--host <host>]
39-
[--service <service>]
40-
[--long]
41-
42-
.. option:: --host <host>
43-
44-
List services on specified host (name only)
45-
46-
.. option:: --service <service>
47-
48-
List only specified service binaries (name only). For example,
49-
``nova-compute``, ``nova-conductor``, etc.
50-
51-
.. option:: --long
52-
53-
List additional fields in output
54-
55-
compute service set
56-
-------------------
57-
58-
Set compute service properties
59-
60-
.. program:: compute service set
61-
.. code:: bash
62-
63-
openstack compute service set
64-
[--enable | --disable]
65-
[--disable-reason <reason>]
66-
[--up | --down]
67-
<host> <service>
68-
69-
.. option:: --enable
70-
71-
Enable service
72-
73-
.. option:: --disable
74-
75-
Disable service
76-
77-
.. option:: --disable-reason <reason>
78-
79-
Reason for disabling the service (in quotes). Should be used with :option:`--disable` option.
80-
81-
.. option:: --up
82-
83-
Force up service. Requires ``--os-compute-api-version`` 2.11 or greater.
84-
85-
.. option:: --down
86-
87-
Force down service. . Requires ``--os-compute-api-version`` 2.11 or
88-
greater.
89-
90-
.. _compute_service_set-host:
91-
.. describe:: <host>
92-
93-
Name of host
94-
95-
.. describe:: <service>
96-
97-
Name of service (Binary name), for example ``nova-compute``
7+
.. autoprogram-cliff:: openstack.compute.v2
8+
:command: compute service *

0 commit comments

Comments
 (0)