Merge "Switch to decorators.idempotent_id on scenario"
diff --git a/tempest/api/compute/volumes/test_attach_volume_negative.py b/tempest/api/compute/volumes/test_attach_volume_negative.py
index acab4b1..c017690 100644
--- a/tempest/api/compute/volumes/test_attach_volume_negative.py
+++ b/tempest/api/compute/volumes/test_attach_volume_negative.py
@@ -30,6 +30,7 @@
             skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
 
+    @test.attr(type=['negative'])
     @test.related_bug('1630783', status_code=500)
     @decorators.idempotent_id('a313b5cd-fbd0-49cc-94de-870e99f763c7')
     def test_delete_attached_volume(self):
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index 5703313..72d71c7 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -15,7 +15,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
 
@@ -93,24 +93,24 @@
 
         super(VolumeMultiBackendV2Test, cls).resource_cleanup()
 
-    @test.idempotent_id('c1a41f3f-9dad-493e-9f09-3ff197d477cc')
+    @decorators.idempotent_id('c1a41f3f-9dad-493e-9f09-3ff197d477cc')
     def test_backend_name_reporting(self):
         # get volume id which created by type without prefix
         for volume_id in self.volume_id_list_without_prefix:
             self._test_backend_name_reporting_by_volume_id(volume_id)
 
-    @test.idempotent_id('f38e647f-ab42-4a31-a2e7-ca86a6485215')
+    @decorators.idempotent_id('f38e647f-ab42-4a31-a2e7-ca86a6485215')
     def test_backend_name_reporting_with_prefix(self):
         # get volume id which created by type with prefix
         for volume_id in self.volume_id_list_with_prefix:
             self._test_backend_name_reporting_by_volume_id(volume_id)
 
-    @test.idempotent_id('46435ab1-a0af-4401-8373-f14e66b0dd58')
+    @decorators.idempotent_id('46435ab1-a0af-4401-8373-f14e66b0dd58')
     def test_backend_name_distinction(self):
         # get volume ids which created by type without prefix
         self._test_backend_name_distinction(self.volume_id_list_without_prefix)
 
-    @test.idempotent_id('4236305b-b65a-4bfc-a9d2-69cb5b2bf2ed')
+    @decorators.idempotent_id('4236305b-b65a-4bfc-a9d2-69cb5b2bf2ed')
     def test_backend_name_distinction_with_prefix(self):
         # get volume ids which created by type without prefix
         self._test_backend_name_distinction(self.volume_id_list_with_prefix)
diff --git a/tempest/api/volume/admin/test_qos.py b/tempest/api/volume/admin/test_qos.py
index 9275d2b..e1cfb30 100644
--- a/tempest/api/volume/admin/test_qos.py
+++ b/tempest/api/volume/admin/test_qos.py
@@ -15,7 +15,7 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils as utils
 from tempest.common import waiters
-from tempest import test
+from tempest.lib import decorators
 
 
 class QosSpecsV2TestJSON(base.BaseVolumeAdminTest):
@@ -55,7 +55,7 @@
         self.admin_volume_qos_client.associate_qos(
             self.created_qos['id'], vol_type_id)
 
-    @test.idempotent_id('7e15f883-4bef-49a9-95eb-f94209a1ced1')
+    @decorators.idempotent_id('7e15f883-4bef-49a9-95eb-f94209a1ced1')
     def test_create_delete_qos_with_front_end_consumer(self):
         """Tests the creation and deletion of QoS specs
 
@@ -63,7 +63,7 @@
         """
         self._create_delete_test_qos_with_given_consumer('front-end')
 
-    @test.idempotent_id('b115cded-8f58-4ee4-aab5-9192cfada08f')
+    @decorators.idempotent_id('b115cded-8f58-4ee4-aab5-9192cfada08f')
     def test_create_delete_qos_with_back_end_consumer(self):
         """Tests the creation and deletion of QoS specs
 
@@ -71,7 +71,7 @@
         """
         self._create_delete_test_qos_with_given_consumer('back-end')
 
-    @test.idempotent_id('f88d65eb-ea0d-487d-af8d-71f4011575a4')
+    @decorators.idempotent_id('f88d65eb-ea0d-487d-af8d-71f4011575a4')
     def test_create_delete_qos_with_both_consumer(self):
         """Tests the creation and deletion of QoS specs
 
@@ -79,7 +79,7 @@
         """
         self._create_delete_test_qos_with_given_consumer('both')
 
-    @test.idempotent_id('7aa214cc-ac1a-4397-931f-3bb2e83bb0fd')
+    @decorators.idempotent_id('7aa214cc-ac1a-4397-931f-3bb2e83bb0fd')
     def test_get_qos(self):
         """Tests the detail of a given qos-specs"""
         body = self.admin_volume_qos_client.show_qos(
@@ -87,13 +87,13 @@
         self.assertEqual(self.qos_name, body['name'])
         self.assertEqual(self.qos_consumer, body['consumer'])
 
-    @test.idempotent_id('75e04226-bcf7-4595-a34b-fdf0736f38fc')
+    @decorators.idempotent_id('75e04226-bcf7-4595-a34b-fdf0736f38fc')
     def test_list_qos(self):
         """Tests the list of all qos-specs"""
         body = self.admin_volume_qos_client.list_qos()['qos_specs']
         self.assertIn(self.created_qos, body)
 
-    @test.idempotent_id('ed00fd85-4494-45f2-8ceb-9e2048919aed')
+    @decorators.idempotent_id('ed00fd85-4494-45f2-8ceb-9e2048919aed')
     def test_set_unset_qos_key(self):
         """Test the addition of a specs key to qos-specs"""
         args = {'iops_bytes': '500'}
@@ -117,7 +117,7 @@
             self.created_qos['id'])['qos_specs']
         self.assertNotIn(keys[0], body['specs'])
 
