Switch to decorators.idempotent_id on compute.*

So many modules are using test.idempotent_id and this is for
switching to decorators.idempotent_id on compute.*.

Change-Id: Ib4ace375a41b9607d1b1cea7dda296fb601a0264
Related-Bug: #1616913
diff --git a/tempest/api/compute/certificates/test_certificates.py b/tempest/api/compute/certificates/test_certificates.py
index d5c7302..a39fec9 100644
--- a/tempest/api/compute/certificates/test_certificates.py
+++ b/tempest/api/compute/certificates/test_certificates.py
@@ -15,7 +15,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -28,14 +28,14 @@
         if not CONF.compute_feature_enabled.nova_cert:
             raise cls.skipException("Nova cert is not available")
 
-    @test.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
+    @decorators.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
     def test_create_root_certificate(self):
         # create certificates
         body = self.certificates_client.create_certificate()['certificate']
         self.assertIn('data', body)
         self.assertIn('private_key', body)
 
-    @test.idempotent_id('3ac273d0-92d2-4632-bdfc-afbc21d4606c')
+    @decorators.idempotent_id('3ac273d0-92d2-4632-bdfc-afbc21d4606c')
     def test_get_root_certificate(self):
         # get the root certificate
         body = (self.certificates_client.show_certificate('root')
diff --git a/tempest/api/compute/flavors/test_flavors.py b/tempest/api/compute/flavors/test_flavors.py
index 7e01296..546667f 100644
--- a/tempest/api/compute/flavors/test_flavors.py
+++ b/tempest/api/compute/flavors/test_flavors.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
+from tempest.lib import decorators
 from tempest import test
 
 
@@ -27,7 +28,7 @@
         cls.client = cls.flavors_client
 
     @test.attr(type='smoke')
-    @test.idempotent_id('e36c0eaa-dff5-4082-ad1f-3f9a80aa3f59')
+    @decorators.idempotent_id('e36c0eaa-dff5-4082-ad1f-3f9a80aa3f59')
     def test_list_flavors(self):
         # List of all flavors should contain the expected flavor
         flavors = self.client.list_flavors()['flavors']
@@ -36,7 +37,7 @@
                              'name': flavor['name']}
         self.assertIn(flavor_min_detail, flavors)
 
-    @test.idempotent_id('6e85fde4-b3cd-4137-ab72-ed5f418e8c24')
+    @decorators.idempotent_id('6e85fde4-b3cd-4137-ab72-ed5f418e8c24')
     def test_list_flavors_with_detail(self):
         # Detailed list of all flavors should contain the expected flavor
         flavors = self.client.list_flavors(detail=True)['flavors']
@@ -44,27 +45,27 @@
         self.assertIn(flavor, flavors)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('1f12046b-753d-40d2-abb6-d8eb8b30cb2f')
+    @decorators.idempotent_id('1f12046b-753d-40d2-abb6-d8eb8b30cb2f')
     def test_get_flavor(self):
         # The expected flavor details should be returned
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
         self.assertEqual(self.flavor_ref, flavor['id'])
 
-    @test.idempotent_id('8d7691b3-6ed4-411a-abc9-2839a765adab')
+    @decorators.idempotent_id('8d7691b3-6ed4-411a-abc9-2839a765adab')
     def test_list_flavors_limit_results(self):
         # Only the expected number of flavors should be returned
         params = {'limit': 1}
         flavors = self.client.list_flavors(**params)['flavors']
         self.assertEqual(1, len(flavors))
 
-    @test.idempotent_id('b26f6327-2886-467a-82be-cef7a27709cb')
+    @decorators.idempotent_id('b26f6327-2886-467a-82be-cef7a27709cb')
     def test_list_flavors_detailed_limit_results(self):
         # Only the expected number of flavors (detailed) should be returned
         params = {'limit': 1}
         flavors = self.client.list_flavors(detail=True, **params)['flavors']
         self.assertEqual(1, len(flavors))
 
-    @test.idempotent_id('e800f879-9828-4bd0-8eae-4f17189951fb')
+    @decorators.idempotent_id('e800f879-9828-4bd0-8eae-4f17189951fb')
     def test_list_flavors_using_marker(self):
         # The list of flavors should start from the provided marker
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
@@ -75,7 +76,7 @@
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]),
                          'The list of flavors did not start after the marker.')
 
-    @test.idempotent_id('6db2f0c0-ddee-4162-9c84-0703d3dd1107')
+    @decorators.idempotent_id('6db2f0c0-ddee-4162-9c84-0703d3dd1107')
     def test_list_flavors_detailed_using_marker(self):
         # The list of flavors should start from the provided marker
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
@@ -86,7 +87,7 @@
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]),
                          'The list of flavors did not start after the marker.')
 
-    @test.idempotent_id('3df2743e-3034-4e57-a4cb-b6527f6eac79')
+    @decorators.idempotent_id('3df2743e-3034-4e57-a4cb-b6527f6eac79')
     def test_list_flavors_detailed_filter_by_min_disk(self):
         # The detailed list of flavors should be filtered by disk space
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
@@ -96,7 +97,7 @@
         flavors = self.client.list_flavors(detail=True, **params)['flavors']
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
-    @test.idempotent_id('09fe7509-b4ee-4b34-bf8b-39532dc47292')
+    @decorators.idempotent_id('09fe7509-b4ee-4b34-bf8b-39532dc47292')
     def test_list_flavors_detailed_filter_by_min_ram(self):
         # The detailed list of flavors should be filtered by RAM
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
@@ -106,7 +107,7 @@
         flavors = self.client.list_flavors(detail=True, **params)['flavors']
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
-    @test.idempotent_id('10645a4d-96f5-443f-831b-730711e11dd4')
+    @decorators.idempotent_id('10645a4d-96f5-443f-831b-730711e11dd4')
     def test_list_flavors_filter_by_min_disk(self):
         # The list of flavors should be filtered by disk space
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
@@ -116,7 +117,7 @@
         flavors = self.client.list_flavors(**params)['flavors']
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
-    @test.idempotent_id('935cf550-e7c8-4da6-8002-00f92d5edfaa')
+    @decorators.idempotent_id('935cf550-e7c8-4da6-8002-00f92d5edfaa')
     def test_list_flavors_filter_by_min_ram(self):
         # The list of flavors should be filtered by RAM
         flavor = self.client.show_flavor(self.flavor_ref)['flavor']
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
index dcb2d2c..4d8416f 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
@@ -16,6 +16,7 @@
 from tempest.api.compute.floating_ips import base
 from tempest import config
 from tempest.lib.common.utils import test_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -52,7 +53,7 @@
             cls.client.delete_floating_ip(cls.floating_ip_id)
         super(FloatingIPsTestJSON, cls).resource_cleanup()
 
-    @test.idempotent_id('f7bfb946-297e-41b8-9e8c-aba8e9bb5194')
+    @decorators.idempotent_id('f7bfb946-297e-41b8-9e8c-aba8e9bb5194')
     @test.services('network')
     def test_allocate_floating_ip(self):
         # Positive test:Allocation of a new floating IP to a project
@@ -68,7 +69,7 @@
         body = self.client.list_floating_ips()['floating_ips']
         self.assertIn(floating_ip_details, body)
 
-    @test.idempotent_id('de45e989-b5ca-4a9b-916b-04a52e7bbb8b')
+    @decorators.idempotent_id('de45e989-b5ca-4a9b-916b-04a52e7bbb8b')
     @test.services('network')
     def test_delete_floating_ip(self):
         # Positive test:Deletion of valid floating IP from project
@@ -83,7 +84,7 @@
         # Check it was really deleted.
         self.client.wait_for_resource_deletion(floating_ip_body['id'])
 
-    @test.idempotent_id('307efa27-dc6f-48a0-8cd2-162ce3ef0b52')
+    @decorators.idempotent_id('307efa27-dc6f-48a0-8cd2-162ce3ef0b52')
     @test.services('network')
     def test_associate_disassociate_floating_ip(self):
         # Positive test:Associate and disassociate the provided floating IP
@@ -104,7 +105,7 @@
             self.floating_ip,
             self.server_id)
 
-    @test.idempotent_id('6edef4b2-aaf1-4abc-bbe3-993e2561e0fe')
+    @decorators.idempotent_id('6edef4b2-aaf1-4abc-bbe3-993e2561e0fe')
     @test.services('network')
     def test_associate_already_associated_floating_ip(self):
         # positive test:Association of an already associated floating IP
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
index 31cf39c..5e47d18 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
@@ -16,6 +16,7 @@
 from tempest.api.compute.floating_ips import base
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -48,7 +49,7 @@
                 break
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('6e0f059b-e4dd-48fb-8207-06e3bba5b074')
+    @decorators.idempotent_id('6e0f059b-e4dd-48fb-8207-06e3bba5b074')
     @test.services('network')
     def test_allocate_floating_ip_from_nonexistent_pool(self):
         # Negative test:Allocation of a new floating IP from a nonexistent_pool
