diff options
author | Matt Riedemann <mriedem.os@gmail.com> | 2017-04-25 16:24:50 -0400 |
---|---|---|
committer | Matt Riedemann <mriedem.os@gmail.com> | 2017-04-25 21:11:47 -0400 |
commit | e303cf11bf6c8652edf13caa0ddf238103ea8601 (patch) | |
tree | 2ac922969fa254fde0b34d65c005447a3de3a6ca /novaclient/tests/unit/v2/test_shell.py | |
parent | ea3b9f7fef28a7f06b51a3b176c85a1fc33cecaa (diff) | |
download | python-novaclient-e303cf11bf6c8652edf13caa0ddf238103ea8601.tar.gz |
2.44: Deprecate multinic/floatingIP actions and os-virtual-interfaces
The 2.44 microversion deprecates the addFixedIP, removeFixedIP,
addFloatingIP, removeFloatingIP server action APIs and
os-virtual-interfaces API.
This change deprecates the CLIs and python API bindings in novaclient.
Implements blueprint deprecate-multinic-proxy-api
Change-Id: Ie76283962c375b735f30ccb3053db07cf2330de2
Diffstat (limited to 'novaclient/tests/unit/v2/test_shell.py')
-rw-r--r-- | novaclient/tests/unit/v2/test_shell.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py index dbf7e5cb..c9346e50 100644 --- a/novaclient/tests/unit/v2/test_shell.py +++ b/novaclient/tests/unit/v2/test_shell.py @@ -1671,12 +1671,18 @@ class ShellTest(utils.TestCase): self.assert_called('DELETE', '/servers/uuid2/metadata/key1', pos=2) def test_server_floating_ip_associate(self): - self.run_command('floating-ip-associate sample-server 11.0.0.1') + _, err = self.run_command( + 'floating-ip-associate sample-server 11.0.0.1') + self.assertIn('WARNING: Command floating-ip-associate is deprecated', + err) self.assert_called('POST', '/servers/1234/action', {'addFloatingIp': {'address': '11.0.0.1'}}) def test_server_floating_ip_disassociate(self): - self.run_command('floating-ip-disassociate sample-server 11.0.0.1') + _, err = self.run_command( + 'floating-ip-disassociate sample-server 11.0.0.1') + self.assertIn( + 'WARNING: Command floating-ip-disassociate is deprecated', err) self.assert_called('POST', '/servers/1234/action', {'removeFloatingIp': {'address': '11.0.0.1'}}) @@ -2500,12 +2506,14 @@ class ShellTest(utils.TestCase): self.assert_called('PUT', '/os-cloudpipe/configure-project', body) def test_add_fixed_ip(self): - self.run_command('add-fixed-ip sample-server 1') + _, err = self.run_command('add-fixed-ip sample-server 1') + self.assertIn('WARNING: Command add-fixed-ip is deprecated', err) self.assert_called('POST', '/servers/1234/action', {'addFixedIp': {'networkId': '1'}}) def test_remove_fixed_ip(self): - self.run_command('remove-fixed-ip sample-server 10.0.0.10') + _, err = self.run_command('remove-fixed-ip sample-server 10.0.0.10') + self.assertIn('WARNING: Command remove-fixed-ip is deprecated', err) self.assert_called('POST', '/servers/1234/action', {'removeFixedIp': {'address': '10.0.0.10'}}) @@ -2867,7 +2875,9 @@ class ShellTest(utils.TestCase): self.assert_called('GET', '/os-server-groups?limit=20&offset=5') def test_list_server_os_virtual_interfaces(self): - self.run_command('virtual-interface-list 1234') + _, err = self.run_command('virtual-interface-list 1234') + self.assertIn('WARNING: Command virtual-interface-list is deprecated', + err) self.assert_called('GET', '/servers/1234/os-virtual-interfaces') def test_versions(self): @@ -2903,6 +2913,7 @@ class ShellTest(utils.TestCase): 41, # There are no version-wrapped shell method changes for this. 42, # There are no version-wrapped shell method changes for this. 43, # There are no version-wrapped shell method changes for this. + 44, # There are no version-wrapped shell method changes for this. ]) versions_supported = set(range(0, novaclient.API_MAX_VERSION.ver_minor + 1)) |