-    @test.idempotent_id('1dd93c76-6420-485d-a771-874044c416ac')
+    @decorators.idempotent_id('1dd93c76-6420-485d-a771-874044c416ac')
     def test_associate_disassociate_qos(self):
         """Test the following operations :
 
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 29a161b..e1c9492 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -15,7 +15,7 @@
 
 from tempest.api.volume import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -59,7 +59,7 @@
     def _get_progress_alias(self):
         return 'os-extended-snapshot-attributes:progress'
 
-    @test.idempotent_id('3e13ca2f-48ea-49f3-ae1a-488e9180d535')
+    @decorators.idempotent_id('3e13ca2f-48ea-49f3-ae1a-488e9180d535')
     def test_reset_snapshot_status(self):
         # Reset snapshot status to creating
         status = 'creating'
@@ -69,7 +69,7 @@
             self.snapshot['id'])['snapshot']
         self.assertEqual(status, snapshot_get['status'])
 
-    @test.idempotent_id('41288afd-d463-485e-8f6e-4eea159413eb')
+    @decorators.idempotent_id('41288afd-d463-485e-8f6e-4eea159413eb')
     def test_update_snapshot_status(self):
         # Reset snapshot status to creating
         status = 'creating'
@@ -88,22 +88,22 @@
         self.assertEqual(status, snapshot_get['status'])
         self.assertEqual(progress, snapshot_get[progress_alias])
 
-    @test.idempotent_id('05f711b6-e629-4895-8103-7ca069f2073a')
+    @decorators.idempotent_id('05f711b6-e629-4895-8103-7ca069f2073a')
     def test_snapshot_force_delete_when_snapshot_is_creating(self):
         # test force delete when status of snapshot is creating
         self._create_reset_and_force_delete_temp_snapshot('creating')
 
-    @test.idempotent_id('92ce8597-b992-43a1-8868-6316b22a969e')
+    @decorators.idempotent_id('92ce8597-b992-43a1-8868-6316b22a969e')
     def test_snapshot_force_delete_when_snapshot_is_deleting(self):
         # test force delete when status of snapshot is deleting
         self._create_reset_and_force_delete_temp_snapshot('deleting')
 
-    @test.idempotent_id('645a4a67-a1eb-4e8e-a547-600abac1525d')
+    @decorators.idempotent_id('645a4a67-a1eb-4e8e-a547-600abac1525d')
     def test_snapshot_force_delete_when_snapshot_is_error(self):
         # test force delete when status of snapshot is error
         self._create_reset_and_force_delete_temp_snapshot('error')
 
-    @test.idempotent_id('bf89080f-8129-465e-9327-b2f922666ba5')
+    @decorators.idempotent_id('bf89080f-8129-465e-9327-b2f922666ba5')
     def test_snapshot_force_delete_when_snapshot_is_error_deleting(self):
         # test force delete when status of snapshot is error_deleting
         self._create_reset_and_force_delete_temp_snapshot('error_deleting')
diff --git a/tempest/api/volume/admin/test_volume_hosts.py b/tempest/api/volume/admin/test_volume_hosts.py
index f6de9a6..73c927a 100644
--- a/tempest/api/volume/admin/test_volume_hosts.py
+++ b/tempest/api/volume/admin/test_volume_hosts.py
@@ -14,12 +14,12 @@
 #    under the License.
 
 from tempest.api.volume import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class VolumeHostsAdminV2TestsJSON(base.BaseVolumeAdminTest):
 
-    @test.idempotent_id('d5f3efa2-6684-4190-9ced-1c2f526352ad')
+    @decorators.idempotent_id('d5f3efa2-6684-4190-9ced-1c2f526352ad')
     def test_list_hosts(self):
         hosts = self.admin_hosts_client.list_hosts()['hosts']
         self.assertGreaterEqual(len(hosts), 2, "No. of hosts are < 2,"
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index 7d8c94d..5a83ae3 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -15,7 +15,7 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest.common import waiters
-from tempest import test
+from tempest.lib import decorators
 
 QUOTA_KEYS = ['gigabytes', 'snapshots', 'volumes', 'backups']
 QUOTA_USAGE_KEYS = ['reserved', 'limit', 'in_use']
@@ -32,21 +32,21 @@
         cls.demo_tenant_id = cls.os.credentials.tenant_id
         cls.alt_client = cls.os_alt.volumes_client
 
-    @test.idempotent_id('59eada70-403c-4cef-a2a3-a8ce2f1b07a0')
+    @decorators.idempotent_id('59eada70-403c-4cef-a2a3-a8ce2f1b07a0')
     def test_list_quotas(self):
         quotas = (self.admin_quotas_client.show_quota_set(self.demo_tenant_id)
                   ['quota_set'])
         for key in QUOTA_KEYS:
             self.assertIn(key, quotas)
 
-    @test.idempotent_id('2be020a2-5fdd-423d-8d35-a7ffbc36e9f7')
+    @decorators.idempotent_id('2be020a2-5fdd-423d-8d35-a7ffbc36e9f7')
     def test_list_default_quotas(self):
         quotas = self.admin_quotas_client.show_default_quota_set(
             self.demo_tenant_id)['quota_set']
         for key in QUOTA_KEYS:
             self.assertIn(key, quotas)
 
-    @test.idempotent_id('3d45c99e-cc42-4424-a56e-5cbd212b63a6')
+    @decorators.idempotent_id('3d45c99e-cc42-4424-a56e-5cbd212b63a6')
     def test_update_all_quota_resources_for_tenant(self):
         # Admin can update all the resource quota limits for a tenant
         default_quota_set = self.admin_quotas_client.show_default_quota_set(
@@ -71,7 +71,7 @@
         # would be no other values in there.
         self.assertDictContainsSubset(new_quota_set, quota_set)
 
-    @test.idempotent_id('18c51ae9-cb03-48fc-b234-14a19374dbed')
+    @decorators.idempotent_id('18c51ae9-cb03-48fc-b234-14a19374dbed')
     def test_show_quota_usage(self):
         quota_usage = self.admin_quotas_client.show_quota_set(
             self.os_adm.credentials.tenant_id,
@@ -81,7 +81,7 @@
             for usage_key in QUOTA_USAGE_KEYS:
                 self.assertIn(usage_key, quota_usage[key])
 
-    @test.idempotent_id('ae8b6091-48ad-4bfa-a188-bbf5cc02115f')
+    @decorators.idempotent_id('ae8b6091-48ad-4bfa-a188-bbf5cc02115f')
     def test_quota_usage(self):
         quota_usage = self.admin_quotas_client.show_quota_set(
             self.demo_tenant_id, params={'usage': True})['quota_set']
@@ -100,7 +100,7 @@
                          volume["size"],
                          new_quota_usage['gigabytes']['in_use'])
 
-    @test.idempotent_id('874b35a9-51f1-4258-bec5-cd561b6690d3')
+    @decorators.idempotent_id('874b35a9-51f1-4258-bec5-cd561b6690d3')
     def test_delete_quota(self):
         # Admin can delete the resource quota set for a project
         project_name = data_utils.rand_name('quota_tenant')
@@ -121,7 +121,7 @@
                          ['quota_set'])
         self.assertEqual(volume_default, quota_set_new['volumes'])
 
-    @test.idempotent_id('8911036f-9d54-4720-80cc-a1c9796a8805')
+    @decorators.idempotent_id('8911036f-9d54-4720-80cc-a1c9796a8805')
     def test_quota_usage_after_volume_transfer(self):
         # Create a volume for transfer
         volume = self.create_volume()
diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py
index c19b1c4..8170626 100644
--- a/tempest/api/volume/admin/test_volume_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_quotas_negative.py
@@ -15,6 +15,7 @@
 
 from tempest.api.volume import base
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -46,14 +47,14 @@
         cls.volume = cls.create_volume()
 
     @test.attr(type='negative')
-    @test.idempotent_id('bf544854-d62a-47f2-a681-90f7a47d86b6')
+    @decorators.idempotent_id('bf544854-d62a-47f2-a681-90f7a47d86b6')
     def test_quota_volumes(self):
         self.assertRaises(lib_exc.OverLimit,
                           self.volumes_client.create_volume,
                           size=CONF.volume.volume_size)
 
     @test.attr(type='negative')
-    @test.idempotent_id('2dc27eee-8659-4298-b900-169d71a91374')
+    @decorators.idempotent_id('2dc27eee-8659-4298-b900-169d71a91374')
     def test_quota_volume_gigabytes(self):
         # NOTE(gfidente): quota set needs to be changed for this test
         # or we may be limited by the volumes or snaps quota number, not by
diff --git a/tempest/api/volume/admin/test_volume_retype_with_migration.py b/tempest/api/volume/admin/test_volume_retype_with_migration.py
index 8a69ea3..dc509de 100644
--- a/tempest/api/volume/admin/test_volume_retype_with_migration.py
+++ b/tempest/api/volume/admin/test_volume_retype_with_migration.py
@@ -16,7 +16,7 @@
 from tempest.api.volume import base
 from tempest.common import waiters
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -75,7 +75,7 @@
 
         super(VolumeRetypeWithMigrationV2Test, cls).resource_cleanup()
 
-    @test.idempotent_id('a1a41f3f-9dad-493e-9f09-3ff197d477cd')
+    @decorators.idempotent_id('a1a41f3f-9dad-493e-9f09-3ff197d477cd')
     def test_available_volume_retype_with_migration(self):
 
         keys_with_no_change = ('id', 'size', 'description', 'name', 'user_id',
diff --git a/tempest/api/volume/admin/test_volume_services.py b/tempest/api/volume/admin/test_volume_services.py
index 165874b..97a352b 100644
--- a/tempest/api/volume/admin/test_volume_services.py
+++ b/tempest/api/volume/admin/test_volume_services.py
@@ -14,7 +14,7 @@
 #    under the License.
 from tempest.api.volume import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 
 CONF = config.CONF
@@ -43,13 +43,13 @@
         cls.host_name = _get_host(cls.services[0]['host'])
         cls.binary_name = cls.services[0]['binary']
 
-    @test.idempotent_id('e0218299-0a59-4f43-8b2b-f1c035b3d26d')
+    @decorators.idempotent_id('e0218299-0a59-4f43-8b2b-f1c035b3d26d')
     def test_list_services(self):
         services = (self.admin_volume_services_client.list_services()
                     ['services'])
         self.assertNotEqual(0, len(services))
 
-    @test.idempotent_id('63a3e1ca-37ee-4983-826d-83276a370d25')
+    @decorators.idempotent_id('63a3e1ca-37ee-4983-826d-83276a370d25')
     def test_get_service_by_service_binary_name(self):
         services = (self.admin_volume_services_client.list_services(
             binary=self.binary_name)['services'])
@@ -57,7 +57,7 @@
         for service in services:
             self.assertEqual(self.binary_name, service['binary'])
 
-    @test.idempotent_id('178710e4-7596-4e08-9333-745cb8bc4f8d')
+    @decorators.idempotent_id('178710e4-7596-4e08-9333-745cb8bc4f8d')
     def test_get_service_by_host_name(self):
         services_on_host = [service for service in self.services if
                             _get_host(service['host']) == self.host_name]
@@ -73,7 +73,7 @@
         # on order.
         self.assertEqual(sorted(s1), sorted(s2))
 
-    @test.idempotent_id('ffa6167c-4497-4944-a464-226bbdb53908')
+    @decorators.idempotent_id('ffa6167c-4497-4944-a464-226bbdb53908')
     def test_get_service_by_service_and_host_name(self):
 
         services = (self.admin_volume_services_client.list_services(
diff --git a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
index 09af7fe..90a0022 100644
--- a/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
@@ -15,6 +15,7 @@
 
 from tempest.api.volume import base
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -54,14 +55,14 @@
         cls.snapshot = cls.create_snapshot(volume_id=cls.volume['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('02bbf63f-6c05-4357-9d98-2926a94064ff')
+    @decorators.idempotent_id('02bbf63f-6c05-4357-9d98-2926a94064ff')
     def test_quota_volume_snapshots(self):
         self.assertRaises(lib_exc.OverLimit,
                           self.snapshots_client.create_snapshot,
                           volume_id=self.volume['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('c99a1ca9-6cdf-498d-9fdf-25832babef27')
+    @decorators.idempotent_id('c99a1ca9-6cdf-498d-9fdf-25832babef27')
     def test_quota_volume_gigabytes_snapshots(self):
         self.addCleanup(self.admin_quotas_client.update_quota_set,
                         self.demo_tenant_id,
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index 16be463..6e6122b 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -17,21 +17,21 @@
 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
 
 
 class VolumeTypesV2Test(base.BaseVolumeAdminTest):
 
-    @test.idempotent_id('9d9b28e3-1b2e-4483-a2cc-24aa0ea1de54')
+    @decorators.idempotent_id('9d9b28e3-1b2e-4483-a2cc-24aa0ea1de54')
     def test_volume_type_list(self):
         # List volume types.
         body = \
             self.admin_volume_types_client.list_volume_types()['volume_types']
         self.assertIsInstance(body, list)
 
-    @test.idempotent_id('c03cc62c-f4e9-4623-91ec-64ce2f9c1260')
+    @decorators.idempotent_id('c03cc62c-f4e9-4623-91ec-64ce2f9c1260')
     def test_volume_crud_with_volume_type_and_extra_specs(self):
         # Create/update/get/delete volume with volume_type and extra spec.
         volume_types = list()
@@ -81,7 +81,7 @@
                          'The fetched Volume is different '
                          'from the created Volume')
 
-    @test.idempotent_id('4e955c3b-49db-4515-9590-0c99f8e471ad')
+    @decorators.idempotent_id('4e955c3b-49db-4515-9590-0c99f8e471ad')
     def test_volume_type_create_get_delete(self):
         # Create/get volume type.
         name = data_utils.rand_name(self.__class__.__name__ + '-volume-type')
@@ -113,7 +113,7 @@
                          'The fetched Volume_type is different '
                          'from the created Volume_type')
 
-    @test.idempotent_id('7830abd0-ff99-4793-a265-405684a54d46')
+    @decorators.idempotent_id('7830abd0-ff99-4793-a265-405684a54d46')
     def test_volume_type_encryption_create_get_delete(self):
         # Create/get/delete encryption type.
         provider = "LuksEncryptor"
@@ -153,7 +153,7 @@
             self.admin_encryption_types_client.show_encryption_type(type_id))
         self.assertEmpty(deleted_encryption_type)
 
-    @test.idempotent_id('cf9f07c6-db9e-4462-a243-5933ad65e9c8')
+    @decorators.idempotent_id('cf9f07c6-db9e-4462-a243-5933ad65e9c8')
     def test_volume_type_update(self):
         # Create volume type
         volume_type = self.create_volume_type()
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
index fdff2df..1729d06 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -14,8 +14,8 @@
 #    under the License.
 
 from tempest.api.volume import base
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
-from tempest import test
 
 
 class VolumeTypesExtraSpecsV2Test(base.BaseVolumeAdminTest):
@@ -25,7 +25,7 @@
         super(VolumeTypesExtraSpecsV2Test, cls).resource_setup()
         cls.volume_type = cls.create_volume_type()
 
-    @test.idempotent_id('b42923e9-0452-4945-be5b-d362ae533e60')
+    @decorators.idempotent_id('b42923e9-0452-4945-be5b-d362ae533e60')
     def test_volume_type_extra_specs_list(self):
         # List Volume types extra specs.
         extra_specs = {"spec1": "val1"}
@@ -38,7 +38,7 @@
         self.assertIsInstance(body, dict)
         self.assertIn('spec1', body)
 
-    @test.idempotent_id('0806db36-b4a0-47a1-b6f3-c2e7f194d017')
+    @decorators.idempotent_id('0806db36-b4a0-47a1-b6f3-c2e7f194d017')
     def test_volume_type_extra_specs_update(self):
         # Update volume type extra specs
         extra_specs = {"spec2": "val1"}
@@ -54,7 +54,7 @@
         self.assertEqual(extra_spec[spec_key], body[spec_key],
                          "Volume type extra spec incorrectly updated")
 
-    @test.idempotent_id('d4772798-601f-408a-b2a5-29e8a59d1220')
+    @decorators.idempotent_id('d4772798-601f-408a-b2a5-29e8a59d1220')
     def test_volume_type_extra_spec_create_get_delete(self):
         # Create/Get/Delete volume type extra spec.
         spec_key = "spec3"
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index 8040322..933b6ad 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -15,8 +15,8 @@
 
 from tempest.api.volume 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 ExtraSpecsNegativeV2Test(base.BaseVolumeAdminTest):
@@ -27,7 +27,7 @@
         cls.extra_specs = {"spec1": "val1"}
         cls.volume_type = cls.create_volume_type(extra_specs=cls.extra_specs)
 
-    @test.idempotent_id('08961d20-5cbb-4910-ac0f-89ad6dbb2da1')
+    @decorators.idempotent_id('08961d20-5cbb-4910-ac0f-89ad6dbb2da1')
     def test_update_no_body(self):
         # Should not update volume type extra specs with no body
         self.assertRaises(
@@ -35,7 +35,7 @@
             self.admin_volume_types_client.update_volume_type_extra_specs,
             self.volume_type['id'], "spec1", None)
 
-    @test.idempotent_id('25e5a0ee-89b3-4c53-8310-236f76c75365')
+    @decorators.idempotent_id('25e5a0ee-89b3-4c53-8310-236f76c75365')
     def test_update_nonexistent_extra_spec_id(self):
         # Should not update volume type extra specs with nonexistent id.
         extra_spec = {"spec1": "val2"}
@@ -45,7 +45,7 @@
             self.volume_type['id'], data_utils.rand_uuid(),
             extra_spec)
 
-    @test.idempotent_id('9bf7a657-b011-4aec-866d-81c496fbe5c8')
+    @decorators.idempotent_id('9bf7a657-b011-4aec-866d-81c496fbe5c8')
     def test_update_none_extra_spec_id(self):
         # Should not update volume type extra specs with none id.
         extra_spec = {"spec1": "val2"}
@@ -54,7 +54,7 @@
             self.admin_volume_types_client.update_volume_type_extra_specs,
             self.volume_type['id'], None, extra_spec)
 
-    @test.idempotent_id('a77dfda2-9100-448e-9076-ed1711f4bdfc')
+    @decorators.idempotent_id('a77dfda2-9100-448e-9076-ed1711f4bdfc')
     def test_update_multiple_extra_spec(self):
         # Should not update volume type extra specs with multiple specs as
             # body.
@@ -65,7 +65,7 @@
             self.volume_type['id'], list(extra_spec)[0],
             extra_spec)
 
-    @test.idempotent_id('49d5472c-a53d-4eab-a4d3-450c4db1c545')
+    @decorators.idempotent_id('49d5472c-a53d-4eab-a4d3-450c4db1c545')
     def test_create_nonexistent_type_id(self):
         # Should not create volume type extra spec for nonexistent volume
             # type id.
@@ -75,7 +75,7 @@
             self.admin_volume_types_client.create_volume_type_extra_specs,
             data_utils.rand_uuid(), extra_specs)
 
-    @test.idempotent_id('c821bdc8-43a4-4bf4-86c8-82f3858d5f7d')
+    @decorators.idempotent_id('c821bdc8-43a4-4bf4-86c8-82f3858d5f7d')
     def test_create_none_body(self):
         # Should not create volume type extra spec for none POST body.
         self.assertRaises(
@@ -83,7 +83,7 @@
             self.admin_volume_types_client.create_volume_type_extra_specs,
             self.volume_type['id'], None)
 
-    @test.idempotent_id('bc772c71-1ed4-4716-b945-8b5ed0f15e87')
+    @decorators.idempotent_id('bc772c71-1ed4-4716-b945-8b5ed0f15e87')
     def test_create_invalid_body(self):
         # Should not create volume type extra spec for invalid POST body.
         self.assertRaises(
@@ -91,7 +91,7 @@
             self.admin_volume_types_client.create_volume_type_extra_specs,
             self.volume_type['id'], extra_specs=['invalid'])
 
-    @test.idempotent_id('031cda8b-7d23-4246-8bf6-bbe73fd67074')
+    @decorators.idempotent_id('031cda8b-7d23-4246-8bf6-bbe73fd67074')
     def test_delete_nonexistent_volume_type_id(self):
         # Should not delete volume type extra spec for nonexistent
         # type id.
@@ -100,7 +100,7 @@
             self.admin_volume_types_client.delete_volume_type_extra_specs,
             data_utils.rand_uuid(), "spec1")
 
-    @test.idempotent_id('dee5cf0c-cdd6-4353-b70c-e847050d71fb')
+    @decorators.idempotent_id('dee5cf0c-cdd6-4353-b70c-e847050d71fb')
     def test_list_nonexistent_volume_type_id(self):
         # Should not list volume type extra spec for nonexistent type id.
         self.assertRaises(
@@ -108,7 +108,7 @@
             self.admin_volume_types_client.list_volume_types_extra_specs,
             data_utils.rand_uuid())
 
-    @test.idempotent_id('9f402cbd-1838-4eb4-9554-126a6b1908c9')
+    @decorators.idempotent_id('9f402cbd-1838-4eb4-9554-126a6b1908c9')
     def test_get_nonexistent_volume_type_id(self):
         # Should not get volume type extra spec for nonexistent type id.
         self.assertRaises(
@@ -116,7 +116,7 @@
             self.admin_volume_types_client.show_volume_type_extra_specs,
             data_utils.rand_uuid(), "spec1")
 
-    @test.idempotent_id('c881797d-12ff-4f1a-b09d-9f6212159753')
+    @decorators.idempotent_id('c881797d-12ff-4f1a-b09d-9f6212159753')
     def test_get_nonexistent_extra_spec_id(self):
         # Should not get volume type extra spec for nonexistent extra spec
             # id.
diff --git a/tempest/api/volume/admin/test_volume_types_negative.py b/tempest/api/volume/admin/test_volume_types_negative.py
index 5332f1e..b278127 100644
--- a/tempest/api/volume/admin/test_volume_types_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_negative.py
@@ -15,13 +15,13 @@
 
 from tempest.api.volume import base
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
-from tempest import test
 
 
 class VolumeTypesNegativeV2Test(base.BaseVolumeAdminTest):
 
-    @test.idempotent_id('b48c98f2-e662-4885-9b71-032256906314')
+    @decorators.idempotent_id('b48c98f2-e662-4885-9b71-032256906314')
     def test_create_with_nonexistent_volume_type(self):
         # Should not be able to create volume with nonexistent volume_type.
         self.name_field = self.special_fields['name_field']
@@ -30,28 +30,28 @@
         self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.create_volume, **params)
 
-    @test.idempotent_id('878b4e57-faa2-4659-b0d1-ce740a06ae81')
+    @decorators.idempotent_id('878b4e57-faa2-4659-b0d1-ce740a06ae81')
     def test_create_with_empty_name(self):
         # Should not be able to create volume type with an empty name.
         self.assertRaises(
             lib_exc.BadRequest,
             self.admin_volume_types_client.create_volume_type, name='')
 
-    @test.idempotent_id('994610d6-0476-4018-a644-a2602ef5d4aa')
+    @decorators.idempotent_id('994610d6-0476-4018-a644-a2602ef5d4aa')
     def test_get_nonexistent_type_id(self):
         # Should not be able to get volume type with nonexistent type id.
         self.assertRaises(lib_exc.NotFound,
                           self.admin_volume_types_client.show_volume_type,
                           data_utils.rand_uuid())
 
-    @test.idempotent_id('6b3926d2-7d73-4896-bc3d-e42dfd11a9f6')
+    @decorators.idempotent_id('6b3926d2-7d73-4896-bc3d-e42dfd11a9f6')
     def test_delete_nonexistent_type_id(self):
         # Should not be able to delete volume type with nonexistent type id.
         self.assertRaises(lib_exc.NotFound,
                           self.admin_volume_types_client.delete_volume_type,
                           data_utils.rand_uuid())
 
-    @test.idempotent_id('8c09f849-f225-4d78-ba87-bffd9a5e0c6f')
+    @decorators.idempotent_id('8c09f849-f225-4d78-ba87-bffd9a5e0c6f')
     def test_create_volume_with_private_volume_type(self):
         # Should not be able to create volume with private volume type.
         params = {'os-volume-type-access:is_public': False}
diff --git a/tempest/api/volume/admin/test_volumes_actions.py b/tempest/api/volume/admin/test_volumes_actions.py
index a63cbf0..693ffe7 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.volume import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class VolumesActionsV2Test(base.BaseVolumeAdminTest):
@@ -28,7 +28,7 @@
         self.admin_volume_client.force_delete_volume(temp_volume['id'])
         self.volumes_client.wait_for_resource_deletion(temp_volume['id'])
 
-    @test.idempotent_id('d063f96e-a2e0-4f34-8b8a-395c42de1845')
+    @decorators.idempotent_id('d063f96e-a2e0-4f34-8b8a-395c42de1845')
     def test_volume_reset_status(self):
         # test volume reset status : available->error->available
         volume = self.create_volume()
@@ -39,17 +39,17 @@
                 volume['id'])['volume']
             self.assertEqual(status, volume_get['status'])
 
-    @test.idempotent_id('21737d5a-92f2-46d7-b009-a0cc0ee7a570')
+    @decorators.idempotent_id('21737d5a-92f2-46d7-b009-a0cc0ee7a570')
     def test_volume_force_delete_when_volume_is_creating(self):
         # test force delete when status of volume is creating
         self._create_reset_and_force_delete_temp_volume('creating')
 
-    @test.idempotent_id('db8d607a-aa2e-4beb-b51d-d4005c232011')
+    @decorators.idempotent_id('db8d607a-aa2e-4beb-b51d-d4005c232011')
     def test_volume_force_delete_when_volume_is_attaching(self):
         # test force delete when status of volume is attaching
         self._create_reset_and_force_delete_temp_volume('attaching')
 
-    @test.idempotent_id('3e33a8a8-afd4-4d64-a86b-c27a185c5a4a')
+    @decorators.idempotent_id('3e33a8a8-afd4-4d64-a86b-c27a185c5a4a')
     def test_volume_force_delete_when_volume_is_error(self):
         # test force delete when status of volume is error
         self._create_reset_and_force_delete_temp_volume('error')
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 61d4ba7..04d27ea 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -20,7 +20,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
 
@@ -49,7 +49,7 @@
         backup.update(changes)
         return self._encode_backup(backup)
 
-    @test.idempotent_id('a99c54a1-dd80-4724-8a13-13bf58d4068d')
+    @decorators.idempotent_id('a99c54a1-dd80-4724-8a13-13bf58d4068d')
     def test_volume_backup_export_import(self):
         """Test backup export import functionality.
 