@@ -58,7 +59,7 @@
                           pool="non_exist_pool")
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('ae1c55a8-552b-44d4-bfb6-2a115a15d0ba')
+    @decorators.idempotent_id('ae1c55a8-552b-44d4-bfb6-2a115a15d0ba')
     @test.services('network')
     def test_delete_nonexistent_floating_ip(self):
         # Negative test:Deletion of a nonexistent floating IP
@@ -69,7 +70,7 @@
                           self.non_exist_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('595fa616-1a71-4670-9614-46564ac49a4c')
+    @decorators.idempotent_id('595fa616-1a71-4670-9614-46564ac49a4c')
     @test.services('network')
     def test_associate_nonexistent_floating_ip(self):
         # Negative test:Association of a non existent floating IP
@@ -80,7 +81,7 @@
                           "0.0.0.0", self.server_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0a081a66-e568-4e6b-aa62-9587a876dca8')
+    @decorators.idempotent_id('0a081a66-e568-4e6b-aa62-9587a876dca8')
     @test.services('network')
     def test_dissociate_nonexistent_floating_ip(self):
         # Negative test:Dissociation of a non existent floating IP should fail
@@ -90,7 +91,7 @@
                           "0.0.0.0", self.server_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('804b4fcb-bbf5-412f-925d-896672b61eb3')
+    @decorators.idempotent_id('804b4fcb-bbf5-412f-925d-896672b61eb3')
     @test.services('network')
     def test_associate_ip_to_server_without_passing_floating_ip(self):
         # Negative test:Association of empty floating IP to specific server
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips.py b/tempest/api/compute/floating_ips/test_list_floating_ips.py
index 5617e8a..71f5f13 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips.py
@@ -15,6 +15,7 @@
 
 from tempest.api.compute import base
 from tempest import config
+from tempest.lib import decorators
 from tempest import test
 
 CONF = config.CONF
@@ -45,7 +46,7 @@
             cls.client.delete_floating_ip(f_id)
         super(FloatingIPDetailsTestJSON, cls).resource_cleanup()
 
-    @test.idempotent_id('16db31c3-fb85-40c9-bbe2-8cf7b67ff99f')
+    @decorators.idempotent_id('16db31c3-fb85-40c9-bbe2-8cf7b67ff99f')
     @test.services('network')
     def test_list_floating_ips(self):
         # Positive test:Should return the list of floating IPs
@@ -56,7 +57,7 @@
         for i in range(3):
             self.assertIn(self.floating_ip[i], floating_ips)
 
-    @test.idempotent_id('eef497e0-8ff7-43c8-85ef-558440574f84')
+    @decorators.idempotent_id('eef497e0-8ff7-43c8-85ef-558440574f84')
     @test.services('network')
     def test_get_floating_ip_details(self):
         # Positive test:Should be able to GET the details of floatingIP
@@ -78,7 +79,7 @@
                          body['fixed_ip'])
         self.assertEqual(floating_ip_id, body['id'])
 
-    @test.idempotent_id('df389fc8-56f5-43cc-b290-20eda39854d3')
+    @decorators.idempotent_id('df389fc8-56f5-43cc-b290-20eda39854d3')
     @test.services('network')
     def test_list_floating_ip_pools(self):
         # Positive test:Should return the list of floating IP Pools
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
index ea56ae9..00a4075 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
@@ -16,6 +16,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -30,7 +31,7 @@
         cls.client = cls.floating_ips_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('7ab18834-4a4b-4f28-a2c5-440579866695')
+    @decorators.idempotent_id('7ab18834-4a4b-4f28-a2c5-440579866695')
     @test.services('network')
     def test_get_nonexistent_floating_ip_details(self):
         # Negative test:Should not be able to GET the details
diff --git a/tempest/api/compute/images/test_image_metadata.py b/tempest/api/compute/images/test_image_metadata.py
index 26d4efe..f131007 100644
--- a/tempest/api/compute/images/test_image_metadata.py
+++ b/tempest/api/compute/images/test_image_metadata.py
@@ -20,8 +20,8 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions
-from tempest import test
 
 CONF = config.CONF
 
@@ -83,7 +83,7 @@
         meta = {'os_version': 'value1', 'os_distro': 'value2'}
         self.client.set_image_metadata(self.image_id, meta)
 
-    @test.idempotent_id('37ec6edd-cf30-4c53-bd45-ae74db6b0531')
+    @decorators.idempotent_id('37ec6edd-cf30-4c53-bd45-ae74db6b0531')
     def test_list_image_metadata(self):
         # All metadata key/value pairs for an image should be returned
         resp_metadata = self.client.list_image_metadata(self.image_id)
@@ -91,7 +91,7 @@
             'os_version': 'value1', 'os_distro': 'value2'}}
         self.assertEqual(expected, resp_metadata)
 
-    @test.idempotent_id('ece7befc-d3ce-42a4-b4be-c3067a418c29')
+    @decorators.idempotent_id('ece7befc-d3ce-42a4-b4be-c3067a418c29')
     def test_set_image_metadata(self):
         # The metadata for the image should match the new values
         req_metadata = {'os_version': 'value2', 'architecture': 'value3'}
@@ -102,7 +102,7 @@
                          ['metadata'])
         self.assertEqual(req_metadata, resp_metadata)
 
-    @test.idempotent_id('7b491c11-a9d5-40fe-a696-7f7e03d3fea2')
+    @decorators.idempotent_id('7b491c11-a9d5-40fe-a696-7f7e03d3fea2')
     def test_update_image_metadata(self):
         # The metadata for the image should match the updated values
         req_metadata = {'os_version': 'alt1', 'architecture': 'value3'}
@@ -116,14 +116,14 @@
             'architecture': 'value3'}}
         self.assertEqual(expected, resp_metadata)
 
-    @test.idempotent_id('4f5db52f-6685-4c75-b848-f4bb363f9aa6')
+    @decorators.idempotent_id('4f5db52f-6685-4c75-b848-f4bb363f9aa6')
     def test_get_image_metadata_item(self):
         # The value for a specific metadata key should be returned
         meta = self.client.show_image_metadata_item(self.image_id,
                                                     'os_distro')['meta']
         self.assertEqual('value2', meta['os_distro'])
 
-    @test.idempotent_id('f2de776a-4778-4d90-a5da-aae63aee64ae')
+    @decorators.idempotent_id('f2de776a-4778-4d90-a5da-aae63aee64ae')
     def test_set_image_metadata_item(self):
         # The value provided for the given meta item should be set for
         # the image
@@ -134,7 +134,7 @@
         expected = {'metadata': {'os_version': 'alt', 'os_distro': 'value2'}}
         self.assertEqual(expected, resp_metadata)
 
-    @test.idempotent_id('a013796c-ba37-4bb5-8602-d944511def14')
+    @decorators.idempotent_id('a013796c-ba37-4bb5-8602-d944511def14')
     def test_delete_image_metadata_item(self):
         # The metadata value/key pair should be deleted from the image
         self.client.delete_image_metadata_item(self.image_id,
diff --git a/tempest/api/compute/images/test_image_metadata_negative.py b/tempest/api/compute/images/test_image_metadata_negative.py
index 489bfbc..0f5b9d8 100644
--- a/tempest/api/compute/images/test_image_metadata_negative.py
+++ b/tempest/api/compute/images/test_image_metadata_negative.py
@@ -15,6 +15,7 @@
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -27,7 +28,7 @@
         cls.client = cls.compute_images_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('94069db2-792f-4fa8-8bd3-2271a6e0c095')
+    @decorators.idempotent_id('94069db2-792f-4fa8-8bd3-2271a6e0c095')
     def test_list_nonexistent_image_metadata(self):
         # Negative test: List on nonexistent image
         # metadata should not happen
@@ -35,7 +36,7 @@
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('a403ef9e-9f95-427c-b70a-3ce3388796f1')
+    @decorators.idempotent_id('a403ef9e-9f95-427c-b70a-3ce3388796f1')
     def test_update_nonexistent_image_metadata(self):
         # Negative test:An update should not happen for a non-existent image
         meta = {'os_distro': 'alt1', 'os_version': 'alt2'}
@@ -44,7 +45,7 @@
                           data_utils.rand_uuid(), meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('41ae052c-6ee6-405c-985e-5712393a620d')
+    @decorators.idempotent_id('41ae052c-6ee6-405c-985e-5712393a620d')
     def test_get_nonexistent_image_metadata_item(self):
         # Negative test: Get on non-existent image should not happen
         self.assertRaises(lib_exc.NotFound,
@@ -52,7 +53,7 @@
                           data_utils.rand_uuid(), 'os_version')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('dc64f2ce-77e8-45b0-88c8-e15041d08eaf')
+    @decorators.idempotent_id('dc64f2ce-77e8-45b0-88c8-e15041d08eaf')
     def test_set_nonexistent_image_metadata(self):
         # Negative test: Metadata should not be set to a non-existent image
         meta = {'os_distro': 'alt1', 'os_version': 'alt2'}
@@ -60,7 +61,7 @@
                           data_utils.rand_uuid(), meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('2154fd03-ab54-457c-8874-e6e3eb56e9cf')
+    @decorators.idempotent_id('2154fd03-ab54-457c-8874-e6e3eb56e9cf')
     def test_set_nonexistent_image_metadata_item(self):
         # Negative test: Metadata item should not be set to a
         # nonexistent image
@@ -71,7 +72,7 @@
                           meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('848e157f-6bcf-4b2e-a5dd-5124025a8518')
+    @decorators.idempotent_id('848e157f-6bcf-4b2e-a5dd-5124025a8518')
     def test_delete_nonexistent_image_metadata_item(self):
         # Negative test: Shouldn't be able to delete metadata
         # item from non-existent image
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index a06f4a7..a0c860a 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -16,7 +16,7 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -39,7 +39,7 @@
         super(ImagesTestJSON, cls).setup_clients()
         cls.client = cls.compute_images_client
 
-    @test.idempotent_id('aa06b52b-2db5-4807-b218-9441f75d74e3')
+    @decorators.idempotent_id('aa06b52b-2db5-4807-b218-9441f75d74e3')
     def test_delete_saving_image(self):
         server = self.create_test_server(wait_until='ACTIVE')
         self.addCleanup(self.servers_client.delete_server, server['id'])
@@ -50,7 +50,7 @@
                .format(image_id=image['id']))
         self.assertTrue(self.client.is_resource_deleted(image['id']), msg)
 
