From 0aa2304f38da0696576827fc4d71f2cf7cc13ad6 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Fri, 17 Jun 2016 15:06:40 +0800 Subject: Transfer "ip floating CRUD" to "floating ip CRUD" This patch does the following things to transfer "ip floating xxx" to "floating ip xxx": * Add new command "floating ip create/delete/list/show", and doc. * Deprecate "ip floating create/delete/list/show" command. Change-Id: Ib071acaac81988431244e858bddafa7f93403df5 Implements: blueprint rework-ip-commands Closes-bug: 1555990 Co-Authored-By: Dean Troyer --- functional/tests/compute/v2/test_server.py | 11 ++++++----- functional/tests/network/v2/test_floating_ip.py | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'functional') diff --git a/functional/tests/compute/v2/test_server.py b/functional/tests/compute/v2/test_server.py index 511ac372..a9d0e9c1 100644 --- a/functional/tests/compute/v2/test_server.py +++ b/functional/tests/compute/v2/test_server.py @@ -249,24 +249,25 @@ class ServerTests(test.TestCase): self.wait_for_status("ACTIVE") # attach ip opts = self.get_opts(["id", "floating_ip_address"]) - raw_output = self.openstack('ip floating create ' + + raw_output = self.openstack('floating ip create ' + self.IP_POOL + opts) ip, ipid, rol = tuple(raw_output.split('\n')) self.assertNotEqual("", ipid) self.assertNotEqual("", ip) - raw_output = self.openstack('ip floating add ' + ip + ' ' + self.NAME) + raw_output = self.openstack('server add floating ip ' + self.NAME + + ' ' + ip) self.assertEqual("", raw_output) raw_output = self.openstack('server show ' + self.NAME) self.assertIn(ip, raw_output) # detach ip - raw_output = self.openstack('ip floating remove ' + ip + ' ' + - self.NAME) + raw_output = self.openstack('server remove floating ip ' + self.NAME + + ' ' + ip) self.assertEqual("", raw_output) raw_output = self.openstack('server show ' + self.NAME) self.assertNotIn(ip, raw_output) - raw_output = self.openstack('ip floating delete ' + ipid) + raw_output = self.openstack('floating ip delete ' + ipid) self.assertEqual("", raw_output) def test_server_reboot(self): diff --git a/functional/tests/network/v2/test_floating_ip.py b/functional/tests/network/v2/test_floating_ip.py index 3b314b70..7e7c63f4 100644 --- a/functional/tests/network/v2/test_floating_ip.py +++ b/functional/tests/network/v2/test_floating_ip.py @@ -35,12 +35,12 @@ class FloatingIpTests(test.TestCase): ) opts = cls.get_opts(cls.FIELDS) raw_output = cls.openstack( - 'ip floating create ' + cls.NETWORK_NAME + opts) + 'floating ip create ' + cls.NETWORK_NAME + opts) cls.ID = raw_output.strip('\n') @classmethod def tearDownClass(cls): - raw_output = cls.openstack('ip floating delete ' + cls.ID) + raw_output = cls.openstack('floating ip delete ' + cls.ID) cls.assertOutput('', raw_output) raw_output = cls.openstack('subnet delete ' + cls.SUBNET_NAME) cls.assertOutput('', raw_output) @@ -49,10 +49,10 @@ class FloatingIpTests(test.TestCase): def test_floating_ip_list(self): opts = self.get_opts(self.HEADERS) - raw_output = self.openstack('ip floating list' + opts) + raw_output = self.openstack('floating ip list' + opts) self.assertIn(self.ID, raw_output) def test_floating_ip_show(self): opts = self.get_opts(self.FIELDS) - raw_output = self.openstack('ip floating show ' + self.ID + opts) + raw_output = self.openstack('floating ip show ' + self.ID + opts) self.assertEqual(self.ID + "\n", raw_output) -- cgit v1.2.1