@@ -117,7 +117,7 @@
         waiters.wait_for_backup_status(self.admin_backups_client,
                                        import_backup['id'], 'available')
 
-    @test.idempotent_id('47a35425-a891-4e13-961c-c45deea21e94')
+    @decorators.idempotent_id('47a35425-a891-4e13-961c-c45deea21e94')
     def test_volume_backup_reset_status(self):
         # Create a volume
         volume = self.create_volume()
diff --git a/tempest/api/volume/admin/v2/test_backends_capabilities.py b/tempest/api/volume/admin/v2/test_backends_capabilities.py
index 9751845..1060f2b 100644
--- a/tempest/api/volume/admin/v2/test_backends_capabilities.py
+++ b/tempest/api/volume/admin/v2/test_backends_capabilities.py
@@ -16,7 +16,7 @@
 import operator
 
 from tempest.api.volume import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class BackendsCapabilitiesAdminV2TestsJSON(base.BaseVolumeAdminTest):
@@ -41,7 +41,7 @@
             cls.admin_scheduler_stats_client.list_pools()['pools']
         ]
 
-    @test.idempotent_id('3750af44-5ea2-4cd4-bc3e-56e7e6caf854')
+    @decorators.idempotent_id('3750af44-5ea2-4cd4-bc3e-56e7e6caf854')
     def test_get_capabilities_backend(self):
         # Test backend properties
         backend = self.admin_capabilities_client.show_backend_capabilities(
@@ -51,7 +51,7 @@
         for key in self.CAPABILITIES:
             self.assertIn(key, backend)
 
-    @test.idempotent_id('a9035743-d46a-47c5-9cb7-3c80ea16dea0')
+    @decorators.idempotent_id('a9035743-d46a-47c5-9cb7-3c80ea16dea0')
     def test_compare_volume_stats_values(self):
         # Test values comparison between show_backend_capabilities
         # to show_pools
diff --git a/tempest/api/volume/admin/v2/test_snapshot_manage.py b/tempest/api/volume/admin/v2/test_snapshot_manage.py
index 6a3f9ee..1114924 100644
--- a/tempest/api/volume/admin/v2/test_snapshot_manage.py
+++ b/tempest/api/volume/admin/v2/test_snapshot_manage.py
@@ -18,7 +18,7 @@
 from tempest.api.volume import base
 from tempest.common import waiters
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -31,7 +31,7 @@
      managed by Cinder from a storage back end to Cinder
     """
 
-    @test.idempotent_id('0132f42d-0147-4b45-8501-cc504bbf7810')
+    @decorators.idempotent_id('0132f42d-0147-4b45-8501-cc504bbf7810')
     @testtools.skipUnless(CONF.volume_feature_enabled.manage_snapshot,
                           "Manage snapshot tests are disabled")
     def test_unmanage_manage_snapshot(self):
diff --git a/tempest/api/volume/admin/v2/test_volume_pools.py b/tempest/api/volume/admin/v2/test_volume_pools.py
index 8544a6a..91d092d 100644
--- a/tempest/api/volume/admin/v2/test_volume_pools.py
+++ b/tempest/api/volume/admin/v2/test_volume_pools.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.volume import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class VolumePoolsAdminV2TestsJSON(base.BaseVolumeAdminTest):
@@ -33,10 +33,10 @@
         self.assertIn(volume_info['os-vol-host-attr:host'],
                       [pool['name'] for pool in cinder_pools])
 
-    @test.idempotent_id('0248a46c-e226-4933-be10-ad6fca8227e7')
+    @decorators.idempotent_id('0248a46c-e226-4933-be10-ad6fca8227e7')
     def test_get_pools_without_details(self):
         self._assert_host_volume_in_pools()
 
-    @test.idempotent_id('d4bb61f7-762d-4437-b8a4-5785759a0ced')
+    @decorators.idempotent_id('d4bb61f7-762d-4437-b8a4-5785759a0ced')
     def test_get_pools_with_details(self):
         self._assert_host_volume_in_pools(with_detail=True)
diff --git a/tempest/api/volume/admin/v2/test_volume_type_access.py b/tempest/api/volume/admin/v2/test_volume_type_access.py
index 80dbf12..b60b33b 100644
--- a/tempest/api/volume/admin/v2/test_volume_type_access.py
+++ b/tempest/api/volume/admin/v2/test_volume_type_access.py
@@ -17,8 +17,8 @@
 
 from tempest.api.volume import base
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
-from tempest import test
 
 CONF = config.CONF
 
@@ -32,7 +32,7 @@
         super(VolumeTypesAccessV2Test, cls).setup_clients()
         cls.alt_client = cls.os_alt.volumes_client
 
-    @test.idempotent_id('d4dd0027-835f-4554-a6e5-50903fb79184')
+    @decorators.idempotent_id('d4dd0027-835f-4554-a6e5-50903fb79184')
     def test_volume_type_access_add(self):
         # Creating a NON public volume type
         params = {'os-volume-type-access:is_public': False}
@@ -55,7 +55,7 @@
         # Validating the created volume is based on the volume type
         self.assertEqual(volume_type['name'], volume['volume_type'])
 
-    @test.idempotent_id('5220eb28-a435-43ce-baaf-ed46f0e95159')
+    @decorators.idempotent_id('5220eb28-a435-43ce-baaf-ed46f0e95159')
     def test_volume_type_access_list(self):
         # Creating a NON public volume type
         params = {'os-volume-type-access:is_public': False}
diff --git a/tempest/api/volume/admin/v2/test_volumes_list.py b/tempest/api/volume/admin/v2/test_volumes_list.py
index fd36d0a..b0a37fb 100644
--- a/tempest/api/volume/admin/v2/test_volumes_list.py
+++ b/tempest/api/volume/admin/v2/test_volumes_list.py
@@ -18,7 +18,7 @@
 from tempest.api.volume import base
 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 @@
                 volume['id'])['volume']
             cls.volume_list.append(volume_details)
 
-    @test.idempotent_id('5866286f-3290-4cfd-a414-088aa6cdc469')
+    @decorators.idempotent_id('5866286f-3290-4cfd-a414-088aa6cdc469')
     def test_volume_list_param_tenant(self):
         # Test to list volumes from single tenant
         # Create a volume in admin tenant
diff --git a/tempest/api/volume/admin/v3/test_user_messages.py b/tempest/api/volume/admin/v3/test_user_messages.py
index 257a434..ed85d4d 100755
--- a/tempest/api/volume/admin/v3/test_user_messages.py
+++ b/tempest/api/volume/admin/v3/test_user_messages.py
@@ -16,7 +16,7 @@
 from tempest.api.volume.v3 import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -60,7 +60,7 @@
                                          'volume %s' % volume['id'])
         return message_id
 
-    @test.idempotent_id('50f29e6e-f363-42e1-8ad1-f67ae7fd4d5a')
+    @decorators.idempotent_id('50f29e6e-f363-42e1-8ad1-f67ae7fd4d5a')
     def test_list_messages(self):
         self._create_user_message()
         messages = self.messages_client.list_messages()['messages']
@@ -70,7 +70,7 @@
                 self.assertIn(key, message.keys(),
                               'Missing expected key %s' % key)
 
-    @test.idempotent_id('55a4a61e-c7b2-4ba0-a05d-b914bdef3070')
+    @decorators.idempotent_id('55a4a61e-c7b2-4ba0-a05d-b914bdef3070')
     def test_show_message(self):
         message_id = self._create_user_message()
         self.addCleanup(self.messages_client.delete_message, message_id)
@@ -80,7 +80,7 @@
         for key in MESSAGE_KEYS:
             self.assertIn(key, message.keys(), 'Missing expected key %s' % key)
 
-    @test.idempotent_id('c6eb6901-cdcc-490f-b735-4fe251842aed')
+    @decorators.idempotent_id('c6eb6901-cdcc-490f-b735-4fe251842aed')
     def test_delete_message(self):
         message_id = self._create_user_message()
         self.messages_client.delete_message(message_id)
diff --git a/tempest/api/volume/test_availability_zone.py b/tempest/api/volume/test_availability_zone.py
index ae4b8f9..25fe5ad 100644
--- a/tempest/api/volume/test_availability_zone.py
+++ b/tempest/api/volume/test_availability_zone.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.volume import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class AvailabilityZoneV2TestJSON(base.BaseVolumeTest):
@@ -25,7 +25,7 @@
         super(AvailabilityZoneV2TestJSON, cls).setup_clients()
         cls.client = cls.availability_zone_client
 
-    @test.idempotent_id('01f1ae88-eba9-4c6b-a011-6f7ace06b725')
+    @decorators.idempotent_id('01f1ae88-eba9-4c6b-a011-6f7ace06b725')
     def test_get_availability_zone_list(self):
         # List of availability zone
         availability_zone = (self.client.list_availability_zones()
diff --git a/tempest/api/volume/test_extensions.py b/tempest/api/volume/test_extensions.py
index f044124..ca86748 100644
--- a/tempest/api/volume/test_extensions.py
+++ b/tempest/api/volume/test_extensions.py
@@ -17,7 +17,7 @@
 
 from tempest.api.volume import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -27,7 +27,7 @@
 
 class ExtensionsV2TestJSON(base.BaseVolumeTest):
 
-    @test.idempotent_id('94607eb0-43a5-47ca-82aa-736b41bd2e2c')
+    @decorators.idempotent_id('94607eb0-43a5-47ca-82aa-736b41bd2e2c')
     def test_list_extensions(self):
         # List of all extensions
         extensions = (self.volumes_extension_client.list_extensions()
diff --git a/tempest/api/volume/test_snapshot_metadata.py b/tempest/api/volume/test_snapshot_metadata.py
index d0fa07e..d5ad8d2 100644
--- a/tempest/api/volume/test_snapshot_metadata.py
+++ b/tempest/api/volume/test_snapshot_metadata.py
@@ -17,7 +17,7 @@
 
 from tempest.api.volume import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 CONF = config.CONF
 
@@ -43,7 +43,7 @@
             self.snapshot['id'], metadata={})
         super(SnapshotV2MetadataTestJSON, self).tearDown()
 
-    @test.idempotent_id('a2f20f99-e363-4584-be97-bc33afb1a56c')
+    @decorators.idempotent_id('a2f20f99-e363-4584-be97-bc33afb1a56c')
     def test_crud_snapshot_metadata(self):
         # Create metadata for the snapshot
         metadata = {"key1": "value1",
@@ -78,7 +78,7 @@
                         'Delete one item metadata of the snapshot failed')
         self.assertNotIn("key3", body)
 
-    @test.idempotent_id('e8ff85c5-8f97-477f-806a-3ac364a949ed')
+    @decorators.idempotent_id('e8ff85c5-8f97-477f-806a-3ac364a949ed')
     def test_update_snapshot_metadata_item(self):
         # Update metadata item for the snapshot
         metadata = {"key1": "value1",
diff --git a/tempest/api/volume/test_volume_absolute_limits.py b/tempest/api/volume/test_volume_absolute_limits.py
index 35e0d56..36445b9 100644
--- a/tempest/api/volume/test_volume_absolute_limits.py
+++ b/tempest/api/volume/test_volume_absolute_limits.py
@@ -15,7 +15,7 @@
 
 from tempest.api.volume import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 
 CONF = config.CONF
@@ -32,7 +32,7 @@
         # Create a shared volume for tests
         cls.volume = cls.create_volume()
 
-    @test.idempotent_id('8e943f53-e9d6-4272-b2e9-adcf2f7c29ad')
+    @decorators.idempotent_id('8e943f53-e9d6-4272-b2e9-adcf2f7c29ad')
     def test_get_volume_absolute_limits(self):
         # get volume limit for a tenant
         absolute_limits = \
diff --git a/tempest/api/volume/test_volume_metadata.py b/tempest/api/volume/test_volume_metadata.py
index c125bb8..9e7b0a7 100644
--- a/tempest/api/volume/test_volume_metadata.py
+++ b/tempest/api/volume/test_volume_metadata.py
@@ -16,7 +16,7 @@
 from testtools import matchers
 
 from tempest.api.volume import base
-from tempest import test
+from tempest.lib import decorators
 
 
 class VolumesV2MetadataTest(base.BaseVolumeTest):
@@ -32,7 +32,7 @@
         self.volumes_client.update_volume_metadata(self.volume['id'], {})
         super(VolumesV2MetadataTest, self).tearDown()
 
-    @test.idempotent_id('6f5b125b-f664-44bf-910f-751591fe5769')
+    @decorators.idempotent_id('6f5b125b-f664-44bf-910f-751591fe5769')
     def test_crud_volume_metadata(self):
         # Create metadata for the volume
         metadata = {"key1": "value1",
@@ -67,7 +67,7 @@
         self.assertThat(body.items(), matchers.ContainsAll(expected.items()),
                         'Delete one item metadata of the volume failed')
 
-    @test.idempotent_id('862261c5-8df4-475a-8c21-946e50e36a20')
+    @decorators.idempotent_id('862261c5-8df4-475a-8c21-946e50e36a20')
     def test_update_volume_metadata_item(self):
         # Update metadata item for the volume
         metadata = {"key1": "value1",
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index a8889e0..8d94cd2 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -17,7 +17,7 @@
 
 from tempest.api.volume import base
 from tempest.common import waiters
-from tempest import test
+from tempest.lib import decorators
 
 
 class VolumesV2TransfersTest(base.BaseVolumeTest):
@@ -33,7 +33,7 @@
         cls.alt_tenant_id = cls.alt_client.tenant_id
         cls.adm_client = cls.os_adm.volumes_client
 
-    @test.idempotent_id('4d75b645-a478-48b1-97c8-503f64242f1a')
+    @decorators.idempotent_id('4d75b645-a478-48b1-97c8-503f64242f1a')
     def test_create_get_list_accept_volume_transfer(self):
         # Create a volume first
         volume = self.create_volume()
@@ -62,7 +62,7 @@
         waiters.wait_for_volume_status(self.alt_client,
                                        volume['id'], 'available')
 
-    @test.idempotent_id('ab526943-b725-4c07-b875-8e8ef87a2c30')
+    @decorators.idempotent_id('ab526943-b725-4c07-b875-8e8ef87a2c30')
     def test_create_list_delete_volume_transfer(self):
         # Create a volume first
         volume = self.create_volume()
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index d8d6b9a..c0cc74d 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -18,6 +18,7 @@
 from tempest.common import waiters
 from tempest import config
 from tempest.lib.common.utils import test_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions
 from tempest import test
 
@@ -48,7 +49,7 @@
         # Create a test shared volume for attach/detach tests
         cls.volume = cls.create_volume()
 
-    @test.idempotent_id('fff42874-7db5-4487-a8e1-ddda5fb5288d')
+    @decorators.idempotent_id('fff42874-7db5-4487-a8e1-ddda5fb5288d')
     @test.attr(type='smoke')
     @test.services('compute')
     def test_attach_detach_volume_to_instance(self):
@@ -65,7 +66,7 @@
         waiters.wait_for_volume_status(self.client,
                                        self.volume['id'], 'available')
 
-    @test.idempotent_id('63e21b4c-0a0c-41f6-bfc3-7c2816815599')
+    @decorators.idempotent_id('63e21b4c-0a0c-41f6-bfc3-7c2816815599')
     def test_volume_bootable(self):
         # Verify that a volume bootable flag is retrieved
         for bool_bootable in [True, False]:
@@ -80,7 +81,7 @@
             self.assertEqual(str(bool_bootable).lower(),
                              fetched_volume['bootable'])
 
-    @test.idempotent_id('9516a2c8-9135-488c-8dd6-5677a7e5f371')
+    @decorators.idempotent_id('9516a2c8-9135-488c-8dd6-5677a7e5f371')
     @test.services('compute')
     def test_get_volume_attachment(self):
         # Create a server
@@ -107,7 +108,7 @@
         self.assertEqual(self.volume['id'], attachment['id'])
         self.assertEqual(self.volume['id'], attachment['volume_id'])
 
-    @test.idempotent_id('d8f1ca95-3d5b-44a3-b8ca-909691c9532d')
+    @decorators.idempotent_id('d8f1ca95-3d5b-44a3-b8ca-909691c9532d')
     @test.services('image')
     def test_volume_upload(self):
         # NOTE(gfidente): the volume uploaded in Glance comes from setUpClass,
@@ -126,7 +127,7 @@
         waiters.wait_for_volume_status(self.client,
                                        self.volume['id'], 'available')
 
-    @test.idempotent_id('92c4ef64-51b2-40c0-9f7e-4749fbaaba33')
+    @decorators.idempotent_id('92c4ef64-51b2-40c0-9f7e-4749fbaaba33')
     def test_reserve_unreserve_volume(self):
         # Mark volume as reserved.
         body = self.client.reserve_volume(self.volume['id'])
@@ -139,7 +140,7 @@
         body = self.client.show_volume(self.volume['id'])['volume']
         self.assertIn('available', body['status'])
 
-    @test.idempotent_id('fff74e1e-5bd3-4b33-9ea9-24c103bc3f59')
+    @decorators.idempotent_id('fff74e1e-5bd3-4b33-9ea9-24c103bc3f59')
     def test_volume_readonly_update(self):
         for readonly in [True, False]:
             # Update volume readonly
diff --git a/tempest/api/volume/test_volumes_backup.py b/tempest/api/volume/test_volumes_backup.py
index 6dcde08..939f1ac 100644
--- a/tempest/api/volume/test_volumes_backup.py
+++ b/tempest/api/volume/test_volumes_backup.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 import test
 
 CONF = config.CONF
@@ -46,7 +47,7 @@
                                        'available')
         return restored_volume
 
-    @test.idempotent_id('a66eb488-8ee1-47d4-8e9f-575a095728c6')
+    @decorators.idempotent_id('a66eb488-8ee1-47d4-8e9f-575a095728c6')
     def test_volume_backup_create_get_detailed_list_restore_delete(self):
         # Create backup
         volume = self.create_volume()
@@ -75,7 +76,7 @@
 
         self.restore_backup(backup['id'])
 
-    @test.idempotent_id('07af8f6d-80af-44c9-a5dc-c8427b1b62e6')
+    @decorators.idempotent_id('07af8f6d-80af-44c9-a5dc-c8427b1b62e6')
     @test.services('compute')
     def test_backup_create_attached_volume(self):
         """Test backup create using force flag.
@@ -97,7 +98,7 @@
                                     name=backup_name, force=True)
         self.assertEqual(backup_name, backup['name'])
 
