Doc: Fix network command documentation issues

Fix the following network command documentation issues:
  - Fix format of subnet pool positional arguments
  - Update port set options to match help
  - Fix network command documentation for Network v2
    versus Compute v2 options and commands
  - Fix subnet command documentation errors and formatting
    problems in help text

Change-Id: I808c2a70ca62eafc9e42d6873539cdd142ffe50c
Related-Bug: #1558677
This commit is contained in:
Richard Theis 2016-04-01 16:16:08 -05:00
parent 9f2e7039e1
commit 6b76860c45
5 changed files with 67 additions and 54 deletions

View File

@ -26,23 +26,27 @@ Create new network
.. option:: --project <project>
Owner's project (name or ID)
(Network v2 only)
*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 v2 only)
*Network version 2 only*
.. option:: --enable
Enable network (default)
(Network v2 only)
*Network version 2 only*
.. option:: --disable
Disable network
(Network v2 only)
*Network version 2 only*
.. option:: --share
@ -56,51 +60,60 @@ Create new network
Availability Zone in which to create this network (requires the Network
Availability Zone extension, this option can be repeated).
(Network v2 only)
*Network version 2 only*
.. option:: --subnet <subnet>
IPv4 subnet for fixed IPs (in CIDR notation)
(Compute v2 network only)
*Compute version 2 only*
.. option:: --external
Set this network as an external network.
Requires the "external-net" extension to be enabled.
(Network v2 only)
*Network version 2 only*
.. option:: --internal
Set this network as an internal network (default)
(Network v2 only)
*Network version 2 only*
.. option:: --default
Specify if this network should be used as
the default external network
(Network v2 only)
*Network version 2 only*
.. option:: --no-default
Do not use the network as the default external network.
By default, no network is set as an external network.
(Network v2 only)
*Network version 2 only*
.. option:: --provider-network-type <provider-network-type>
The physical mechanism by which the virtual network is implemented.
The supported options are: flat, gre, local, vlan, vxlan
(Network v2 only)
*Network version 2 only*
.. option:: --provider-physical-network <provider-physical-network>
Name of the physical network over which the virtual network is implemented
(Network v2 only)
*Network version 2 only*
.. option:: --provider-segment <provider-segment>
VLAN ID for VLAN networks or Tunnel ID for GRE/VXLAN networks
(Network v2 only)
*Network version 2 only*
.. _network_create-name:
.. describe:: <name>
@ -148,6 +161,8 @@ network set
Set network properties
*Network version 2 only*
.. program:: network set
.. code:: bash

View File

@ -124,11 +124,11 @@ Set port properties
os port set
[--fixed-ip subnet=<subnet>,ip-address=<ip-address> | --no-fixed-ip]
[--device-id <device-id>]
[--device <device-id>]
[--device-owner <device-owner>]
[--vnic-type <vnic-type>]
[--binding-profile <binding-profile> | --no-binding-profile]
[--host-id <host-id>]
[--host <host-id>]
[--enable | --disable]
[--name <name>]
<port>
@ -143,9 +143,9 @@ Set port properties
Clear existing information of fixed-ips
.. option:: --device-id <device-id>
.. option:: --device <device-id>
Device ID of this port
Port device ID
.. option:: --device-owner <device-owner>
@ -165,9 +165,9 @@ Set port properties
Clear existing information of binding:profile
.. option:: --host-id <host-id>
.. option:: --host <host-id>
The ID of the host where the port is allocated
Allocate port on host ``<host-id>`` (ID only)
.. option:: --enable

View File