-    @test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
+    @decorators.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
     def test_create_image_from_stopped_server(self):
         server = self.create_test_server(wait_until='ACTIVE')
         self.servers_client.stop_server(server['id'])
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index 6c97072..10f3c70 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -16,6 +16,7 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -41,7 +42,7 @@
         cls.client = cls.compute_images_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('6cd5a89d-5b47-46a7-93bc-3916f0d84973')
+    @decorators.idempotent_id('6cd5a89d-5b47-46a7-93bc-3916f0d84973')
     def test_create_image_from_deleted_server(self):
         # An image should not be created if the server instance is removed
         server = self.create_test_server(wait_until='ACTIVE')
@@ -56,7 +57,7 @@
                           server['id'], meta=meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('82c5b0c4-9dbd-463c-872b-20c4755aae7f')
+    @decorators.idempotent_id('82c5b0c4-9dbd-463c-872b-20c4755aae7f')
     def test_create_image_from_invalid_server(self):
         # An image should not be created with invalid server id
         # Create a new image with invalid server id
@@ -65,7 +66,7 @@
                           data_utils.rand_name('invalid'), meta=meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538')
+    @decorators.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538')
     def test_create_image_specify_uuid_35_characters_or_less(self):
         # Return an error if Image ID passed is 35 characters or less
         snapshot_name = data_utils.rand_name('test-snap')
@@ -74,7 +75,7 @@
                           test_uuid, name=snapshot_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('36741560-510e-4cc2-8641-55fe4dfb2437')
+    @decorators.idempotent_id('36741560-510e-4cc2-8641-55fe4dfb2437')
     def test_create_image_specify_uuid_37_characters_or_more(self):
         # Return an error if Image ID passed is 37 characters or more
         snapshot_name = data_utils.rand_name('test-snap')
@@ -83,14 +84,14 @@
                           test_uuid, name=snapshot_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('381acb65-785a-4942-94ce-d8f8c84f1f0f')
+    @decorators.idempotent_id('381acb65-785a-4942-94ce-d8f8c84f1f0f')
     def test_delete_image_with_invalid_image_id(self):
         # An image should not be deleted with invalid image id
         self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           data_utils.rand_name('invalid'))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('137aef61-39f7-44a1-8ddf-0adf82511701')
+    @decorators.idempotent_id('137aef61-39f7-44a1-8ddf-0adf82511701')
     def test_delete_non_existent_image(self):
         # Return an error while trying to delete a non-existent image
 
@@ -99,13 +100,13 @@
                           non_existent_image_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('e6e41425-af5c-4fe6-a4b5-7b7b963ffda5')
+    @decorators.idempotent_id('e6e41425-af5c-4fe6-a4b5-7b7b963ffda5')
     def test_delete_image_blank_id(self):
         # Return an error while trying to delete an image with blank Id
         self.assertRaises(lib_exc.NotFound, self.client.delete_image, '')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('924540c3-f1f1-444c-8f58-718958b6724e')
+    @decorators.idempotent_id('924540c3-f1f1-444c-8f58-718958b6724e')
     def test_delete_image_non_hex_string_id(self):
         # Return an error while trying to delete an image with non hex id
         invalid_image_id = data_utils.rand_uuid()[:-1] + "j"
@@ -113,13 +114,13 @@
                           invalid_image_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('68e2c175-bd26-4407-ac0f-4ea9ce2139ea')
+    @decorators.idempotent_id('68e2c175-bd26-4407-ac0f-4ea9ce2139ea')
     def test_delete_image_negative_image_id(self):
         # Return an error while trying to delete an image with negative id
         self.assertRaises(lib_exc.NotFound, self.client.delete_image, -1)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('b340030d-82cd-4066-a314-c72fb7c59277')
+    @decorators.idempotent_id('b340030d-82cd-4066-a314-c72fb7c59277')
     def test_delete_image_with_id_over_character_limit(self):
         # Return an error while trying to delete image with id over limit
         invalid_image_id = data_utils.rand_uuid() + "1"
diff --git a/tempest/api/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
index 7768596..7fff555 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -18,7 +18,7 @@
 from tempest.common import waiters
 from tempest import config
 from tempest.lib.common.utils import test_utils
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -46,7 +46,7 @@
         flavor = self.flavors_client.show_flavor(flavor_id)['flavor']
         return flavor['disk']
 
-    @test.idempotent_id('3731d080-d4c5-4872-b41a-64d0d0021314')
+    @decorators.idempotent_id('3731d080-d4c5-4872-b41a-64d0d0021314')
     def test_create_delete_image(self):
         server_id = self.create_test_server(wait_until='ACTIVE')['id']
 
@@ -79,7 +79,7 @@
         self.client.delete_image(image_id)
         self.client.wait_for_resource_deletion(image_id)
 
-    @test.idempotent_id('3b7c6fe4-dfe7-477c-9243-b06359db51e6')
+    @decorators.idempotent_id('3b7c6fe4-dfe7-477c-9243-b06359db51e6')
     def test_create_image_specify_multibyte_character_image_name(self):
         server_id = self.create_test_server(wait_until='ACTIVE')['id']
 
diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py
index cd71de7..09bbfbe 100644
--- a/tempest/api/compute/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/images/test_images_oneserver_negative.py
@@ -20,6 +20,7 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -82,7 +83,7 @@
         cls.image_ids = []
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('55d1d38c-dd66-4933-9c8e-7d92aeb60ddc')
+    @decorators.idempotent_id('55d1d38c-dd66-4933-9c8e-7d92aeb60ddc')
     def test_create_image_specify_invalid_metadata(self):
         # Return an error when creating image with invalid metadata
         snapshot_name = data_utils.rand_name('test-snap')
@@ -91,7 +92,7 @@
                           self.server_id, name=snapshot_name, metadata=meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('3d24d11f-5366-4536-bd28-cff32b748eca')
+    @decorators.idempotent_id('3d24d11f-5366-4536-bd28-cff32b748eca')
     def test_create_image_specify_metadata_over_limits(self):
         # Return an error when creating image with meta data over 255 chars
         snapshot_name = data_utils.rand_name('test-snap')
@@ -100,7 +101,7 @@
                           self.server_id, name=snapshot_name, metadata=meta)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0460efcf-ee88-4f94-acef-1bf658695456')
+    @decorators.idempotent_id('0460efcf-ee88-4f94-acef-1bf658695456')
     def test_create_second_image_when_first_image_is_being_saved(self):
         # Disallow creating another image when first image is being saved
 
@@ -117,7 +118,7 @@
                           self.server_id, name=alt_snapshot_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('084f0cbc-500a-4963-8a4e-312905862581')
+    @decorators.idempotent_id('084f0cbc-500a-4963-8a4e-312905862581')
     def test_create_image_specify_name_over_character_limit(self):
         # Return an error if snapshot name over 255 characters is passed
 
@@ -126,7 +127,7 @@
                           self.server_id, name=snapshot_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0894954d-2db2-4195-a45b-ffec0bc0187e')
+    @decorators.idempotent_id('0894954d-2db2-4195-a45b-ffec0bc0187e')
     def test_delete_image_that_is_not_yet_active(self):
         # Return an error while trying to delete an image what is creating
 
diff --git a/tempest/api/compute/images/test_list_image_filters.py b/tempest/api/compute/images/test_list_image_filters.py
index a9c2f7a..9c9b8a1 100644
--- a/tempest/api/compute/images/test_list_image_filters.py
+++ b/tempest/api/compute/images/test_list_image_filters.py
@@ -23,8 +23,8 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions
-from tempest import test
 
 CONF = config.CONF
 
@@ -122,7 +122,7 @@
             cls.server1['id'], wait_until='ACTIVE')
         cls.snapshot2_id = cls.snapshot2['id']
 
-    @test.idempotent_id('a3f5b513-aeb3-42a9-b18e-f091ef73254d')
+    @decorators.idempotent_id('a3f5b513-aeb3-42a9-b18e-f091ef73254d')
     def test_list_images_filter_by_status(self):
         # The list of images should contain only images with the
         # provided status