-    @test.idempotent_id('2a8ba340-dff2-4511-9db7-646f07156b15')
+    @decorators.idempotent_id('2a8ba340-dff2-4511-9db7-646f07156b15')
     def test_bootable_volume_backup_and_restore(self):
         # Create volume from image
         img_uuid = CONF.compute.image_ref
diff --git a/tempest/api/volume/test_volumes_clone.py b/tempest/api/volume/test_volumes_clone.py
index 2cedb4e..79a1a0a 100644
--- a/tempest/api/volume/test_volumes_clone.py
+++ b/tempest/api/volume/test_volumes_clone.py
@@ -15,7 +15,7 @@
 
 from tempest.api.volume import base
 from tempest import config
-from tempest import test
+from tempest.lib import decorators
 
 
 CONF = config.CONF
@@ -29,7 +29,7 @@
         if not CONF.volume_feature_enabled.clone:
             raise cls.skipException("Cinder volume clones are disabled")
 
-    @test.idempotent_id('9adae371-a257-43a5-9555-dc7c88e66e0e')
+    @decorators.idempotent_id('9adae371-a257-43a5-9555-dc7c88e66e0e')
     def test_create_from_volume(self):
         # Creates a volume from another volume passing a size different from
         # the source volume.
@@ -45,7 +45,7 @@
         self.assertEqual(volume['source_volid'], src_vol['id'])
         self.assertEqual(int(volume['size']), src_size + 1)
 
