summaryrefslogtreecommitdiff
path: root/doc/source/cli/command-objects
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-11-04 16:02:31 -0600
committerEric Fried <openstack@fried.cc>2019-11-05 07:09:05 -0600
commitc6266b5ab22b911ae7e0ca5077d0c04a23dabca9 (patch)
tree8e2f4ff670b4b272184ecc877cd9838b5ad4873b /doc/source/cli/command-objects
parentda56b8f4cf15cc5a77249b680dd0c4d05137be9a (diff)
downloadpython-openstackclient-c6266b5ab22b911ae7e0ca5077d0c04a23dabca9.tar.gz
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
Diffstat (limited to 'doc/source/cli/command-objects')
-rw-r--r--doc/source/cli/command-objects/aggregate.rst179
-rw-r--r--doc/source/cli/command-objects/compute-agent.rst98
-rw-r--r--doc/source/cli/command-objects/compute-service.rst93
-rw-r--r--doc/source/cli/command-objects/console-log.rst21
-rw-r--r--doc/source/cli/command-objects/console-url.rst42
-rw-r--r--doc/source/cli/command-objects/flavor.rst228
-rw-r--r--doc/source/cli/command-objects/host.rst66
-rw-r--r--doc/source/cli/command-objects/hypervisor-stats.rst12
-rw-r--r--doc/source/cli/command-objects/hypervisor.rst39
-rw-r--r--doc/source/cli/command-objects/keypair.rst71
-rw-r--r--doc/source/cli/command-objects/server.rst4
-rw-r--r--doc/source/cli/command-objects/usage.rst49
12 files changed, 28 insertions, 874 deletions
diff --git a/doc/source/cli/command-objects/aggregate.rst b/doc/source/cli/command-objects/aggregate.rst
index 2029a6c8..0f62ce8f 100644
--- a/doc/source/cli/command-objects/aggregate.rst
+++ b/doc/source/cli/command-objects/aggregate.rst
@@ -7,180 +7,5 @@ criteria.
Compute v2
-aggregate add host
-------------------
-
-Add host to aggregate
-
-.. program:: aggregate add host
-.. code:: bash
-
- openstack aggregate add host
- <aggregate>
- <host>
-
-.. _aggregate_add_host-aggregate:
-.. describe:: <aggregate>
-
- Aggregate (name or ID)
-
-.. _aggregate_add_host-host:
-.. describe:: <host>
-
- Host to add to :ref:`\<aggregate\> <aggregate_add_host-aggregate>`
-
-aggregate create
-----------------
-
-Create a new aggregate
-
-.. program:: aggregate create
-.. code:: bash
-
- openstack aggregate create
- [--zone <availability-zone>]
- [--property <key=value> [...] ]
- <name>
-
-.. option:: --zone <availability-zone>
-
- Availability zone name
-
-.. option:: --property <key=value>
-
- Property to add to this aggregate (repeat option to set multiple properties)
-
-.. _aggregate_create-name:
-.. describe:: <name>
-
- New aggregate name
-
-aggregate delete
-----------------
-
-Delete existing aggregate(s)
-
-.. program:: aggregate delete
-.. code:: bash
-
- openstack aggregate delete
- <aggregate> [<aggregate> ...]
-
-.. _aggregate_delete-aggregate:
-.. describe:: <aggregate>
-
- Aggregate(s) to delete (name or ID)
-
-aggregate list
---------------
-
-List all aggregates
-
-.. program:: aggregate list
-.. code:: bash
-
- openstack aggregate list
- [--long]
-
-.. option:: --long
-
- List additional fields in output
-
-aggregate remove host
----------------------
-
-Remove host from aggregate
-
-.. program:: aggregate remove host
-.. code:: bash
-
- openstack aggregate remove host
- <aggregate>
- <host>
-
-.. _aggregate_remove_host-aggregate:
-.. describe:: <aggregate>
-
- Aggregate (name or ID)
-
-.. _aggregate_remove_host-host:
-.. describe:: <host>
-
- Host to remove from :ref:`\<aggregate\> <aggregate_remove_host-aggregate>`
-
-aggregate set
--------------
-
-Set aggregate properties
-
-.. program:: aggregate set
-.. code:: bash
-
- openstack aggregate set
- [--name <new-name>]
- [--zone <availability-zone>]
- [--property <key=value> [...] ]
- [--no-property]
- <aggregate>
-
-.. option:: --name <name>
-
- Set aggregate name
-
-.. option:: --zone <availability-zone>
-
- Set availability zone name
-
-.. option:: --property <key=value>
-
- Property to set on :ref:`\<aggregate\> <aggregate_set-aggregate>`
- (repeat option to set multiple properties)
-
-.. option:: --no-property
-
- Remove all properties from :ref:`\<aggregate\> <aggregate_set-aggregate>`
- (specify both :option:`--property` and :option:`--no-property` to
- overwrite the current properties)
-
-.. _aggregate_set-aggregate:
-.. describe:: <aggregate>
-
- Aggregate to modify (name or ID)
-
-aggregate show
---------------
-
-Display aggregate details
-
-.. program:: aggregate show
-.. code:: bash
-
- openstack aggregate show
- <aggregate>
-
-.. _aggregate_show-aggregate:
-.. describe:: <aggregate>
-
- Aggregate to display (name or ID)
-
-aggregate unset
----------------
-
-Unset aggregate properties
-
-.. program:: aggregate unset
-.. code-block:: bash
-
- openstack aggregate unset
- [--property <key> [...] ]
- <aggregate>
-
-.. option:: --property <key>
-
- Property to remove from :ref:`\<aggregate\> <aggregate_unset-aggregate>`
- (repeat option to remove multiple properties)
-
-.. _aggregate_unset-aggregate:
-.. describe:: <aggregate>
-
- Aggregate to modify (name or ID)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: aggregate *
diff --git a/doc/source/cli/command-objects/compute-agent.rst b/doc/source/cli/command-objects/compute-agent.rst
index e8317b48..89d74928 100644
--- a/doc/source/cli/command-objects/compute-agent.rst
+++ b/doc/source/cli/command-objects/compute-agent.rst
@@ -4,99 +4,5 @@ compute agent
Compute v2
-compute agent create
---------------------
-
-Create compute agent
-
-.. program:: compute agent create
-.. code:: bash
-
- openstack compute agent create
- <os> <architecture> <version> <url> <md5hash>
- <hypervisor>
-
-.. _compute_agent-create:
-.. describe:: <os>
-
- Type of OS
-
-.. describe:: <architecture>
-
- Type of architecture
-
-.. describe:: <version>
-
- Version
-
-.. describe:: <url>
-
- URL
-
-.. describe:: <md5hash>
-
- MD5 hash
-
-.. describe:: <hypervisor>
-
- Type of hypervisor
-
-compute agent delete
---------------------
-
-Delete compute agent(s)
-
-.. program:: compute agent delete
-.. code:: bash
-
- openstack compute agent delete <id> [<id> ...]
-
-.. _compute_agent-delete:
-.. describe:: <id>
-
- ID of agent(s) to delete
-
-compute agent list
-------------------
-
-List compute agents
-
-.. program:: compute agent list
-.. code:: bash
-
- openstack compute agent list [--hypervisor <hypervisor>]
-
-.. option:: --hypervisor <hypervisor>
-
- Type of hypervisor
-
-compute agent set
------------------
-
-Set compute agent properties
-
-.. program:: agent set
-.. code:: bash
-
- openstack compute agent set
- [--agent-version <version>]
- [--url <url]
- [--md5hash <md5hash>]
- <id>
-
-.. _compute_agent-set:
-.. option:: --agent-version <version>
-
- Version of the agent
-
-.. option:: --url <url>
-
- URL of the agent
-
-.. option:: --md5hash <md5hash>
-
- MD5 hash of the agent
-
-.. describe:: <id>
-
- Agent to modify (ID only)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: compute agent *
diff --git a/doc/source/cli/command-objects/compute-service.rst b/doc/source/cli/command-objects/compute-service.rst
index a76a9c26..ac54786e 100644
--- a/doc/source/cli/command-objects/compute-service.rst
+++ b/doc/source/cli/command-objects/compute-service.rst
@@ -4,94 +4,5 @@ compute service
Compute v2
-compute service delete
-----------------------
-
-Delete compute service(s)
-
-.. program:: compute service delete
-.. code:: bash
-
- openstack compute service delete
- <service> [<service> ...]
-
-.. _compute_service_delete-service:
-.. describe:: <service>
-
- Compute service(s) to delete (ID only). If using
- ``--os-compute-api-version`` 2.53 or greater, the ID is a UUID which can
- be retrieved by listing compute services using the same 2.53+ microversion.
-
-compute service list
---------------------
-
-List compute services
-
-Using ``--os-compute-api-version`` 2.53 or greater will return the ID as a
-UUID value which can be used to uniquely identify the service in a multi-cell
-deployment.
-
-.. program:: compute service list
-.. code:: bash
-
- openstack compute service list
- [--host <host>]
- [--service <service>]
- [--long]
-
-.. option:: --host <host>
-
- List services on specified host (name only)
-
-.. option:: --service <service>
-
- List only specified service binaries (name only). For example,
- ``nova-compute``, ``nova-conductor``, etc.
-
-.. option:: --long
-
- List additional fields in output
-
-compute service set
--------------------
-
-Set compute service properties
-
-.. program:: compute service set
-.. code:: bash
-
- openstack compute service set
- [--enable | --disable]
- [--disable-reason <reason>]
- [--up | --down]
- <host> <service>
-
-.. option:: --enable
-
- Enable service
-
-.. option:: --disable
-
- Disable service
-
-.. option:: --disable-reason <reason>
-
- Reason for disabling the service (in quotes). Should be used with :option:`--disable` option.
-
-.. option:: --up
-
- Force up service. Requires ``--os-compute-api-version`` 2.11 or greater.
-
-.. option:: --down
-
- Force down service. . Requires ``--os-compute-api-version`` 2.11 or
- greater.
-
-.. _compute_service_set-host:
-.. describe:: <host>
-
- Name of host
-
-.. describe:: <service>
-
- Name of service (Binary name), for example ``nova-compute``
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: compute service *
diff --git a/doc/source/cli/command-objects/console-log.rst b/doc/source/cli/command-objects/console-log.rst
index bcb23e70..46ef370d 100644
--- a/doc/source/cli/command-objects/console-log.rst
+++ b/doc/source/cli/command-objects/console-log.rst
@@ -6,22 +6,5 @@ Server console text dump
Compute v2
-console log show
-----------------
-
-Show server's console output
-
-.. program:: console log show
-.. code:: bash
-
- openstack console log show
- [--lines <num-lines>]
- <server>
-
-.. option:: --lines <num-lines>
-
- Number of lines to display from the end of the log (default=all)
-
-.. describe:: <server>
-
- Server to show log console log (name or ID)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: console log *
diff --git a/doc/source/cli/command-objects/console-url.rst b/doc/source/cli/command-objects/console-url.rst
index 8a5807b6..001ccc56 100644
--- a/doc/source/cli/command-objects/console-url.rst
+++ b/doc/source/cli/command-objects/console-url.rst
@@ -6,43 +6,5 @@ Server remote console URL
Compute v2
-console url show
-----------------
-
-Show server's remote console URL
-
-.. program:: console url show
-.. code:: bash
-
- openstack console url show
- [--novnc | --xvpvnc | --spice]
- [--rdp | --serial | --mks]
- <server>
-
-.. option:: --novnc
-
- Show noVNC console URL (default)
-
-.. option:: --xvpvnc
-
- Show xvpvnc console URL
-
-.. option:: --spice
-
- Show SPICE console URL
-
-.. option:: --rdp
-
- Show RDP console URL
-
-.. option:: --serial
-
- Show serial console URL
-
-.. option:: --mks
-
- Show WebMKS console URL
-
-.. describe:: <server>
-
- Server to show URL (name or ID)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: console url *
diff --git a/doc/source/cli/command-objects/flavor.rst b/doc/source/cli/command-objects/flavor.rst
index f22463b7..ee09b3ac 100644
--- a/doc/source/cli/command-objects/flavor.rst
+++ b/doc/source/cli/command-objects/flavor.rst
@@ -4,229 +4,5 @@ flavor
Compute v2
-flavor create
--------------
-
-Create new flavor
-
-.. program:: flavor create
-.. code:: bash
-
- openstack flavor create
- [--id <id>]
- [--ram <size-mb>]
- [--disk <size-gb>]
- [--ephemeral-disk <size-gb>]
- [--swap <size-mb>]
- [--vcpus <num-cpu>]
- [--rxtx-factor <factor>]
- [--public | --private]
- [--property <key=value> [...] ]
- [--project <project>]
- [--project-domain <project-domain>]
- [--description <description>]
- <flavor-name>
-
-.. option:: --id <id>
-
- Unique flavor ID; 'auto' creates a UUID (default: auto)
-
-.. option:: --ram <size-mb>
-
- Memory size in MB (default 256M)
-
-.. option:: --disk <size-gb>
-
- Disk size in GB (default 0G)
-
-.. option:: --ephemeral-disk <size-gb>
-
- Ephemeral disk size in GB (default 0G)
-
-.. option:: --swap <size-mb>
-
- Additional swap space size in MB (default 0M)
-
-.. option:: --vcpus <num-cpu>
-
- Number of vcpus (default 1)
-
-.. option:: --rxtx-factor <factor>
-
- RX/TX factor (default 1.0)
-
-.. option:: --public
-
- Flavor is available to other projects (default)
-
-.. option:: --private
-
- Flavor is not available to other projects
-
-.. option:: --property <key=value>
-
- Property to add for this flavor (repeat option to set multiple properties)
-
-.. option:: --project <project>
-
- Allow <project> to access private flavor (name or ID)
- (Must be used with :option:`--private` option)
-
-.. option:: --project-domain <project-domain>
-
- Domain the project belongs to (name or ID).
- This can be used in case collisions between project names exist.
-
-.. option:: --description <description>
-
- Description to add for this flavor. Only available starting with
- ``--os-compute-api-version 2.55``.
-
-.. _flavor_create-flavor-name:
-.. describe:: <flavor-name>
-
- New flavor name
-
-flavor delete
--------------
-
-Delete flavor(s)
-
-.. program:: flavor delete
-.. code:: bash
-
- openstack flavor delete
- <flavor> [<flavor> ...]
-
-.. _flavor_delete-flavor:
-.. describe:: <flavor>
-
- Flavor(s) to delete (name or ID)
-
-flavor list
------------
-
-List flavors
-
-.. program:: flavor list
-.. code:: bash
-
- openstack flavor list
- [--public | --private | --all]
- [--long]
- [--marker <flavor-id>]
- [--limit <num-flavors>]
-
-.. option:: --public
-
- List only public flavors (default)
-
-.. option:: --private
-
- List only private flavors
-
-.. option:: --all
-
- List all flavors, whether public or private
-
-.. option:: --long
-
- List additional fields in output
-
-.. option:: --marker <flavor-id>
-
- The last flavor ID of the previous page
-
-.. option:: --limit <num-flavors>
-
- Maximum number of flavors to display
-
-flavor set
-----------
-
-Set flavor properties
-
-.. program:: flavor set
-.. code:: bash
-
- openstack flavor set
- [--no-property]
- [--property <key=value> [...] ]
- [--project <project>]
- [--project-domain <project-domain>]
- [--description <description>]
- <flavor>
-
-.. option:: --property <key=value>
-
- Property to add or modify for this flavor (repeat option to set multiple properties)
-
-.. option:: --project <project>
-
- Set flavor access to project (name or ID) (admin only)
-
-.. option:: --project-domain <project-domain>
-
- Domain the project belongs to (name or ID).
- This can be used in case collisions between project names exist.
-
-.. option:: --no-property
-
- Remove all properties from this flavor (specify both --no-property and --property
- to remove the current properties before setting new properties.)
-
-.. option:: --description <description>
-
- Description to set for this flavor. Only available starting with
- ``--os-compute-api-version 2.55``.
-
-.. describe:: <flavor>
-
- Flavor to modify (name or ID)
-
-flavor show
------------
-
-Display flavor details
-
-.. program:: flavor show
-.. code:: bash
-
- openstack flavor show
- <flavor>
-
-.. _flavor_show-flavor:
-.. describe:: <flavor>
-
- Flavor to display (name or ID)
-
-flavor unset
-------------
-
-Unset flavor properties
-
-.. program:: flavor unset
-.. code:: bash
-
- openstack flavor unset
- [--property <key> [...] ]
- [--project <project>]
- [--project-domain <project-domain>]
- <flavor>
-
-.. option:: --property <key>
-
- Property to remove from flavor (repeat option to remove multiple properties)
-
-.. option:: --project <project>
-
- Remove flavor access from project (name or ID) (admin only)
-
-.. option:: --project-domain <project-domain>
-
- Domain the project belongs to (name or ID).
- This can be used in case collisions between project names exist.
-
-.. describe:: <flavor>
-
- Flavor to modify (name or ID)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: flavor *
diff --git a/doc/source/cli/command-objects/host.rst b/doc/source/cli/command-objects/host.rst
index cbf34398..acd5a287 100644
--- a/doc/source/cli/command-objects/host.rst
+++ b/doc/source/cli/command-objects/host.rst
@@ -6,67 +6,5 @@ Compute v2
The physical computer running a hypervisor.
-host list
----------
-
-List hosts
-
-.. program:: host list
-.. code:: bash
-
- openstack host list
- [--zone <availability-zone>]
-
-.. option:: --zone <availability-zone>
-
- Only return hosts in the availability zone
-
-host set
---------
-
-Set host properties
-
-.. program:: host set
-.. code:: bash
-
- openstack host set
- [--enable | --disable]
- [--enable-maintenance | --disable-maintenance]
- <host>
-
-.. _host-set:
-.. option:: --enable
-
- Enable the host
-
-.. option:: --disable
-
- Disable the host
-
-.. _maintenance-set:
-.. option:: --enable-maintenance
-
- Enable maintenance mode for the host
-
-.. option:: --disable-maintenance
-
- Disable maintenance mode for the host
-
-.. describe:: <host>
-
- Host to modify (name only)
-
-host show
----------
-
-Display host details
-
-.. program:: host show
-.. code:: bash
-
- openstack host show
- <host>
-
-.. describe:: <host>
-
- Name of host
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: host *
diff --git a/doc/source/cli/command-objects/hypervisor-stats.rst b/doc/source/cli/command-objects/hypervisor-stats.rst
index 89faf135..1f5768f2 100644
--- a/doc/source/cli/command-objects/hypervisor-stats.rst
+++ b/doc/source/cli/command-objects/hypervisor-stats.rst
@@ -4,13 +4,5 @@ hypervisor stats
Compute v2
-hypervisor stats show
----------------------
-
-Display hypervisor stats details
-
-.. program:: hypervisor stats show
-.. code:: bash
-
- openstack hypervisor stats show
-
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: hypervisor stats *
diff --git a/doc/source/cli/command-objects/hypervisor.rst b/doc/source/cli/command-objects/hypervisor.rst
index 9db384a2..9ae82bf1 100644
--- a/doc/source/cli/command-objects/hypervisor.rst
+++ b/doc/source/cli/command-objects/hypervisor.rst
@@ -4,38 +4,11 @@ hypervisor
Compute v2
-hypervisor list
----------------
+.. NOTE(efried): have to list these out one by one; 'hypervisor *' pulls in
+ ... stats.
-List hypervisors
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: hypervisor list
-.. program:: hypervisor list
-.. code:: bash
-
- openstack hypervisor list
- [--matching <hostname>]
- [--long]
-
-.. option:: --matching <hostname>
-
- Filter hypervisors using <hostname> substring
-
-.. option:: --long
-
- List additional fields in output
-
-hypervisor show
----------------
-
-Display hypervisor details
-
-.. program:: hypervisor show
-.. code:: bash
-
- openstack hypervisor show
- <hypervisor>
-
-.. _hypervisor_show-flavor:
-.. describe:: <hypervisor>
-
- Hypervisor to display (name or ID)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: hypervisor show
diff --git a/doc/source/cli/command-objects/keypair.rst b/doc/source/cli/command-objects/keypair.rst
index a539f0a2..f8bce375 100644
--- a/doc/source/cli/command-objects/keypair.rst
+++ b/doc/source/cli/command-objects/keypair.rst
@@ -9,72 +9,5 @@ command.
Compute v2
-keypair create
---------------
-
-Create new public or private key for server ssh access
-
-.. program:: keypair create
-.. code:: bash
-
- openstack keypair create
- [--public-key <file> | --private-key <file>]
- <name>
-
-.. option:: --public-key <file>
-
- Filename for public key to add. If not used, creates a private key.
-
-.. option:: --private-key <file>
-
- Filename for private key to save. If not used, print private key in
- console.
-
-.. describe:: <name>
-
- New public or private key name
-
-keypair delete
---------------
-
-Delete public or private key(s)
-
-.. program:: keypair delete
-.. code:: bash
-
- openstack keypair delete
- <key> [<key> ...]
-
-.. describe:: <key>
-
- Name of key(s) to delete (name only)
-
-keypair list
-------------
-
-List key fingerprints
-
-.. program:: keypair list
-.. code:: bash
-
- openstack keypair list
-
-keypair show
-------------
-
-Display key details
-
-.. program:: keypair show
-.. code:: bash
-
- openstack keypair show
- [--public-key]
- <key>
-
-.. option:: --public-key
-
- Show only bare public key paired with the generated key
-
-.. describe:: <key>
-
- Public or private key to display (name only)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: keypair *
diff --git a/doc/source/cli/command-objects/server.rst b/doc/source/cli/command-objects/server.rst
index a7fef257..89eb4e37 100644
--- a/doc/source/cli/command-objects/server.rst
+++ b/doc/source/cli/command-objects/server.rst
@@ -23,7 +23,7 @@ Compute v2
:command: server lock
.. autoprogram-cliff:: openstack.compute.v2
- :command: server migrate
+ :command: server migrate*
.. autoprogram-cliff:: openstack.compute.v2
:command: server pause
@@ -41,7 +41,7 @@ Compute v2
:command: server rescue
.. autoprogram-cliff:: openstack.compute.v2
- :command: server resize
+ :command: server resize*
.. autoprogram-cliff:: openstack.compute.v2
:command: server restore
diff --git a/doc/source/cli/command-objects/usage.rst b/doc/source/cli/command-objects/usage.rst
index bb13176c..c2bcde06 100644
--- a/doc/source/cli/command-objects/usage.rst
+++ b/doc/source/cli/command-objects/usage.rst
@@ -4,50 +4,5 @@ usage
Compute v2
-usage list
-----------
-
-List resource usage per project
-
-Compute API v2.40+ returns all matching entities rather than being
-limited to the API server configured maximum (``CONF.api.max_limit``).
-
-.. program:: usage list
-.. code:: bash
-
- openstack usage list
- [--start <start>]
- [--end <end>]
-
-.. option:: --start <start>
-
- Usage range start date, ex 2012-01-20 (default: 4 weeks ago)
-
-.. option:: --end <end>
-
- Usage range end date, ex 2012-01-20 (default: tomorrow)
-
-usage show
-----------
-
-Show resource usage for a single project
-
-.. program:: usage show
-.. code:: bash
-
- openstack usage show
- [--project <project>]
- [--start <start>]
- [--end <end>]
-
-.. option:: --project <project>
-
- Name or ID of project to show usage for
-
-.. option:: --start <start>
-
- Usage range start date, ex 2012-01-20 (default: 4 weeks ago)
-
-.. option:: --end <end>
-
- Usage range end date, ex 2012-01-20 (default: tomorrow)
+.. autoprogram-cliff:: openstack.compute.v2
+ :command: usage *