Skip to content

Commit cba37d0

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Doc: Fix network command documentation issues"
2 parents cb8f757 + 6b76860 commit cba37d0

5 files changed

Lines changed: 67 additions & 54 deletions

File tree

doc/source/command-objects/network.rst

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,27 @@ Create new network
2626
.. option:: --project <project>
2727
2828
Owner's project (name or ID)
29-
(Network v2 only)
29+
30+
*Network version 2 only*
3031
3132
.. option:: --project-domain <project-domain>
3233
3334
Domain the project belongs to (name or ID).
3435
This can be used in case collisions between project names exist.
35-
(Network v2 only)
36+
37+
*Network version 2 only*
3638
3739
.. option:: --enable
3840
3941
Enable network (default)
40-
(Network v2 only)
42+
43+
*Network version 2 only*
4144
4245
.. option:: --disable
4346
4447
Disable network
45-
(Network v2 only)
48+
49+
*Network version 2 only*
4650
4751
.. option:: --share
4852
@@ -56,51 +60,60 @@ Create new network
5660
5761
Availability Zone in which to create this network (requires the Network
5862
Availability Zone extension, this option can be repeated).
59-
(Network v2 only)
63+
64+
*Network version 2 only*
6065
6166
.. option:: --subnet <subnet>
6267
6368
IPv4 subnet for fixed IPs (in CIDR notation)
64-
(Compute v2 network only)
69+
70+
*Compute version 2 only*
6571
6672
.. option:: --external
6773
6874
Set this network as an external network.
6975
Requires the "external-net" extension to be enabled.
70-
(Network v2 only)
76+
77+
*Network version 2 only*
7178
7279
.. option:: --internal
7380
7481
Set this network as an internal network (default)
75-
(Network v2 only)
82+
83+
*Network version 2 only*
7684
7785
.. option:: --default
7886
7987
Specify if this network should be used as
8088
the default external network
81-
(Network v2 only)
89+
90+
*Network version 2 only*
8291
8392
.. option:: --no-default
8493
8594
Do not use the network as the default external network.
8695
By default, no network is set as an external network.
87-
(Network v2 only)
96+
97+
*Network version 2 only*
8898
8999
.. option:: --provider-network-type <provider-network-type>
90100
91101
The physical mechanism by which the virtual network is implemented.
92102
The supported options are: flat, gre, local, vlan, vxlan
93-
(Network v2 only)
103+
104+
*Network version 2 only*
94105
95106
.. option:: --provider-physical-network <provider-physical-network>
96107
97108
Name of the physical network over which the virtual network is implemented
98-
(Network v2 only)
109+
110+
*Network version 2 only*
99111
100112
.. option:: --provider-segment <provider-segment>
101113
102114
VLAN ID for VLAN networks or Tunnel ID for GRE/VXLAN networks
103-
(Network v2 only)
115+
116+
*Network version 2 only*
104117
105118
.. _network_create-name:
106119
.. describe:: <name>
@@ -148,6 +161,8 @@ network set
148161
149162
Set network properties
150163
164+
*Network version 2 only*
165+
151166
.. program:: network set
152167
.. code:: bash
153168

doc/source/command-objects/port.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ Set port properties
124124
125125
os port set
126126
[--fixed-ip subnet=<subnet>,ip-address=<ip-address> | --no-fixed-ip]
127-
[--device-id <device-id>]
127+
[--device <device-id>]
128128
[--device-owner <device-owner>]
129129
[--vnic-type <vnic-type>]
130130
[--binding-profile <binding-profile> | --no-binding-profile]
131-
[--host-id <host-id>]
131+
[--host <host-id>]
132132
[--enable | --disable]
133133
[--name <name>]
134134
<port>
@@ -143,9 +143,9 @@ Set port properties
143143
144144
Clear existing information of fixed-ips
145145
146-
.. option:: --device-id <device-id>
146+
.. option:: --device <device-id>
147147
148-
Device ID of this port
148+
Port device ID
149149
150150
.. option:: --device-owner <device-owner>
151151
@@ -165,9 +165,9 @@ Set port properties
165165
166166
Clear existing information of binding:profile
167167
168-
.. option:: --host-id <host-id>
168+
.. option:: --host <host-id>
169169
170-
The ID of the host where the port is allocated
170+
Allocate port on host ``<host-id>`` (ID only)
171171
172172
.. option:: --enable
173173

doc/source/command-objects/subnet-pool.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Create subnet pool
4747
collisions between project names exist.
4848
4949
.. _subnet_pool_create-name:
50-
.. describe:: <name>
50+
.. describe:: <name>
5151
5252
Name of the new subnet pool
5353
@@ -120,7 +120,7 @@ Set subnet pool properties
120120
Set subnet pool maximum prefix length
121121
122122
.. _subnet_pool_set-subnet-pool:
123-
.. describe:: <subnet-pool>
123+
.. describe:: <subnet-pool>
124124
125125
Subnet pool to modify (name or ID)
126126

