summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2018-03-15 13:21:41 +0100
committerIhar Hrachyshka <ihrachys@redhat.com>2018-03-26 14:26:53 +0000
commita3caf7b331709d76fc6aec5222c60688fd6112a9 (patch)
tree9404f13431a1e4ade5cd0b71c9062499d0acad90 /openstackclient/network
parenta2b9d2cd7c0f29ba3ab4a47864b86c6e0016ecbd (diff)
downloadpython-openstackclient-3.14.1.tar.gz
neutron: add --mtu for create/set network3.14.1
Support Neutron network mtu configuration with a new argument, --mtu that allows CLI users to set MTU for Neutron networks. Change-Id: I93d23581c7e8c84eaf9bb3b293360036f60f456b (cherry picked from commit 18563b4132f794cc6612c2897795f96a31b565ae)
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/network.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/openstackclient/network/v2/network.py b/openstackclient/network/v2/network.py
index 4c1725c5..d1c7f005 100644
--- a/openstackclient/network/v2/network.py
+++ b/openstackclient/network/v2/network.py
@@ -107,6 +107,10 @@ def _get_attrs_network(client_manager, parsed_args):
if parsed_args.description:
attrs['description'] = parsed_args.description
+ # set mtu
+ if parsed_args.mtu:
+ attrs['mtu'] = parsed_args.mtu
+
# update_external_network_options
if parsed_args.internal:
attrs['router:external'] = False
@@ -217,6 +221,11 @@ class CreateNetwork(common.NetworkAndComputeShowOne):
metavar='<description>',
help=_("Set network description")
)
+ parser.add_argument(
+ '--mtu',
+ metavar='<mtu>',
+ help=_("Set network mtu")
+ )
identity_common.add_project_domain_option_to_parser(parser)
parser.add_argument(
'--availability-zone-hint',
@@ -619,6 +628,11 @@ class SetNetwork(command.Command):
metavar="<description",
help=_("Set network description")
)
+ parser.add_argument(
+ '--mtu',
+ metavar="<mtu",
+ help=_("Set network mtu")
+ )
port_security_group = parser.add_mutually_exclusive_group()
port_security_group.add_argument(
'--enable-port-security',