Merge "Doc: Fix network command documentation issues"

This commit is contained in:
Jenkins 2016-04-11 13:17:12 +00:00 committed by Gerrit Code Review
commit cba37d0031
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

@ -47,7 +47,7 @@ Create subnet pool
collisions between project names exist.
.. _subnet_pool_create-name:
.. describe:: <name>
.. describe:: <name>
Name of the new subnet pool
@ -120,7 +120,7 @@ Set subnet pool properties
Set subnet pool maximum prefix length
.. _subnet_pool_set-subnet-pool:
.. describe:: <subnet-pool>
.. describe:: <subnet-pool>
Subnet pool to modify (name or ID)

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,31 +73,30 @@ 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
'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')
.. 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: destination subnet (in CIDR notation)
gateway: nexthop IP address
(This option can be repeated)
``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)
.. option:: --ip-version {4,6}
IP version (default is 4). Note that when subnet pool is specified,
IP version is determined from the subnet pool and this option
is ignored.
IP version is determined from the subnet pool and this option
is ignored.
.. option:: --ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}
IPv6 RA (Router Advertisement) mode,
valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac]
valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac]
.. option:: --ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}
@ -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,17 +179,17 @@ 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: destination subnet (in CIDR notation)
gateway: nexthop IP address
(This option can be repeated)
``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)
.. option:: --name

View File

@ -197,7 +197,7 @@ class CreateSubnet(command.ShowOne):
parser.add_argument(
'--prefix-length',
metavar='<prefix-length>',
help='Prefix length for subnet allocation from subnetpool',
help='Prefix length for subnet allocation from subnet pool',
)
parser.add_argument(
'--subnet-range',
@ -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)