doc/source/command-objects/subnet.rst

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Create new subnet
4242
4343
.. option:: --use-default-subnet-pool
4444
45-
Use default subnet pool for --ip-version
45+
Use default subnet pool for ``--ip-version``
4646
4747
.. option:: --prefix-length <prefix-length>
4848
@@ -51,12 +51,12 @@ Create new subnet
5151
.. option:: --subnet-range <subnet-range>
5252
5353
Subnet range in CIDR notation
54-
(required if --subnet-pool is not specified, optional otherwise)
54+
(required if ``--subnet-pool`` is not specified, optional otherwise)
5555
5656
.. option:: --allocation-pool start=<ip-address>,end=<ip-address>
5757
5858
Allocation pool IP addresses for this subnet e.g.:
59-
start=192.168.199.2,end=192.168.199.254 (This option can be repeated)
59+
``start=192.168.199.2,end=192.168.199.254`` (This option can be repeated)
6060
6161
.. option:: --dhcp
6262
@@ -73,31 +73,30 @@ Create new subnet
7373
.. option:: --gateway <gateway>
7474
7575
Specify a gateway for the subnet. The three options are:
76-
<ip-address>: Specific IP address to use as the gateway
77-
'auto': Gateway address should automatically be chosen from
78-
within the subnet itself
79-
'none': This subnet will not use a gateway
80-
e.g.: --gateway 192.168.9.1, --gateway auto, --gateway none
81-
(default is 'auto')
76+
<ip-address>: Specific IP address to use as the gateway,
77+
'auto': Gateway address should automatically be chosen from
78+
within the subnet itself, 'none': This subnet will not use
79+
a gateway, e.g.: ``--gateway 192.168.9.1``, ``--gateway auto``,
80+
``--gateway none`` (default is 'auto')
8281
8382
.. option:: --host-route destination=<subnet>,gateway=<ip-address>
8483
8584
Additional route for this subnet e.g.:
86-
destination=10.10.0.0/16,gateway=192.168.71.254
87-
destination: destination subnet (in CIDR notation)
88-
gateway: nexthop IP address
89-
(This option can be repeated)
85+
``destination=10.10.0.0/16,gateway=192.168.71.254``
86+
destination: destination subnet (in CIDR notation)
87+
gateway: nexthop IP address
88+
(This option can be repeated)
9089
9190
.. option:: --ip-version {4,6}
9291
9392
IP version (default is 4). Note that when subnet pool is specified,
94-
IP version is determined from the subnet pool and this option
95-
is ignored.
93+
IP version is determined from the subnet pool and this option
94+
is ignored.
9695
9796
.. option:: --ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}
9897
9998
IPv6 RA (Router Advertisement) mode,
100-
valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac]
99+
valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac]
101100
102101
.. option:: --ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}
103102
@@ -163,7 +162,7 @@ Set subnet properties
163162
.. option:: --allocation-pool start=<ip-address>,end=<ip-address>
164163
165164
Allocation pool IP addresses for this subnet e.g.:
166-
start=192.168.199.2,end=192.168.199.254 (This option can be repeated)
165+
``start=192.168.199.2,end=192.168.199.254`` (This option can be repeated)
167166
168167
.. option:: --dhcp
169168
@@ -180,17 +179,17 @@ Set subnet properties
180179
.. option:: --gateway <gateway>
181180
182181
Specify a gateway for the subnet. The options are:
183-
<ip-address>: Specific IP address to use as the gateway
184-
'none': This subnet will not use a gateway
185-
e.g.: --gateway 192.168.9.1, --gateway none
182+
<ip-address>: Specific IP address to use as the gateway,
183+
'none': This subnet will not use a gateway,
184+
e.g.: ``--gateway 192.168.9.1``, ``--gateway none``
186185
187186
.. option:: --host-route destination=<subnet>,gateway=<ip-address>
188187
189188
Additional route for this subnet e.g.:
190-
destination=10.10.0.0/16,gateway=192.168.71.254
191-
destination: destination subnet (in CIDR notation)
192-
gateway: nexthop IP address
193-
(This option can be repeated)
189+
``destination=10.10.0.0/16,gateway=192.168.71.254``
190+
destination: destination subnet (in CIDR notation)
191+
gateway: nexthop IP address
192+
(This option can be repeated)
194193
195194
.. option:: --name
196195

openstackclient/network/v2/subnet.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def get_parser(self, prog_name):
197197
parser.add_argument(
198198
'--prefix-length',
199199
metavar='<prefix-length>',
200-
help='Prefix length for subnet allocation from subnetpool',
200+
help='Prefix length for subnet allocation from subnet pool',
201201
)
202202
parser.add_argument(
203203
'--subnet-range',
@@ -223,12 +223,11 @@ def get_parser(self, prog_name):
223223
metavar='<gateway>',
224224
default='auto',
225225
help="Specify a gateway for the subnet. The three options are: "
226-
" <ip-address>: Specific IP address to use as the gateway "
227-
" 'auto': Gateway address should automatically be "
228-
" chosen from within the subnet itself "
229-
" 'none': This subnet will not use a gateway "
230-
"e.g.: --gateway 192.168.9.1, --gateway auto, --gateway none"
231-
"(default is 'auto')",
226+
"<ip-address>: Specific IP address to use as the gateway, "
227+
"'auto': Gateway address should automatically be chosen from "
228+
"within the subnet itself, 'none': This subnet will not use "
229+
"a gateway, e.g.: --gateway 192.168.9.1, --gateway auto, "
230+
"--gateway none (default is 'auto')",
232231
)
233232
parser.add_argument(
234233
'--ip-version',
@@ -351,8 +350,8 @@ def get_parser(self, prog_name):
351350
'--gateway',
352351
metavar='<gateway>',
353352
help="Specify a gateway for the subnet. The options are: "
354-
" <ip-address>: Specific IP address to use as the gateway "
355-
" 'none': This subnet will not use a gateway "
353+
"<ip-address>: Specific IP address to use as the gateway, "
354+
"'none': This subnet will not use a gateway, "
356355
"e.g.: --gateway 192.168.9.1, --gateway none"
357356
)
358357
_get_common_parse_arguments(parser)

0 commit comments

Comments
 (0)