@@ -133,7 +133,7 @@
         self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
         self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
 
-    @test.idempotent_id('33163b73-79f5-4d07-a7ea-9213bcc468ff')
+    @decorators.idempotent_id('33163b73-79f5-4d07-a7ea-9213bcc468ff')
     def test_list_images_filter_by_name(self):
         # List of all images should contain the expected images filtered
         # by name
@@ -144,7 +144,7 @@
         self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
         self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
 
-    @test.idempotent_id('9f238683-c763-45aa-b848-232ec3ce3105')
+    @decorators.idempotent_id('9f238683-c763-45aa-b848-232ec3ce3105')
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
                           'Snapshotting is not available.')
     def test_list_images_filter_by_server_id(self):
@@ -161,7 +161,7 @@
         self.assertFalse(any([i for i in images
                               if i['id'] == self.snapshot3_id]))
 
-    @test.idempotent_id('05a377b8-28cf-4734-a1e6-2ab5c38bf606')
+    @decorators.idempotent_id('05a377b8-28cf-4734-a1e6-2ab5c38bf606')
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
                           'Snapshotting is not available.')
     def test_list_images_filter_by_server_ref(self):
@@ -180,7 +180,7 @@
             self.assertTrue(any([i for i in images
                                  if i['id'] == self.snapshot3_id]))
 
-    @test.idempotent_id('e3356918-4d3e-4756-81d5-abc4524ba29f')
+    @decorators.idempotent_id('e3356918-4d3e-4756-81d5-abc4524ba29f')
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
                           'Snapshotting is not available.')
     def test_list_images_filter_by_type(self):
@@ -197,14 +197,14 @@
         self.assertFalse(any([i for i in images
                               if i['id'] == self.image_ref]))
 
-    @test.idempotent_id('3a484ca9-67ba-451e-b494-7fcf28d32d62')
+    @decorators.idempotent_id('3a484ca9-67ba-451e-b494-7fcf28d32d62')
     def test_list_images_limit_results(self):
         # Verify only the expected number of results are returned
         params = {'limit': '1'}
         images = self.client.list_images(**params)['images']
         self.assertEqual(1, len([x for x in images if 'id' in x]))
 
-    @test.idempotent_id('18bac3ae-da27-436c-92a9-b22474d13aab')
+    @decorators.idempotent_id('18bac3ae-da27-436c-92a9-b22474d13aab')
     def test_list_images_filter_by_changes_since(self):
         # Verify only updated images are returned in the detailed list
 
@@ -215,7 +215,7 @@
         found = any([i for i in images if i['id'] == self.image3_id])
         self.assertTrue(found)
 
-    @test.idempotent_id('9b0ea018-6185-4f71-948a-a123a107988e')
+    @decorators.idempotent_id('9b0ea018-6185-4f71-948a-a123a107988e')
     def test_list_images_with_detail_filter_by_status(self):
         # Detailed list of all images should only contain images
         # with the provided status
@@ -226,7 +226,7 @@
         self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
         self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
 
-    @test.idempotent_id('644ea267-9bd9-4f3b-af9f-dffa02396a17')
+    @decorators.idempotent_id('644ea267-9bd9-4f3b-af9f-dffa02396a17')
     def test_list_images_with_detail_filter_by_name(self):
         # Detailed list of all images should contain the expected
         # images filtered by name
@@ -237,7 +237,7 @@
         self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
         self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
 
-    @test.idempotent_id('ba2fa9a9-b672-47cc-b354-3b4c0600e2cb')
+    @decorators.idempotent_id('ba2fa9a9-b672-47cc-b354-3b4c0600e2cb')
     def test_list_images_with_detail_limit_results(self):
         # Verify only the expected number of results (with full details)
         # are returned
@@ -245,7 +245,7 @@
         images = self.client.list_images(detail=True, **params)['images']
         self.assertEqual(1, len(images))
 
-    @test.idempotent_id('8c78f822-203b-4bf6-8bba-56ebd551cf84')
+    @decorators.idempotent_id('8c78f822-203b-4bf6-8bba-56ebd551cf84')
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
                           'Snapshotting is not available.')
     def test_list_images_with_detail_filter_by_server_ref(self):
@@ -264,7 +264,7 @@
             self.assertTrue(any([i for i in images
                                  if i['id'] == self.snapshot3_id]))
 
-    @test.idempotent_id('888c0cc0-7223-43c5-9db0-b125fd0a393b')
+    @decorators.idempotent_id('888c0cc0-7223-43c5-9db0-b125fd0a393b')
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
                           'Snapshotting is not available.')
     def test_list_images_with_detail_filter_by_type(self):
@@ -282,7 +282,7 @@
         self.assertFalse(any([i for i in images
                               if i['id'] == self.image_ref]))
 
-    @test.idempotent_id('7d439e18-ac2e-4827-b049-7e18004712c4')
+    @decorators.idempotent_id('7d439e18-ac2e-4827-b049-7e18004712c4')
     def test_list_images_with_detail_filter_by_changes_since(self):
         # Verify an update image is returned
 
diff --git a/tempest/api/compute/images/test_list_image_filters_negative.py b/tempest/api/compute/images/test_list_image_filters_negative.py
index 2689f88..e04a57a 100644
--- a/tempest/api/compute/images/test_list_image_filters_negative.py
+++ b/tempest/api/compute/images/test_list_image_filters_negative.py
@@ -15,6 +15,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -36,7 +37,7 @@
         cls.client = cls.compute_images_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('391b0440-432c-4d4b-b5da-c5096aa247eb')
+    @decorators.idempotent_id('391b0440-432c-4d4b-b5da-c5096aa247eb')
     def test_get_nonexistent_image(self):
         # Check raises a NotFound
         nonexistent_image = data_utils.rand_uuid()
diff --git a/tempest/api/compute/images/test_list_images.py b/tempest/api/compute/images/test_list_images.py
index ae3667d..5d3cbf3 100644
--- a/tempest/api/compute/images/test_list_images.py
+++ b/tempest/api/compute/images/test_list_images.py
@@ -15,7 +15,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -34,20 +34,20 @@
         super(ListImagesTestJSON, cls).setup_clients()
         cls.client = cls.compute_images_client
 
-    @test.idempotent_id('490d0898-e12a-463f-aef0-c50156b9f789')
+    @decorators.idempotent_id('490d0898-e12a-463f-aef0-c50156b9f789')
     def test_get_image(self):
         # Returns the correct details for a single image
         image = self.client.show_image(self.image_ref)['image']
         self.assertEqual(self.image_ref, image['id'])
 
-    @test.idempotent_id('fd51b7f4-d4a3-4331-9885-866658112a6f')
+    @decorators.idempotent_id('fd51b7f4-d4a3-4331-9885-866658112a6f')
     def test_list_images(self):
         # The list of all images should contain the image
         images = self.client.list_images()['images']
         found = any([i for i in images if i['id'] == self.image_ref])
         self.assertTrue(found)
 
-    @test.idempotent_id('9f94cb6b-7f10-48c5-b911-a0b84d7d4cd6')
+    @decorators.idempotent_id('9f94cb6b-7f10-48c5-b911-a0b84d7d4cd6')
     def test_list_images_with_detail(self):
         # Detailed list of all images should contain the expected images
         images = self.client.list_images(detail=True)['images']
diff --git a/tempest/api/compute/keypairs/test_keypairs.py b/tempest/api/compute/keypairs/test_keypairs.py
index 30222f4..11e84e8 100644
--- a/tempest/api/compute/keypairs/test_keypairs.py
+++ b/tempest/api/compute/keypairs/test_keypairs.py
@@ -15,13 +15,13 @@
 
 from tempest.api.compute.keypairs import base
 from tempest.common.utils import data_utils
-from tempest import test
+from tempest.lib import decorators
 
 
 class KeyPairsV2TestJSON(base.BaseKeypairTest):
     max_microversion = '2.1'
 
-    @test.idempotent_id('1d1dbedb-d7a0-432a-9d09-83f543c3c19b')
+    @decorators.idempotent_id('1d1dbedb-d7a0-432a-9d09-83f543c3c19b')
     def test_keypairs_create_list_delete(self):
         # Keypairs created should be available in the response list
         # Create 3 keypairs
@@ -46,7 +46,7 @@
                          "Failed to find keypairs %s in fetched list"
                          % ', '.join(m_key['name'] for m_key in missing_kps))
 
-    @test.idempotent_id('6c1d3123-4519-4742-9194-622cb1714b7d')
+    @decorators.idempotent_id('6c1d3123-4519-4742-9194-622cb1714b7d')
     def test_keypair_create_delete(self):
         # Keypair should be created, verified and deleted
         k_name = data_utils.rand_name('keypair')
@@ -59,7 +59,7 @@
         self.assertIsNotNone(private_key,
                              "Field private_key is empty or not found.")
 
-    @test.idempotent_id('a4233d5d-52d8-47cc-9a25-e1864527e3df')
+    @decorators.idempotent_id('a4233d5d-52d8-47cc-9a25-e1864527e3df')
     def test_get_keypair_detail(self):
         # Keypair should be created, Got details by name and deleted
         k_name = data_utils.rand_name('keypair')
