summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorreedip <reedip.banerjee@nectechnologies.in>2016-04-01 14:26:16 +0900
committerreedip <reedip.banerjee@nectechnologies.in>2016-04-07 10:59:15 +0900
commit73d15e3768e28008515781b30e533ddf3d8d4159 (patch)
tree7395556cb7a882a4f4dc174719baa0eff43019dd /openstackclient/tests
parent0edab95fd1989dcc06a166a820b115a75dd17d54 (diff)
downloadpython-openstackclient-73d15e3768e28008515781b30e533ddf3d8d4159.tar.gz
Add option to clear information from ports
This patch adds the option of "no-fixed-ip" and "no-binding-profile" which is used to clear the fixed-ip and binding:profile information from the ports. Change-Id: I946301eaf6c647bae55e4f416aa0d98e5f06e699
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/network/v2/test_port.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/openstackclient/tests/network/v2/test_port.py b/openstackclient/tests/network/v2/test_port.py
index 31454dba..3b1a641a 100644
--- a/openstackclient/tests/network/v2/test_port.py
+++ b/openstackclient/tests/network/v2/test_port.py
@@ -298,10 +298,14 @@ class TestSetPort(TestPort):
def test_set_this(self):
arglist = [
'--disable',
+ '--no-fixed-ip',
+ '--no-binding-profile',
self._port.name,
]
verifylist = [
('disable', True),
+ ('no_binding_profile', True),
+ ('no_fixed_ip', True),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@@ -309,6 +313,8 @@ class TestSetPort(TestPort):
attrs = {
'admin_state_up': False,
+ 'binding:profile': {},
+ 'fixed_ips': [],
}
self.network.update_port.assert_called_once_with(self._port, **attrs)
self.assertIsNone(result)