summaryrefslogtreecommitdiff
path: root/doc/source/cli/command-objects/network-agent.rst
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-10-28 17:27:38 -0500
committerEric Fried <openstack@fried.cc>2019-11-01 14:24:30 -0500
commitcd6c285cc6c2274e6b42cc452ba4a61a3487ca23 (patch)
tree334eddf792c9287511a8d419e82c2e6777fd63b2 /doc/source/cli/command-objects/network-agent.rst
parent61ad83b57580c76a1c448e03064c4df6bcc01e87 (diff)
downloadpython-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-agent.rst')
-rw-r--r--doc/source/cli/command-objects/network-agent.rst206
1 files changed, 2 insertions, 204 deletions
diff --git a/doc/source/cli/command-objects/network-agent.rst b/doc/source/cli/command-objects/network-agent.rst
index 9f02cb6b..7e721db1 100644
--- a/doc/source/cli/command-objects/network-agent.rst
+++ b/doc/source/cli/command-objects/network-agent.rst
@@ -10,207 +10,5 @@ agent is "True".
Network v2
-network agent add network
--------------------------
-
-Add network to an agent
-
-.. program:: network agent add network
-.. code:: bash
-
- openstack network agent add network
- [--dhcp]
- <agent-id>
- <network>
-
-.. option:: --dhcp
-
- Add a network to DHCP agent
-
-.. describe:: <agent-id>
-
- Agent to which a network is added (ID only)
-
-.. describe:: <network>
-
- Network to be added to an agent (name or ID)
-
-network agent add router
-------------------------
-
-Add router to an agent
-
-.. program:: network agent add router
-.. code:: bash
-
- openstack network agent add router
- [--l3]
- <agent-id>
- <router>
-
-.. option:: --l3
-
- Add router to an L3 agent
-
-.. _network_agent_add_router-agent-id:
-.. describe:: <agent-id>
-
- Agent to which a router is added (ID only)
-
-.. _network_agent_add_router-router:
-.. describe:: <router>
-
- Router to be added to an agent (name or ID)
-
-network agent delete
---------------------
-
-Delete network agent(s)
-
-.. program:: network agent delete
-.. code:: bash
-
- openstack network agent delete
- <network-agent> [<network-agent> ...]
-
-.. _network_agent_delete-network-agent:
-.. describe:: <network-agent>
-
- Network agent(s) to delete (ID only)
-
-network agent list
-------------------
-
-List network agents
-
-.. program:: network agent list
-.. code:: bash
-
- openstack network agent list
- [--agent-type <agent-type>]
- [--host <host>]
- [--network <network> | --router <router>]
- [--long]
-
-.. option:: --agent-type <agent-type>
-
- List only agents with the specified agent type.
- The supported agent types are: dhcp, open-vswitch,
- linux-bridge, ofa, l3, loadbalancer, metering,
- metadata, macvtap, nic.
-
-.. option:: --host <host>
-
- List only agents running on the specified host
-
-.. option:: --network <network>
-
- List agents hosting a network (name or ID)
-
-.. option:: --router <router>
-
- List agents hosting this router (name or ID)
-
-.. option:: --long
-
- List additional fields in output
-
-network agent remove network
-----------------------------
-
-Remove network from an agent
-
-.. program:: network agent remove network
-.. code:: bash
-
- openstack network agent remove network
- [--dhcp]
- <agent-id>
- <network>
-
-.. option:: --dhcp
-
- Remove network from DHCP agent
-
-.. _network_agent_remove_network-agent-id:
-.. describe:: <agent-id>
-
- Agent to which a network is removed (ID only)
-
-.. _network_agent_remove_network-network:
-.. describe:: <network>
-
- Network to be removed from an agent (name or ID)
-
-network agent remove router
----------------------------
-
-Remove router from an agent
-
-.. program:: network agent remove router
-.. code:: bash
-
- openstack agent remove router
- [--l3]
- <agent-id>
- <router>
-
-.. option:: --l3
-
- Remove router from an L3 agent
-
-.. _network_agent_remove_router-agent-id:
-.. describe:: <agent-id>
-
- Agent from which router will be removed (ID only)
-
-.. _network_agent_remove_router-router:
-.. describe:: <router>
-
- Router to be removed from an agent (name or ID)
-
-network agent set
------------------
-
-Set network agent properties
-
-.. program:: network agent set
-.. code:: bash
-
- openstack network agent set
- [--description <description>]
- [--enable | --disable]
- <network-agent>
-
-.. option:: --description <description>
-
- Set network agent description
-
-.. option:: --enable
-
- Enable network agent
-
-.. option:: --disable
-
- Disable network agent
-
-.. _network_agent_set-network-agent:
-.. describe:: <network-agent>
-
- Network agent to modify (ID only)
-
-network agent show
-------------------
-
-Display network agent details
-
-.. program:: network agent show
-.. code:: bash
-
- openstack network agent show
- <network-agent>
-
-.. _network_agent_show-network-agent:
-.. describe:: <network-agent>
-
- Network agent to display (ID only)
+.. autoprogram-cliff:: openstack.network.v2
+ :command: network agent *