@@ -74,7 +74,7 @@
         self.assertIsNotNone(public_key,
                              "Field public_key is empty or not found.")
 
-    @test.idempotent_id('39c90c6a-304a-49dd-95ec-2366129def05')
+    @decorators.idempotent_id('39c90c6a-304a-49dd-95ec-2366129def05')
     def test_keypair_create_with_pub_key(self):
         # Keypair should be created with a given public key
         k_name = data_utils.rand_name('keypair')
diff --git a/tempest/api/compute/keypairs/test_keypairs_negative.py b/tempest/api/compute/keypairs/test_keypairs_negative.py
index f5ffa19..863ce0d 100644
--- a/tempest/api/compute/keypairs/test_keypairs_negative.py
+++ b/tempest/api/compute/keypairs/test_keypairs_negative.py
@@ -16,13 +16,14 @@
 
 from tempest.api.compute.keypairs import base
 from tempest.common.utils import data_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
 
 class KeyPairsNegativeTestJSON(base.BaseKeypairTest):
     @test.attr(type=['negative'])
-    @test.idempotent_id('29cca892-46ae-4d48-bc32-8fe7e731eb81')
+    @decorators.idempotent_id('29cca892-46ae-4d48-bc32-8fe7e731eb81')
     def test_keypair_create_with_invalid_pub_key(self):
         # Keypair should not be created with a non RSA public key
         pub_key = "ssh-rsa JUNK nova@ubuntu"
@@ -30,7 +31,7 @@
                           self.create_keypair, pub_key=pub_key)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('7cc32e47-4c42-489d-9623-c5e2cb5a2fa5')
+    @decorators.idempotent_id('7cc32e47-4c42-489d-9623-c5e2cb5a2fa5')
     def test_keypair_delete_nonexistent_key(self):
         # Non-existent key deletion should throw a proper error
         k_name = data_utils.rand_name("keypair-non-existent")
@@ -38,7 +39,7 @@
                           k_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('dade320e-69ca-42a9-ba4a-345300f127e0')
+    @decorators.idempotent_id('dade320e-69ca-42a9-ba4a-345300f127e0')
     def test_create_keypair_with_empty_public_key(self):
         # Keypair should not be created with an empty public key
         pub_key = ' '
@@ -46,7 +47,7 @@
                           pub_key=pub_key)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('fc100c19-2926-4b9c-8fdc-d0589ee2f9ff')
+    @decorators.idempotent_id('fc100c19-2926-4b9c-8fdc-d0589ee2f9ff')
     def test_create_keypair_when_public_key_bits_exceeds_maximum(self):
         # Keypair should not be created when public key bits are too long
         pub_key = 'ssh-rsa ' + 'A' * 2048 + ' openstack@ubuntu'
@@ -54,7 +55,7 @@
                           pub_key=pub_key)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0359a7f1-f002-4682-8073-0c91e4011b7c')
+    @decorators.idempotent_id('0359a7f1-f002-4682-8073-0c91e4011b7c')
     def test_create_keypair_with_duplicate_name(self):
         # Keypairs with duplicate names should not be created
         k_name = data_utils.rand_name('keypair')
@@ -65,14 +66,14 @@
         self.client.delete_keypair(k_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('1398abe1-4a84-45fb-9294-89f514daff00')
+    @decorators.idempotent_id('1398abe1-4a84-45fb-9294-89f514daff00')
     def test_create_keypair_with_empty_name_string(self):
         # Keypairs with name being an empty string should not be created
         self.assertRaises(lib_exc.BadRequest, self.create_keypair,
                           '')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('3faa916f-779f-4103-aca7-dc3538eee1b7')
+    @decorators.idempotent_id('3faa916f-779f-4103-aca7-dc3538eee1b7')
     def test_create_keypair_with_long_keynames(self):
         # Keypairs with name longer than 255 chars should not be created
         k_name = 'keypair-'.ljust(260, '0')
@@ -80,7 +81,7 @@
                           k_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('45fbe5e0-acb5-49aa-837a-ff8d0719db91')
+    @decorators.idempotent_id('45fbe5e0-acb5-49aa-837a-ff8d0719db91')
     def test_create_keypair_invalid_name(self):
         # Keypairs with name being an invalid name should not be created
         k_name = 'key_/.\@:'
diff --git a/tempest/api/compute/keypairs/test_keypairs_v22.py b/tempest/api/compute/keypairs/test_keypairs_v22.py
index 4bd1a40..c893a4f 100644
--- a/tempest/api/compute/keypairs/test_keypairs_v22.py
+++ b/tempest/api/compute/keypairs/test_keypairs_v22.py
@@ -14,7 +14,7 @@
 
 from tempest.api.compute.keypairs import test_keypairs
 from tempest.common.utils import data_utils
-from tempest import test
+from tempest.lib import decorators
 
 
 class KeyPairsV22TestJSON(test_keypairs.KeyPairsV2TestJSON):
@@ -41,11 +41,11 @@
             if keypair['keypair']['name'] == k_name:
                 self._check_keypair_type(keypair['keypair'], keypair_type)
 
-    @test.idempotent_id('8726fa85-7f98-4b20-af9e-f710a4f3391c')
+    @decorators.idempotent_id('8726fa85-7f98-4b20-af9e-f710a4f3391c')
     def test_keypairsv22_create_list_show(self):
         self._test_keypairs_create_list_show()
 
-    @test.idempotent_id('89d59d43-f735-441a-abcf-0601727f47b6')
+    @decorators.idempotent_id('89d59d43-f735-441a-abcf-0601727f47b6')
     def test_keypairsv22_create_list_show_with_type(self):
         keypair_type = 'x509'
         self._test_keypairs_create_list_show(keypair_type=keypair_type)
diff --git a/tempest/api/compute/limits/test_absolute_limits.py b/tempest/api/compute/limits/test_absolute_limits.py
index 6cc722c..58352bd 100644
--- a/tempest/api/compute/limits/test_absolute_limits.py
+++ b/tempest/api/compute/limits/test_absolute_limits.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class AbsoluteLimitsTestJSON(base.BaseV2ComputeTest):
@@ -24,7 +24,7 @@
         super(AbsoluteLimitsTestJSON, cls).setup_clients()
         cls.client = cls.limits_client
 
-    @test.idempotent_id('b54c66af-6ab6-4cf0-a9e5-a0cb58d75e0b')
+    @decorators.idempotent_id('b54c66af-6ab6-4cf0-a9e5-a0cb58d75e0b')
     def test_absLimits_get(self):
         # To check if all limits are present in the response
         limits = self.client.show_limits()['limits']
diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py
index 66bc241..b9ae0c6 100644
--- a/tempest/api/compute/limits/test_absolute_limits_negative.py
+++ b/tempest/api/compute/limits/test_absolute_limits_negative.py
@@ -15,6 +15,7 @@
 
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -32,7 +33,7 @@
         cls.client = cls.limits_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('215cd465-d8ae-49c9-bf33-9c911913a5c8')
+    @decorators.idempotent_id('215cd465-d8ae-49c9-bf33-9c911913a5c8')
     def test_max_image_meta_exceed_limit(self):
         # We should not create vm with image meta over maxImageMeta limit
         # Get max limit value
diff --git a/tempest/api/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
index 60caa19..7658848 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -15,6 +15,7 @@
 
 from tempest.api.compute.security_groups import base
 from tempest import config
+from tempest.lib import decorators
 from tempest import test
 
 CONF = config.CONF
@@ -57,7 +58,7 @@
                              "Miss-matched key is %s" % key)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('850795d7-d4d3-4e55-b527-a774c0123d3a')
+    @decorators.idempotent_id('850795d7-d4d3-4e55-b527-a774c0123d3a')
     @test.services('network')
     def test_security_group_rules_create(self):
         # Positive test: Creation of Security Group rule
@@ -75,7 +76,7 @@
         self.expected['ip_range'] = {'cidr': '0.0.0.0/0'}
         self._check_expected_response(rule)
 
-    @test.idempotent_id('7a01873e-3c38-4f30-80be-31a043cfe2fd')
+    @decorators.idempotent_id('7a01873e-3c38-4f30-80be-31a043cfe2fd')
     @test.services('network')
     def test_security_group_rules_create_with_optional_cidr(self):
         # Positive test: Creation of Security Group rule
@@ -98,7 +99,7 @@
         self.expected['ip_range'] = {'cidr': cidr}
         self._check_expected_response(rule)
 
-    @test.idempotent_id('7f5d2899-7705-4d4b-8458-4505188ffab6')
+    @decorators.idempotent_id('7f5d2899-7705-4d4b-8458-4505188ffab6')
     @test.services('network')
     def test_security_group_rules_create_with_optional_group_id(self):
         # Positive test: Creation of Security Group rule
@@ -127,7 +128,7 @@
         self._check_expected_response(rule)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('a6154130-5a55-4850-8be4-5e9e796dbf17')