-    @test.idempotent_id('cbbcd7c6-5a6c-481a-97ac-ca55ab715d16')
+    @decorators.idempotent_id('cbbcd7c6-5a6c-481a-97ac-ca55ab715d16')
     def test_create_from_bootable_volume(self):
         # Create volume from image
         img_uuid = CONF.compute.image_ref
diff --git a/tempest/api/volume/test_volumes_clone_negative.py b/tempest/api/volume/test_volumes_clone_negative.py
index 5c54e1e..fa827cd 100644
--- a/tempest/api/volume/test_volumes_clone_negative.py
+++ b/tempest/api/volume/test_volumes_clone_negative.py
@@ -15,9 +15,8 @@
 
 from tempest.api.volume import base
 from tempest import config
+from tempest.lib import decorators
 from tempest.lib import exceptions
-from tempest import test
-
 
 CONF = config.CONF
 
@@ -30,7 +29,7 @@
         if not CONF.volume_feature_enabled.clone:
             raise cls.skipException("Cinder volume clones are disabled")
 
-    @test.idempotent_id('9adae371-a257-43a5-459a-dc7c88e66e0e')
+    @decorators.idempotent_id('9adae371-a257-43a5-459a-dc7c88e66e0e')
     def test_create_from_volume_decreasing_size(self):
         # Creates a volume from another volume passing a size different from
         # the source volume.
