From 73d15e3768e28008515781b30e533ddf3d8d4159 Mon Sep 17 00:00:00 2001 From: reedip Date: Fri, 1 Apr 2016 14:26:16 +0900 Subject: 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 --- openstackclient/tests/network/v2/test_port.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openstackclient/tests/network') 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) -- cgit v1.2.1