+    @decorators.idempotent_id('a6154130-5a55-4850-8be4-5e9e796dbf17')
     @test.services('network')
     def test_security_group_rules_list(self):
         # Positive test: Created Security Group rules should be
@@ -165,7 +166,7 @@
         self.assertTrue(any([i for i in rules if i['id'] == rule1_id]))
         self.assertTrue(any([i for i in rules if i['id'] == rule2_id]))
 
-    @test.idempotent_id('fc5c5acf-2091-43a6-a6ae-e42760e9ffaf')
+    @decorators.idempotent_id('fc5c5acf-2091-43a6-a6ae-e42760e9ffaf')
     @test.services('network')
     def test_security_group_rules_delete_when_peer_group_deleted(self):
         # Positive test:rule will delete when peer group deleting
diff --git a/tempest/api/compute/security_groups/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
index 78c19ca..0312736 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules_negative.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
@@ -15,6 +15,7 @@
 
 from tempest.api.compute.security_groups import base
 from tempest.common.utils import data_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -27,7 +28,7 @@
         cls.rules_client = cls.security_group_rules_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('1d507e98-7951-469b-82c3-23f1e6b8c254')
+    @decorators.idempotent_id('1d507e98-7951-469b-82c3-23f1e6b8c254')
     @test.services('network')
     def test_create_security_group_rule_with_non_existent_id(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -44,7 +45,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('2244d7e4-adb7-4ecb-9930-2d77e123ce4f')
+    @decorators.idempotent_id('2244d7e4-adb7-4ecb-9930-2d77e123ce4f')
     @test.services('network')
     def test_create_security_group_rule_with_invalid_id(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -61,7 +62,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('8bd56d02-3ffa-4d67-9933-b6b9a01d6089')
+    @decorators.idempotent_id('8bd56d02-3ffa-4d67-9933-b6b9a01d6089')
     @test.services('network')
     def test_create_security_group_rule_duplicate(self):
         # Negative test: Create Security Group rule duplicate should fail
@@ -86,7 +87,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('84c81249-9f6e-439c-9bbf-cbb0d2cddbdf')
+    @decorators.idempotent_id('84c81249-9f6e-439c-9bbf-cbb0d2cddbdf')
     @test.services('network')
     def test_create_security_group_rule_with_invalid_ip_protocol(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -106,7 +107,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('12bbc875-1045-4f7a-be46-751277baedb9')
+    @decorators.idempotent_id('12bbc875-1045-4f7a-be46-751277baedb9')
     @test.services('network')
     def test_create_security_group_rule_with_invalid_from_port(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -125,7 +126,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('ff88804d-144f-45d1-bf59-dd155838a43a')
+    @decorators.idempotent_id('ff88804d-144f-45d1-bf59-dd155838a43a')
     @test.services('network')
     def test_create_security_group_rule_with_invalid_to_port(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -144,7 +145,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('00296fa9-0576-496a-ae15-fbab843189e0')
+    @decorators.idempotent_id('00296fa9-0576-496a-ae15-fbab843189e0')
     @test.services('network')
     def test_create_security_group_rule_with_invalid_port_range(self):
         # Negative test: Creation of Security Group rule should FAIL
@@ -163,7 +164,7 @@
                           to_port=to_port)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('56fddcca-dbb8-4494-a0db-96e9f869527c')
+    @decorators.idempotent_id('56fddcca-dbb8-4494-a0db-96e9f869527c')
     @test.services('network')
     def test_delete_security_group_rule_with_non_existent_id(self):
         # Negative test: Deletion of Security Group rule should be FAIL
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index b667898..e070336 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -16,6 +16,7 @@
 from tempest.api.compute.security_groups import base
 from tempest.common.utils import data_utils
 from tempest.common import waiters
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -28,7 +29,7 @@
         cls.client = cls.security_groups_client
 
     @test.attr(type='smoke')
-    @test.idempotent_id('eb2b087d-633d-4d0d-a7bd-9e6ba35b32de')
+    @decorators.idempotent_id('eb2b087d-633d-4d0d-a7bd-9e6ba35b32de')
     @test.services('network')
     def test_security_groups_create_list_delete(self):
         # Positive test:Should return the list of Security Groups
@@ -60,7 +61,7 @@
                          "list" % ', '.join(m_group['name']
                                             for m_group in deleted_sgs))
 
-    @test.idempotent_id('ecc0da4a-2117-48af-91af-993cca39a615')
+    @decorators.idempotent_id('ecc0da4a-2117-48af-91af-993cca39a615')
     @test.services('network')
     def test_security_group_create_get_delete(self):
         # Security Group should be created, fetched and deleted
@@ -82,7 +83,7 @@
         self.client.delete_security_group(securitygroup['id'])
         self.client.wait_for_resource_deletion(securitygroup['id'])
 
-    @test.idempotent_id('fe4abc0d-83f5-4c50-ad11-57a1127297a2')
+    @decorators.idempotent_id('fe4abc0d-83f5-4c50-ad11-57a1127297a2')
     @test.services('network')
     def test_server_security_groups(self):
         # Checks that security groups may be added and linked to a server
@@ -124,7 +125,7 @@
         self.client.delete_security_group(sg['id'])
         self.client.delete_security_group(sg2['id'])
 
-    @test.idempotent_id('7d4e1d3c-3209-4d6d-b020-986304ebad1f')
+    @decorators.idempotent_id('7d4e1d3c-3209-4d6d-b020-986304ebad1f')
     @test.services('network')
     def test_update_security_groups(self):
         # Update security group name and description
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index bcada1e..ad18861 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -38,7 +38,7 @@
         cls.neutron_available = CONF.service_available.neutron
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('673eaec1-9b3e-48ed-bdf1-2786c1b9661c')
+    @decorators.idempotent_id('673eaec1-9b3e-48ed-bdf1-2786c1b9661c')
     @test.services('network')
     def test_security_group_get_nonexistent_group(self):
         # Negative test:Should not be able to GET the details
@@ -50,7 +50,7 @@
     @decorators.skip_because(bug="1161411",
                              condition=CONF.service_available.neutron)
     @test.attr(type=['negative'])
-    @test.idempotent_id('1759c3cb-b0fc-44b7-86ce-c99236be911d')
+    @decorators.idempotent_id('1759c3cb-b0fc-44b7-86ce-c99236be911d')
     @test.services('network')
     def test_security_group_create_with_invalid_group_name(self):
         # Negative test: Security Group should not be created with group name
@@ -73,7 +73,7 @@
     @decorators.skip_because(bug="1161411",
                              condition=CONF.service_available.neutron)
     @test.attr(type=['negative'])
-    @test.idempotent_id('777b6f14-aca9-4758-9e84-38783cfa58bc')
+    @decorators.idempotent_id('777b6f14-aca9-4758-9e84-38783cfa58bc')
     @test.services('network')
     def test_security_group_create_with_invalid_group_description(self):
         # Negative test: Security Group should not be created with description
@@ -86,7 +86,7 @@
                           self.client.create_security_group,
                           name=s_name, description=s_description)
 
-    @test.idempotent_id('9fdb4abc-6b66-4b27-b89c-eb215a956168')
+    @decorators.idempotent_id('9fdb4abc-6b66-4b27-b89c-eb215a956168')
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron allows duplicate names for security groups")
     @test.attr(type=['negative'])
@@ -103,7 +103,7 @@
                           name=s_name, description=s_description)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('36a1629f-c6da-4a26-b8b8-55e7e5d5cd58')
+    @decorators.idempotent_id('36a1629f-c6da-4a26-b8b8-55e7e5d5cd58')
     @test.services('network')
     def test_delete_the_default_security_group(self):
         # Negative test:Deletion of the "default" Security Group should Fail
@@ -119,7 +119,7 @@
                           default_security_group_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('6727c00b-214c-4f9e-9a52-017ac3e98411')
+    @decorators.idempotent_id('6727c00b-214c-4f9e-9a52-017ac3e98411')
     @test.services('network')
     def test_delete_nonexistent_security_group(self):
         # Negative test:Deletion of a non-existent Security Group should fail
@@ -128,7 +128,7 @@
                           self.client.delete_security_group, non_exist_id)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('1438f330-8fa4-4aeb-8a94-37c250106d7f')
+    @decorators.idempotent_id('1438f330-8fa4-4aeb-8a94-37c250106d7f')
     @test.services('network')
     def test_delete_security_group_without_passing_id(self):
         # Negative test:Deletion of a Security Group with out passing ID
@@ -136,7 +136,7 @@
         self.assertRaises(lib_exc.NotFound,
                           self.client.delete_security_group, '')
 
-    @test.idempotent_id('00579617-fe04-4e1c-9d08-ca7467d2e34b')
+    @decorators.idempotent_id('00579617-fe04-4e1c-9d08-ca7467d2e34b')
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron does not check the security group ID")
     @test.attr(type=['negative'])
@@ -151,7 +151,7 @@
                           self.client.update_security_group, sg_id_invalid,
                           name=s_name, description=s_description)
 
-    @test.idempotent_id('cda8d8b4-59f8-4087-821d-20cf5a03b3b1')
+    @decorators.idempotent_id('cda8d8b4-59f8-4087-821d-20cf5a03b3b1')
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron does not check the security group name")
     @test.attr(type=['negative'])
