Skip to content

Commit 244ac70

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Don't show hint about vlan transparent in network set"
2 parents 7653cff + 2b66c71 commit 244ac70

4 files changed

Lines changed: 22 additions & 27 deletions

File tree

doc/source/command-objects/network.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ Set network properties
318318
[--provider-physical-network <provider-physical-network>]
319319
[--provider-segment <provider-segment>]
320320
[--qos-policy <qos-policy> | --no-qos-policy]
321-
[--transparent-vlan | --no-transparent-vlan]
322321
<network>
323322
324323
.. option:: --name <name>
@@ -393,14 +392,6 @@ Set network properties
393392
394393
Remove the QoS policy attached to this network
395394
396-
.. option:: --transparent-vlan
397-
398-
Make the network VLAN transparent
399-
400-
.. option:: --no-transparent-vlan
401-
402-
Do not make the network VLAN transparent
403-
404395
.. _network_set-network:
405396
.. describe:: <network>
406397

openstackclient/network/v2/network.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ def _get_attrs_network(client_manager, parsed_args):
127127
attrs['qos_policy_id'] = _qos_policy.id
128128
if 'no_qos_policy' in parsed_args and parsed_args.no_qos_policy:
129129
attrs['qos_policy_id'] = None
130-
# Update VLAN Transparency for networks
131-
if parsed_args.transparent_vlan:
132-
attrs['vlan_transparent'] = True
133-
if parsed_args.no_transparent_vlan:
134-
attrs['vlan_transparent'] = False
135130
return attrs
136131

137132

@@ -170,16 +165,6 @@ def _add_additional_network_options(parser):
170165
help=_("VLAN ID for VLAN networks or Tunnel ID for "
171166
"GENEVE/GRE/VXLAN networks"))
172167

173-
vlan_transparent_grp = parser.add_mutually_exclusive_group()
174-
vlan_transparent_grp.add_argument(
175-
'--transparent-vlan',
176-
action='store_true',
177-
help=_("Make the network VLAN transparent"))
178-
vlan_transparent_grp.add_argument(
179-
'--no-transparent-vlan',
180-
action='store_true',
181-
help=_("Do not make the network VLAN transparent"))
182-
183168

184169
# TODO(sindhu): Use the SDK resource mapped attribute names once the
185170
# OSC minimum requirements include SDK 1.0.
@@ -282,6 +267,16 @@ def update_parser_network(self, parser):
282267
metavar='<qos-policy>',
283268
help=_("QoS policy to attach to this network (name or ID)")
284269
)
270+
vlan_transparent_grp = parser.add_mutually_exclusive_group()
271+
vlan_transparent_grp.add_argument(
272+
'--transparent-vlan',
273+
action='store_true',
274+
help=_("Make the network VLAN transparent"))
275+
vlan_transparent_grp.add_argument(
276+
'--no-transparent-vlan',
277+
action='store_true',
278+
help=_("Do not make the network VLAN transparent"))
279+
285280
_add_additional_network_options(parser)
286281
return parser
287282

@@ -296,6 +291,11 @@ def update_parser_compute(self, parser):
296291

297292
def take_action_network(self, client, parsed_args):
298293
attrs = _get_attrs_network(self.app.client_manager, parsed_args)
294+
if parsed_args.transparent_vlan:
295+
attrs['vlan_transparent'] = True
296+
if parsed_args.no_transparent_vlan:
297+
attrs['vlan_transparent'] = False
298+
299299
obj = client.create_network(**attrs)
300300
display_columns, columns = _get_columns_network(obj)
301301
data = utils.get_item_properties(obj, columns, formatters=_formatters)

openstackclient/tests/unit/network/v2/test_network.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,6 @@ def test_set_this(self):
821821
'--provider-network-type', 'vlan',
822822
'--provider-physical-network', 'physnet1',
823823
'--provider-segment', '400',
824-
'--no-transparent-vlan',
825824
'--enable-port-security',
826825
'--qos-policy', self.qos_policy.name,
827826
]
@@ -836,7 +835,6 @@ def test_set_this(self):
836835
('provider_network_type', 'vlan'),
837836
('physical_network', 'physnet1'),
838837
('segmentation_id', '400'),
839-
('no_transparent_vlan', True),
840838
('enable_port_security', True),
841839
('qos_policy', self.qos_policy.name),
842840
]
@@ -854,7 +852,6 @@ def test_set_this(self):
854852
'provider:network_type': 'vlan',
855853
'provider:physical_network': 'physnet1',
856854
'provider:segmentation_id': '400',
857-
'vlan_transparent': False,
858855
'port_security_enabled': True,
859856
'qos_policy_id': self.qos_policy.id,
860857
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Remove ``--transparent-vlan`` and ``--no-transparent-vlan``
5+
from ``network set``, because updating ``vlan-transparent``
6+
is not supported in Neutron.
7+
[Bug `1691776 <https://bugs.launchpad.net/python-openstackclient/+bug/1691776>`_]

0 commit comments

Comments
 (0)