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/network-rbac.rst | 135 +----------------------- 1 file changed, 2 insertions(+), 133 deletions(-) (limited to 'doc/source/cli/command-objects/network-rbac.rst') diff --git a/doc/source/cli/command-objects/network-rbac.rst b/doc/source/cli/command-objects/network-rbac.rst index 22733a2c..d9e48554 100644 --- a/doc/source/cli/command-objects/network-rbac.rst +++ b/doc/source/cli/command-objects/network-rbac.rst @@ -8,136 +8,5 @@ to network resources for specific projects. Network v2 -network rbac create -------------------- - -Create network RBAC policy - -.. program:: network rbac create -.. code:: bash - - openstack network rbac create - --type - --action - [--target-project | --target-all-projects] - [--target-project-domain ] - [--project [--project-domain ]] - - -.. option:: --type - - Type of the object that RBAC policy affects ("security_group", "qos_policy" or "network") (required) - -.. option:: --action - - Action for the RBAC policy ("access_as_external" or "access_as_shared") (required) - -.. option:: --target-project - - The project to which the RBAC policy will be enforced (name or ID) - -.. option:: --target-all-projects - - Allow creating RBAC policy for all projects. - -.. option:: --target-project-domain - - Domain the target project belongs to (name or ID). - This can be used in case collisions between project names exist. - -.. option:: --project - - The owner project (name or ID) - -.. option:: --project-domain - - Domain the project belongs to (name or ID). - This can be used in case collisions between project names exist. - -.. _network_rbac_create-rbac-policy: -.. describe:: - - The object to which this RBAC policy affects (name or ID) - -network rbac delete -------------------- - -Delete network RBAC policy(s) - -.. program:: network rbac delete -.. code:: bash - - openstack network rbac delete - [ ...] - -.. _network_rbac_delete-rbac-policy: -.. describe:: - - RBAC policy(s) to delete (ID only) - -network rbac list ------------------ - -List network RBAC policies - -.. program:: network rbac list -.. code:: bash - - openstack network rbac list - [--type ] - [--action ] - [--long] - -.. option:: --type - - List network RBAC policies according to given object type ("security_group", "qos_policy" or "network") - -.. option:: --action - - List network RBAC policies according to given action ("access_as_external" or "access_as_shared") - -.. option:: --long - - List additional fields in output - -network rbac set ----------------- - -Set network RBAC policy properties - -.. program:: network rbac set -.. code:: bash - - openstack network rbac set - [--target-project [--target-project-domain ]] - - -.. option:: --target-project - - The project to which the RBAC policy will be enforced (name or ID) - -.. option:: --target-project-domain - - Domain the target project belongs to (name or ID). - This can be used in case collisions between project names exist. - -.. _network_rbac_set-rbac-policy: -.. describe:: - - RBAC policy to be modified (ID only) - -network rbac show ------------------ - -Display network RBAC policy details - -.. program:: network rbac show -.. code:: bash - - openstack network rbac show - - -.. _network_rbac_show-rbac-policy: -.. describe:: - - RBAC policy (ID only) +.. autoprogram-cliff:: openstack.network.v2 + :command: network rbac * -- cgit v1.2.1