@@ -167,7 +167,7 @@
                           self.client.update_security_group,
                           securitygroup_id, name=s_new_name)
 
-    @test.idempotent_id('97d12b1c-a610-4194-93f1-ba859e718b45')
+    @decorators.idempotent_id('97d12b1c-a610-4194-93f1-ba859e718b45')
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron does not check the security group description")
     @test.attr(type=['negative'])
@@ -184,7 +184,7 @@
                           securitygroup_id, description=s_new_des)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('27edee9c-873d-4da6-a68a-3c256efebe8f')
+    @decorators.idempotent_id('27edee9c-873d-4da6-a68a-3c256efebe8f')
     @test.services('network')
     def test_update_non_existent_security_group(self):
         # Update a non-existent Security Group should Fail
diff --git a/tempest/api/compute/test_extensions.py b/tempest/api/compute/test_extensions.py
index d171cd5..f87bf6d 100644
--- a/tempest/api/compute/test_extensions.py
+++ b/tempest/api/compute/test_extensions.py
@@ -17,6 +17,7 @@
 
 from tempest.api.compute import base
 from tempest import config
+from tempest.lib import decorators
 from tempest import test
 
 CONF = config.CONF
@@ -27,7 +28,7 @@
 
 class ExtensionsTestJSON(base.BaseV2ComputeTest):
 
-    @test.idempotent_id('3bb27738-b759-4e0d-a5fa-37d7a6df07d1')
+    @decorators.idempotent_id('3bb27738-b759-4e0d-a5fa-37d7a6df07d1')
     def test_list_extensions(self):
         # List of all extensions
         if len(CONF.compute_feature_enabled.api_extensions) == 0:
@@ -44,7 +45,7 @@
         extension_list = map(lambda x: x['alias'], extensions)
         LOG.debug("Nova extensions: %s", ','.join(extension_list))
 
-    @test.idempotent_id('05762f39-bdfa-4cdb-9b46-b78f8e78e2fd')
+    @decorators.idempotent_id('05762f39-bdfa-4cdb-9b46-b78f8e78e2fd')
     @test.requires_ext(extension='os-consoles', service='compute')
     def test_get_extension(self):
         # get the specified extensions
diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py
index 7853962..40d0746 100644
--- a/tempest/api/compute/test_live_block_migration_negative.py
+++ b/tempest/api/compute/test_live_block_migration_negative.py
@@ -17,6 +17,7 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -42,7 +43,7 @@
             disk_over_commit=False)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('7fb7856e-ae92-44c9-861a-af62d7830bcb')
+    @decorators.idempotent_id('7fb7856e-ae92-44c9-861a-af62d7830bcb')
     def test_invalid_host_for_migration(self):
         # Migrating to an invalid host should not change the status
         target_host = data_utils.rand_name('host')
diff --git a/tempest/api/compute/test_networks.py b/tempest/api/compute/test_networks.py
index d4b8003..4d21fed 100644
--- a/tempest/api/compute/test_networks.py
+++ b/tempest/api/compute/test_networks.py
@@ -14,7 +14,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -31,7 +31,7 @@
         super(ComputeNetworksTest, cls).setup_clients()
         cls.client = cls.os.compute_networks_client
 
-    @test.idempotent_id('3fe07175-312e-49a5-a623-5f52eeada4c2')
+    @decorators.idempotent_id('3fe07175-312e-49a5-a623-5f52eeada4c2')
     def test_list_networks(self):
         networks = self.client.list_networks()['networks']
         self.assertNotEmpty(networks, "No networks found.")
diff --git a/tempest/api/compute/test_quotas.py b/tempest/api/compute/test_quotas.py
index b9e0c35..0ad2df8 100644
--- a/tempest/api/compute/test_quotas.py
+++ b/tempest/api/compute/test_quotas.py
@@ -15,6 +15,7 @@
 
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
+from tempest.lib import decorators
 from tempest import test
 
 
@@ -51,7 +52,7 @@
                                      'cores', 'security_groups',
                                      'server_group_members', 'server_groups'))
 
-    @test.idempotent_id('f1ef0a97-dbbb-4cca-adc5-c9fbc4f76107')
+    @decorators.idempotent_id('f1ef0a97-dbbb-4cca-adc5-c9fbc4f76107')
     def test_get_quotas(self):
         # User can get the quota set for it's tenant
         expected_quota_set = self.default_quota_set | set(['id'])
@@ -67,7 +68,7 @@
         for quota in expected_quota_set:
             self.assertIn(quota, quota_set.keys())
 
-    @test.idempotent_id('9bfecac7-b966-4f47-913f-1a9e2c12134a')
+    @decorators.idempotent_id('9bfecac7-b966-4f47-913f-1a9e2c12134a')
     def test_get_default_quotas(self):
         # User can get the default quota set for it's tenant
         expected_quota_set = self.default_quota_set | set(['id'])
@@ -77,7 +78,7 @@
         for quota in expected_quota_set:
             self.assertIn(quota, quota_set.keys())
 
-    @test.idempotent_id('cd65d997-f7e4-4966-a7e9-d5001b674fdc')
+    @decorators.idempotent_id('cd65d997-f7e4-4966-a7e9-d5001b674fdc')
     def test_compare_tenant_quotas_with_default_quotas(self):
         # Tenants are created with the default quota values
         default_quota_set = \
diff --git a/tempest/api/compute/test_tenant_networks.py b/tempest/api/compute/test_tenant_networks.py
index 96b7ef6..b203c7e 100644
--- a/tempest/api/compute/test_tenant_networks.py
+++ b/tempest/api/compute/test_tenant_networks.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from tempest.api.compute import base
+from tempest.lib import decorators
 from tempest import test
 
 
@@ -29,7 +30,7 @@
         cls.set_network_resources(network=True)
         super(ComputeTenantNetworksTest, cls).setup_credentials()
 
-    @test.idempotent_id('edfea98e-bbe3-4c7a-9739-87b986baff26')
+    @decorators.idempotent_id('edfea98e-bbe3-4c7a-9739-87b986baff26')
     @test.services('network')
     def test_list_show_tenant_networks(self):
         # Fetch all networks that are visible to the tenant: this may include
diff --git a/tempest/api/compute/test_versions.py b/tempest/api/compute/test_versions.py
index 8b84a21..c9f0724 100644
--- a/tempest/api/compute/test_versions.py
+++ b/tempest/api/compute/test_versions.py
@@ -13,12 +13,12 @@
 # under the License.
 
 from tempest.api.compute import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class TestVersions(base.BaseV2ComputeTest):
 
-    @test.idempotent_id('6c0a0990-43b6-4529-9b61-5fd8daf7c55c')
+    @decorators.idempotent_id('6c0a0990-43b6-4529-9b61-5fd8daf7c55c')
     def test_list_api_versions(self):
         """Test that a get of the unversioned url returns the choices doc.
 
@@ -36,7 +36,7 @@
         self.assertEqual(versions[0]['id'], 'v2.0',
                          "The first listed version should be v2.0")
 
-    @test.idempotent_id('b953a29e-929c-4a8e-81be-ec3a7e03cb76')
+    @decorators.idempotent_id('b953a29e-929c-4a8e-81be-ec3a7e03cb76')
     def test_get_version_details(self):
         """Test individual version endpoints info works.
 
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index fa465af..cbe7178 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -21,8 +21,8 @@
 from tempest.common.utils.linux import remote_client
 from tempest.common import waiters
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
-from tempest import test
 
 CONF = config.CONF
 
@@ -85,7 +85,7 @@
 
         return attachment
 
-    @test.idempotent_id('52e9045a-e90d-4c0d-9087-79d657faffff')
+    @decorators.idempotent_id('52e9045a-e90d-4c0d-9087-79d657faffff')
     def test_attach_detach_volume(self):
         # Stop and Start a server with an attached volume, ensuring that
         # the volume remains attached.
@@ -136,7 +136,7 @@
             disks = linux_client.get_disks()
             self.assertNotIn(device_name_to_match, disks)
 
-    @test.idempotent_id('7fa563fe-f0f7-43eb-9e22-a1ece036b513')
+    @decorators.idempotent_id('7fa563fe-f0f7-43eb-9e22-a1ece036b513')
     def test_list_get_volume_attachments(self):
         # List volume attachment of the server
         server = self._create_server()
@@ -156,7 +156,7 @@
         self.assertEqual(volume['id'], body['volumeId'])
         self.assertEqual(attachment['id'], body['id'])
 
-    @test.idempotent_id('757d488b-a951-4bc7-b3cd-f417028da08a')
+    @decorators.idempotent_id('757d488b-a951-4bc7-b3cd-f417028da08a')
     def test_list_get_two_volume_attachments(self):
         # NOTE: This test is using the volume device auto-assignment
         # without specifying the device ("/dev/sdb", etc). The feature
@@ -243,7 +243,7 @@
             counted_volumes = self._count_volumes(server)
             self.assertEqual(number_of_volumes, counted_volumes)
 
