summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-22 17:10:23 +0000
committerGerrit Code Review <review@openstack.org>2017-06-22 17:10:23 +0000
commit244ac70ae9543bb11e95ae42712a9c0a5309e872 (patch)
tree495aff389a304091ac91ec1b08b9fcefbd7e2577 /openstackclient/network
parent7653cff5e6f9592332a23e452ad6bf1549542b16 (diff)
parent2b66c71a7c2798dc1f9149574d54062b9086a01a (diff)
downloadpython-openstackclient-244ac70ae9543bb11e95ae42712a9c0a5309e872.tar.gz
Merge "Don't show hint about vlan transparent in network set"
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/network.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/openstackclient/network/v2/network.py b/openstackclient/network/v2/network.py
index e4cf54bf..58ed6841 100644
--- a/openstackclient/network/v2/network.py
+++ b/openstackclient/network/v2/network.py
@@ -127,11 +127,6 @@ def _get_attrs_network(client_manager, parsed_args):
attrs['qos_policy_id'] = _qos_policy.id
if 'no_qos_policy' in parsed_args and parsed_args.no_qos_policy:
attrs['qos_policy_id'] = None
- # Update VLAN Transparency for networks
- if parsed_args.transparent_vlan:
- attrs['vlan_transparent'] = True
- if parsed_args.no_transparent_vlan:
- attrs['vlan_transparent'] = False
return attrs
@@ -170,16 +165,6 @@ def _add_additional_network_options(parser):
help=_("VLAN ID for VLAN networks or Tunnel ID for "
"GENEVE/GRE/VXLAN networks"))
- vlan_transparent_grp = parser.add_mutually_exclusive_group()
- vlan_transparent_grp.add_argument(
- '--transparent-vlan',
- action='store_true',
- help=_("Make the network VLAN transparent"))
- vlan_transparent_grp.add_argument(
- '--no-transparent-vlan',
- action='store_true',
- help=_("Do not make the network VLAN transparent"))
-
# TODO(sindhu): Use the SDK resource mapped attribute names once the
# OSC minimum requirements include SDK 1.0.
@@ -282,6 +267,16 @@ class CreateNetwork(common.NetworkAndComputeShowOne):
metavar='<qos-policy>',
help=_("QoS policy to attach to this network (name or ID)")
)
+ vlan_transparent_grp = parser.add_mutually_exclusive_group()
+ vlan_transparent_grp.add_argument(
+ '--transparent-vlan',
+ action='store_true',
+ help=_("Make the network VLAN transparent"))
+ vlan_transparent_grp.add_argument(
+ '--no-transparent-vlan',
+ action='store_true',
+ help=_("Do not make the network VLAN transparent"))
+
_add_additional_network_options(parser)
return parser
@@ -296,6 +291,11 @@ class CreateNetwork(common.NetworkAndComputeShowOne):
def take_action_network(self, client, parsed_args):
attrs = _get_attrs_network(self.app.client_manager, parsed_args)
+ if parsed_args.transparent_vlan:
+ attrs['vlan_transparent'] = True
+ if parsed_args.no_transparent_vlan:
+ attrs['vlan_transparent'] = False
+
obj = client.create_network(**attrs)
display_columns, columns = _get_columns_network(obj)
data = utils.get_item_properties(obj, columns, formatters=_formatters)