diff --git a/tempest/api/volume/test_volumes_extend.py b/tempest/api/volume/test_volumes_extend.py
index c3d6dbb..20118df 100644
--- a/tempest/api/volume/test_volumes_extend.py
+++ b/tempest/api/volume/test_volumes_extend.py
@@ -15,12 +15,12 @@
 
 from tempest.api.volume import base
 from tempest.common import waiters
-from tempest import test
+from tempest.lib import decorators
 
 
 class VolumesV2ExtendTest(base.BaseVolumeTest):
 
-    @test.idempotent_id('9a36df71-a257-43a5-9555-dc7c88e66e0e')
+    @decorators.idempotent_id('9a36df71-a257-43a5-9555-dc7c88e66e0e')
     def test_volume_extend(self):
         # Extend Volume Test.
         self.volume = self.create_volume()
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 65e461c..d1a1c2f 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.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 import test
 
 CONF = config.CONF
@@ -118,12 +119,12 @@
             self.assertEqual('false', updated_volume['bootable'])
 
     @test.attr(type='smoke')
-    @test.idempotent_id('27fb0e9f-fb64-41dd-8bdb-1ffa762f0d51')
+    @decorators.idempotent_id('27fb0e9f-fb64-41dd-8bdb-1ffa762f0d51')
     def test_volume_create_get_update_delete(self):
         self._volume_create_get_update_delete(size=CONF.volume.volume_size)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('54a01030-c7fc-447c-86ee-c1182beae638')