-    @test.idempotent_id('13a940b6-3474-4c3c-b03f-29b89112bfee')
+    @decorators.idempotent_id('13a940b6-3474-4c3c-b03f-29b89112bfee')
     @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
                           'Shelve is not available.')
     def test_attach_volume_shelved_or_offload_server(self):
@@ -269,7 +269,7 @@
         # case of shelved_offloaded.
         self.assertIsNotNone(volume_attachment['device'])
 
-    @test.idempotent_id('b54e86dd-a070-49c4-9c07-59ae6dae15aa')
+    @decorators.idempotent_id('b54e86dd-a070-49c4-9c07-59ae6dae15aa')
     @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
                           'Shelve is not available.')
     def test_detach_volume_shelved_or_offload_server(self):
diff --git a/tempest/api/compute/volumes/test_attach_volume_negative.py b/tempest/api/compute/volumes/test_attach_volume_negative.py
index 1f18bfe..acab4b1 100644
--- a/tempest/api/compute/volumes/test_attach_volume_negative.py
+++ b/tempest/api/compute/volumes/test_attach_volume_negative.py
@@ -14,6 +14,7 @@
 
 from tempest.api.compute import base
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -30,7 +31,7 @@
             raise cls.skipException(skip_msg)
 
     @test.related_bug('1630783', status_code=500)
-    @test.idempotent_id('a313b5cd-fbd0-49cc-94de-870e99f763c7')
+    @decorators.idempotent_id('a313b5cd-fbd0-49cc-94de-870e99f763c7')
     def test_delete_attached_volume(self):
         server = self.create_test_server(wait_until='ACTIVE')
         volume = self.create_volume()
diff --git a/tempest/api/compute/volumes/test_volume_snapshots.py b/tempest/api/compute/volumes/test_volume_snapshots.py
index 01718cc..3d5d23b 100644
--- a/tempest/api/compute/volumes/test_volume_snapshots.py
+++ b/tempest/api/compute/volumes/test_volume_snapshots.py
@@ -19,7 +19,7 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 
 CONF = config.CONF
@@ -40,7 +40,7 @@
         cls.volumes_client = cls.volumes_extensions_client
         cls.snapshots_client = cls.snapshots_extensions_client
 
-    @test.idempotent_id('cd4ec87d-7825-450d-8040-6e2068f2da8f')
+    @decorators.idempotent_id('cd4ec87d-7825-450d-8040-6e2068f2da8f')
     @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,
                           'Cinder volume snapshots are disabled')
     def test_volume_snapshot_create_get_list_delete(self):
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index 7549d4a..63c247e 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -19,7 +19,7 @@
 from tempest.common.utils import data_utils
 from tempest.common import waiters
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 
 CONF = config.CONF
@@ -39,7 +39,7 @@
         super(VolumesGetTestJSON, cls).setup_clients()
         cls.client = cls.volumes_extensions_client
 
-    @test.idempotent_id('f10f25eb-9775-4d9d-9cbe-1cf54dae9d5f')
+    @decorators.idempotent_id('f10f25eb-9775-4d9d-9cbe-1cf54dae9d5f')
     def test_volume_create_get_delete(self):
         # CREATE, GET, DELETE Volume
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
diff --git a/tempest/api/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py
index 0481570..dd9d408 100644
--- a/tempest/api/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -15,7 +15,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -52,7 +52,7 @@
             cls.volume_list.append(volume)
             cls.volume_id_list.append(volume['id'])
 
-    @test.idempotent_id('bc2dd1a0-15af-48e5-9990-f2e75a48325d')
+    @decorators.idempotent_id('bc2dd1a0-15af-48e5-9990-f2e75a48325d')
     def test_volume_list(self):
         # Should return the list of Volumes
         # Fetch all Volumes
@@ -67,7 +67,7 @@
                          ', '.join(m_vol['displayName']
                                    for m_vol in missing_volumes))
 
-    @test.idempotent_id('bad0567a-5a4f-420b-851e-780b55bb867c')
+    @decorators.idempotent_id('bad0567a-5a4f-420b-851e-780b55bb867c')
     def test_volume_list_with_details(self):
         # Should return the list of Volumes with details
         # Fetch all Volumes
@@ -82,7 +82,7 @@
                          ', '.join(m_vol['displayName']
                                    for m_vol in missing_volumes))
 
-    @test.idempotent_id('1048ed81-2baf-487a-b284-c0622b86e7b8')
+    @decorators.idempotent_id('1048ed81-2baf-487a-b284-c0622b86e7b8')
     def test_volume_list_param_limit(self):
         # Return the list of volumes based on limit set
         params = {'limit': 2}
@@ -91,7 +91,7 @@
         self.assertEqual(len(fetched_vol_list), params['limit'],
                          "Failed to list volumes by limit set")
 
-    @test.idempotent_id('33985568-4965-49d5-9bcc-0aa007ca5b7a')
+    @decorators.idempotent_id('33985568-4965-49d5-9bcc-0aa007ca5b7a')
     def test_volume_list_with_detail_param_limit(self):
         # Return the list of volumes with details based on limit set.
         params = {'limit': 2}
@@ -101,7 +101,7 @@
         self.assertEqual(len(fetched_vol_list), params['limit'],
                          "Failed to list volume details by limit set")
 
-    @test.idempotent_id('51c22651-a074-4ea7-af0b-094f9331303e')
+    @decorators.idempotent_id('51c22651-a074-4ea7-af0b-094f9331303e')
     def test_volume_list_param_offset_and_limit(self):
         # Return the list of volumes based on offset and limit set.
         # get all volumes list
@@ -118,7 +118,7 @@
                              all_vol_list[index + params['offset']]['id'],
                              "Failed to list volumes by offset and limit")
 
-    @test.idempotent_id('06b6abc4-3f10-48e9-a7a1-3facc98f03e5')
+    @decorators.idempotent_id('06b6abc4-3f10-48e9-a7a1-3facc98f03e5')
     def test_volume_list_with_detail_param_offset_and_limit(self):
         # Return the list of volumes details based on offset and limit set.
         # get all volumes list
diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py
index 0e1fef2..2ad8631 100644
--- a/tempest/api/compute/volumes/test_volumes_negative.py
+++ b/tempest/api/compute/volumes/test_volumes_negative.py
@@ -16,6 +16,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -37,7 +38,7 @@
         cls.client = cls.volumes_extensions_client
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('c03ea686-905b-41a2-8748-9635154b7c57')
+    @decorators.idempotent_id('c03ea686-905b-41a2-8748-9635154b7c57')
     def test_volume_get_nonexistent_volume_id(self):
         # Negative: Should not be able to get details of nonexistent volume
         # Creating a nonexistent volume id
@@ -46,7 +47,7 @@
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('54a34226-d910-4b00-9ef8-8683e6c55846')
+    @decorators.idempotent_id('54a34226-d910-4b00-9ef8-8683e6c55846')
     def test_volume_delete_nonexistent_volume_id(self):
         # Negative: Should not be able to delete nonexistent Volume
         # Creating nonexistent volume id
@@ -55,7 +56,7 @@
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('5125ae14-152b-40a7-b3c5-eae15e9022ef')
+    @decorators.idempotent_id('5125ae14-152b-40a7-b3c5-eae15e9022ef')
     def test_create_volume_with_invalid_size(self):
         # Negative: Should not be able to create volume with invalid size
         # in request
@@ -65,7 +66,7 @@
                           size='#$%', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('131cb3a1-75cc-4d40-b4c3-1317f64719b0')
+    @decorators.idempotent_id('131cb3a1-75cc-4d40-b4c3-1317f64719b0')
     def test_create_volume_without_passing_size(self):
         # Negative: Should not be able to create volume without passing size
         # in request
@@ -75,7 +76,7 @@
                           size='', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('8cce995e-0a83-479a-b94d-e1e40b8a09d1')
+    @decorators.idempotent_id('8cce995e-0a83-479a-b94d-e1e40b8a09d1')
     def test_create_volume_with_size_zero(self):
         # Negative: Should not be able to create volume with size zero
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
@@ -84,13 +85,13 @@
                           size='0', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('62bab09a-4c03-4617-8cca-8572bc94af9b')
+    @decorators.idempotent_id('62bab09a-4c03-4617-8cca-8572bc94af9b')
     def test_get_volume_without_passing_volume_id(self):
         # Negative: Should not be able to get volume when empty ID is passed
         self.assertRaises(lib_exc.NotFound, self.client.show_volume, '')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('62972737-124b-4513-b6cf-2f019f178494')
+    @decorators.idempotent_id('62972737-124b-4513-b6cf-2f019f178494')
     def test_delete_invalid_volume_id(self):
         # Negative: Should not be able to delete volume when invalid ID is
         # passed
@@ -99,7 +100,7 @@
                           data_utils.rand_name('invalid'))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0d1417c5-4ae8-4c2c-adc5-5f0b864253e5')
+    @decorators.idempotent_id('0d1417c5-4ae8-4c2c-adc5-5f0b864253e5')
     def test_delete_volume_without_passing_volume_id(self):
         # Negative: Should not be able to delete volume when empty ID is passed
         self.assertRaises(lib_exc.NotFound, self.client.delete_volume, '')