summaryrefslogtreecommitdiff
path: root/openstackclient/tests/network/v2
diff options
context:
space:
mode:
authorHuanxuan Ao <huanxuan.ao@easystack.cn>2016-06-15 13:57:39 +0800
committerHuanxuan Ao <huanxuan.ao@easystack.cn>2016-06-15 20:33:09 +0800
commitca5e8e6c8540e457a620cc90d321a08e7417de32 (patch)
treee6aa4b09c6252a9aec2d5c86c2440bf0e68b7cca /openstackclient/tests/network/v2
parent0ec711c640120539e4968c81fd6ee158257845d4 (diff)
downloadpython-openstackclient-ca5e8e6c8540e457a620cc90d321a08e7417de32.tar.gz
Add default IP version and fix help messages for "ip availability list"
There was not a default IP version in "ip availability list" command, if we used this command without "--ip-version" option, the output was different from the outputs with the option "--ip-version 4" and "--ip-version 6" and it is not right. This patch add default IP version (default is 4) in ``ip availability list`` command and make this command work properly without ``--ip-version`` option. And also fix the help message. Change-Id: Idc08ab6eaf05946eb2ab59bfb3d4497a383d987d Closes-Bug: #1592761
Diffstat (limited to 'openstackclient/tests/network/v2')
-rw-r--r--openstackclient/tests/network/v2/test_ip_availability.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/openstackclient/tests/network/v2/test_ip_availability.py b/openstackclient/tests/network/v2/test_ip_availability.py
index 39e11cd5..c6ec2b0b 100644
--- a/openstackclient/tests/network/v2/test_ip_availability.py
+++ b/openstackclient/tests/network/v2/test_ip_availability.py
@@ -82,8 +82,10 @@ class TestListIPAvailability(TestIPAvailability):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
+ filters = {'ip_version': 4}
- self.network.network_ip_availabilities.assert_called_once_with()
+ self.network.network_ip_availabilities.assert_called_once_with(
+ **filters)
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, list(data))
@@ -116,7 +118,8 @@ class TestListIPAvailability(TestIPAvailability):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
- filters = {'tenant_id': identity_fakes.project_id}
+ filters = {'tenant_id': identity_fakes.project_id,
+ 'ip_version': 4}
self.network.network_ip_availabilities.assert_called_once_with(
**filters)