@ -42,7 +42,7 @@ Create new subnet
.. option:: --use-default-subnet-pool
Use default subnet pool for --ip-version
Use default subnet pool for ``--ip-version``
.. option:: --prefix-length <prefix-length>
@ -51,12 +51,12 @@ Create new subnet
.. option:: --subnet-range <subnet-range>
Subnet range in CIDR notation
(required if --subnet-pool is not specified, optional otherwise)
(required if ``--subnet-pool`` is not specified, optional otherwise)
.. option:: --allocation-pool start=<ip-address>,end=<ip-address>
Allocation pool IP addresses for this subnet e.g.:
start=192.168.199.2,end=192.168.199.254 (This option can be repeated)
``start=192.168.199.2,end=192.168.199.254`` (This option can be repeated)
.. option:: --dhcp
@ -73,17 +73,16 @@ Create new subnet
.. option:: --gateway <gateway>
Specify a gateway for the subnet. The three options are:
<ip-address>: Specific IP address to use as the gateway
<ip-address>: Specific IP address to use as the gateway,
'auto': Gateway address should automatically be chosen from
within the subnet itself
'none': This subnet will not use a gateway
e.g.: --gateway 192.168.9.1, --gateway auto, --gateway none
(default is 'auto')
within the subnet itself, 'none': This subnet will not use
a gateway, e.g.: ``--gateway 192.168.9.1``, ``--gateway auto``,
``--gateway none`` (default is 'auto')
.. option:: --host-route destination=<subnet>,gateway=<ip-address>
Additional route for this subnet e.g.:
destination=10.10.0.0/16,gateway=192.168.71.254
``destination=10.10.0.0/16,gateway=192.168.71.254``
destination: destination subnet (in CIDR notation)
gateway: nexthop IP address
(This option can be repeated)
@ -163,7 +162,7 @@ Set subnet properties
.. option:: --allocation-pool start=<ip-address>,end=<ip-address>
Allocation pool IP addresses for this subnet e.g.:
start=192.168.199.2,end=192.168.199.254 (This option can be repeated)
``start=192.168.199.2,end=192.168.199.254`` (This option can be repeated)
.. option:: --dhcp
@ -180,14 +179,14 @@ Set subnet properties
.. option:: --gateway <gateway>
Specify a gateway for the subnet. The options are:
<ip-address>: Specific IP address to use as the gateway
'none': This subnet will not use a gateway
e.g.: --gateway 192.168.9.1, --gateway none
<ip-address>: Specific IP address to use as the gateway,
'none': This subnet will not use a gateway,
e.g.: ``--gateway 192.168.9.1``, ``--gateway none``
.. option:: --host-route destination=<subnet>,gateway=<ip-address>
Additional route for this subnet e.g.:
destination=10.10.0.0/16,gateway=192.168.71.254
``destination=10.10.0.0/16,gateway=192.168.71.254``
destination: destination subnet (in CIDR notation)
gateway: nexthop IP address
(This option can be repeated)

View File

@ -223,12 +223,11 @@ class CreateSubnet(command.ShowOne):
metavar='<gateway>',
default='auto',
help="Specify a gateway for the subnet. The three options are: "
" <ip-address>: Specific IP address to use as the gateway "
" 'auto': Gateway address should automatically be "
" chosen from within the subnet itself "
" 'none': This subnet will not use a gateway "
"e.g.: --gateway 192.168.9.1, --gateway auto, --gateway none"
"(default is 'auto')",
"<ip-address>: Specific IP address to use as the gateway, "
"'auto': Gateway address should automatically be chosen from "
"within the subnet itself, 'none': This subnet will not use "
"a gateway, e.g.: --gateway 192.168.9.1, --gateway auto, "
"--gateway none (default is 'auto')",
)
parser.add_argument(
'--ip-version',
@ -351,8 +350,8 @@ class SetSubnet(command.Command):
'--gateway',
metavar='<gateway>',
help="Specify a gateway for the subnet. The options are: "
" <ip-address>: Specific IP address to use as the gateway "
" 'none': This subnet will not use a gateway "
"<ip-address>: Specific IP address to use as the gateway, "
"'none': This subnet will not use a gateway, "
"e.g.: --gateway 192.168.9.1, --gateway none"
)
_get_common_parse_arguments(parser)