From cd6c285cc6c2274e6b42cc452ba4a61a3487ca23 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Mon, 28 Oct 2019 17:27:38 -0500 Subject: neutron: autogenerate docs $namespace = openstack.network.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. This one turned out to be quite involved, because we support both neutron and nova-network. When running in a real cloud, the command classes detect whether the neutron service is present, assume nova-network if that service is not found, and only add parser options relevant to the detected service. But the docs need to present both sets of options. This was easy enough when they were hardcoded, but required a bit of additional infrastructure for generated docs. Change-Id: I426261eb1d86bcc68656aabd61f10b7f082da402 --- doc/source/cli/command-objects/ip-availability.rst | 56 +--------------------- 1 file changed, 2 insertions(+), 54 deletions(-) (limited to 'doc/source/cli/command-objects/ip-availability.rst') diff --git a/doc/source/cli/command-objects/ip-availability.rst b/doc/source/cli/command-objects/ip-availability.rst index dd39e649..94e60459 100644 --- a/doc/source/cli/command-objects/ip-availability.rst +++ b/doc/source/cli/command-objects/ip-availability.rst @@ -4,57 +4,5 @@ ip availability Network v2 -ip availability list --------------------- - -List IP availability for network - -This command retrieves information about IP availability. -Useful for admins who need a quick way to check the -IP availability for all associated networks. -List specifically returns total IP capacity and the -number of allocated IP addresses from that pool. - -.. program:: ip availability list -.. code:: bash - - openstack ip availability list - [--ip-version {4,6}] - [--project ] - -.. option:: --ip-version {4,6} - - List IP availability of given IP version networks - (default is 4) - -.. option:: --project - - List IP availability of given project - (name or ID) - -ip availability show --------------------- - -Show network IP availability details - -This command retrieves information about IP availability. -Useful for admins who need a quick way to -check the IP availability and details for a -specific network. - -This command will return information about -IP availability for the network as a whole, and -return availability information for each individual -subnet within the network as well. - - -.. program:: ip availability show -.. code:: bash - - openstack ip availability show - - -.. _ip_availability_show-network: -.. describe:: - - Show IP availability for a specific network (name or ID) +.. autoprogram-cliff:: openstack.network.v2 + :command: ip availability * -- cgit v1.2.1