diff options
| author | Eric Fried <openstack@fried.cc> | 2019-10-28 17:27:38 -0500 |
|---|---|---|
| committer | Eric Fried <openstack@fried.cc> | 2019-11-01 14:24:30 -0500 |
| commit | cd6c285cc6c2274e6b42cc452ba4a61a3487ca23 (patch) | |
| tree | 334eddf792c9287511a8d419e82c2e6777fd63b2 /doc/source/cli/command-objects/network-segment.rst | |
| parent | 61ad83b57580c76a1c448e03064c4df6bcc01e87 (diff) | |
| download | python-openstackclient-cd6c285cc6c2274e6b42cc452ba4a61a3487ca23.tar.gz | |
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
Diffstat (limited to 'doc/source/cli/command-objects/network-segment.rst')
| -rw-r--r-- | doc/source/cli/command-objects/network-segment.rst | 129 |
1 files changed, 12 insertions, 117 deletions
diff --git a/doc/source/cli/command-objects/network-segment.rst b/doc/source/cli/command-objects/network-segment.rst index d6a66aa0..2e914380 100644 --- a/doc/source/cli/command-objects/network-segment.rst +++ b/doc/source/cli/command-objects/network-segment.rst @@ -9,125 +9,20 @@ within a network may not be guaranteed. Network v2 -network segment create ----------------------- +.. NOTE(efried): have to list these out one by one; 'network segment *' pulls + ... range *. -Create new network segment +.. autoprogram-cliff:: openstack.network.v2 + :command: network segment create -.. program:: network segment create -.. code:: bash +.. autoprogram-cliff:: openstack.network.v2 + :command: network segment delete - openstack network segment create - [--description <description>] - [--physical-network <physical-network>] - [--segment <segment>] - --network <network> - --network-type <network-type> - <name> +.. autoprogram-cliff:: openstack.network.v2 + :command: network segment list -.. option:: --description <description> +.. autoprogram-cliff:: openstack.network.v2 + :command: network segment set - Network segment description - -.. option:: --physical-network <physical-network> - - Physical network name of this network segment - -.. option:: --segment <segment> - - Segment identifier for this network segment which is - based on the network type, VLAN ID for vlan network - type and tunnel ID for geneve, gre and vxlan network - types - -.. option:: --network <network> - - Network this network segment belongs to (name or ID) - -.. option:: --network-type <network-type> - - Network type of this network segment - (flat, geneve, gre, local, vlan or vxlan) - -.. _network_segment_create-name: -.. describe:: <name> - - New network segment name - -network segment delete ----------------------- - -Delete network segment(s) - -.. program:: network segment delete -.. code:: bash - - openstack network segment delete - <network-segment> [<network-segment> ...] - -.. _network_segment_delete-segment: -.. describe:: <network-segment> - - Network segment(s) to delete (name or ID) - -network segment list --------------------- - -List network segments - -.. program:: network segment list -.. code:: bash - - openstack network segment list - [--long] - [--network <network>] - -.. option:: --long - - List additional fields in output - -.. option:: --network <network> - - List network segments that belong to this network (name or ID) - -network segment set -------------------- - -Set network segment properties - -.. program:: network segment set -.. code:: bash - - openstack network segment set - [--description <description>] - [--name <name>] - <network-segment> - -.. option:: --description <description> - - Set network segment description - -.. option:: --name <name> - - Set network segment name - -.. _network_segment_set-segment: -.. describe:: <network-segment> - - Network segment to modify (name or ID) - -network segment show --------------------- - -Display network segment details - -.. program:: network segment show -.. code:: bash - - openstack network segment show - <network-segment> - -.. _network_segment_show-segment: -.. describe:: <network-segment> - - Network segment to display (name or ID) +.. autoprogram-cliff:: openstack.network.v2 + :command: network segment show |
