Switch to use idempotent_id decorator from tempest.lib

Decorator idempotent_id() in tempest.test is deprecated and
tempest.lib.decorators.idempotent_id() should be used instead.
This patch switch all tempest tests to use new decorator.

Change-Id: I2df9c13fbb44b8807da6805761ad30bfd010dc55
diff --git a/neutron/tests/tempest/api/test_subnetpools.py b/neutron/tests/tempest/api/test_subnetpools.py
index 763d06c..ec47606 100644
--- a/neutron/tests/tempest/api/test_subnetpools.py
+++ b/neutron/tests/tempest/api/test_subnetpools.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -91,7 +92,7 @@
             self.assertEqual(expected_values['prefixes'],
                              updated_pool['prefixes'])
 
-    @test.idempotent_id('6e1781ec-b45b-4042-aebe-f485c022996e')
+    @decorators.idempotent_id('6e1781ec-b45b-4042-aebe-f485c022996e')
     def test_create_list_subnetpool(self):
         created_subnetpool = self._create_subnetpool()
         body = self.client.list_subnetpools()
@@ -103,7 +104,7 @@
                       [sp['name'] for sp in subnetpools],
                       "Created subnetpool name should be in the list")
 
-    @test.idempotent_id('c72c1c0c-2193-4aca-ddd4-b1442640bbbb')
+    @decorators.idempotent_id('c72c1c0c-2193-4aca-ddd4-b1442640bbbb')
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
     def test_create_update_subnetpool_description(self):
@@ -121,7 +122,7 @@
         body = subnet_pools[0]
         self.assertEqual('d2', body['description'])
 
-    @test.idempotent_id('741d08c2-1e3f-42be-99c7-0ea93c5b728c')
+    @decorators.idempotent_id('741d08c2-1e3f-42be-99c7-0ea93c5b728c')
     def test_get_subnetpool(self):
         created_subnetpool = self._create_subnetpool()
         prefixlen = self._subnetpool_data['min_prefixlen']
@@ -133,7 +134,7 @@
         self.assertEqual(prefixlen, subnetpool['default_prefixlen'])
         self.assertFalse(subnetpool['shared'])
 
-    @test.idempotent_id('5bf9f1e2-efc8-4195-acf3-d12b2bd68dd3')
+    @decorators.idempotent_id('5bf9f1e2-efc8-4195-acf3-d12b2bd68dd3')
     @test.requires_ext(extension="project-id", service="network")
     def test_show_subnetpool_has_project_id(self):
         subnetpool = self._create_subnetpool()
@@ -144,7 +145,7 @@
         self.assertEqual(self.client.tenant_id, show_subnetpool['project_id'])
         self.assertEqual(self.client.tenant_id, show_subnetpool['tenant_id'])
 
-    @test.idempotent_id('764f1b93-1c4a-4513-9e7b-6c2fc5e9270c')
+    @decorators.idempotent_id('764f1b93-1c4a-4513-9e7b-6c2fc5e9270c')
     def test_tenant_update_subnetpool(self):
         created_subnetpool = self._create_subnetpool()
         pool_id = created_subnetpool['id']
@@ -158,7 +159,7 @@
                                                 subnetpool)
         self.assertFalse(subnetpool['shared'])
 
-    @test.idempotent_id('4b496082-c992-4319-90be-d4a7ce646290')
+    @decorators.idempotent_id('4b496082-c992-4319-90be-d4a7ce646290')
     def test_update_subnetpool_prefixes_append(self):
         # We can append new prefixes to subnetpool
         create_subnetpool = self._create_subnetpool()
@@ -173,7 +174,7 @@
         self.assertIn(self.new_prefix, prefixes)
         self.assertIn(old_prefixes[0], prefixes)
 
-    @test.idempotent_id('2cae5d6a-9d32-42d8-8067-f13970ae13bb')
+    @decorators.idempotent_id('2cae5d6a-9d32-42d8-8067-f13970ae13bb')
     def test_update_subnetpool_prefixes_extend(self):
         # We can extend current subnetpool prefixes
         created_subnetpool = self._create_subnetpool()
@@ -186,7 +187,7 @@
         self.assertIn(self.larger_prefix, prefixes)
         self.assertNotIn(old_prefixes[0], prefixes)
 
-    @test.idempotent_id('d70c6c35-913b-4f24-909f-14cd0d29b2d2')
+    @decorators.idempotent_id('d70c6c35-913b-4f24-909f-14cd0d29b2d2')
     def test_admin_create_shared_subnetpool(self):
         created_subnetpool = self._create_subnetpool(is_admin=True,
                                                      shared=True)
@@ -219,7 +220,7 @@
         subnet = body['subnet']
         return pool_id, subnet
 