+    @decorators.idempotent_id('54a01030-c7fc-447c-86ee-c1182beae638')
     @test.services('image')
     def test_volume_create_get_update_delete_from_image(self):
         image = self.compute_images_client.show_image(
@@ -133,7 +134,7 @@
         self._volume_create_get_update_delete(
             imageRef=CONF.compute.image_ref, size=disk_size)
 
-    @test.idempotent_id('3f591b4a-7dc6-444c-bd51-77469506b3a1')
+    @decorators.idempotent_id('3f591b4a-7dc6-444c-bd51-77469506b3a1')
     @testtools.skipUnless(CONF.volume_feature_enabled.clone,
                           'Cinder volume clones are disabled')
     def test_volume_create_get_update_delete_as_clone(self):
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index 5e3f49f..d1da95d 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -19,6 +19,7 @@
 
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 
@@ -95,7 +96,7 @@
                         self.assertEqual(params[key], volume[key], msg)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('0b6ddd39-b948-471f-8038-4787978747c4')
+    @decorators.idempotent_id('0b6ddd39-b948-471f-8038-4787978747c4')
     def test_volume_list(self):
         # Get a list of Volumes
         # Fetch all volumes
@@ -103,14 +104,14 @@
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
 
-    @test.idempotent_id('adcbb5a7-5ad8-4b61-bd10-5380e111a877')
+    @decorators.idempotent_id('adcbb5a7-5ad8-4b61-bd10-5380e111a877')
     def test_volume_list_with_details(self):
         # Get a list of Volumes with details
         # Fetch all Volumes
         fetched_list = self.volumes_client.list_volumes(detail=True)['volumes']
         self.assertVolumesIn(fetched_list, self.volume_list)
 
-    @test.idempotent_id('a28e8da4-0b56-472f-87a8-0f4d3f819c02')
+    @decorators.idempotent_id('a28e8da4-0b56-472f-87a8-0f4d3f819c02')
     def test_volume_list_by_name(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         params = {self.name: volume[self.name]}
@@ -120,7 +121,7 @@
         self.assertEqual(fetched_vol[0][self.name],
                          volume[self.name])
 
-    @test.idempotent_id('2de3a6d4-12aa-403b-a8f2-fdeb42a89623')
+    @decorators.idempotent_id('2de3a6d4-12aa-403b-a8f2-fdeb42a89623')
     def test_volume_list_details_by_name(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         params = {self.name: volume[self.name]}
@@ -130,7 +131,7 @@
         self.assertEqual(fetched_vol[0][self.name],
                          volume[self.name])
 
-    @test.idempotent_id('39654e13-734c-4dab-95ce-7613bf8407ce')
+    @decorators.idempotent_id('39654e13-734c-4dab-95ce-7613bf8407ce')
     def test_volumes_list_by_status(self):
         params = {'status': 'available'}
         fetched_list = self.volumes_client.list_volumes(
@@ -139,7 +140,7 @@
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
 
-    @test.idempotent_id('2943f712-71ec-482a-bf49-d5ca06216b9f')
+    @decorators.idempotent_id('2943f712-71ec-482a-bf49-d5ca06216b9f')
     def test_volumes_list_details_by_status(self):
         params = {'status': 'available'}
         fetched_list = self.volumes_client.list_volumes(
@@ -148,7 +149,7 @@
             self.assertEqual('available', volume['status'])
         self.assertVolumesIn(fetched_list, self.volume_list)
 
-    @test.idempotent_id('2016a942-3020-40d7-95ce-7613bf8407ce')
+    @decorators.idempotent_id('2016a942-3020-40d7-95ce-7613bf8407ce')
     def test_volumes_list_by_bootable(self):
         """Check out volumes.
 
@@ -162,7 +163,7 @@
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
 
-    @test.idempotent_id('2016a939-72ec-482a-bf49-d5ca06216b9f')
+    @decorators.idempotent_id('2016a939-72ec-482a-bf49-d5ca06216b9f')
     def test_volumes_list_details_by_bootable(self):
         params = {'bootable': 'false'}
         fetched_list = self.volumes_client.list_volumes(
@@ -171,7 +172,7 @@
             self.assertEqual('false', volume['bootable'])
         self.assertVolumesIn(fetched_list, self.volume_list)
 
-    @test.idempotent_id('c0cfa863-3020-40d7-b587-e35f597d5d87')
+    @decorators.idempotent_id('c0cfa863-3020-40d7-b587-e35f597d5d87')
     def test_volumes_list_by_availability_zone(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         zone = volume['availability_zone']
@@ -182,7 +183,7 @@
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
 
-    @test.idempotent_id('e1b80d13-94f0-4ba2-a40e-386af29f8db1')
+    @decorators.idempotent_id('e1b80d13-94f0-4ba2-a40e-386af29f8db1')
     def test_volumes_list_details_by_availability_zone(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         zone = volume['availability_zone']
@@ -193,19 +194,19 @@
             self.assertEqual(zone, volume['availability_zone'])
         self.assertVolumesIn(fetched_list, self.volume_list)
 
-    @test.idempotent_id('b5ebea1b-0603-40a0-bb41-15fcd0a53214')
+    @decorators.idempotent_id('b5ebea1b-0603-40a0-bb41-15fcd0a53214')
     def test_volume_list_with_param_metadata(self):
         # Test to list volumes when metadata param is given
         params = {'metadata': self.metadata}
         self._list_by_param_value_and_assert(params)
 
-    @test.idempotent_id('1ca92d3c-4a8e-4b43-93f5-e4c7fb3b291d')
+    @decorators.idempotent_id('1ca92d3c-4a8e-4b43-93f5-e4c7fb3b291d')
     def test_volume_list_with_detail_param_metadata(self):
         # Test to list volumes details when metadata param is given
         params = {'metadata': self.metadata}
         self._list_by_param_value_and_assert(params, with_detail=True)
 
-    @test.idempotent_id('777c87c1-2fc4-4883-8b8e-5c0b951d1ec8')
+    @decorators.idempotent_id('777c87c1-2fc4-4883-8b8e-5c0b951d1ec8')
     def test_volume_list_param_display_name_and_status(self):
         # Test to list volume when display name and status param is given
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
@@ -213,7 +214,7 @@
                   'status': 'available'}
         self._list_by_param_value_and_assert(params)
 
-    @test.idempotent_id('856ab8ca-6009-4c37-b691-be1065528ad4')
+    @decorators.idempotent_id('856ab8ca-6009-4c37-b691-be1065528ad4')
     def test_volume_list_with_detail_param_display_name_and_status(self):
         # Test to list volume when name and status param is given
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index 4c31a89..0a095a9 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -15,6 +15,7 @@
 
 from tempest.api.volume 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
 
@@ -32,21 +33,21 @@
         cls.mountpoint = "/dev/vdc"
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('f131c586-9448-44a4-a8b0-54ca838aa43e')
+    @decorators.idempotent_id('f131c586-9448-44a4-a8b0-54ca838aa43e')
     def test_volume_get_nonexistent_volume_id(self):
         # Should not be able to get a non-existent volume
         self.assertRaises(lib_exc.NotFound, self.volumes_client.show_volume,
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('555efa6e-efcd-44ef-8a3b-4a7ca4837a29')
+    @decorators.idempotent_id('555efa6e-efcd-44ef-8a3b-4a7ca4837a29')
     def test_volume_delete_nonexistent_volume_id(self):
         # Should not be able to delete a non-existent Volume
         self.assertRaises(lib_exc.NotFound, self.volumes_client.delete_volume,
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('1ed83a8a-682d-4dfb-a30e-ee63ffd6c049')
+    @decorators.idempotent_id('1ed83a8a-682d-4dfb-a30e-ee63ffd6c049')
     def test_create_volume_with_invalid_size(self):
         # Should not be able to create volume with invalid size
         # in request
@@ -57,7 +58,7 @@
                           size='#$%', params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('9387686f-334f-4d31-a439-33494b9e2683')
+    @decorators.idempotent_id('9387686f-334f-4d31-a439-33494b9e2683')
     def test_create_volume_without_passing_size(self):
         # Should not be able to create volume without passing size
         # in request
@@ -68,7 +69,7 @@
                           size='', params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('41331caa-eaf4-4001-869d-bc18c1869360')
+    @decorators.idempotent_id('41331caa-eaf4-4001-869d-bc18c1869360')
     def test_create_volume_with_size_zero(self):
         # Should not be able to create volume with size zero
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
@@ -78,7 +79,7 @@
                           size='0', params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('8b472729-9eba-446e-a83b-916bdb34bef7')
+    @decorators.idempotent_id('8b472729-9eba-446e-a83b-916bdb34bef7')
     def test_create_volume_with_size_negative(self):
         # Should not be able to create volume with size negative
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
@@ -88,7 +89,7 @@
                           size='-1', params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('10254ed8-3849-454e-862e-3ab8e6aa01d2')
+    @decorators.idempotent_id('10254ed8-3849-454e-862e-3ab8e6aa01d2')
     def test_create_volume_with_nonexistent_volume_type(self):
         # Should not be able to create volume with non-existent volume type
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
@@ -98,7 +99,7 @@
                           params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0c36f6ae-4604-4017-b0a9-34fdc63096f9')
+    @decorators.idempotent_id('0c36f6ae-4604-4017-b0a9-34fdc63096f9')
     def test_create_volume_with_nonexistent_snapshot_id(self):
         # Should not be able to create volume with non-existent snapshot
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
@@ -108,7 +109,7 @@
                           params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('47c73e08-4be8-45bb-bfdf-0c4e79b88344')
+    @decorators.idempotent_id('47c73e08-4be8-45bb-bfdf-0c4e79b88344')
     def test_create_volume_with_nonexistent_source_volid(self):
         # Should not be able to create volume with non-existent source volume
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
@@ -118,7 +119,7 @@
                           params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0186422c-999a-480e-a026-6a665744c30c')
+    @decorators.idempotent_id('0186422c-999a-480e-a026-6a665744c30c')
     def test_update_volume_with_nonexistent_volume_id(self):
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
         params = {self.name_field: v_name}
@@ -126,7 +127,7 @@
                           volume_id=data_utils.rand_uuid(), params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('e66e40d6-65e6-4e75-bdc7-636792fa152d')
+    @decorators.idempotent_id('e66e40d6-65e6-4e75-bdc7-636792fa152d')
     def test_update_volume_with_invalid_volume_id(self):
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
         params = {self.name_field: v_name}
@@ -135,7 +136,7 @@
                           params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('72aeca85-57a5-4c1f-9057-f320f9ea575b')
+    @decorators.idempotent_id('72aeca85-57a5-4c1f-9057-f320f9ea575b')
     def test_update_volume_with_empty_volume_id(self):
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
         params = {self.name_field: v_name}
@@ -143,35 +144,35 @@
                           volume_id='', params=params)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('30799cfd-7ee4-446c-b66c-45b383ed211b')
+    @decorators.idempotent_id('30799cfd-7ee4-446c-b66c-45b383ed211b')
     def test_get_invalid_volume_id(self):
         # Should not be able to get volume with invalid id
         self.assertRaises(lib_exc.NotFound, self.volumes_client.show_volume,
                           data_utils.rand_name('invalid'))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('c6c3db06-29ad-4e91-beb0-2ab195fe49e3')
+    @decorators.idempotent_id('c6c3db06-29ad-4e91-beb0-2ab195fe49e3')
     def test_get_volume_without_passing_volume_id(self):
         # Should not be able to get volume when empty ID is passed
         self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.show_volume, '')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('1f035827-7c32-4019-9240-b4ec2dbd9dfd')
+    @decorators.idempotent_id('1f035827-7c32-4019-9240-b4ec2dbd9dfd')
     def test_delete_invalid_volume_id(self):
         # Should not be able to delete volume when invalid ID is passed
         self.assertRaises(lib_exc.NotFound, self.volumes_client.delete_volume,
                           data_utils.rand_name('invalid'))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('441a1550-5d44-4b30-af0f-a6d402f52026')
+    @decorators.idempotent_id('441a1550-5d44-4b30-af0f-a6d402f52026')
     def test_delete_volume_without_passing_volume_id(self):
         # Should not be able to delete volume when empty ID is passed
         self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.delete_volume, '')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('f5e56b0a-5d02-43c1-a2a7-c9b792c2e3f6')
+    @decorators.idempotent_id('f5e56b0a-5d02-43c1-a2a7-c9b792c2e3f6')
     @test.services('compute')
     def test_attach_volumes_with_nonexistent_volume_id(self):
         server = self.create_server(wait_until='ACTIVE')
@@ -183,14 +184,14 @@
                           mountpoint=self.mountpoint)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('9f9c24e4-011d-46b5-b992-952140ce237a')
+    @decorators.idempotent_id('9f9c24e4-011d-46b5-b992-952140ce237a')
     def test_detach_volumes_with_invalid_volume_id(self):
         self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.detach_volume,
                           'xxx')
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('e0c75c74-ee34-41a9-9288-2a2051452854')
+    @decorators.idempotent_id('e0c75c74-ee34-41a9-9288-2a2051452854')
     def test_volume_extend_with_size_smaller_than_original_size(self):
         # Extend volume with smaller size than original size.
         extend_size = 0
@@ -199,7 +200,7 @@
                           self.volume['id'], new_size=extend_size)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('5d0b480d-e833-439f-8a5a-96ad2ed6f22f')
+    @decorators.idempotent_id('5d0b480d-e833-439f-8a5a-96ad2ed6f22f')
     def test_volume_extend_with_non_number_size(self):
         # Extend volume when size is non number.
         extend_size = 'abc'
@@ -208,7 +209,7 @@
                           self.volume['id'], new_size=extend_size)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('355218f1-8991-400a-a6bb-971239287d92')
+    @decorators.idempotent_id('355218f1-8991-400a-a6bb-971239287d92')
     def test_volume_extend_with_None_size(self):
         # Extend volume with None size.
         extend_size = None
@@ -217,7 +218,7 @@
                           self.volume['id'], new_size=extend_size)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('8f05a943-013c-4063-ac71-7baf561e82eb')
+    @decorators.idempotent_id('8f05a943-013c-4063-ac71-7baf561e82eb')
     def test_volume_extend_with_nonexistent_volume_id(self):
         # Extend volume size when volume is nonexistent.
         extend_size = int(self.volume['size']) + 1
@@ -225,7 +226,7 @@
                           data_utils.rand_uuid(), new_size=extend_size)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('aff8ba64-6d6f-4f2e-bc33-41a08ee9f115')
+    @decorators.idempotent_id('aff8ba64-6d6f-4f2e-bc33-41a08ee9f115')
     def test_volume_extend_without_passing_volume_id(self):
         # Extend volume size when passing volume id is None.
         extend_size = int(self.volume['size']) + 1
@@ -233,21 +234,21 @@
                           None, new_size=extend_size)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('ac6084c0-0546-45f9-b284-38a367e0e0e2')
+    @decorators.idempotent_id('ac6084c0-0546-45f9-b284-38a367e0e0e2')
     def test_reserve_volume_with_nonexistent_volume_id(self):
         self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.reserve_volume,
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('eb467654-3dc1-4a72-9b46-47c29d22654c')
+    @decorators.idempotent_id('eb467654-3dc1-4a72-9b46-47c29d22654c')
     def test_unreserve_volume_with_nonexistent_volume_id(self):
         self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.unreserve_volume,
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('449c4ed2-ecdd-47bb-98dc-072aeccf158c')
+    @decorators.idempotent_id('449c4ed2-ecdd-47bb-98dc-072aeccf158c')
     def test_reserve_volume_with_negative_volume_status(self):
         # Mark volume as reserved.
         self.volumes_client.reserve_volume(self.volume['id'])
@@ -259,7 +260,7 @@
         self.volumes_client.unreserve_volume(self.volume['id'])
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('0f4aa809-8c7b-418f-8fb3-84c7a5dfc52f')
+    @decorators.idempotent_id('0f4aa809-8c7b-418f-8fb3-84c7a5dfc52f')
     def test_list_volumes_with_nonexistent_name(self):
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
         params = {self.name_field: v_name}
@@ -268,7 +269,7 @@
         self.assertEqual(0, len(fetched_volume))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('9ca17820-a0e7-4cbd-a7fa-f4468735e359')
+    @decorators.idempotent_id('9ca17820-a0e7-4cbd-a7fa-f4468735e359')
     def test_list_volumes_detail_with_nonexistent_name(self):
         v_name = data_utils.rand_name(self.__class__.__name__ + '-Volume')
         params = {self.name_field: v_name}
@@ -278,7 +279,7 @@
         self.assertEqual(0, len(fetched_volume))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('143b279b-7522-466b-81be-34a87d564a7c')
+    @decorators.idempotent_id('143b279b-7522-466b-81be-34a87d564a7c')
     def test_list_volumes_with_invalid_status(self):
         params = {'status': 'null'}
         fetched_volume = self.volumes_client.list_volumes(
@@ -286,7 +287,7 @@
         self.assertEqual(0, len(fetched_volume))
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('ba94b27b-be3f-496c-a00e-0283b373fa75')
+    @decorators.idempotent_id('ba94b27b-be3f-496c-a00e-0283b373fa75')
     def test_list_volumes_detail_with_invalid_status(self):
         params = {'status': 'null'}
         fetched_volume = \
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 6f85891..f1ca722 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -13,6 +13,7 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest.lib import decorators
 from tempest import test
 
 CONF = config.CONF
@@ -39,7 +40,7 @@
         self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
         self.snapshots.remove(snapshot)
 
-    @test.idempotent_id('b467b54c-07a4-446d-a1cf-651dedcc3ff1')
+    @decorators.idempotent_id('b467b54c-07a4-446d-a1cf-651dedcc3ff1')
     @test.services('compute')
     def test_snapshot_create_with_volume_in_use(self):
         # Create a snapshot when volume status is in-use
@@ -53,7 +54,7 @@
         # Delete the snapshot
         self.cleanup_snapshot(snapshot)
 
-    @test.idempotent_id('8567b54c-4455-446d-a1cf-651ddeaa3ff2')
+    @decorators.idempotent_id('8567b54c-4455-446d-a1cf-651ddeaa3ff2')
     @test.services('compute')
     def test_snapshot_delete_with_volume_in_use(self):
         # Create a test instance
@@ -71,7 +72,7 @@
         self.cleanup_snapshot(snapshot3)
         self.cleanup_snapshot(snapshot2)
 
-    @test.idempotent_id('5210a1de-85a0-11e6-bb21-641c676a5d61')
+    @decorators.idempotent_id('5210a1de-85a0-11e6-bb21-641c676a5d61')
     @test.services('compute')
     def test_snapshot_create_offline_delete_online(self):
 
@@ -92,7 +93,7 @@
         self.cleanup_snapshot(snapshot1)
         self.cleanup_snapshot(snapshot2)
 
-    @test.idempotent_id('2a8abbe4-d871-46db-b049-c41f5af8216e')
+    @decorators.idempotent_id('2a8abbe4-d871-46db-b049-c41f5af8216e')
     def test_snapshot_create_get_list_update_delete(self):
         # Create a snapshot
         snapshot = self.create_snapshot(self.volume_origin['id'])
@@ -130,7 +131,7 @@
         # Delete the snapshot
         self.cleanup_snapshot(snapshot)
 
-    @test.idempotent_id('677863d1-3142-456d-b6ac-9924f667a7f4')
+    @decorators.idempotent_id('677863d1-3142-456d-b6ac-9924f667a7f4')
     def test_volume_from_snapshot(self):
         # Creates a volume a snapshot passing a size different from the source
         src_size = CONF.volume.volume_size
diff --git a/tempest/api/volume/test_volumes_snapshots_list.py b/tempest/api/volume/test_volumes_snapshots_list.py
index b831252..ff390ea 100644
--- a/tempest/api/volume/test_volumes_snapshots_list.py
+++ b/tempest/api/volume/test_volumes_snapshots_list.py
@@ -13,7 +13,6 @@
 from tempest.api.volume import base
 from tempest import config
 from tempest.lib import decorators
-from tempest import test
 
 CONF = config.CONF
 
@@ -56,7 +55,7 @@
         # Validating filtered snapshots length equals to expected_elements
         self.assertEqual(expected_elements, len(fetched_snap_list))
 
-    @test.idempotent_id('59f41f43-aebf-48a9-ab5d-d76340fab32b')
+    @decorators.idempotent_id('59f41f43-aebf-48a9-ab5d-d76340fab32b')
     def test_snapshots_list_with_params(self):
         """list snapshots with params."""
         # Verify list snapshots by display_name filter
@@ -72,7 +71,7 @@
                   self.name_field: self.snapshot[self.name_field]}
         self._list_by_param_values_and_assert(**params)
 
-    @test.idempotent_id('220a1022-1fcd-4a74-a7bd-6b859156cda2')
+    @decorators.idempotent_id('220a1022-1fcd-4a74-a7bd-6b859156cda2')
     def test_snapshots_list_details_with_params(self):
         """list snapshot details with params."""
         # Verify list snapshot details by display_name filter
@@ -86,12 +85,12 @@
                   self.name_field: self.snapshot[self.name_field]}
         self._list_by_param_values_and_assert(with_detail=True, **params)
 
-    @test.idempotent_id('db4d8e0a-7a2e-41cc-a712-961f6844e896')
+    @decorators.idempotent_id('db4d8e0a-7a2e-41cc-a712-961f6844e896')
     def test_snapshot_list_param_limit(self):
         # List returns limited elements
         self._list_snapshots_by_param_limit(limit=1, expected_elements=1)
 
-    @test.idempotent_id('a1427f61-420e-48a5-b6e3-0b394fa95400')
+    @decorators.idempotent_id('a1427f61-420e-48a5-b6e3-0b394fa95400')
     def test_snapshot_list_param_limit_equals_infinite(self):
         # List returns all elements when request limit exceeded
         # snapshots number
@@ -100,7 +99,7 @@
                                             expected_elements=len(snap_list))
 
     @decorators.skip_because(bug='1540893')
-    @test.idempotent_id('e3b44b7f-ae87-45b5-8a8c-66110eb24d0a')
+    @decorators.idempotent_id('e3b44b7f-ae87-45b5-8a8c-66110eb24d0a')
     def test_snapshot_list_param_limit_equals_zero(self):
         # List returns zero elements
         self._list_snapshots_by_param_limit(limit=0, expected_elements=0)
diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py
index 1f5bb0d..1e68848 100644
--- a/tempest/api/volume/test_volumes_snapshots_negative.py
+++ b/tempest/api/volume/test_volumes_snapshots_negative.py
@@ -13,6 +13,7 @@
 from tempest.api.volume 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
 
@@ -28,7 +29,7 @@
             raise cls.skipException("Cinder volume snapshots are disabled")
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('e3e466af-70ab-4f4b-a967-ab04e3532ea7')
+    @decorators.idempotent_id('e3e466af-70ab-4f4b-a967-ab04e3532ea7')
     def test_create_snapshot_with_nonexistent_volume_id(self):
         # Create a snapshot with nonexistent volume id
         s_name = data_utils.rand_name(self.__class__.__name__ + '-snap')
@@ -38,7 +39,7 @@
                           display_name=s_name)
 
     @test.attr(type=['negative'])
-    @test.idempotent_id('bb9da53e-d335-4309-9c15-7e76fd5e4d6d')
+    @decorators.idempotent_id('bb9da53e-d335-4309-9c15-7e76fd5e4d6d')
     def test_create_snapshot_without_passing_volume_id(self):
         # Create a snapshot without passing volume id
         s_name = data_utils.rand_name(self.__class__.__name__ + '-snap')
@@ -46,7 +47,7 @@
                           self.snapshots_client.create_snapshot,
                           volume_id=None, display_name=s_name)
 
-    @test.idempotent_id('677863d1-34f9-456d-b6ac-9924f667a7f4')
+    @decorators.idempotent_id('677863d1-34f9-456d-b6ac-9924f667a7f4')
     def test_volume_from_snapshot_decreasing_size(self):
         # Creates a volume a snapshot passing a size different from the source
         src_size = CONF.volume.volume_size + 1
diff --git a/tempest/api/volume/v2/test_image_metadata.py b/tempest/api/volume/v2/test_image_metadata.py
index 1e7bb30..9c082b3 100644
--- a/tempest/api/volume/v2/test_image_metadata.py
+++ b/tempest/api/volume/v2/test_image_metadata.py
@@ -17,6 +17,7 @@
 
 from tempest.api.volume import base
 from tempest import config
+from tempest.lib import decorators
 from tempest import test
 
 CONF = config.CONF
@@ -30,7 +31,7 @@
         # Create a volume from image ID
         cls.volume = cls.create_volume(imageRef=CONF.compute.image_ref)
 
-    @test.idempotent_id('03efff0b-5c75-4822-8f10-8789ac15b13e')
+    @decorators.idempotent_id('03efff0b-5c75-4822-8f10-8789ac15b13e')
     @test.services('image')
     def test_update_image_metadata(self):
         # Update image metadata
diff --git a/tempest/api/volume/v2/test_volumes_list.py b/tempest/api/volume/v2/test_volumes_list.py
index 28ba941..9b17515 100644
--- a/tempest/api/volume/v2/test_volumes_list.py
+++ b/tempest/api/volume/v2/test_volumes_list.py
@@ -19,7 +19,6 @@
 
 from tempest.api.volume import base
 from tempest.lib import decorators
-from tempest import test
 
 
 class VolumesV2ListTestJSON(base.BaseVolumeTest):
@@ -46,7 +45,7 @@
             volume = cls.create_volume(metadata=cls.metadata)
             cls.volume_id_list.append(volume['id'])
 
-    @test.idempotent_id('2a7064eb-b9c3-429b-b888-33928fc5edd3')
+    @decorators.idempotent_id('2a7064eb-b9c3-429b-b888-33928fc5edd3')
     def test_volume_list_details_with_multiple_params(self):
         # List volumes detail using combined condition
         def _list_details_with_multiple_params(limit=2,
@@ -169,15 +168,15 @@
                                  'missing ids %s' % remaining)
                 break
 
-    @test.idempotent_id('e9138a2c-f67b-4796-8efa-635c196d01de')
+    @decorators.idempotent_id('e9138a2c-f67b-4796-8efa-635c196d01de')
     def test_volume_list_details_pagination(self):
         self._test_pagination('volumes', ids=self.volume_id_list, detail=True)
 
-    @test.idempotent_id('af55e775-8e4b-4feb-8719-215c43b0238c')
+    @decorators.idempotent_id('af55e775-8e4b-4feb-8719-215c43b0238c')
     def test_volume_list_pagination(self):
         self._test_pagination('volumes', ids=self.volume_id_list, detail=False)
 
-    @test.idempotent_id('46eff077-100b-427f-914e-3db2abcdb7e2')
+    @decorators.idempotent_id('46eff077-100b-427f-914e-3db2abcdb7e2')
     @decorators.skip_because(bug='1572765')
     def test_volume_list_with_detail_param_marker(self):
         # Choosing a random volume from a list of volumes for 'marker'