diff options
| author | Zuul <zuul@review.opendev.org> | 2021-03-06 13:57:27 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2021-03-06 13:57:27 +0000 |
| commit | 274d1eeffb9facc5d802c54a2360491e582a31b0 (patch) | |
| tree | 91cb92ffeaa942a6d9b38e6b97d96a78906195ec /openstackclient/tests | |
| parent | 9414435607e6ceab606512d00035ba3212029971 (diff) | |
| parent | ed731d6cd9254eae047d14ccd55132229e13e7d1 (diff) | |
| download | python-openstackclient-274d1eeffb9facc5d802c54a2360491e582a31b0.tar.gz | |
Merge "network: Add missing subnet unset --gateway <subnet-id>"
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/test_subnet.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/network/v2/test_subnet.py b/openstackclient/tests/unit/network/v2/test_subnet.py index 1b4bfdad..6085cda8 100644 --- a/openstackclient/tests/unit/network/v2/test_subnet.py +++ b/openstackclient/tests/unit/network/v2/test_subnet.py @@ -1264,6 +1264,7 @@ class TestUnsetSubnet(TestSubnet): 'end': '8.8.8.170'}], 'service_types': ['network:router_gateway', 'network:floatingip_agent_gateway'], + 'gateway_ip': 'fe80::a00a:0:c0de:0:1', 'tags': ['green', 'red'], }) self.network.find_subnet = mock.Mock(return_value=self._testsubnet) self.network.update_subnet = mock.Mock(return_value=None) @@ -1277,6 +1278,7 @@ class TestUnsetSubnet(TestSubnet): '--host-route', 'destination=10.30.30.30/24,gateway=10.30.30.1', '--allocation-pool', 'start=8.8.8.100,end=8.8.8.150', '--service-type', 'network:router_gateway', + '--gateway', self._testsubnet.name, ] verifylist = [ @@ -1286,6 +1288,7 @@ class TestUnsetSubnet(TestSubnet): ('allocation_pools', [{ 'start': '8.8.8.100', 'end': '8.8.8.150'}]), ('service_types', ['network:router_gateway']), + ('gateway', True), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) @@ -1297,6 +1300,7 @@ class TestUnsetSubnet(TestSubnet): "destination": "10.20.20.0/24", "nexthop": "10.20.20.1"}], 'allocation_pools': [{'start': '8.8.8.160', 'end': '8.8.8.170'}], 'service_types': ['network:floatingip_agent_gateway'], + 'gateway_ip': None, } self.network.update_subnet.assert_called_once_with( self._testsubnet, **attrs) |