-    @test.idempotent_id('1362ed7d-3089-42eb-b3a5-d6cb8398ee77')
+    @decorators.idempotent_id('1362ed7d-3089-42eb-b3a5-d6cb8398ee77')
     def test_create_subnet_from_pool_with_prefixlen(self):
         subnet_values = {"prefixlen": self.max_prefixlen}
         pool_id, subnet = self._create_subnet_from_pool(
@@ -228,7 +229,7 @@
         self.assertEqual(pool_id, subnet['subnetpool_id'])
         self.assertTrue(cidr.endswith(str(self.max_prefixlen)))
 
-    @test.idempotent_id('86b86189-9789-4582-9c3b-7e2bfe5735ee')
+    @decorators.idempotent_id('86b86189-9789-4582-9c3b-7e2bfe5735ee')
     def test_create_subnet_from_pool_with_subnet_cidr(self):
         subnet_values = {"cidr": self.subnet_cidr}
         pool_id, subnet = self._create_subnet_from_pool(
@@ -237,7 +238,7 @@
         self.assertEqual(pool_id, subnet['subnetpool_id'])
         self.assertEqual(cidr, self.subnet_cidr)
 
-    @test.idempotent_id('83f76e3a-9c40-40c2-a015-b7c5242178d8')
+    @decorators.idempotent_id('83f76e3a-9c40-40c2-a015-b7c5242178d8')
     def test_create_subnet_from_pool_with_default_prefixlen(self):
         # If neither cidr nor prefixlen is specified,
         # subnet will use subnetpool default_prefixlen for cidr.
@@ -247,7 +248,7 @@
         prefixlen = self._subnetpool_data['min_prefixlen']
         self.assertTrue(cidr.endswith(str(prefixlen)))
 
-    @test.idempotent_id('a64af292-ec52-4bde-b654-a6984acaf477')
+    @decorators.idempotent_id('a64af292-ec52-4bde-b654-a6984acaf477')
     def test_create_subnet_from_pool_with_quota(self):
         pool_values = {'default_quota': 4}
         subnet_values = {"prefixlen": self.max_prefixlen}
@@ -257,7 +258,7 @@
         self.assertEqual(pool_id, subnet['subnetpool_id'])
         self.assertTrue(cidr.endswith(str(self.max_prefixlen)))
 
-    @test.idempotent_id('49b44c64-1619-4b29-b527-ffc3c3115dc4')
+    @decorators.idempotent_id('49b44c64-1619-4b29-b527-ffc3c3115dc4')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_subnetpool_associate_address_scope(self):
         address_scope = self.create_address_scope(
@@ -269,7 +270,7 @@
         self.assertEqual(address_scope['id'],
                          body['subnetpool']['address_scope_id'])
 
-    @test.idempotent_id('910b6393-db24-4f6f-87dc-b36892ad6c8c')
+    @decorators.idempotent_id('910b6393-db24-4f6f-87dc-b36892ad6c8c')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_associate_address_scope(self):
         address_scope = self.create_address_scope(
@@ -285,7 +286,7 @@
         self.assertEqual(address_scope['id'],
                          body['subnetpool']['address_scope_id'])
 
-    @test.idempotent_id('18302e80-46a3-4563-82ac-ccd1dd57f652')
+    @decorators.idempotent_id('18302e80-46a3-4563-82ac-ccd1dd57f652')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_associate_another_address_scope(self):
         address_scope = self.create_address_scope(
@@ -306,7 +307,7 @@
         self.assertEqual(another_address_scope['id'],
                          body['subnetpool']['address_scope_id'])
 
-    @test.idempotent_id('f8970048-e41b-42d6-934b-a1297b07706a')
+    @decorators.idempotent_id('f8970048-e41b-42d6-934b-a1297b07706a')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_disassociate_address_scope(self):
         address_scope = self.create_address_scope(
@@ -341,7 +342,7 @@
         cls._subnetpool_data = {'min_prefixlen': min_prefixlen,
                                 'prefixes': prefixes}
 
-    @test.idempotent_id('f62d73dc-cf6f-4879-b94b-dab53982bf3b')
+    @decorators.idempotent_id('f62d73dc-cf6f-4879-b94b-dab53982bf3b')
     def test_create_dual_stack_subnets_from_subnetpools(self):
         pool_id_v6, subnet_v6 = self._create_subnet_from_pool()
         pool_values_v4 = {'prefixes': ['192.168.0.0/16'],
@@ -368,42 +369,42 @@
         for name in cls.resource_names:
             cls._create_subnetpool(name=name)
 
-    @test.idempotent_id('6e3f842e-6bfb-49cb-82d3-0026be4e8e04')
+    @decorators.idempotent_id('6e3f842e-6bfb-49cb-82d3-0026be4e8e04')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('f336859b-b868-438c-a6fc-2c06374115f2')
+    @decorators.idempotent_id('f336859b-b868-438c-a6fc-2c06374115f2')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('1291fae7-c196-4372-ad59-ce7988518f7b')
+    @decorators.idempotent_id('1291fae7-c196-4372-ad59-ce7988518f7b')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('ddb20d14-1952-49b4-a17e-231cc2239a52')
+    @decorators.idempotent_id('ddb20d14-1952-49b4-a17e-231cc2239a52')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('b3bd9665-2769-4a43-b50c-31b1add12891')
+    @decorators.idempotent_id('b3bd9665-2769-4a43-b50c-31b1add12891')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('1ec1f325-43b0-406e-96ce-20539e38a61d')
+    @decorators.idempotent_id('1ec1f325-43b0-406e-96ce-20539e38a61d')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('f43a293e-4aaa-48f4-aeaf-de63a676357c')
+    @decorators.idempotent_id('f43a293e-4aaa-48f4-aeaf-de63a676357c')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('73511385-839c-4829-8ac1-b5ad992126c4')
+    @decorators.idempotent_id('73511385-839c-4829-8ac1-b5ad992126c4')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
 
-    @test.idempotent_id('82a13efc-c18f-4249-b8ec-cec7cf26fbd6')
+    @decorators.idempotent_id('82a13efc-c18f-4249-b8ec-cec7cf26fbd6')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
 
-    @test.idempotent_id('27feb3f8-40f4-4e50-8cd2-7d0096a98682')
+    @decorators.idempotent_id('27feb3f8-40f4-4e50-8cd2-7d0096a98682')
     def test_list_validation_filters(self):
         self._test_list_validation_filters()