summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/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/tests/unit/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/tests/unit/network')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py1
-rw-r--r--openstackclient/tests/unit/network/v2/test_network.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index a77cab8b..5f3a8a4a 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -335,6 +335,7 @@ class FakeNetwork(object):
'name': 'network-name-' + uuid.uuid4().hex,
'status': 'ACTIVE',
'description': 'network-description-' + uuid.uuid4().hex,
+ 'mtu': '1350',
'tenant_id': 'project-id-' + uuid.uuid4().hex,
'admin_state_up': True,
'shared': False,
diff --git a/openstackclient/tests/unit/network/v2/test_network.py b/openstackclient/tests/unit/network/v2/test_network.py
index 357088f3..9f4a6acc 100644
--- a/openstackclient/tests/unit/network/v2/test_network.py
+++ b/openstackclient/tests/unit/network/v2/test_network.py
@@ -64,6 +64,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
'ipv4_address_scope',
'ipv6_address_scope',
'is_default',
+ 'mtu',
'name',
'port_security_enabled',
'project_id',
@@ -87,6 +88,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
_network.ipv4_address_scope_id,
_network.ipv6_address_scope_id,
_network.is_default,
+ _network.mtu,
_network.name,
_network.is_port_security_enabled,
_network.project_id,
@@ -149,6 +151,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
"--disable",
"--share",
"--description", self._network.description,
+ "--mtu", self._network.mtu,
"--project", self.project.name,
"--project-domain", self.domain.name,
"--availability-zone-hint", "nova",
@@ -165,6 +168,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
('disable', True),
('share', True),
('description', self._network.description),
+ ('mtu', self._network.mtu),
('project', self.project.name),
('project_domain', self.domain.name),
('availability_zone_hints', ["nova"]),
@@ -188,6 +192,7 @@ class TestCreateNetworkIdentityV3(TestNetwork):
'name': self._network.name,
'shared': True,
'description': self._network.description,
+ 'mtu': self._network.mtu,
# TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor
'tenant_id': self.project.id,
'project_id': self.project.id,
@@ -286,6 +291,7 @@ class TestCreateNetworkIdentityV2(TestNetwork):
'ipv4_address_scope',
'ipv6_address_scope',
'is_default',
+ 'mtu',
'name',
'port_security_enabled',
'project_id',
@@ -309,6 +315,7 @@ class TestCreateNetworkIdentityV2(TestNetwork):
_network.ipv4_address_scope_id,
_network.ipv6_address_scope_id,
_network.is_default,
+ _network.mtu,
_network.name,
_network.is_port_security_enabled,
_network.project_id,
@@ -1023,6 +1030,7 @@ class TestShowNetwork(TestNetwork):
'ipv4_address_scope',
'ipv6_address_scope',
'is_default',
+ 'mtu',
'name',
'port_security_enabled',
'project_id',
@@ -1046,6 +1054,7 @@ class TestShowNetwork(TestNetwork):
_network.ipv4_address_scope_id,
_network.ipv6_address_scope_id,
_network.is_default,
+ _network.mtu,
_network.name,
_network.is_port_security_enabled,
_network.project_id,