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/security-group.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/security-group.rst')
| -rw-r--r-- | doc/source/cli/command-objects/security-group.rst | 202 |
1 files changed, 14 insertions, 188 deletions
diff --git a/doc/source/cli/command-objects/security-group.rst b/doc/source/cli/command-objects/security-group.rst index 403e5fc0..4edc1995 100644 --- a/doc/source/cli/command-objects/security-group.rst +++ b/doc/source/cli/command-objects/security-group.rst @@ -8,197 +8,23 @@ which specify the network access rules. Compute v2, Network v2 -security group create ---------------------- +.. NOTE(efried): have to list these out one by one; 'security group *' pulls in + ... rule *. -Create a new security group +.. autoprogram-cliff:: openstack.network.v2 + :command: security group create -.. program:: security group create -.. code:: bash +.. autoprogram-cliff:: openstack.network.v2 + :command: security group delete - openstack security group create - [--description <description>] - [--project <project> [--project-domain <project-domain>]] - [--tag <tag> | --no-tag] - <name> +.. autoprogram-cliff:: openstack.network.v2 + :command: security group list -.. option:: --description <description> +.. autoprogram-cliff:: openstack.network.v2 + :command: security group set - Security group description +.. autoprogram-cliff:: openstack.network.v2 + :command: security group show -.. option:: --project <project> - - Owner's project (name or ID) - - *Network version 2 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. - - *Network version 2 only* - -.. option:: --tag <tag> - - Tag to be added to the security group (repeat option to set multiple tags) - - *Network version 2 only* - -.. option:: --no-tag - - No tags associated with the security group - - *Network version 2 only* - -.. describe:: <name> - - New security group name - -security group delete ---------------------- - -Delete security group(s) - -.. program:: security group delete -.. code:: bash - - openstack security group delete - <group> [<group> ...] - -.. describe:: <group> - - Security group(s) to delete (name or ID) - -security group list -------------------- - -List security groups - -.. program:: security group list -.. code:: bash - - openstack security group list - [--all-projects] - [--project <project> [--project-domain <project-domain>]] - [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]] - [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]] - -.. option:: --all-projects - - Display information from all projects (admin only) - - *Network version 2 ignores this option and will always display information* - *for all projects (admin only).* - -.. option:: --project <project> - - List security groups according to the project (name or ID) - - *Network version 2 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. - - *Network version 2 only* - -.. option:: --tags <tag>[,<tag>,...] - - List security groups which have all given tag(s) - - *Network version 2 only* - -.. option:: --any-tags <tag>[,<tag>,...] - - List security groups which have any given tag(s) - - *Network version 2 only* - -.. option:: --not-tags <tag>[,<tag>,...] - - Exclude security groups which have all given tag(s) - - *Network version 2 only* - -.. option:: --not-any-tags <tag>[,<tag>,...] - - Exclude security groups which have any given tag(s) - - *Network version 2 only* - -security group set ------------------- - -Set security group properties - -.. program:: security group set -.. code:: bash - - openstack security group set - [--name <new-name>] - [--description <description>] - [--tag <tag>] [--no-tag] - <group> - -.. option:: --name <new-name> - - New security group name - -.. option:: --description <description> - - New security group description - -.. option:: --tag <tag> - - Tag to be added to the security group (repeat option to set multiple tags) - -.. option:: --no-tag - - Clear tags associated with the security group. Specify both --tag - and --no-tag to overwrite current tags - -.. describe:: <group> - - Security group to modify (name or ID) - -security group show -------------------- - -Display security group details - -.. program:: security group show -.. code:: bash - - openstack security group show - <group> - -.. describe:: <group> - - Security group to display (name or ID) - -security group unset --------------------- - -Unset security group properties - -.. program:: security group unset -.. code:: bash - - openstack security group unset - [--tag <tag> | --all-tag] - <group> - -.. option:: --tag <tag> - - Tag to be removed from the security group - (repeat option to remove multiple tags) - -.. option:: --all-tag - - Clear all tags associated with the security group - -.. describe:: <group> - - Security group to modify (name or ID) +.. autoprogram-cliff:: openstack.network.v2 + :command: security group unset |
