Switch to use idempotent_id decorator from tempest.lib

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

Change-Id: I2df9c13fbb44b8807da6805761ad30bfd010dc55
diff --git a/neutron/tests/tempest/api/admin/test_agent_management.py b/neutron/tests/tempest/api/admin/test_agent_management.py
index b710dc3..08f2bc3 100644
--- a/neutron/tests/tempest/api/admin/test_agent_management.py
+++ b/neutron/tests/tempest/api/admin/test_agent_management.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from neutron.tests.tempest.common import tempest_fixtures
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -29,7 +30,7 @@
         cls.agent = agents[0]  # don't modify this agent
         cls.dyn_agent = agents[1]
 
-    @test.idempotent_id('9c80f04d-11f3-44a4-8738-ed2f879b0ff4')
+    @decorators.idempotent_id('9c80f04d-11f3-44a4-8738-ed2f879b0ff4')
     def test_list_agent(self):
         body = self.admin_client.list_agents()
         agents = body['agents']
@@ -41,18 +42,18 @@
             agent.pop('configurations', None)
         self.assertIn(self.agent, agents)
 
-    @test.idempotent_id('e335be47-b9a1-46fd-be30-0874c0b751e6')
+    @decorators.idempotent_id('e335be47-b9a1-46fd-be30-0874c0b751e6')
     def test_list_agents_non_admin(self):
         body = self.client.list_agents()
         self.assertEqual(len(body["agents"]), 0)
 
-    @test.idempotent_id('869bc8e8-0fda-4a30-9b71-f8a7cf58ca9f')
+    @decorators.idempotent_id('869bc8e8-0fda-4a30-9b71-f8a7cf58ca9f')
     def test_show_agent(self):
         body = self.admin_client.show_agent(self.agent['id'])
         agent = body['agent']
         self.assertEqual(agent['id'], self.agent['id'])
 
-    @test.idempotent_id('371dfc5b-55b9-4cb5-ac82-c40eadaac941')
+    @decorators.idempotent_id('371dfc5b-55b9-4cb5-ac82-c40eadaac941')
     def test_update_agent_status(self):
         origin_status = self.agent['admin_state_up']
         # Try to update the 'admin_state_up' to the original
@@ -63,7 +64,7 @@
         updated_status = body['agent']['admin_state_up']
         self.assertEqual(origin_status, updated_status)
 
-    @test.idempotent_id('68a94a14-1243-46e6-83bf-157627e31556')
+    @decorators.idempotent_id('68a94a14-1243-46e6-83bf-157627e31556')
     def test_update_agent_description(self):
         self.useFixture(tempest_fixtures.LockFixture('agent_description'))
         description = 'description for update agent.'
diff --git a/neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py b/neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py
index 5576e0d..40febdf 100644
--- a/neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py
+++ b/neutron/tests/tempest/api/admin/test_dhcp_agent_scheduler.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from neutron_lib import constants
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.common import utils
@@ -32,7 +33,7 @@
         cls.cidr = cls.subnet['cidr']
         cls.port = cls.create_port(cls.network)
 
-    @test.idempotent_id('f164801e-1dd8-4b8b-b5d3-cc3ac77cfaa5')
+    @decorators.idempotent_id('f164801e-1dd8-4b8b-b5d3-cc3ac77cfaa5')
     def test_dhcp_port_status_active(self):
 
         def dhcp_port_active():
@@ -44,12 +45,12 @@
             return False
         utils.wait_until_true(dhcp_port_active)
 
-    @test.idempotent_id('5032b1fe-eb42-4a64-8f3b-6e189d8b5c7d')
+    @decorators.idempotent_id('5032b1fe-eb42-4a64-8f3b-6e189d8b5c7d')
     def test_list_dhcp_agent_hosting_network(self):
         self.admin_client.list_dhcp_agent_hosting_network(
             self.network['id'])
 
-    @test.idempotent_id('30c48f98-e45d-4ffb-841c-b8aad57c7587')
+    @decorators.idempotent_id('30c48f98-e45d-4ffb-841c-b8aad57c7587')
     def test_list_networks_hosted_by_one_dhcp(self):
         body = self.admin_client.list_dhcp_agent_hosting_network(
             self.network['id'])
@@ -68,7 +69,7 @@
             network_ids.append(network['id'])
         return network_id in network_ids
 
-    @test.idempotent_id('a0856713-6549-470c-a656-e97c8df9a14d')
+    @decorators.idempotent_id('a0856713-6549-470c-a656-e97c8df9a14d')
     def test_add_remove_network_from_dhcp_agent(self):
         # The agent is now bound to the network, we can free the port
         self.client.delete_port(self.port['id'])
diff --git a/neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py b/neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py
index deef5af..f1fc3d0 100644
--- a/neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py
+++ b/neutron/tests/tempest/api/admin/test_extension_driver_port_security_admin.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -24,7 +25,7 @@
                              base.BaseAdminNetworkTest):
 
     @test.attr(type='negative')
-    @test.idempotent_id('d39a96e2-2dea-4feb-8093-e7ac991ce6f8')
+    @decorators.idempotent_id('d39a96e2-2dea-4feb-8093-e7ac991ce6f8')
     @test.requires_ext(extension='port-security', service='network')
     def test_create_port_security_false_on_shared_network(self):
         network = self.create_shared_network()
diff --git a/neutron/tests/tempest/api/admin/test_external_network_extension.py b/neutron/tests/tempest/api/admin/test_external_network_extension.py
index 99e10ee..c642c03 100644
--- a/neutron/tests/tempest/api/admin/test_external_network_extension.py
+++ b/neutron/tests/tempest/api/admin/test_external_network_extension.py
@@ -12,6 +12,7 @@
 
 from oslo_config import cfg
 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
 import testtools
@@ -38,7 +39,7 @@
         self.addCleanup(self.admin_client.delete_network, network['id'])
         return network
 
-    @test.idempotent_id('afd8f1b7-a81e-4629-bca8-a367b3a144bb')
+    @decorators.idempotent_id('afd8f1b7-a81e-4629-bca8-a367b3a144bb')
     def test_regular_client_shares_with_another(self):
         net = self.create_network()
         self.client.create_rbac_policy(
@@ -53,7 +54,7 @@
             external_gateway_info={'network_id': net['id']})['router']
         self.addCleanup(self.admin_client.delete_router, r['id'])
 
-    @test.idempotent_id('eff9443a-2d04-48ee-840e-d955ac564bcd')
+    @decorators.idempotent_id('eff9443a-2d04-48ee-840e-d955ac564bcd')
     def test_regular_client_blocked_from_creating_external_wild_policies(self):
         net = self.create_network()
         with testtools.ExpectedException(lib_exc.Forbidden):
@@ -62,7 +63,7 @@
                 action='access_as_external',
                 target_tenant='*')
 
-    @test.idempotent_id('a2e19f06-48a9-4e4c-b717-08cb2008707d')
+    @decorators.idempotent_id('a2e19f06-48a9-4e4c-b717-08cb2008707d')
     def test_wildcard_policy_created_from_external_network_api(self):
         # create external makes wildcard
         net_id = self._create_network(external=True)['id']
@@ -85,7 +86,7 @@
             object_id=net_id, action='access_as_external',
             target_tenant='*')['rbac_policies']))
 
-    @test.idempotent_id('a5539002-5bdb-48b5-b124-abcd12347865')
+    @decorators.idempotent_id('a5539002-5bdb-48b5-b124-abcd12347865')
     def test_external_update_policy_from_wildcard_to_specific_tenant(self):
         net_id = self._create_network(external=True)['id']
         rbac_pol = self.admin_client.list_rbac_policies(
@@ -100,7 +101,7 @@
         self.admin_client.update_rbac_policy(
             rbac_pol['id'], target_tenant=self.client2.tenant_id)
 
-    @test.idempotent_id('a5539002-5bdb-48b5-b124-e9eedd5975e6')
+    @decorators.idempotent_id('a5539002-5bdb-48b5-b124-e9eedd5975e6')
     def test_external_conversion_on_policy_create(self):
         net_id = self._create_network(external=False)['id']
         self.admin_client.create_rbac_policy(
@@ -110,7 +111,7 @@
         body = self.admin_client.show_network(net_id)['network']
         self.assertTrue(body['router:external'])
 
-    @test.idempotent_id('01364c50-bfb6-46c4-b44c-edc4564d61cf')
+    @decorators.idempotent_id('01364c50-bfb6-46c4-b44c-edc4564d61cf')
     def test_policy_allows_tenant_to_allocate_floatingip(self):
         net = self._create_network(external=False)
         # share to the admin client so it gets converted to external but
@@ -130,7 +131,7 @@
         self.client2.create_floatingip(
             floating_network_id=net['id'])
 
-    @test.idempotent_id('476be1e0-f72e-47dc-9a14-4435926bbe82')
+    @decorators.idempotent_id('476be1e0-f72e-47dc-9a14-4435926bbe82')
     def test_policy_allows_tenant_to_attach_ext_gw(self):
         net = self._create_network(external=False)
         self.create_subnet(net, client=self.admin_client, enable_dhcp=False)
@@ -143,7 +144,7 @@
             external_gateway_info={'network_id': net['id']})['router']
         self.addCleanup(self.admin_client.delete_router, r['id'])
 
-    @test.idempotent_id('d54decee-4203-4ced-91a2-ea42ca63e154')
+    @decorators.idempotent_id('d54decee-4203-4ced-91a2-ea42ca63e154')
     def test_delete_policies_while_tenant_attached_to_net(self):
         net = self._create_network(external=False)
         self.create_subnet(net, client=self.admin_client, enable_dhcp=False)
@@ -184,7 +185,7 @@
                 data_utils.rand_name('router-'),
                 external_gateway_info={'network_id': net['id']})
 
-    @test.idempotent_id('7041cec7-d8fe-4c78-9b04-b51b2fd49dc9')
+    @decorators.idempotent_id('7041cec7-d8fe-4c78-9b04-b51b2fd49dc9')
     def test_wildcard_policy_delete_blocked_on_default_ext(self):
         public_net_id = cfg.CONF.network.public_network_id
         # ensure it is default before so we don't wipe out the policy
diff --git a/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py b/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py
index 792e682..72cacfa 100644
--- a/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py
+++ b/neutron/tests/tempest/api/admin/test_floating_ips_admin_actions.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 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
 import testtools
@@ -42,7 +43,7 @@
         cls.port = cls.create_port(cls.network)
 
     @test.attr(type='negative')
-    @test.idempotent_id('11116ee9-4e99-5b15-b8e1-aa7df92ca589')
+    @decorators.idempotent_id('11116ee9-4e99-5b15-b8e1-aa7df92ca589')
     def test_associate_floating_ip_with_port_from_another_tenant(self):
         body = self.admin_client.create_floatingip(
             floating_network_id=self.ext_net_id)
@@ -64,7 +65,7 @@
     @testtools.skipUnless(
         CONF.neutron_plugin_options.specify_floating_ip_address_available,
         "Feature for specifying floating IP address is disabled")
-    @test.idempotent_id('332a8ae4-402e-4b98-bb6f-532e5a87b8e0')
+    @decorators.idempotent_id('332a8ae4-402e-4b98-bb6f-532e5a87b8e0')
     def test_create_floatingip_with_specified_ip_address(self):
         # other tests may end up stealing the IP before we can use it
         # since it's on the external network so we need to retry if it's
diff --git a/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py b/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py
index a276441..25cdb99 100644
--- a/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py
+++ b/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -79,11 +80,11 @@
                 cls.client.add_router_interface_with_port_id(
                     cls.router['id'], cls.port['id'])
 
-    @test.idempotent_id('b7ce6e89-e837-4ded-9b78-9ed3c9c6a45a')
+    @decorators.idempotent_id('b7ce6e89-e837-4ded-9b78-9ed3c9c6a45a')
     def test_list_routers_on_l3_agent(self):
         self.admin_client.list_routers_on_l3_agent(self.agent['id'])
 
-    @test.idempotent_id('9464e5e7-8625-49c3-8fd1-89c52be59d66')
+    @decorators.idempotent_id('9464e5e7-8625-49c3-8fd1-89c52be59d66')
     def test_add_list_remove_router_on_l3_agent(self):
         l3_agent_ids = list()
         self.admin_client.add_router_to_l3_agent(
diff --git a/neutron/tests/tempest/api/admin/test_networks.py b/neutron/tests/tempest/api/admin/test_networks.py
index 1068c0b..0cf83a3 100644
--- a/neutron/tests/tempest/api/admin/test_networks.py
+++ b/neutron/tests/tempest/api/admin/test_networks.py
@@ -11,6 +11,7 @@
 #    under the License.
 
 from oslo_utils import uuidutils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -19,7 +20,7 @@
 
 class NetworksTestAdmin(base.BaseAdminNetworkTest):
 
-    @test.idempotent_id('d3c76044-d067-4cb0-ae47-8cdd875c7f67')
+    @decorators.idempotent_id('d3c76044-d067-4cb0-ae47-8cdd875c7f67')
     @test.requires_ext(extension="project-id", service="network")
     def test_admin_create_network_keystone_v3(self):
         project_id = self.client.tenant_id  # non-admin
@@ -37,7 +38,7 @@
         self.assertEqual(project_id, lookup_net['project_id'])
         self.assertEqual(project_id, lookup_net['tenant_id'])
 
-    @test.idempotent_id('8d21aaca-4364-4eb9-8b79-44b4fff6373b')
+    @decorators.idempotent_id('8d21aaca-4364-4eb9-8b79-44b4fff6373b')
     @test.requires_ext(extension="project-id", service="network")
     def test_admin_create_network_keystone_v3_and_tenant(self):
         project_id = self.client.tenant_id  # non-admin
@@ -55,7 +56,7 @@
         self.assertEqual(project_id, lookup_net['project_id'])
         self.assertEqual(project_id, lookup_net['tenant_id'])
 
-    @test.idempotent_id('08b92179-669d-45ee-8233-ef6611190809')
+    @decorators.idempotent_id('08b92179-669d-45ee-8233-ef6611190809')
     @test.requires_ext(extension="project-id", service="network")
     def test_admin_create_network_keystone_v3_and_other_tenant(self):
         project_id = self.client.tenant_id  # non-admin
diff --git a/neutron/tests/tempest/api/admin/test_quotas.py b/neutron/tests/tempest/api/admin/test_quotas.py
index 7195693..9736d7f 100644
--- a/neutron/tests/tempest/api/admin/test_quotas.py
+++ b/neutron/tests/tempest/api/admin/test_quotas.py
@@ -15,6 +15,7 @@
 
 import six
 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
 
@@ -75,7 +76,7 @@
     """
 
     @test.attr(type='gate')
-    @test.idempotent_id('2390f766-836d-40ef-9aeb-e810d78207fb')
+    @decorators.idempotent_id('2390f766-836d-40ef-9aeb-e810d78207fb')
     def test_quotas(self):
         tenant_id = self._create_tenant()['id']
         new_quotas = {'network': 0, 'security_group': 0}
diff --git a/neutron/tests/tempest/api/admin/test_quotas_negative.py b/neutron/tests/tempest/api/admin/test_quotas_negative.py
index 3ff49c6..3887bea 100644
--- a/neutron/tests/tempest/api/admin/test_quotas_negative.py
+++ b/neutron/tests/tempest/api/admin/test_quotas_negative.py
@@ -11,6 +11,7 @@
 #    under the License.
 
 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
 
@@ -23,7 +24,7 @@
 class QuotasAdminNegativeTestJSON(test_quotas.QuotasTestBase):
 
     @test.attr(type='negative')
-    @test.idempotent_id('952f9b24-9156-4bdc-90f3-682a3d4302f0')
+    @decorators.idempotent_id('952f9b24-9156-4bdc-90f3-682a3d4302f0')
     def test_create_network_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
         new_quotas = {'network': 1}
@@ -37,7 +38,7 @@
                           self.admin_client.create_network, **net_args)
 
     @test.attr(type='negative')
-    @test.idempotent_id('0b7f99e3-9f77-45ce-9a89-b39a184de618')
+    @decorators.idempotent_id('0b7f99e3-9f77-45ce-9a89-b39a184de618')
     def test_create_subnet_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
         new_quotas = {'subnet': 1}
@@ -59,7 +60,7 @@
                           self.admin_client.create_subnet, **subnet_args)
 
     @test.attr(type='negative')
-    @test.idempotent_id('fe20d9f9-346c-4a20-bbfa-d9ca390f4dc6')
+    @decorators.idempotent_id('fe20d9f9-346c-4a20-bbfa-d9ca390f4dc6')
     def test_create_port_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
         new_quotas = {'port': 1}
@@ -86,7 +87,7 @@
                           self.admin_client.create_port, **port_args)
 
     @test.attr(type='negative')
-    @test.idempotent_id('bb1e9c3c-7e6f-41f1-b579-63dbc655ecb7')
+    @decorators.idempotent_id('bb1e9c3c-7e6f-41f1-b579-63dbc655ecb7')
     @test.requires_ext(extension="router", service="network")
     def test_create_router_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
@@ -104,7 +105,7 @@
                           name, True, **router_args)
 
     @test.attr(type='negative')
-    @test.idempotent_id('5c924ff7-b7a9-474f-92a3-dbe0f976ec13')
+    @decorators.idempotent_id('5c924ff7-b7a9-474f-92a3-dbe0f976ec13')
     @test.requires_ext(extension="security-group", service="network")
     def test_create_security_group_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
@@ -125,7 +126,7 @@
                           self.admin_client.create_security_group, **sg_args)
 
     @test.attr(type='negative')
-    @test.idempotent_id('b7143480-6118-4ed4-be38-1b6f15f30d05')
+    @decorators.idempotent_id('b7143480-6118-4ed4-be38-1b6f15f30d05')
     @test.requires_ext(extension="security-group", service="network")
     def test_create_security_group_rule_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
@@ -157,7 +158,7 @@
                           **sg_rule_args)
 
     @test.attr(type='negative')
-    @test.idempotent_id('d00fe5bb-9db8-4e1a-9c31-490f52897e6f')
+    @decorators.idempotent_id('d00fe5bb-9db8-4e1a-9c31-490f52897e6f')
     @test.requires_ext(extension="router", service="network")
     def test_create_floatingip_when_quotas_is_full(self):
         tenant_id = self._create_tenant()['id']
diff --git a/neutron/tests/tempest/api/admin/test_routers_dvr.py b/neutron/tests/tempest/api/admin/test_routers_dvr.py
index c9d6e1e..f0904c1 100644
--- a/neutron/tests/tempest/api/admin/test_routers_dvr.py
+++ b/neutron/tests/tempest/api/admin/test_routers_dvr.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base_routers as base
@@ -39,7 +40,7 @@
             raise cls.skipException(msg)
         cls.admin_client.delete_router(router['router']['id'])
 
-    @test.idempotent_id('08a2a0a8-f1e4-4b34-8e30-e522e836c44e')
+    @decorators.idempotent_id('08a2a0a8-f1e4-4b34-8e30-e522e836c44e')
     def test_distributed_router_creation(self):
         """
         Test uses administrative credentials to creates a
@@ -56,7 +57,7 @@
                         router['router']['id'])
         self.assertTrue(router['router']['distributed'])
 
-    @test.idempotent_id('8a0a72b4-7290-4677-afeb-b4ffe37bc352')
+    @decorators.idempotent_id('8a0a72b4-7290-4677-afeb-b4ffe37bc352')
     def test_centralized_router_creation(self):
         """
         Test uses administrative credentials to creates a
@@ -74,7 +75,7 @@
                         router['router']['id'])
         self.assertFalse(router['router']['distributed'])
 
-    @test.idempotent_id('acd43596-c1fb-439d-ada8-31ad48ae3c2e')
+    @decorators.idempotent_id('acd43596-c1fb-439d-ada8-31ad48ae3c2e')
     def test_centralized_router_update_to_dvr(self):
         """
         Test uses administrative credentials to creates a
diff --git a/neutron/tests/tempest/api/admin/test_routers_flavors.py b/neutron/tests/tempest/api/admin/test_routers_flavors.py
index 7323427..5e81c83 100644
--- a/neutron/tests/tempest/api/admin/test_routers_flavors.py
+++ b/neutron/tests/tempest/api/admin/test_routers_flavors.py
@@ -12,6 +12,7 @@
 #    under the License.
 
 from neutron_lib import constants
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 import testtools
@@ -80,7 +81,7 @@
                 service_profile['id'])
         super(RoutersFlavorTestCase, cls).resource_cleanup()
 
-    @test.idempotent_id('a4d01977-e968-4983-b4d9-824ea6c33f4b')
+    @decorators.idempotent_id('a4d01977-e968-4983-b4d9-824ea6c33f4b')
     def test_create_router_with_flavor(self):
         # ensure regular client can see flavor
         flavors = self.client.list_flavors(id=self.flavor['id'])
@@ -96,13 +97,13 @@
         router = self.create_router('name', flavor_id=prem_flavor['id'])
         self.assertEqual(prem_flavor['id'], router['flavor_id'])
 
-    @test.idempotent_id('30e73858-a0fc-409c-a2e0-e9cd2826f6a2')
+    @decorators.idempotent_id('30e73858-a0fc-409c-a2e0-e9cd2826f6a2')
     def test_delete_router_flavor_in_use(self):
         self.create_router('name', flavor_id=self.flavor['id'])
         with testtools.ExpectedException(lib_exc.Conflict):
             self.admin_client.delete_flavor(self.flavor['id'])
 
-    @test.idempotent_id('83939cf7-5070-41bc-9a3e-cd9f22df2186')
+    @decorators.idempotent_id('83939cf7-5070-41bc-9a3e-cd9f22df2186')
     def test_badrequest_on_requesting_flags_and_flavor(self):
         with testtools.ExpectedException(lib_exc.BadRequest):
             self.admin_client.create_router(
diff --git a/neutron/tests/tempest/api/admin/test_shared_network_extension.py b/neutron/tests/tempest/api/admin/test_shared_network_extension.py
index 97b4a0c..6f3e391 100644
--- a/neutron/tests/tempest/api/admin/test_shared_network_extension.py
+++ b/neutron/tests/tempest/api/admin/test_shared_network_extension.py
@@ -16,6 +16,7 @@
 
 from oslo_utils import uuidutils
 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
 import testtools
@@ -30,7 +31,7 @@
         super(SharedNetworksTest, cls).resource_setup()
         cls.shared_network = cls.create_shared_network()
 
-    @test.idempotent_id('6661d219-b96d-4597-ad10-55766123421a')
+    @decorators.idempotent_id('6661d219-b96d-4597-ad10-55766123421a')
     def test_filtering_shared_networks(self):
         # this test is necessary because the 'shared' column does not actually
         # exist on networks so the filter function has to translate it into
@@ -49,7 +50,7 @@
         self.assertNotEmpty(items)
         self.assertTrue(all(n['shared'] == shared for n in items))
 
-    @test.idempotent_id('6661d219-b96d-4597-ad10-51672353421a')
+    @decorators.idempotent_id('6661d219-b96d-4597-ad10-51672353421a')
     def test_filtering_shared_subnets(self):
         # shared subnets need to be tested because their shared status isn't
         # visible as a regular API attribute and it's solely dependent on the
@@ -73,7 +74,7 @@
         self.assertNotIn(shared,
             self.admin_client.list_subnets(shared=False)['subnets'])
 
-    @test.idempotent_id('6661d219-b96d-4597-ad10-55766ce4abf7')
+    @decorators.idempotent_id('6661d219-b96d-4597-ad10-55766ce4abf7')
     def test_create_update_shared_network(self):
         shared_network = self.create_shared_network()
         net_id = shared_network['id']
@@ -89,7 +90,7 @@
         self.assertFalse(updated_net['shared'])
         self.assertFalse(updated_net['admin_state_up'])
 
-    @test.idempotent_id('9c31fabb-0181-464f-9ace-95144fe9ca77')
+    @decorators.idempotent_id('9c31fabb-0181-464f-9ace-95144fe9ca77')
     def test_create_port_shared_network_as_non_admin_tenant(self):
         # create a port as non admin
         body = self.client.create_port(network_id=self.shared_network['id'])
@@ -99,7 +100,7 @@
         self.assertNotEqual(self.shared_network['tenant_id'],
                             port['tenant_id'])
 
-    @test.idempotent_id('3e39c4a6-9caf-4710-88f1-d20073c6dd76')
+    @decorators.idempotent_id('3e39c4a6-9caf-4710-88f1-d20073c6dd76')
     def test_create_bulk_shared_network(self):
         # Creates 2 networks in one request
         net_nm = [data_utils.rand_name('network'),
@@ -117,7 +118,7 @@
         self.assertIn(self.shared_network['id'], networks_list)
         self.assertTrue(self.shared_network['shared'])
 
-    @test.idempotent_id('a064a9fd-e02f-474a-8159-f828cd636a28')
+    @decorators.idempotent_id('a064a9fd-e02f-474a-8159-f828cd636a28')
     def test_list_shared_networks(self):
         # List the shared networks and confirm that
         # shared network extension attribute is returned for those networks
@@ -132,7 +133,7 @@
         self.assertEqual(self.shared_network['id'], show_shared_net['id'])
         self.assertTrue(show_shared_net['shared'])
 
-    @test.idempotent_id('e03c92a2-638d-4bfa-b50a-b1f66f087e58')
+    @decorators.idempotent_id('e03c92a2-638d-4bfa-b50a-b1f66f087e58')
     def test_show_shared_networks_attribute(self):
         # Show a shared network and confirm that
         # shared network extension attribute is returned.
@@ -154,13 +155,13 @@
         cls.network = cls.create_shared_network()
         cls.create_subnet(cls.network, client=cls.admin_client)
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-ffffffff1fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-ffffffff1fff')
     def test_create_with_address_pair_blocked_on_other_network(self):
         with testtools.ExpectedException(lib_exc.Forbidden):
             self.create_port(self.network,
                              allowed_address_pairs=self.allowed_address_pairs)
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-ffffffff2fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-ffffffff2fff')
     def test_update_with_address_pair_blocked_on_other_network(self):
         port = self.create_port(self.network)
         with testtools.ExpectedException(lib_exc.Forbidden):
@@ -192,14 +193,14 @@
         return {'network': net, 'subnet': subnet, 'policy': pol}
 
     @test.attr(type='smoke')
-    @test.idempotent_id('86c3529b-1231-40de-803c-bfffffff1eee')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-bfffffff1eee')
     def test_create_rbac_policy_with_target_tenant_none(self):
         with testtools.ExpectedException(lib_exc.BadRequest):
             self._make_admin_net_and_subnet_shared_to_tenant_id(
                 tenant_id=None)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('86c3529b-1231-40de-803c-bfffffff1fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-bfffffff1fff')
     def test_create_rbac_policy_with_target_tenant_too_long_id(self):
         with testtools.ExpectedException(lib_exc.BadRequest):
             target_tenant = '1234' * 100
@@ -207,7 +208,7 @@
                 tenant_id=target_tenant)
 
     @test.attr(type='smoke')
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff1fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff1fff')
     def test_network_only_visible_to_policy_target(self):
         net = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)['network']
@@ -216,7 +217,7 @@
             # client2 has not been granted access
             self.client2.show_network(net['id'])
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff2fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff2fff')
     def test_subnet_on_network_only_visible_to_policy_target(self):
         sub = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)['subnet']
@@ -225,7 +226,7 @@
             # client2 has not been granted access
             self.client2.show_subnet(sub['id'])
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff2eee')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff2eee')
     def test_policy_target_update(self):
         res = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)
@@ -239,7 +240,7 @@
         update_res['rbac_policy'].pop('target_tenant')
         self.assertEqual(res['policy'], update_res['rbac_policy'])
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-affefefef321')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-affefefef321')
     def test_duplicate_policy_error(self):
         res = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)
@@ -248,7 +249,7 @@
                 object_type='network', object_id=res['network']['id'],
                 action='access_as_shared', target_tenant=self.client.tenant_id)
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff3fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff3fff')
     def test_port_presence_prevents_network_rbac_policy_deletion(self):
         res = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)
@@ -278,7 +279,7 @@
         # anchor is gone, delete should pass
         self.admin_client.delete_rbac_policy(wild['id'])
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-beefbeefbeef')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-beefbeefbeef')
     def test_tenant_can_delete_port_on_own_network(self):
         net = self.create_network()  # owned by self.client
         self.client.create_rbac_policy(
@@ -287,7 +288,7 @@
         port = self.client2.create_port(network_id=net['id'])['port']
         self.client.delete_port(port['id'])
 
-    @test.idempotent_id('f7539232-389a-4e9c-9e37-e42a129eb541')
+    @decorators.idempotent_id('f7539232-389a-4e9c-9e37-e42a129eb541')
     def test_tenant_cant_delete_other_tenants_ports(self):
         net = self.create_network()
         port = self.client.create_port(network_id=net['id'])['port']
@@ -295,7 +296,7 @@
         with testtools.ExpectedException(lib_exc.NotFound):
             self.client2.delete_port(port['id'])
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff4fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff4fff')
     def test_regular_client_shares_to_another_regular_client(self):
         net = self.create_network()  # owned by self.client
         with testtools.ExpectedException(lib_exc.NotFound):
@@ -313,7 +314,7 @@
             [p['id']
              for p in self.client2.list_rbac_policies()['rbac_policies']])
 
-    @test.idempotent_id('bf5052b8-b11e-407c-8e43-113447404d3e')
+    @decorators.idempotent_id('bf5052b8-b11e-407c-8e43-113447404d3e')
     def test_filter_fields(self):
         net = self.create_network()
         self.client.create_rbac_policy(
@@ -325,7 +326,7 @@
             res = self.client.list_rbac_policies(fields=fields)
             self.assertEqual(set(fields), set(res['rbac_policies'][0].keys()))
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff5fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff5fff')
     def test_policy_show(self):
         res = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)
@@ -340,7 +341,7 @@
         self.assertEqual(
             p2, self.admin_client.show_rbac_policy(p2['id'])['rbac_policy'])
 
-    @test.idempotent_id('e7bcb1ea-4877-4266-87bb-76f68b421f31')
+    @decorators.idempotent_id('e7bcb1ea-4877-4266-87bb-76f68b421f31')
     def test_filter_policies(self):
         net = self.create_network()
         pol1 = self.client.create_rbac_policy(
@@ -358,7 +359,7 @@
         self.assertEqual(pol1['id'], res1[0]['id'])
         self.assertEqual(pol2['id'], res2[0]['id'])
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff6fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff6fff')
     def test_regular_client_blocked_from_sharing_anothers_network(self):
         net = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)['network']
@@ -367,7 +368,7 @@
                 object_type='network', object_id=net['id'],
                 action='access_as_shared', target_tenant=self.client.tenant_id)
 
-    @test.idempotent_id('c5f8f785-ce8d-4430-af7e-a236205862fb')
+    @decorators.idempotent_id('c5f8f785-ce8d-4430-af7e-a236205862fb')
     @test.requires_ext(extension="quotas", service="network")
     def test_rbac_policy_quota(self):
         quota = self.client.show_quotas(self.client.tenant_id)['quota']
@@ -383,7 +384,7 @@
                     action='access_as_shared',
                     target_tenant=uuidutils.generate_uuid().replace('-', ''))
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-afffffff7fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-afffffff7fff')
     def test_regular_client_blocked_from_sharing_with_wildcard(self):
         net = self.create_network()
         with testtools.ExpectedException(lib_exc.Forbidden):
@@ -398,7 +399,7 @@
             self.client.update_rbac_policy(pol['rbac_policy']['id'],
                                            target_tenant='*')
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-aeeeeeee7fff')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-aeeeeeee7fff')
     def test_filtering_works_with_rbac_records_present(self):
         resp = self._make_admin_net_and_subnet_shared_to_tenant_id(
             self.client.tenant_id)
diff --git a/neutron/tests/tempest/api/test_address_scopes.py b/neutron/tests/tempest/api/test_address_scopes.py
index 5cecb77..ea0b5da 100644
--- a/neutron/tests/tempest/api/test_address_scopes.py
+++ b/neutron/tests/tempest/api/test_address_scopes.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 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
 
@@ -56,7 +57,7 @@
 
 class AddressScopeTest(AddressScopeTestBase):
 
-    @test.idempotent_id('045f9294-8b1a-4848-b6a8-edf1b41e9d06')
+    @decorators.idempotent_id('045f9294-8b1a-4848-b6a8-edf1b41e9d06')
     def test_tenant_create_list_address_scope(self):
         address_scope = self._create_address_scope(ip_version=4)
         body = self.client.list_address_scopes()
@@ -68,7 +69,7 @@
                       [a_s['name'] for a_s in returned_address_scopes],
                       "Created address scope name should be in the list")
 
-    @test.idempotent_id('85e0326b-4c75-4b92-bd6e-7c7de6aaf05c')
+    @decorators.idempotent_id('85e0326b-4c75-4b92-bd6e-7c7de6aaf05c')
     def test_show_address_scope(self):
         address_scope = self._create_address_scope(ip_version=4)
         body = self.client.show_address_scope(
@@ -79,7 +80,7 @@
                          returned_address_scope['name'])
         self.assertFalse(returned_address_scope['shared'])
 
-    @test.idempotent_id('bbd57364-6d57-48e4-b0f1-8b9a998f5e06')
+    @decorators.idempotent_id('bbd57364-6d57-48e4-b0f1-8b9a998f5e06')
     @test.requires_ext(extension="project-id", service="network")
     def test_show_address_scope_project_id(self):
         address_scope = self._create_address_scope(ip_version=4)
@@ -90,18 +91,18 @@
         self.assertEqual(self.client.tenant_id, show_addr_scope['project_id'])
         self.assertEqual(self.client.tenant_id, show_addr_scope['tenant_id'])
 
-    @test.idempotent_id('85a259b2-ace6-4e32-9657-a9a392b452aa')
+    @decorators.idempotent_id('85a259b2-ace6-4e32-9657-a9a392b452aa')
     def test_tenant_update_address_scope(self):
         self._test_update_address_scope_helper()
 
-    @test.idempotent_id('22b3b600-72a8-4b60-bc94-0f29dd6271df')
+    @decorators.idempotent_id('22b3b600-72a8-4b60-bc94-0f29dd6271df')
     def test_delete_address_scope(self):
         address_scope = self._create_address_scope(ip_version=4)
         self.client.delete_address_scope(address_scope['id'])
         self.assertRaises(lib_exc.NotFound, self.client.show_address_scope,
                           address_scope['id'])
 
-    @test.idempotent_id('5a06c287-8036-4d04-9d78-def8e06d43df')
+    @decorators.idempotent_id('5a06c287-8036-4d04-9d78-def8e06d43df')
     def test_admin_create_shared_address_scope(self):
         address_scope = self._create_address_scope(is_admin=True, shared=True,
                                                    ip_version=4)
@@ -112,7 +113,7 @@
                          returned_address_scope['name'])
         self.assertTrue(returned_address_scope['shared'])
 
-    @test.idempotent_id('e9e1ccdd-9ccd-4076-9503-71820529508b')
+    @decorators.idempotent_id('e9e1ccdd-9ccd-4076-9503-71820529508b')
     def test_admin_update_shared_address_scope(self):
         address_scope = self._test_update_address_scope_helper(is_admin=True,
                                                                shared=True)
diff --git a/neutron/tests/tempest/api/test_address_scopes_negative.py b/neutron/tests/tempest/api/test_address_scopes_negative.py
index 05afa04..ac8956d 100644
--- a/neutron/tests/tempest/api/test_address_scopes_negative.py
+++ b/neutron/tests/tempest/api/test_address_scopes_negative.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 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
 
@@ -22,32 +23,32 @@
 class AddressScopeTestNegative(test_address_scopes.AddressScopeTestBase):
 
     @test.attr(type='negative')
-    @test.idempotent_id('9c92ec34-0c50-4104-aa47-9ce98d5088df')
+    @decorators.idempotent_id('9c92ec34-0c50-4104-aa47-9ce98d5088df')
     def test_tenant_create_shared_address_scope(self):
         self.assertRaises(lib_exc.Forbidden, self._create_address_scope,
                           shared=True, ip_version=4)
 
     @test.attr(type='negative')
-    @test.idempotent_id('a857b61e-bf53-4fab-b21a-b0daaf81b5bd')
+    @decorators.idempotent_id('a857b61e-bf53-4fab-b21a-b0daaf81b5bd')
     def test_tenant_update_address_scope_shared_true(self):
         self.assertRaises(lib_exc.Forbidden,
                           self._test_update_address_scope_helper, shared=True)
 
     @test.attr(type='negative')
-    @test.idempotent_id('a859ef2f-9c76-4e2e-ba0f-e0339a489e8c')
+    @decorators.idempotent_id('a859ef2f-9c76-4e2e-ba0f-e0339a489e8c')
     def test_tenant_update_address_scope_shared_false(self):
         self.assertRaises(lib_exc.Forbidden,
                           self._test_update_address_scope_helper, shared=False)
 
     @test.attr(type='negative')
-    @test.idempotent_id('9b6dd7ad-cabb-4f55-bd5e-e61176ef41f6')
+    @decorators.idempotent_id('9b6dd7ad-cabb-4f55-bd5e-e61176ef41f6')
     def test_get_non_existent_address_scope(self):
         non_exist_id = data_utils.rand_name('address_scope')
         self.assertRaises(lib_exc.NotFound, self.client.show_address_scope,
                           non_exist_id)
 
     @test.attr(type='negative')
-    @test.idempotent_id('ef213552-f2da-487d-bf4a-e1705d115ff1')
+    @decorators.idempotent_id('ef213552-f2da-487d-bf4a-e1705d115ff1')
     def test_tenant_get_not_shared_admin_address_scope(self):
         address_scope = self._create_address_scope(is_admin=True,
                                                    ip_version=4)
@@ -56,21 +57,21 @@
                           address_scope['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('5c25dc6a-1e92-467a-9cc7-cda74b6003db')
+    @decorators.idempotent_id('5c25dc6a-1e92-467a-9cc7-cda74b6003db')
     def test_delete_non_existent_address_scope(self):
         non_exist_id = data_utils.rand_name('address_scope')
         self.assertRaises(lib_exc.NotFound, self.client.delete_address_scope,
                           non_exist_id)
 
     @test.attr(type='negative')
-    @test.idempotent_id('47c25dc5-e886-4a84-88c3-ac5031969661')
+    @decorators.idempotent_id('47c25dc5-e886-4a84-88c3-ac5031969661')
     def test_update_non_existent_address_scope(self):
         non_exist_id = data_utils.rand_name('address_scope')
         self.assertRaises(lib_exc.NotFound, self.client.update_address_scope,
                           non_exist_id, name='foo-name')
 
     @test.attr(type='negative')
-    @test.idempotent_id('702d0515-82cb-4207-b0d9-703336e54665')
+    @decorators.idempotent_id('702d0515-82cb-4207-b0d9-703336e54665')
     def test_update_shared_address_scope_to_unshare(self):
         address_scope = self._create_address_scope(is_admin=True, shared=True,
                                                    ip_version=4)
@@ -79,7 +80,7 @@
                           address_scope['id'], name='new-name', shared=False)
 
     @test.attr(type='negative')
-    @test.idempotent_id('1e471e5c-6f9c-437a-9257-fd9bc4b6f0fb')
+    @decorators.idempotent_id('1e471e5c-6f9c-437a-9257-fd9bc4b6f0fb')
     def test_delete_address_scope_associated_with_subnetpool(self):
         address_scope = self._create_address_scope(ip_version=4)
         prefixes = [u'10.11.12.0/24']
diff --git a/neutron/tests/tempest/api/test_allowed_address_pair.py b/neutron/tests/tempest/api/test_allowed_address_pair.py
index 5313785..3c47e12 100644
--- a/neutron/tests/tempest/api/test_allowed_address_pair.py
+++ b/neutron/tests/tempest/api/test_allowed_address_pair.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 import netaddr
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -48,7 +49,7 @@
         cls.ip_address = port['fixed_ips'][0]['ip_address']
         cls.mac_address = port['mac_address']
 
-    @test.idempotent_id('86c3529b-1231-40de-803c-00e40882f043')
+    @decorators.idempotent_id('86c3529b-1231-40de-803c-00e40882f043')
     def test_create_list_port_with_address_pair(self):
         # Create port with allowed address pair attribute
         allowed_address_pairs = [{'ip_address': self.ip_address,
@@ -85,12 +86,12 @@
         allowed_address_pair = body['port']['allowed_address_pairs']
         self.assertItemsEqual(allowed_address_pair, allowed_address_pairs)
 
-    @test.idempotent_id('9599b337-272c-47fd-b3cf-509414414ac4')
+    @decorators.idempotent_id('9599b337-272c-47fd-b3cf-509414414ac4')
     def test_update_port_with_address_pair(self):
         # Update port with allowed address pair
         self._update_port_with_address(self.ip_address)
 
-    @test.idempotent_id('4d6d178f-34f6-4bff-a01c-0a2f8fe909e4')
+    @decorators.idempotent_id('4d6d178f-34f6-4bff-a01c-0a2f8fe909e4')
     def test_update_port_with_cidr_address_pair(self):
         # Update allowed address pair with cidr
         cidr = str(
@@ -98,7 +99,7 @@
                 'network', 'project_network_cidr')))
         self._update_port_with_address(cidr)
 
-    @test.idempotent_id('b3f20091-6cd5-472b-8487-3516137df933')
+    @decorators.idempotent_id('b3f20091-6cd5-472b-8487-3516137df933')
     def test_update_port_with_multiple_ip_mac_address_pair(self):
         # Create an ip _address and mac_address through port create
         resp = self.client.create_port(network_id=self.network['id'])
diff --git a/neutron/tests/tempest/api/test_auto_allocated_topology.py b/neutron/tests/tempest/api/test_auto_allocated_topology.py
index 65c3057..7a6d5ac 100644
--- a/neutron/tests/tempest/api/test_auto_allocated_topology.py
+++ b/neutron/tests/tempest/api/test_auto_allocated_topology.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from oslo_config import cfg
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -79,7 +80,7 @@
         body = client.list_networks(name='auto_allocated_network')
         self.networks.extend(body['networks'])
 
-    @test.idempotent_id('64bc0b02-cee4-11e5-9f3c-080027605a2b')
+    @decorators.idempotent_id('64bc0b02-cee4-11e5-9f3c-080027605a2b')
     def test_get_allocated_net_topology_as_tenant(self):
         resources_before = self._count_topology_resources()
         self.assertEqual((0, 0, 0), resources_before)
@@ -105,7 +106,7 @@
         self.assertEqual(network_id1, network_id2)
         self.assertEqual(resources_after1, resources_after2)
 
-    @test.idempotent_id('aabc0b02-cee4-11e5-9f3c-091127605a2b')
+    @decorators.idempotent_id('aabc0b02-cee4-11e5-9f3c-091127605a2b')
     def test_delete_allocated_net_topology_as_tenant(self):
         resources_before = self._count_topology_resources()
         self.assertEqual((0, 0, 0), resources_before)
diff --git a/neutron/tests/tempest/api/test_dhcp_ipv6.py b/neutron/tests/tempest/api/test_dhcp_ipv6.py
index b1a3361..afe9c53 100644
--- a/neutron/tests/tempest/api/test_dhcp_ipv6.py
+++ b/neutron/tests/tempest/api/test_dhcp_ipv6.py
@@ -15,8 +15,8 @@
 
 import netaddr
 from neutron_lib import constants
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
-from tempest import test
 
 from neutron.tests.tempest.api import base
 from neutron.tests.tempest import config
@@ -79,7 +79,7 @@
                 self.client.delete_router(router['id'])
                 self._remove_from_list_by_index(self.routers, router)
 
-    @test.idempotent_id('98244d88-d990-4570-91d4-6b25d70d08af')
+    @decorators.idempotent_id('98244d88-d990-4570-91d4-6b25d70d08af')
     def test_dhcp_stateful_fixedips_outrange(self):
         """When port gets IP address from fixed IP range it
         shall be checked if it's from subnets range.
diff --git a/neutron/tests/tempest/api/test_extension_driver_port_security.py b/neutron/tests/tempest/api/test_extension_driver_port_security.py
index 71cc6c0..8e3ec07 100644
--- a/neutron/tests/tempest/api/test_extension_driver_port_security.py
+++ b/neutron/tests/tempest/api/test_extension_driver_port_security.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 import ddt
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -28,7 +29,7 @@
 class PortSecTest(base_security.BaseSecGroupTest,
                   base.BaseNetworkTest):
 
-    @test.idempotent_id('7c338ddf-e64e-4118-bd33-e49a1f2f1495')
+    @decorators.idempotent_id('7c338ddf-e64e-4118-bd33-e49a1f2f1495')
     @test.requires_ext(extension='port-security', service='network')
     def test_port_sec_default_value(self):
         # Default port-sec value is True, and the attr of the port will inherit
@@ -39,7 +40,7 @@
         port = self.create_port(network)
         self.assertTrue(port['port_security_enabled'])
 
-    @test.idempotent_id('e60eafd2-31de-4c38-8106-55447d033b57')
+    @decorators.idempotent_id('e60eafd2-31de-4c38-8106-55447d033b57')
     @test.requires_ext(extension='port-security', service='network')
     @ddt.unpack
     @ddt.data({'port_sec_net': False, 'port_sec_port': True, 'expected': True},
@@ -53,7 +54,7 @@
         self.assertEqual(network['port_security_enabled'], port_sec_net)
         self.assertEqual(port['port_security_enabled'], expected)
 
-    @test.idempotent_id('fe7c27b9-f320-4daf-b977-b1547c43daf6')
+    @decorators.idempotent_id('fe7c27b9-f320-4daf-b977-b1547c43daf6')
     @test.requires_ext(extension='port-security', service='network')
     def test_create_port_sec_with_security_group(self):
         network = self.create_network(port_security_enabled=True)
@@ -69,7 +70,7 @@
         self.assertEmpty(port['security_groups'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('ff11226c-a5ff-4ad4-8480-0840e36e47a9')
+    @decorators.idempotent_id('ff11226c-a5ff-4ad4-8480-0840e36e47a9')
     @test.requires_ext(extension='port-security', service='network')
     def test_port_sec_update_port_failed(self):
         network = self.create_network()
@@ -96,7 +97,7 @@
         # Remove security group from port before deletion on resource_cleanup
         self.update_port(port, security_groups=[])
 
-    @test.idempotent_id('05642059-1bfc-4581-9bc9-aaa5db08dd60')
+    @decorators.idempotent_id('05642059-1bfc-4581-9bc9-aaa5db08dd60')
     @test.requires_ext(extension='port-security', service='network')
     def test_port_sec_update_pass(self):
         network = self.create_network()
@@ -120,7 +121,7 @@
         self.assertEmpty(port['security_groups'])
         self.assertFalse(port['port_security_enabled'])
 
-    @test.idempotent_id('2df6114b-b8c3-48a1-96e8-47f08159d35c')
+    @decorators.idempotent_id('2df6114b-b8c3-48a1-96e8-47f08159d35c')
     @test.requires_ext(extension='port-security', service='network')
     def test_delete_with_port_sec(self):
         network = self.create_network(port_security_enabled=True)
@@ -133,7 +134,7 @@
             self.client.is_resource_deleted('network', network['id']))
 
     @test.attr(type='negative')
-    @test.idempotent_id('ed93e453-3f8d-495e-8e7e-b0e268c2ebd9')
+    @decorators.idempotent_id('ed93e453-3f8d-495e-8e7e-b0e268c2ebd9')
     @test.requires_ext(extension='port-security', service='network')
     @test.requires_ext(extension='allowed-address-pairs', service='network')
     def test_allow_address_pairs(self):
diff --git a/neutron/tests/tempest/api/test_extensions.py b/neutron/tests/tempest/api/test_extensions.py
index b1b09e8..3809a93 100644
--- a/neutron/tests/tempest/api/test_extensions.py
+++ b/neutron/tests/tempest/api/test_extensions.py
@@ -10,6 +10,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -27,14 +28,14 @@
         else:
             self.assertNotIn(ext, extensions)
 
-    @test.idempotent_id('262420b7-a4bb-4a3e-b4b5-e73bad18df8c')
+    @decorators.idempotent_id('262420b7-a4bb-4a3e-b4b5-e73bad18df8c')
     def test_list_extensions_sorting(self):
         self._test_list_extensions_includes('sorting')
 
-    @test.idempotent_id('19db409e-a23f-445d-8bc8-ca3d64c84706')
+    @decorators.idempotent_id('19db409e-a23f-445d-8bc8-ca3d64c84706')
     def test_list_extensions_pagination(self):
         self._test_list_extensions_includes('pagination')
 
-    @test.idempotent_id('155b7bc2-e358-4dd8-bf3e-1774c084567f')
+    @decorators.idempotent_id('155b7bc2-e358-4dd8-bf3e-1774c084567f')
     def test_list_extensions_project_id(self):
         self._test_list_extensions_includes('project-id')
diff --git a/neutron/tests/tempest/api/test_extra_dhcp_options.py b/neutron/tests/tempest/api/test_extra_dhcp_options.py
index 291bd9e..7ba6bee 100644
--- a/neutron/tests/tempest/api/test_extra_dhcp_options.py
+++ b/neutron/tests/tempest/api/test_extra_dhcp_options.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -52,7 +53,7 @@
             {'opt_value': cls.ip_server, 'opt_name': 'server-ip-address'}
         ]
 
-    @test.idempotent_id('d2c17063-3767-4a24-be4f-a23dbfa133c9')
+    @decorators.idempotent_id('d2c17063-3767-4a24-be4f-a23dbfa133c9')
     def test_create_list_port_with_extra_dhcp_options(self):
         # Create a port with Extra DHCP Options
         body = self.client.create_port(
@@ -68,7 +69,7 @@
         self.assertTrue(port)
         self._confirm_extra_dhcp_options(port[0], self.extra_dhcp_opts)
 
-    @test.idempotent_id('9a6aebf4-86ee-4f47-b07a-7f7232c55607')
+    @decorators.idempotent_id('9a6aebf4-86ee-4f47-b07a-7f7232c55607')
     def test_update_show_port_with_extra_dhcp_options(self):
         # Update port with extra dhcp options
         name = data_utils.rand_name('new-port-name')
diff --git a/neutron/tests/tempest/api/test_flavors_extensions.py b/neutron/tests/tempest/api/test_flavors_extensions.py
index e0dda0b..ab3c522 100644
--- a/neutron/tests/tempest/api/test_flavors_extensions.py
+++ b/neutron/tests/tempest/api/test_flavors_extensions.py
@@ -12,6 +12,7 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -63,7 +64,7 @@
         labels = self.admin_client.list_service_profiles(id=service_profile_id)
         self.assertEqual(len(labels['service_profiles']), 0)
 
-    @test.idempotent_id('b12a9487-b6a2-4cff-a69a-fe2a0b64fae6')
+    @decorators.idempotent_id('b12a9487-b6a2-4cff-a69a-fe2a0b64fae6')
     def test_create_update_delete_service_profile(self):
         # Creates a service profile
         description = "service_profile created by tempest"
@@ -86,7 +87,7 @@
                   id=service_profile['id']))
         self.assertEqual(len(labels['service_profiles']), 1)
 
-    @test.idempotent_id('136bcf09-00af-4da7-9b7f-174735d4aebd')
+    @decorators.idempotent_id('136bcf09-00af-4da7-9b7f-174735d4aebd')
     def test_create_update_delete_flavor(self):
         # Creates a flavor
         description = "flavor created by tempest"
@@ -105,7 +106,7 @@
         labels = (self.admin_client.list_flavors(id=flavor['id']))
         self.assertEqual(len(labels['flavors']), 1)
 
-    @test.idempotent_id('30abb445-0eea-472e-bd02-8649f54a5968')
+    @decorators.idempotent_id('30abb445-0eea-472e-bd02-8649f54a5968')
     def test_show_service_profile(self):
         # Verifies the details of a service profile
         body = self.admin_client.show_service_profile(
@@ -118,7 +119,7 @@
                          service_profile['metainfo'])
         self.assertTrue(service_profile['enabled'])
 
-    @test.idempotent_id('362f9658-164b-44dd-8356-151bc9b7be72')
+    @decorators.idempotent_id('362f9658-164b-44dd-8356-151bc9b7be72')
     def test_show_flavor(self):
         # Verifies the details of a flavor
         body = self.admin_client.show_flavor(self.flavor['id'])
@@ -128,14 +129,14 @@
         self.assertEqual(self.flavor['name'], flavor['name'])
         self.assertTrue(flavor['enabled'])
 
-    @test.idempotent_id('eb3dd12e-6dfd-45f4-8393-46e0fa19860e')
+    @decorators.idempotent_id('eb3dd12e-6dfd-45f4-8393-46e0fa19860e')
     def test_list_flavors(self):
         # Verify flavor lists
         body = self.admin_client.list_flavors(id=33)
         flavors = body['flavors']
         self.assertEqual(0, len(flavors))
 
-    @test.idempotent_id('e2fb2f8c-45bf-429a-9f17-171c70444612')
+    @decorators.idempotent_id('e2fb2f8c-45bf-429a-9f17-171c70444612')
     def test_list_service_profiles(self):
         # Verify service profiles lists
         body = self.admin_client.list_service_profiles(id=33)
diff --git a/neutron/tests/tempest/api/test_floating_ips.py b/neutron/tests/tempest/api/test_floating_ips.py
index 6523f3c..f261e37 100644
--- a/neutron/tests/tempest/api/test_floating_ips.py
+++ b/neutron/tests/tempest/api/test_floating_ips.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -41,7 +42,7 @@
         for i in range(2):
             cls.create_port(cls.network)
 
-    @test.idempotent_id('f6a0fb6c-cb64-4b81-b0d5-f41d8f69d22d')
+    @decorators.idempotent_id('f6a0fb6c-cb64-4b81-b0d5-f41d8f69d22d')
     def test_blank_update_clears_association(self):
         # originally the floating IP had no attributes other than its
         # association, so an update with an empty body was a signal to
@@ -56,7 +57,7 @@
         body = self.client.update_floatingip(body['id'])['floatingip']
         self.assertFalse(body['port_id'])
 
-    @test.idempotent_id('c72c1c0c-2193-4aca-eeee-b1442641ffff')
+    @decorators.idempotent_id('c72c1c0c-2193-4aca-eeee-b1442641ffff')
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
     def test_create_update_floatingip_description(self):
@@ -78,7 +79,7 @@
                                              port_id=None)
         self.assertEqual('d2', body['floatingip']['description'])
 
-    @test.idempotent_id('fd7161e1-2167-4686-a6ff-0f3df08001bb')
+    @decorators.idempotent_id('fd7161e1-2167-4686-a6ff-0f3df08001bb')
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
     def test_floatingip_update_extra_attributes_port_id_not_changed(self):
diff --git a/neutron/tests/tempest/api/test_floating_ips_negative.py b/neutron/tests/tempest/api/test_floating_ips_negative.py
index 4616747..39aaeb4 100644
--- a/neutron/tests/tempest/api/test_floating_ips_negative.py
+++ b/neutron/tests/tempest/api/test_floating_ips_negative.py
@@ -15,6 +15,7 @@
 #    under the License.
 
 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
 
@@ -39,7 +40,7 @@
         cls.port = cls.create_port(cls.network)
 
     @test.attr(type='negative')
-    @test.idempotent_id('0b5b8797-6de7-4191-905c-a48b888eb429')
+    @decorators.idempotent_id('0b5b8797-6de7-4191-905c-a48b888eb429')
     def test_associate_floatingip_with_port_with_floatingip(self):
         net = self.create_network()
         subnet = self.create_subnet(net)
diff --git a/neutron/tests/tempest/api/test_metering_extensions.py b/neutron/tests/tempest/api/test_metering_extensions.py
index 9bbcdce..39e2645 100644
--- a/neutron/tests/tempest/api/test_metering_extensions.py
+++ b/neutron/tests/tempest/api/test_metering_extensions.py
@@ -14,6 +14,7 @@
 
 from neutron_lib.db import constants as db_const
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -61,14 +62,14 @@
                  id=metering_label_rule_id))
         self.assertEqual(len(rules['metering_label_rules']), 0)
 
-    @test.idempotent_id('05d7c750-6d26-44d6-82f3-c9dd1f81f358')
+    @decorators.idempotent_id('05d7c750-6d26-44d6-82f3-c9dd1f81f358')
     def test_list_metering_labels(self):
         # Verify label filtering
         body = self.admin_client.list_metering_labels(id=33)
         metering_labels = body['metering_labels']
         self.assertEqual(0, len(metering_labels))
 
-    @test.idempotent_id('ec8e15ff-95d0-433b-b8a6-b466bddb1e50')
+    @decorators.idempotent_id('ec8e15ff-95d0-433b-b8a6-b466bddb1e50')
     def test_create_delete_metering_label_with_filters(self):
         # Creates a label
         name = data_utils.rand_name('metering-label-')
@@ -84,7 +85,7 @@
                   id=metering_label['id']))
         self.assertEqual(len(labels['metering_labels']), 1)
 
-    @test.idempotent_id('46608f8d-2e27-4eb6-a0b4-dbe405144c4d')
+    @decorators.idempotent_id('46608f8d-2e27-4eb6-a0b4-dbe405144c4d')
     def test_create_delete_metering_label_with_name_max_length(self):
         name = LONG_NAME_OK
         body = self.admin_client.create_metering_label(name=name)
@@ -95,7 +96,7 @@
                   id=metering_label['id']))
         self.assertEqual(len(labels['metering_labels']), 1)
 
-    @test.idempotent_id('cfc500d9-9de6-4847-8803-62889c097d45')
+    @decorators.idempotent_id('cfc500d9-9de6-4847-8803-62889c097d45')
     def test_show_metering_label(self):
         # Verifies the details of a label
         body = self.admin_client.show_metering_label(self.metering_label['id'])
@@ -107,14 +108,14 @@
         self.assertEqual(self.metering_label['description'],
                          metering_label['description'])
 
-    @test.idempotent_id('cc832399-6681-493b-9d79-0202831a1281')
+    @decorators.idempotent_id('cc832399-6681-493b-9d79-0202831a1281')
     def test_list_metering_label_rules(self):
         # Verify rule filtering
         body = self.admin_client.list_metering_label_rules(id=33)
         metering_label_rules = body['metering_label_rules']
         self.assertEqual(0, len(metering_label_rules))
 
-    @test.idempotent_id('f4d547cd-3aee-408f-bf36-454f8825e045')
+    @decorators.idempotent_id('f4d547cd-3aee-408f-bf36-454f8825e045')
     def test_create_delete_metering_label_rule_with_filters(self):
         # Creates a rule
         remote_ip_prefix = ("10.0.1.0/24" if self._ip_version == 4
@@ -132,7 +133,7 @@
                  id=metering_label_rule['id']))
         self.assertEqual(len(rules['metering_label_rules']), 1)
 
-    @test.idempotent_id('b7354489-96ea-41f3-9452-bace120fb4a7')
+    @decorators.idempotent_id('b7354489-96ea-41f3-9452-bace120fb4a7')
     def test_show_metering_label_rule(self):
         # Verifies the details of a rule
         body = (self.admin_client.show_metering_label_rule(
diff --git a/neutron/tests/tempest/api/test_metering_negative.py b/neutron/tests/tempest/api/test_metering_negative.py
index dece9e4..87d7f93 100644
--- a/neutron/tests/tempest/api/test_metering_negative.py
+++ b/neutron/tests/tempest/api/test_metering_negative.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from neutron_lib.db import constants as db_const
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -29,7 +30,7 @@
         super(MeteringNegativeTestJSON, cls).resource_setup()
 
     @test.attr(type='negative')
-    @test.idempotent_id('8b3f7c84-9d37-4771-8681-bfd2c07f3c2d')
+    @decorators.idempotent_id('8b3f7c84-9d37-4771-8681-bfd2c07f3c2d')
     def test_create_metering_label_with_too_long_name(self):
         self.assertRaises(lib_exc.BadRequest,
                           self.admin_client.create_metering_label,
diff --git a/neutron/tests/tempest/api/test_network_ip_availability.py b/neutron/tests/tempest/api/test_network_ip_availability.py
index b3f2182..416c38e 100644
--- a/neutron/tests/tempest/api/test_network_ip_availability.py
+++ b/neutron/tests/tempest/api/test_network_ip_availability.py
@@ -17,6 +17,7 @@
 
 from tempest.lib.common.utils import data_utils
 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
 
@@ -108,7 +109,7 @@
 
 class NetworksIpAvailabilityIPv4Test(NetworksIpAvailabilityTest):
 
-    @test.idempotent_id('0f33cc8c-1bf6-47d1-9ce1-010618240599')
+    @decorators.idempotent_id('0f33cc8c-1bf6-47d1-9ce1-010618240599')
     def test_admin_network_availability_before_subnet(self):
         net_name = data_utils.rand_name('network-')
         network = self.create_network(network_name=net_name)
@@ -116,7 +117,7 @@
         net_availability = self.admin_client.list_network_ip_availabilities()
         self._assert_total_and_used_ips(0, 0, network, net_availability)
 
-    @test.idempotent_id('3aecd3b2-16ed-4b87-a54a-91d7b3c2986b')
+    @decorators.idempotent_id('3aecd3b2-16ed-4b87-a54a-91d7b3c2986b')
     def test_net_ip_availability_after_subnet_and_ports(self):
         net_name = data_utils.rand_name('network-')
         network = self.create_network(network_name=net_name)
@@ -135,7 +136,7 @@
             calc_total_ips(prefix, self._ip_version),
             network, net_availability)
 
-    @test.idempotent_id('9f11254d-757b-492e-b14b-f52144e4ee7b')
+    @decorators.idempotent_id('9f11254d-757b-492e-b14b-f52144e4ee7b')
     def test_net_ip_availability_after_port_delete(self):
         net_name = data_utils.rand_name('network-')
         network = self.create_network(network_name=net_name)
diff --git a/neutron/tests/tempest/api/test_network_ip_availability_negative.py b/neutron/tests/tempest/api/test_network_ip_availability_negative.py
index 094f393..bb95ed0 100644
--- a/neutron/tests/tempest/api/test_network_ip_availability_negative.py
+++ b/neutron/tests/tempest/api/test_network_ip_availability_negative.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from oslo_utils import uuidutils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -22,7 +23,7 @@
 class NetworksIpAvailabilityNegativeTest(net_ip.NetworksIpAvailabilityTest):
 
     @test.attr(type='negative')
-    @test.idempotent_id('3b8693eb-6c57-4ea1-ab84-3730c9ee9c84')
+    @decorators.idempotent_id('3b8693eb-6c57-4ea1-ab84-3730c9ee9c84')
     def test_network_availability_nonexistent_network_id(self):
         self.assertRaises(lib_exc.NotFound,
                           self.admin_client.show_network_ip_availability,
diff --git a/neutron/tests/tempest/api/test_networks.py b/neutron/tests/tempest/api/test_networks.py
index df61ee7..0b39569 100644
--- a/neutron/tests/tempest/api/test_networks.py
+++ b/neutron/tests/tempest/api/test_networks.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -36,7 +37,7 @@
         super(NetworksTestJSON, cls).resource_setup()
         cls.network = cls.create_network()
 
-    @test.idempotent_id('2bf13842-c93f-4a69-83ed-717d2ec3b44e')
+    @decorators.idempotent_id('2bf13842-c93f-4a69-83ed-717d2ec3b44e')
     def test_show_network(self):
         # Verify the details of a network
         body = self.client.show_network(self.network['id'])
@@ -51,7 +52,7 @@
         if test.is_extension_enabled('project-id', 'network'):
             self.assertEqual(project_id, network['project_id'])
 
-    @test.idempotent_id('26f2b7a5-2cd1-4f3a-b11f-ad259b099b11')
+    @decorators.idempotent_id('26f2b7a5-2cd1-4f3a-b11f-ad259b099b11')
     @test.requires_ext(extension="project-id", service="network")
     def test_show_network_fields_keystone_v3(self):
 
@@ -70,7 +71,7 @@
         _check_show_network_fields(['project_id'], True, False)
         _check_show_network_fields(['project_id', 'tenant_id'], True, True)
 
-    @test.idempotent_id('0cc0552f-afaf-4231-b7a7-c2a1774616da')
+    @decorators.idempotent_id('0cc0552f-afaf-4231-b7a7-c2a1774616da')
     @test.requires_ext(extension="project-id", service="network")
     def test_create_network_keystone_v3(self):
         project_id = self.client.tenant_id
@@ -91,7 +92,7 @@
         self.assertEqual(project_id, new_net['project_id'])
         self.assertEqual(project_id, new_net['tenant_id'])
 
-    @test.idempotent_id('94e2a44c-3367-4253-8c2a-22deaf59e96c')
+    @decorators.idempotent_id('94e2a44c-3367-4253-8c2a-22deaf59e96c')
     @test.requires_ext(extension="dns-integration",
                        service="network")
     def test_create_update_network_dns_domain(self):
@@ -107,7 +108,7 @@
         body = self.client.show_network(net_id)['network']
         self.assertEqual(domain2, body['dns_domain'])
 
-    @test.idempotent_id('a23186b9-aa6f-4b08-b877-35ca3b9cd54c')
+    @decorators.idempotent_id('a23186b9-aa6f-4b08-b877-35ca3b9cd54c')
     @test.requires_ext(extension="project-id", service="network")
     def test_list_networks_fields_keystone_v3(self):
         def _check_list_networks_fields(fields, expect_project_id,
@@ -140,42 +141,42 @@
         for name in cls.resource_names:
             cls.create_network(network_name=name)
 
-    @test.idempotent_id('de27d34a-bd9d-4516-83d6-81ef723f7d0d')
+    @decorators.idempotent_id('de27d34a-bd9d-4516-83d6-81ef723f7d0d')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('e767a160-59f9-4c4b-8dc1-72124a68640a')
+    @decorators.idempotent_id('e767a160-59f9-4c4b-8dc1-72124a68640a')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('71389852-f57b-49f2-b109-77b705e9e8af')
+    @decorators.idempotent_id('71389852-f57b-49f2-b109-77b705e9e8af')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('b7e153d2-37c3-48d4-8390-ec13498fee3d')
+    @decorators.idempotent_id('b7e153d2-37c3-48d4-8390-ec13498fee3d')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('8a9c89df-0ee7-4c0d-8f1d-ec8f27cf362f')
+    @decorators.idempotent_id('8a9c89df-0ee7-4c0d-8f1d-ec8f27cf362f')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('79a52810-2156-4ab6-b577-9e46e58d4b58')
+    @decorators.idempotent_id('79a52810-2156-4ab6-b577-9e46e58d4b58')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('36a4671f-a542-442f-bc44-a8873ee778d1')
+    @decorators.idempotent_id('36a4671f-a542-442f-bc44-a8873ee778d1')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('13eb066c-aa90-406d-b4c3-39595bf8f910')
+    @decorators.idempotent_id('13eb066c-aa90-406d-b4c3-39595bf8f910')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
 
-    @test.idempotent_id('f1867fc5-e1d6-431f-bc9f-8b882e43a7f9')
+    @decorators.idempotent_id('f1867fc5-e1d6-431f-bc9f-8b882e43a7f9')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
 
-    @test.idempotent_id('3574ec9b-a8b8-43e3-9c11-98f5875df6a9')
+    @decorators.idempotent_id('3574ec9b-a8b8-43e3-9c11-98f5875df6a9')
     def test_list_validation_filters(self):
         self._test_list_validation_filters()
diff --git a/neutron/tests/tempest/api/test_networks_negative.py b/neutron/tests/tempest/api/test_networks_negative.py
index 87da1b8..249ef5f 100644
--- a/neutron/tests/tempest/api/test_networks_negative.py
+++ b/neutron/tests/tempest/api/test_networks_negative.py
@@ -10,6 +10,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 import testtools
@@ -26,7 +27,7 @@
         cls.subnet = cls.create_subnet(cls.network)
 
     @test.attr(type='negative')
-    @test.idempotent_id('9f80f25b-5d1b-4f26-9f6b-774b9b270819')
+    @decorators.idempotent_id('9f80f25b-5d1b-4f26-9f6b-774b9b270819')
     def test_delete_network_in_use(self):
         port = self.client.create_port(network_id=self.network['id'])
         self.addCleanup(self.client.delete_port, port['port']['id'])
diff --git a/neutron/tests/tempest/api/test_ports.py b/neutron/tests/tempest/api/test_ports.py
index 034f07e..8d8468c 100644
--- a/neutron/tests/tempest/api/test_ports.py
+++ b/neutron/tests/tempest/api/test_ports.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -42,7 +43,7 @@
         self.assertTrue(dns_assignment['fqdn'].startswith(hostname))
         self.assertEqual(ip, dns_assignment['ip_address'])
 
-    @test.idempotent_id('c72c1c0c-2193-4aca-bbb4-b1442640bbbb')
+    @decorators.idempotent_id('c72c1c0c-2193-4aca-bbb4-b1442640bbbb')
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
     def test_create_update_port_description(self):
@@ -57,7 +58,7 @@
         body = self.client.list_ports(id=body['port']['id'])['ports'][0]
         self.assertEqual('d2', body['description'])
 
-    @test.idempotent_id('539fbefe-fb36-48aa-9a53-8c5fbd44e492')
+    @decorators.idempotent_id('539fbefe-fb36-48aa-9a53-8c5fbd44e492')
     @test.requires_ext(extension="dns-integration",
                        service="network")
     def test_create_update_port_with_dns_name(self):
@@ -78,7 +79,7 @@
         self.assertEqual('d2', body['dns_name'])
         self._confirm_dns_assignment(body)
 
-    @test.idempotent_id('435e89df-a8bb-4b41-801a-9f20d362d777')
+    @decorators.idempotent_id('435e89df-a8bb-4b41-801a-9f20d362d777')
     @test.requires_ext(extension="dns-integration",
                        service="network")
     def test_create_update_port_with_no_dns_name(self):
@@ -90,14 +91,14 @@
         self.assertFalse(port_body['port']['dns_name'])
         self._confirm_dns_assignment(port_body['port'])
 
-    @test.idempotent_id('c72c1c0c-2193-4aca-bbb4-b1442640c123')
+    @decorators.idempotent_id('c72c1c0c-2193-4aca-bbb4-b1442640c123')
     def test_change_dhcp_flag_then_create_port(self):
         s = self.create_subnet(self.network, enable_dhcp=False)
         self.create_port(self.network)
         self.client.update_subnet(s['id'], enable_dhcp=True)
         self.create_port(self.network)
 
-    @test.idempotent_id('1d6d8683-8691-43c6-a7ba-c69723258726')
+    @decorators.idempotent_id('1d6d8683-8691-43c6-a7ba-c69723258726')
     def test_add_ips_to_port(self):
         s = self.create_subnet(self.network)
         port = self.create_port(self.network)
@@ -121,38 +122,38 @@
         for name in cls.resource_names:
             cls.create_port(net, name=name)
 
-    @test.idempotent_id('9ab73df4-960a-4ae3-87d3-60992b8d3e2d')
+    @decorators.idempotent_id('9ab73df4-960a-4ae3-87d3-60992b8d3e2d')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('b426671d-7270-430f-82ff-8f33eec93010')
+    @decorators.idempotent_id('b426671d-7270-430f-82ff-8f33eec93010')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('a202fdc8-6616-45df-b6a0-463932de6f94')
+    @decorators.idempotent_id('a202fdc8-6616-45df-b6a0-463932de6f94')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('f4723b8e-8186-4b9a-bf9e-57519967e048')
+    @decorators.idempotent_id('f4723b8e-8186-4b9a-bf9e-57519967e048')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('fcd02a7a-f07e-4d5e-b0ca-b58e48927a9b')
+    @decorators.idempotent_id('fcd02a7a-f07e-4d5e-b0ca-b58e48927a9b')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('3afe7024-77ab-4cfe-824b-0b2bf4217727')
+    @decorators.idempotent_id('3afe7024-77ab-4cfe-824b-0b2bf4217727')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
 
-    @test.idempotent_id('b8857391-dc44-40cc-89b7-2800402e03ce')
+    @decorators.idempotent_id('b8857391-dc44-40cc-89b7-2800402e03ce')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('4e51e9c9-ceae-4ec0-afd4-147569247699')
+    @decorators.idempotent_id('4e51e9c9-ceae-4ec0-afd4-147569247699')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('74293e59-d794-4a93-be09-38667199ef68')
+    @decorators.idempotent_id('74293e59-d794-4a93-be09-38667199ef68')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron/tests/tempest/api/test_qos.py
index 395bda0..4f03557 100644
--- a/neutron/tests/tempest/api/test_qos.py
+++ b/neutron/tests/tempest/api/test_qos.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest.lib import exceptions
 from tempest import test
 
@@ -28,7 +29,7 @@
     def resource_setup(cls):
         super(QosTestJSON, cls).resource_setup()
 
-    @test.idempotent_id('108fbdf7-3463-4e47-9871-d07f3dcf5bbb')
+    @decorators.idempotent_id('108fbdf7-3463-4e47-9871-d07f3dcf5bbb')
     def test_create_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy desc1',
@@ -46,7 +47,7 @@
         policies_ids = [p['id'] for p in policies]
         self.assertIn(policy['id'], policies_ids)
 
-    @test.idempotent_id('606a48e2-5403-4052-b40f-4d54b855af76')
+    @decorators.idempotent_id('606a48e2-5403-4052-b40f-4d54b855af76')
     @test.requires_ext(extension="project-id", service="network")
     def test_show_policy_has_project_id(self):
         policy = self.create_qos_policy(name='test-policy', shared=False)
@@ -59,7 +60,7 @@
         self.assertEqual(self.admin_client.tenant_id,
                          show_policy['tenant_id'])
 
-    @test.idempotent_id('f8d20e92-f06d-4805-b54f-230f77715815')
+    @decorators.idempotent_id('f8d20e92-f06d-4805-b54f-230f77715815')
     def test_list_policy_filter_by_name(self):
         self.create_qos_policy(name='test', description='test policy',
                                shared=False)
@@ -73,7 +74,7 @@
         retrieved_policy = policies[0]
         self.assertEqual('test', retrieved_policy['name'])
 
-    @test.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
+    @decorators.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
     def test_policy_update(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='',
@@ -88,7 +89,7 @@
         self.assertTrue(retrieved_policy['shared'])
         self.assertEqual([], retrieved_policy['rules'])
 
-    @test.idempotent_id('6e880e0f-bbfc-4e54-87c6-680f90e1b618')
+    @decorators.idempotent_id('6e880e0f-bbfc-4e54-87c6-680f90e1b618')
     def test_policy_update_forbidden_for_regular_tenants_own_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='',
@@ -99,7 +100,7 @@
             self.client.update_qos_policy,
             policy['id'], description='test policy')
 
-    @test.idempotent_id('4ecfd7e7-47b6-4702-be38-be9235901a87')
+    @decorators.idempotent_id('4ecfd7e7-47b6-4702-be38-be9235901a87')
     def test_policy_update_forbidden_for_regular_tenants_foreign_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='',
@@ -110,7 +111,7 @@
             self.client.update_qos_policy,
             policy['id'], description='test policy')
 
-    @test.idempotent_id('ee263db4-009a-4641-83e5-d0e83506ba4c')
+    @decorators.idempotent_id('ee263db4-009a-4641-83e5-d0e83506ba4c')
     def test_shared_policy_update(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='',
@@ -128,7 +129,7 @@
         retrieved_policy = retrieved_policy['policy']
         self.assertFalse(retrieved_policy['shared'])
 
-    @test.idempotent_id('1cb42653-54bd-4a9a-b888-c55e18199201')
+    @decorators.idempotent_id('1cb42653-54bd-4a9a-b888-c55e18199201')
     def test_delete_policy(self):
         policy = self.admin_client.create_qos_policy(
             'test-policy', 'desc', True)['policy']
@@ -141,11 +142,11 @@
         self.assertRaises(exceptions.NotFound,
                           self.admin_client.show_qos_policy, policy['id'])
 
-    @test.idempotent_id('cf776f77-8d3d-49f2-8572-12d6a1557224')
+    @decorators.idempotent_id('cf776f77-8d3d-49f2-8572-12d6a1557224')
     def test_list_admin_rule_types(self):
         self._test_list_rule_types(self.admin_client)
 
-    @test.idempotent_id('49c8ea35-83a9-453a-bd23-239cf3b13929')
+    @decorators.idempotent_id('49c8ea35-83a9-453a-bd23-239cf3b13929')
     def test_list_regular_rule_types(self):
         self._test_list_rule_types(self.client)
 
@@ -180,7 +181,7 @@
         updated_network = self.admin_client.show_network(network_id)
         self.assertIsNone(updated_network['network']['qos_policy_id'])
 
-    @test.idempotent_id('65b9ef75-1911-406a-bbdb-ca1d68d528b0')
+    @decorators.idempotent_id('65b9ef75-1911-406a-bbdb-ca1d68d528b0')
     def test_policy_association_with_admin_network(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -194,7 +195,7 @@
 
         self._disassociate_network(self.admin_client, network['id'])
 
-    @test.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
+    @decorators.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
     def test_policy_association_with_tenant_network(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -208,7 +209,7 @@
 
         self._disassociate_network(self.client, network['id'])
 
-    @test.idempotent_id('9efe63d0-836f-4cc2-b00c-468e63aa614e')
+    @decorators.idempotent_id('9efe63d0-836f-4cc2-b00c-468e63aa614e')
     def test_policy_association_with_network_nonexistent_policy(self):
         self.assertRaises(
             exceptions.NotFound,
@@ -216,7 +217,7 @@
             'test network',
             qos_policy_id='9efe63d0-836f-4cc2-b00c-468e63aa614e')
 
-    @test.idempotent_id('1aa55a79-324f-47d9-a076-894a8fc2448b')
+    @decorators.idempotent_id('1aa55a79-324f-47d9-a076-894a8fc2448b')
     def test_policy_association_with_network_non_shared_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -226,7 +227,7 @@
             self.create_network,
             'test network', qos_policy_id=policy['id'])
 
-    @test.idempotent_id('09a9392c-1359-4cbb-989f-fb768e5834a8')
+    @decorators.idempotent_id('09a9392c-1359-4cbb-989f-fb768e5834a8')
     def test_policy_update_association_with_admin_network(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -248,7 +249,7 @@
         updated_port = self.admin_client.show_port(port_id)
         self.assertIsNone(updated_port['port']['qos_policy_id'])
 
-    @test.idempotent_id('98fcd95e-84cf-4746-860e-44692e674f2e')
+    @decorators.idempotent_id('98fcd95e-84cf-4746-860e-44692e674f2e')
     def test_policy_association_with_port_shared_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -262,7 +263,7 @@
 
         self._disassociate_port(port['id'])
 
-    @test.idempotent_id('49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
+    @decorators.idempotent_id('49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
     def test_policy_association_with_port_nonexistent_policy(self):
         network = self.create_shared_network('test network')
         self.assertRaises(
@@ -271,7 +272,7 @@
             network,
             qos_policy_id='49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
 
-    @test.idempotent_id('f53d961c-9fe5-4422-8b66-7add972c6031')
+    @decorators.idempotent_id('f53d961c-9fe5-4422-8b66-7add972c6031')
     def test_policy_association_with_port_non_shared_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -282,7 +283,7 @@
             self.create_port,
             network, qos_policy_id=policy['id'])
 
-    @test.idempotent_id('f8163237-fba9-4db5-9526-bad6d2343c76')
+    @decorators.idempotent_id('f8163237-fba9-4db5-9526-bad6d2343c76')
     def test_policy_update_association_with_port_shared_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -299,7 +300,7 @@
 
         self._disassociate_port(port['id'])
 
-    @test.idempotent_id('18163237-8ba9-4db5-9525-bad6d2343c75')
+    @decorators.idempotent_id('18163237-8ba9-4db5-9525-bad6d2343c75')
     def test_delete_not_allowed_if_policy_in_use_by_network(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -313,7 +314,7 @@
         self._disassociate_network(self.admin_client, network['id'])
         self.admin_client.delete_qos_policy(policy['id'])
 
-    @test.idempotent_id('24153230-84a9-4dd5-9525-bad6d2343c75')
+    @decorators.idempotent_id('24153230-84a9-4dd5-9525-bad6d2343c75')
     def test_delete_not_allowed_if_policy_in_use_by_port(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -327,7 +328,7 @@
         self._disassociate_port(port['id'])
         self.admin_client.delete_qos_policy(policy['id'])
 
-    @test.idempotent_id('a2a5849b-dd06-4b18-9664-0b6828a1fc27')
+    @decorators.idempotent_id('a2a5849b-dd06-4b18-9664-0b6828a1fc27')
     def test_qos_policy_delete_with_rules(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -340,7 +341,7 @@
         with testtools.ExpectedException(exceptions.NotFound):
             self.admin_client.show_qos_policy(policy['id'])
 
-    @test.idempotent_id('fb384bde-a973-41c3-a542-6f77a092155f')
+    @decorators.idempotent_id('fb384bde-a973-41c3-a542-6f77a092155f')
     def test_get_policy_that_is_shared(self):
         policy = self.create_qos_policy(
             name='test-policy-shared',
@@ -350,7 +351,7 @@
         obtained_policy = self.client.show_qos_policy(policy['id'])['policy']
         self.assertEqual(obtained_policy, policy)
 
-    @test.idempotent_id('aed8e2a6-22da-421b-89b9-935a2c1a1b50')
+    @decorators.idempotent_id('aed8e2a6-22da-421b-89b9-935a2c1a1b50')
     def test_policy_create_forbidden_for_regular_tenants(self):
         self.assertRaises(
             exceptions.Forbidden,
@@ -365,7 +366,7 @@
     def resource_setup(cls):
         super(QosBandwidthLimitRuleTestJSON, cls).resource_setup()
 
-    @test.idempotent_id('8a59b00b-3e9c-4787-92f8-93a5cdf5e378')
+    @decorators.idempotent_id('8a59b00b-3e9c-4787-92f8-93a5cdf5e378')
     def test_rule_create(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -396,7 +397,7 @@
         self.assertEqual(qos_consts.RULE_TYPE_BANDWIDTH_LIMIT,
                          policy_rules[0]['type'])
 
-    @test.idempotent_id('8a59b00b-ab01-4787-92f8-93a5cdf5e378')
+    @decorators.idempotent_id('8a59b00b-ab01-4787-92f8-93a5cdf5e378')
     def test_rule_create_fail_for_the_same_type(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -410,7 +411,7 @@
                           policy_id=policy['id'],
                           max_kbps=201, max_burst_kbps=1338)
 
-    @test.idempotent_id('149a6988-2568-47d2-931e-2dbc858943b3')
+    @decorators.idempotent_id('149a6988-2568-47d2-931e-2dbc858943b3')
     def test_rule_update(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -430,7 +431,7 @@
         self.assertEqual(200, retrieved_policy['max_kbps'])
         self.assertEqual(1337, retrieved_policy['max_burst_kbps'])
 
-    @test.idempotent_id('67ee6efd-7b33-4a68-927d-275b4f8ba958')
+    @decorators.idempotent_id('67ee6efd-7b33-4a68-927d-275b4f8ba958')
     def test_rule_delete(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -448,21 +449,21 @@
                           self.admin_client.show_bandwidth_limit_rule,
                           policy['id'], rule['id'])
 
-    @test.idempotent_id('f211222c-5808-46cb-a961-983bbab6b852')
+    @decorators.idempotent_id('f211222c-5808-46cb-a961-983bbab6b852')
     def test_rule_create_rule_nonexistent_policy(self):
         self.assertRaises(
             exceptions.NotFound,
             self.create_qos_bandwidth_limit_rule,
             'policy', 200, 1337)
 
-    @test.idempotent_id('a4a2e7ad-786f-4927-a85a-e545a93bd274')
+    @decorators.idempotent_id('a4a2e7ad-786f-4927-a85a-e545a93bd274')
     def test_rule_create_forbidden_for_regular_tenants(self):
         self.assertRaises(
             exceptions.Forbidden,
             self.client.create_bandwidth_limit_rule,
             'policy', 1, 2)
 
-    @test.idempotent_id('1bfc55d9-6fd8-4293-ab3a-b1d69bf7cd2e')
+    @decorators.idempotent_id('1bfc55d9-6fd8-4293-ab3a-b1d69bf7cd2e')
     def test_rule_update_forbidden_for_regular_tenants_own_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -476,7 +477,7 @@
             self.client.update_bandwidth_limit_rule,
             policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
 
-    @test.idempotent_id('9a607936-4b6f-4c2f-ad21-bd5b3d4fc91f')
+    @decorators.idempotent_id('9a607936-4b6f-4c2f-ad21-bd5b3d4fc91f')
     def test_rule_update_forbidden_for_regular_tenants_foreign_policy(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -490,7 +491,7 @@
             self.client.update_bandwidth_limit_rule,
             policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
 
-    @test.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
+    @decorators.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
     def test_get_rules_by_policy(self):
         policy1 = self.create_qos_policy(name='test-policy1',
                                          description='test policy1',
@@ -555,7 +556,7 @@
 
         return net
 
-    @test.idempotent_id('b9dcf582-d3b3-11e5-950a-54ee756c66df')
+    @decorators.idempotent_id('b9dcf582-d3b3-11e5-950a-54ee756c66df')
     def test_policy_sharing_with_wildcard(self):
         qos_pol = self.create_qos_policy(
             name=data_utils.rand_name('test-policy'),
@@ -607,21 +608,21 @@
 
         return rbac_for_client_tenant, rbac_wildcard
 
-    @test.idempotent_id('328b1f70-d424-11e5-a57f-54ee756c66df')
+    @decorators.idempotent_id('328b1f70-d424-11e5-a57f-54ee756c66df')
     def test_net_bound_shared_policy_wildcard_and_tenant_id_wild_remove(self):
         client_rbac, wildcard_rbac = self._create_net_bound_qos_rbacs()
         # globally unshare the qos-policy, the specific share should remain
         self.admin_client.delete_rbac_policy(wildcard_rbac['id'])
         self.client.list_rbac_policies(id=client_rbac['id'])
 
-    @test.idempotent_id('1997b00c-0c75-4e43-8ce2-999f9fa555ee')
+    @decorators.idempotent_id('1997b00c-0c75-4e43-8ce2-999f9fa555ee')
     def test_net_bound_shared_policy_wildcard_and_tenant_id_wild_remains(self):
         client_rbac, wildcard_rbac = self._create_net_bound_qos_rbacs()
         # remove client_rbac policy the wildcard share should remain
         self.admin_client.delete_rbac_policy(client_rbac['id'])
         self.client.list_rbac_policies(id=wildcard_rbac['id'])
 
-    @test.idempotent_id('2ace9adc-da6e-11e5-aafe-54ee756c66df')
+    @decorators.idempotent_id('2ace9adc-da6e-11e5-aafe-54ee756c66df')
     def test_policy_sharing_with_wildcard_and_tenant_id(self):
         res = self._make_admin_policy_shared_to_tenant_id(
             self.client.tenant_id)
@@ -644,7 +645,7 @@
         self.assertIn(rbac,
                       self.admin_client.list_rbac_policies()['rbac_policies'])
 
-    @test.idempotent_id('9f85c76a-a350-11e5-8ae5-54ee756c66df')
+    @decorators.idempotent_id('9f85c76a-a350-11e5-8ae5-54ee756c66df')
     def test_policy_target_update(self):
         res = self._make_admin_policy_shared_to_tenant_id(
             self.client.tenant_id)
@@ -658,7 +659,7 @@
         update_res['rbac_policy'].pop('target_tenant')
         self.assertEqual(res['rbac_policy'], update_res['rbac_policy'])
 
-    @test.idempotent_id('a9b39f46-a350-11e5-97c7-54ee756c66df')
+    @decorators.idempotent_id('a9b39f46-a350-11e5-97c7-54ee756c66df')
     def test_network_presence_prevents_policy_rbac_policy_deletion(self):
         res = self._make_admin_policy_shared_to_tenant_id(
             self.client2.tenant_id)
@@ -686,7 +687,7 @@
             self.admin_client.update_rbac_policy(
                 wild['id'], target_tenant=self.client2.tenant_id)
 
-    @test.idempotent_id('b0fe87e8-a350-11e5-9f08-54ee756c66df')
+    @decorators.idempotent_id('b0fe87e8-a350-11e5-9f08-54ee756c66df')
     def test_regular_client_shares_to_another_regular_client(self):
         # owned by self.admin_client
         policy = self._create_qos_policy()
@@ -705,7 +706,7 @@
         self.assertNotIn(rbac_policy['id'], [p['id'] for p in
                           self.client2.list_rbac_policies()['rbac_policies']])
 
-    @test.idempotent_id('ba88d0ca-a350-11e5-a06f-54ee756c66df')
+    @decorators.idempotent_id('ba88d0ca-a350-11e5-a06f-54ee756c66df')
     def test_filter_fields(self):
         policy = self._create_qos_policy()
         self.admin_client.create_rbac_policy(
@@ -717,7 +718,7 @@
             res = self.admin_client.list_rbac_policies(fields=fields)
             self.assertEqual(set(fields), set(res['rbac_policies'][0].keys()))
 
-    @test.idempotent_id('c10d993a-a350-11e5-9c7a-54ee756c66df')
+    @decorators.idempotent_id('c10d993a-a350-11e5-9c7a-54ee756c66df')
     def test_rbac_policy_show(self):
         res = self._make_admin_policy_shared_to_tenant_id(
             self.client.tenant_id)
@@ -732,7 +733,7 @@
         self.assertEqual(
             p2, self.admin_client.show_rbac_policy(p2['id'])['rbac_policy'])
 
-    @test.idempotent_id('c7496f86-a350-11e5-b380-54ee756c66df')
+    @decorators.idempotent_id('c7496f86-a350-11e5-b380-54ee756c66df')
     def test_filter_rbac_policies(self):
         policy = self._create_qos_policy()
         rbac_pol1 = self.admin_client.create_rbac_policy(
@@ -752,7 +753,7 @@
         self.assertEqual(rbac_pol1['id'], res1[0]['id'])
         self.assertEqual(rbac_pol2['id'], res2[0]['id'])
 
-    @test.idempotent_id('cd7d755a-a350-11e5-a344-54ee756c66df')
+    @decorators.idempotent_id('cd7d755a-a350-11e5-a344-54ee756c66df')
     def test_regular_client_blocked_from_sharing_anothers_policy(self):
         qos_policy = self._make_admin_policy_shared_to_tenant_id(
             self.client.tenant_id)['policy']
@@ -777,7 +778,7 @@
     def resource_setup(cls):
         super(QosDscpMarkingRuleTestJSON, cls).resource_setup()
 
-    @test.idempotent_id('f5cbaceb-5829-497c-9c60-ad70969e9a08')
+    @decorators.idempotent_id('f5cbaceb-5829-497c-9c60-ad70969e9a08')
     def test_rule_create(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -806,7 +807,7 @@
         self.assertEqual(qos_consts.RULE_TYPE_DSCP_MARKING,
                          policy_rules[0]['type'])
 
-    @test.idempotent_id('08553ffe-030f-4037-b486-7e0b8fb9385a')
+    @decorators.idempotent_id('08553ffe-030f-4037-b486-7e0b8fb9385a')
     def test_rule_create_fail_for_the_same_type(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -819,7 +820,7 @@
                           policy_id=policy['id'],
                           dscp_mark=self.VALID_DSCP_MARK2)
 
-    @test.idempotent_id('76f632e5-3175-4408-9a32-3625e599c8a2')
+    @decorators.idempotent_id('76f632e5-3175-4408-9a32-3625e599c8a2')
     def test_rule_update(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -835,7 +836,7 @@
         retrieved_policy = retrieved_policy['dscp_marking_rule']
         self.assertEqual(self.VALID_DSCP_MARK2, retrieved_policy['dscp_mark'])
 
-    @test.idempotent_id('74f81904-c35f-48a3-adae-1f5424cb3c18')
+    @decorators.idempotent_id('74f81904-c35f-48a3-adae-1f5424cb3c18')
     def test_rule_delete(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -853,21 +854,21 @@
                           self.admin_client.show_dscp_marking_rule,
                           policy['id'], rule['id'])
 
-    @test.idempotent_id('9cb8ef5c-96fc-4978-9ee0-e3b02bab628a')
+    @decorators.idempotent_id('9cb8ef5c-96fc-4978-9ee0-e3b02bab628a')
     def test_rule_create_rule_nonexistent_policy(self):
         self.assertRaises(
             exceptions.NotFound,
             self.admin_client.create_dscp_marking_rule,
             'policy', self.VALID_DSCP_MARK1)
 
-    @test.idempotent_id('bf6002ea-29de-486f-b65d-08aea6d4c4e2')
+    @decorators.idempotent_id('bf6002ea-29de-486f-b65d-08aea6d4c4e2')
     def test_rule_create_forbidden_for_regular_tenants(self):
         self.assertRaises(
             exceptions.Forbidden,
             self.client.create_dscp_marking_rule,
             'policy', self.VALID_DSCP_MARK1)
 
-    @test.idempotent_id('33646b08-4f05-4493-a48a-bde768a18533')
+    @decorators.idempotent_id('33646b08-4f05-4493-a48a-bde768a18533')
     def test_invalid_rule_create(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -877,7 +878,7 @@
             self.admin_client.create_dscp_marking_rule,
             policy['id'], 58)
 
-    @test.idempotent_id('c565131d-4c80-4231-b0f3-9ae2be4de129')
+    @decorators.idempotent_id('c565131d-4c80-4231-b0f3-9ae2be4de129')
     def test_get_rules_by_policy(self):
         policy1 = self.create_qos_policy(name='test-policy1',
                                          description='test policy1',
@@ -911,7 +912,7 @@
     def resource_setup(cls):
         super(QosMinimumBandwidthRuleTestJSON, cls).resource_setup()
 
-    @test.idempotent_id('aa59b00b-3e9c-4787-92f8-93a5cdf5e378')
+    @decorators.idempotent_id('aa59b00b-3e9c-4787-92f8-93a5cdf5e378')
     def test_rule_create(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -943,7 +944,7 @@
         self.assertEqual(qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH,
                          policy_rules[0]['type'])
 
-    @test.idempotent_id('266d9b87-e51c-48bd-9aa7-8269573621be')
+    @decorators.idempotent_id('266d9b87-e51c-48bd-9aa7-8269573621be')
     def test_rule_create_fail_for_missing_min_kbps(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -953,7 +954,7 @@
                           policy_id=policy['id'],
                           direction=self.DIRECTION_EGRESS)
 
-    @test.idempotent_id('aa59b00b-ab01-4787-92f8-93a5cdf5e378')
+    @decorators.idempotent_id('aa59b00b-ab01-4787-92f8-93a5cdf5e378')
     def test_rule_create_fail_for_the_same_type(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -967,7 +968,7 @@
                           policy_id=policy['id'],
                           direction=self.DIRECTION_EGRESS, min_kbps=201)
 
-    @test.idempotent_id('d6fce764-e511-4fa6-9f86-f4b41cf142cf')
+    @decorators.idempotent_id('d6fce764-e511-4fa6-9f86-f4b41cf142cf')
     def test_rule_create_fail_for_direction_ingress(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -978,7 +979,7 @@
                           direction=self.DIRECTION_INGRESS,
                           min_kbps=201)
 
-    @test.idempotent_id('a49a6988-2568-47d2-931e-2dbc858943b3')
+    @decorators.idempotent_id('a49a6988-2568-47d2-931e-2dbc858943b3')
     def test_rule_update(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -997,7 +998,7 @@
         self.assertEqual(350, retrieved_policy['min_kbps'])
         self.assertEqual(self.DIRECTION_EGRESS, retrieved_policy['direction'])
 
-    @test.idempotent_id('a7ee6efd-7b33-4a68-927d-275b4f8ba958')
+    @decorators.idempotent_id('a7ee6efd-7b33-4a68-927d-275b4f8ba958')
     def test_rule_delete(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
@@ -1016,21 +1017,21 @@
                           self.admin_client.show_minimum_bandwidth_rule,
                           policy['id'], rule['id'])
 
-    @test.idempotent_id('a211222c-5808-46cb-a961-983bbab6b852')
+    @decorators.idempotent_id('a211222c-5808-46cb-a961-983bbab6b852')
     def test_rule_create_rule_nonexistent_policy(self):
         self.assertRaises(
             exceptions.NotFound,
             self.admin_client.create_minimum_bandwidth_rule,
             'policy', self.DIRECTION_EGRESS, min_kbps=200)
 
-    @test.idempotent_id('b4a2e7ad-786f-4927-a85a-e545a93bd274')
+    @decorators.idempotent_id('b4a2e7ad-786f-4927-a85a-e545a93bd274')
     def test_rule_create_forbidden_for_regular_tenants(self):
         self.assertRaises(
             exceptions.Forbidden,
             self.client.create_minimum_bandwidth_rule,
             'policy', self.DIRECTION_EGRESS, min_kbps=300)
 
-    @test.idempotent_id('de0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
+    @decorators.idempotent_id('de0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
     def test_get_rules_by_policy(self):
         policy1 = self.create_qos_policy(name='test-policy1',
                                          description='test policy1',
@@ -1074,38 +1075,38 @@
             cls.create_qos_policy(
                 name=name, description='search-criteria-test')
 
-    @test.idempotent_id('55fc0103-fdc1-4d34-ab62-c579bb739a91')
+    @decorators.idempotent_id('55fc0103-fdc1-4d34-ab62-c579bb739a91')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('13e08ac3-bfed-426b-892a-b3b158560c23')
+    @decorators.idempotent_id('13e08ac3-bfed-426b-892a-b3b158560c23')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('719e61cc-e33c-4918-aa4d-1a791e6e0e86')
+    @decorators.idempotent_id('719e61cc-e33c-4918-aa4d-1a791e6e0e86')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('3bd8fb58-c0f8-4954-87fb-f286e1eb096a')
+    @decorators.idempotent_id('3bd8fb58-c0f8-4954-87fb-f286e1eb096a')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('3bad0747-8082-46e9-be4d-c428a842db41')
+    @decorators.idempotent_id('3bad0747-8082-46e9-be4d-c428a842db41')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('d6a8bacd-d5e8-4ef3-bc55-23ca6998d208')
+    @decorators.idempotent_id('d6a8bacd-d5e8-4ef3-bc55-23ca6998d208')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('0b9aecdc-2b27-421b-b104-53d24e905ae8')
+    @decorators.idempotent_id('0b9aecdc-2b27-421b-b104-53d24e905ae8')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('1a3dc257-dafd-4870-8c71-639ae7ddc6ea')
+    @decorators.idempotent_id('1a3dc257-dafd-4870-8c71-639ae7ddc6ea')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
 
-    @test.idempotent_id('40e09b53-4eb8-4526-9181-d438c8005a20')
+    @decorators.idempotent_id('40e09b53-4eb8-4526-9181-d438c8005a20')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
diff --git a/neutron/tests/tempest/api/test_qos_negative.py b/neutron/tests/tempest/api/test_qos_negative.py
index 5057c72..05a5512 100644
--- a/neutron/tests/tempest/api/test_qos_negative.py
+++ b/neutron/tests/tempest/api/test_qos_negative.py
@@ -11,6 +11,7 @@
 #    under the License.
 
 from neutron_lib.db import constants as db_const
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -28,21 +29,21 @@
         super(QosNegativeTestJSON, cls).resource_setup()
 
     @test.attr(type='negative')
-    @test.idempotent_id('b9dce555-d3b3-11e5-950a-54ee757c77da')
+    @decorators.idempotent_id('b9dce555-d3b3-11e5-950a-54ee757c77da')
     def test_add_policy_with_too_long_name(self):
         self.assertRaises(lib_exc.BadRequest,
                           self.client.create_qos_policy,
                           LONG_NAME_NG, 'test policy desc1', False)
 
     @test.attr(type='negative')
-    @test.idempotent_id('b9dce444-d3b3-11e5-950a-54ee747c99db')
+    @decorators.idempotent_id('b9dce444-d3b3-11e5-950a-54ee747c99db')
     def test_add_policy_with_too_long_description(self):
         self.assertRaises(lib_exc.BadRequest,
                           self.client.create_qos_policy,
                           'test-policy', LONG_DESCRIPTION_NG, False)
 
     @test.attr(type='negative')
-    @test.idempotent_id('b9dce444-d3b3-11e5-950a-54ee757c77dc')
+    @decorators.idempotent_id('b9dce444-d3b3-11e5-950a-54ee757c77dc')
     def test_add_policy_with_too_long_tenant_id(self):
         self.assertRaises(lib_exc.BadRequest,
                           self.client.create_qos_policy,
diff --git a/neutron/tests/tempest/api/test_revisions.py b/neutron/tests/tempest/api/test_revisions.py
index 1da4493..2e06c7c 100644
--- a/neutron/tests/tempest/api/test_revisions.py
+++ b/neutron/tests/tempest/api/test_revisions.py
@@ -12,6 +12,7 @@
 
 import netaddr
 
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -26,7 +27,7 @@
     def skip_checks(cls):
         super(TestRevisions, cls).skip_checks()
 
-    @test.idempotent_id('4a26a4be-9c53-483c-bc50-b53f1db10ac6')
+    @decorators.idempotent_id('4a26a4be-9c53-483c-bc50-b53f1db10ac6')
     def test_update_network_bumps_revision(self):
         net = self.create_network()
         self.assertIn('revision_number', net)
@@ -34,7 +35,7 @@
         self.assertGreater(updated['network']['revision_number'],
                            net['revision_number'])
 
-    @test.idempotent_id('cac7ecde-12d5-4331-9a03-420899dea077')
+    @decorators.idempotent_id('cac7ecde-12d5-4331-9a03-420899dea077')
     def test_update_port_bumps_revision(self):
         net = self.create_network()
         port = self.create_port(net)
@@ -43,7 +44,7 @@
         self.assertGreater(updated['port']['revision_number'],
                            port['revision_number'])
 
-    @test.idempotent_id('c1c4fa41-8e89-44d0-9bfc-409f3b66dc57')
+    @decorators.idempotent_id('c1c4fa41-8e89-44d0-9bfc-409f3b66dc57')
     def test_update_subnet_bumps_revision(self):
         net = self.create_network()
         subnet = self.create_subnet(net)
@@ -52,7 +53,7 @@
         self.assertGreater(updated['subnet']['revision_number'],
                            subnet['revision_number'])
 
-    @test.idempotent_id('e8c5d7db-2b8d-4615-a476-6e537437c4f2')
+    @decorators.idempotent_id('e8c5d7db-2b8d-4615-a476-6e537437c4f2')
     def test_update_subnetpool_bumps_revision(self):
         sp = self.create_subnetpool('subnetpool', default_prefixlen=24,
                                     prefixes=['10.0.0.0/8'])
@@ -61,7 +62,7 @@
         self.assertGreater(updated['subnetpool']['revision_number'],
                            sp['revision_number'])
 
-    @test.idempotent_id('e8c5d7db-2b8d-4567-a326-6e123437c4d1')
+    @decorators.idempotent_id('e8c5d7db-2b8d-4567-a326-6e123437c4d1')
     def test_update_subnet_bumps_network_revision(self):
         net = self.create_network()
         subnet = self.create_subnet(net)
@@ -73,7 +74,7 @@
         self.assertGreater(updated2['network']['revision_number'],
                            updated['network']['revision_number'])
 
-    @test.idempotent_id('6c256f71-c929-4200-b3dc-4e1843506be5')
+    @decorators.idempotent_id('6c256f71-c929-4200-b3dc-4e1843506be5')
     @test.requires_ext(extension="security-group", service="network")
     def test_update_sg_group_bumps_revision(self):
         sg, name = self._create_security_group()
@@ -83,7 +84,7 @@
         self.assertGreater(update_body['security_group']['revision_number'],
                            sg['security_group']['revision_number'])
 
-    @test.idempotent_id('6489632f-8550-4453-a674-c98849742967')
+    @decorators.idempotent_id('6489632f-8550-4453-a674-c98849742967')
     @test.requires_ext(extension="security-group", service="network")
     def test_update_port_sg_binding_bumps_revision(self):
         net = self.create_network()
@@ -98,7 +99,7 @@
         self.assertGreater(updated2['port']['revision_number'],
                            updated['port']['revision_number'])
 
-    @test.idempotent_id('29c7ab2b-d1d8-425d-8cec-fcf632960f22')
+    @decorators.idempotent_id('29c7ab2b-d1d8-425d-8cec-fcf632960f22')
     @test.requires_ext(extension="security-group", service="network")
     def test_update_sg_rule_bumps_sg_revision(self):
         sg, name = self._create_security_group()
@@ -115,7 +116,7 @@
         self.assertGreater(updated2['security_group']['revision_number'],
                            updated['security_group']['revision_number'])
 
-    @test.idempotent_id('db70c285-0365-4fac-9f55-2a0ad8cf55a8')
+    @decorators.idempotent_id('db70c285-0365-4fac-9f55-2a0ad8cf55a8')
     @test.requires_ext(extension="allowed-address-pairs", service="network")
     def test_update_allowed_address_pairs_bumps_revision(self):
         net = self.create_network()
@@ -129,7 +130,7 @@
         self.assertGreater(updated2['port']['revision_number'],
                            updated['port']['revision_number'])
 
-    @test.idempotent_id('a21ec3b4-3569-4b77-bf29-4177edaa2df5')
+    @decorators.idempotent_id('a21ec3b4-3569-4b77-bf29-4177edaa2df5')
     @test.requires_ext(extension="extra_dhcp_opt", service="network")
     def test_update_extra_dhcp_opt_bumps_revision(self):
         net = self.create_network()
@@ -144,7 +145,7 @@
         self.assertGreater(updated2['port']['revision_number'],
                            updated['port']['revision_number'])
 
-    @test.idempotent_id('40ba648f-f374-4c29-a5b7-489dd5a38a4e')
+    @decorators.idempotent_id('40ba648f-f374-4c29-a5b7-489dd5a38a4e')
     @test.requires_ext(extension="dns-integration", service="network")
     def test_update_dns_domain_bumps_revision(self):
         net = self.create_network(dns_domain='example.test.')
@@ -161,7 +162,7 @@
         self.assertGreater(updated2['port']['revision_number'],
                            updated['port']['revision_number'])
 
-    @test.idempotent_id('8482324f-cf59-4d73-b98e-d37119255300')
+    @decorators.idempotent_id('8482324f-cf59-4d73-b98e-d37119255300')
     @test.requires_ext(extension="router", service="network")
     @test.requires_ext(extension="extraroute", service="network")
     def test_update_router_extra_routes_bumps_revision(self):
@@ -178,7 +179,7 @@
         self.assertGreater(updated2['router']['revision_number'],
                            updated['router']['revision_number'])
 
-    @test.idempotent_id('6bd18702-e25a-4b4b-8c0c-680113533511')
+    @decorators.idempotent_id('6bd18702-e25a-4b4b-8c0c-680113533511')
     @test.requires_ext(extension="subnet-service-types", service="network")
     def test_update_subnet_service_types_bumps_revisions(self):
         subnet = self.create_subnet(self.create_network())
@@ -191,7 +192,7 @@
         self.assertGreater(updated2['subnet']['revision_number'],
                            updated['subnet']['revision_number'])
 
-    @test.idempotent_id('9c83105c-9973-45ff-9ca2-e66d64700abe')
+    @decorators.idempotent_id('9c83105c-9973-45ff-9ca2-e66d64700abe')
     @test.requires_ext(extension="port-security", service="network")
     def test_update_port_security_bumps_revisions(self):
         net = self.create_network(port_security_enabled=False)
@@ -213,7 +214,7 @@
         self.assertGreater(updated2['port']['revision_number'],
                            updated['port']['revision_number'])
 
-    @test.idempotent_id('68d5ac3a-11a1-4847-8e2e-5843c043d89b')
+    @decorators.idempotent_id('68d5ac3a-11a1-4847-8e2e-5843c043d89b')
     @test.requires_ext(extension="binding", service="network")
     def test_portbinding_bumps_revision(self):
         port = self.create_port(self.create_network())
@@ -224,7 +225,7 @@
         self.assertGreater(updated['revision_number'],
                            port['revision_number'])
 
-    @test.idempotent_id('4a37bde9-1975-47e0-9b8c-2c9ca36415b0')
+    @decorators.idempotent_id('4a37bde9-1975-47e0-9b8c-2c9ca36415b0')
     @test.requires_ext(extension="router", service="network")
     def test_update_router_bumps_revision(self):
         subnet = self.create_subnet(self.create_network())
@@ -239,7 +240,7 @@
         self.assertGreater(updated['revision_number'],
                            router['revision_number'])
 
-    @test.idempotent_id('9de71ebc-f5df-4cd0-80bc-60299fce3ce9')
+    @decorators.idempotent_id('9de71ebc-f5df-4cd0-80bc-60299fce3ce9')
     @test.requires_ext(extension="router", service="network")
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
@@ -263,7 +264,7 @@
         # disassociate
         self.client.update_floatingip(b2['floatingip']['id'], port_id=None)
 
-    @test.idempotent_id('afb6486c-41b5-483e-a500-3c506f4deb49')
+    @decorators.idempotent_id('afb6486c-41b5-483e-a500-3c506f4deb49')
     @test.requires_ext(extension="router", service="network")
     @test.requires_ext(extension="dvr", service="network")
     def test_update_router_extra_attributes_bumps_revision(self):
@@ -279,7 +280,7 @@
         self.assertGreater(updated['revision_number'],
                            router['revision_number'])
 
-    @test.idempotent_id('90743b00-b0e2-40e4-9524-1c884fe3ef23')
+    @decorators.idempotent_id('90743b00-b0e2-40e4-9524-1c884fe3ef23')
     @test.requires_ext(extension="external-net", service="network")
     @test.requires_ext(extension="auto-allocated-topology", service="network")
     @test.requires_ext(extension="subnet_allocation", service="network")
@@ -292,7 +293,7 @@
         self.assertGreater(updated['network']['revision_number'],
                            net['revision_number'])
 
-    @test.idempotent_id('5af6450a-0f61-49c3-b628-38db77c7b856')
+    @decorators.idempotent_id('5af6450a-0f61-49c3-b628-38db77c7b856')
     @test.requires_ext(extension="qos", service="network")
     def test_update_qos_port_policy_binding_bumps_revision(self):
         policy = self.create_qos_policy(name='port-policy', shared=False)
@@ -303,7 +304,7 @@
         self.assertGreater(updated['port']['revision_number'],
                            port['revision_number'])
 
-    @test.idempotent_id('817da343-c6e4-445c-9519-a621f124dfbe')
+    @decorators.idempotent_id('817da343-c6e4-445c-9519-a621f124dfbe')
     @test.requires_ext(extension="qos", service="network")
     def test_update_qos_network_policy_binding_bumps_revision(self):
         policy = self.create_qos_policy(name='network-policy', shared=False)
diff --git a/neutron/tests/tempest/api/test_routers.py b/neutron/tests/tempest/api/test_routers.py
index d98ea3a..d6beb77 100644
--- a/neutron/tests/tempest/api/test_routers.py
+++ b/neutron/tests/tempest/api/test_routers.py
@@ -16,6 +16,7 @@
 import netaddr
 import six
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.common import utils
@@ -41,7 +42,7 @@
             if cls._ip_version == 4 else
             config.safe_get_config_value('network', 'project_network_v6_cidr'))
 
-    @test.idempotent_id('c72c1c0c-2193-4aca-eeee-b1442640eeee')
+    @decorators.idempotent_id('c72c1c0c-2193-4aca-eeee-b1442640eeee')
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
     def test_create_update_router_description(self):
@@ -54,7 +55,7 @@
         body = self.client.show_router(body['router']['id'])['router']
         self.assertEqual('d2', body['description'])
 
-    @test.idempotent_id('847257cc-6afd-4154-b8fb-af49f5670ce8')
+    @decorators.idempotent_id('847257cc-6afd-4154-b8fb-af49f5670ce8')
     @test.requires_ext(extension='ext-gw-mode', service='network')
     def test_create_router_with_default_snat_value(self):
         # Create a router with default snat rule
@@ -65,7 +66,7 @@
             router['id'], {'network_id': CONF.network.public_network_id,
                            'enable_snat': True})
 
-    @test.idempotent_id('ea74068d-09e9-4fd7-8995-9b6a1ace920f')
+    @decorators.idempotent_id('ea74068d-09e9-4fd7-8995-9b6a1ace920f')
     @test.requires_ext(extension='ext-gw-mode', service='network')
     def test_create_router_with_snat_explicit(self):
         name = data_utils.rand_name('snat-router')
@@ -107,7 +108,7 @@
         self.assertIn(public_subnet_id,
                       [x['subnet_id'] for x in fixed_ips])
 
-    @test.idempotent_id('b386c111-3b21-466d-880c-5e72b01e1a33')
+    @decorators.idempotent_id('b386c111-3b21-466d-880c-5e72b01e1a33')
     @test.requires_ext(extension='ext-gw-mode', service='network')
     def test_update_router_set_gateway_with_snat_explicit(self):
         router = self._create_router(data_utils.rand_name('router-'))
@@ -122,7 +123,7 @@
              'enable_snat': True})
         self._verify_gateway_port(router['id'])
 
-    @test.idempotent_id('96536bc7-8262-4fb2-9967-5c46940fa279')
+    @decorators.idempotent_id('96536bc7-8262-4fb2-9967-5c46940fa279')
     @test.requires_ext(extension='ext-gw-mode', service='network')
     def test_update_router_set_gateway_without_snat(self):
         router = self._create_router(data_utils.rand_name('router-'))
@@ -137,7 +138,7 @@
              'enable_snat': False})
         self._verify_gateway_port(router['id'])
 
-    @test.idempotent_id('f2faf994-97f4-410b-a831-9bc977b64374')
+    @decorators.idempotent_id('f2faf994-97f4-410b-a831-9bc977b64374')
     @test.requires_ext(extension='ext-gw-mode', service='network')
     def test_update_router_reset_gateway_without_snat(self):
         router = self._create_router(
@@ -154,7 +155,7 @@
              'enable_snat': False})
         self._verify_gateway_port(router['id'])
 
-    @test.idempotent_id('db3093b1-93b6-4893-be83-c4716c251b3e')
+    @decorators.idempotent_id('db3093b1-93b6-4893-be83-c4716c251b3e')
     def test_router_interface_status(self):
         network = self.create_network()
         subnet = self.create_subnet(network)
@@ -165,7 +166,7 @@
             intf['port_id'])['port']['status'] == 'ACTIVE'
         utils.wait_until_true(status_active, exception=AssertionError)
 
-    @test.idempotent_id('c86ac3a8-50bd-4b00-a6b8-62af84a0765c')
+    @decorators.idempotent_id('c86ac3a8-50bd-4b00-a6b8-62af84a0765c')
     @test.requires_ext(extension='extraroute', service='network')
     def test_update_extra_route(self):
         self.network = self.create_network()
@@ -199,7 +200,7 @@
     def _delete_extra_routes(self, router_id):
         self.client.delete_extra_routes(router_id)
 
-    @test.idempotent_id('01f185d1-d1a6-4cf9-abf7-e0e1384c169c')
+    @decorators.idempotent_id('01f185d1-d1a6-4cf9-abf7-e0e1384c169c')
     def test_network_attached_with_two_routers(self):
         network = self.create_network(data_utils.rand_name('network1'))
         self.create_subnet(network)
@@ -236,7 +237,7 @@
     def skip_checks(cls):
         super(DvrRoutersTest, cls).skip_checks()
 
-    @test.idempotent_id('141297aa-3424-455d-aa8d-f2d95731e00a')
+    @decorators.idempotent_id('141297aa-3424-455d-aa8d-f2d95731e00a')
     def test_create_distributed_router(self):
         name = data_utils.rand_name('router')
         create_body = self.admin_client.create_router(
@@ -246,7 +247,7 @@
                         self.admin_client)
         self.assertTrue(create_body['router']['distributed'])
 
-    @test.idempotent_id('644d7a4a-01a1-4b68-bb8d-0c0042cb1729')
+    @decorators.idempotent_id('644d7a4a-01a1-4b68-bb8d-0c0042cb1729')
     def test_convert_centralized_router(self):
         router = self._create_router(data_utils.rand_name('router'))
         self.assertNotIn('distributed', router)
@@ -274,38 +275,38 @@
         for name in cls.resource_names:
             cls.create_router(router_name=name)
 
-    @test.idempotent_id('03a69efb-90a7-435b-bb5c-3add3612085a')
+    @decorators.idempotent_id('03a69efb-90a7-435b-bb5c-3add3612085a')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('95913d30-ff41-4b17-9f44-5258c651e78c')
+    @decorators.idempotent_id('95913d30-ff41-4b17-9f44-5258c651e78c')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('7f7d40b1-e165-4817-8dc5-02f8e2f0dff3')
+    @decorators.idempotent_id('7f7d40b1-e165-4817-8dc5-02f8e2f0dff3')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('a5b83e83-3d98-45bb-a2c7-0ee179ffd42c')
+    @decorators.idempotent_id('a5b83e83-3d98-45bb-a2c7-0ee179ffd42c')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('40804af8-c25d-45f8-b8a8-b4c70345215d')
+    @decorators.idempotent_id('40804af8-c25d-45f8-b8a8-b4c70345215d')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('77b9676c-d3cb-43af-a0e8-a5b8c6099e70')
+    @decorators.idempotent_id('77b9676c-d3cb-43af-a0e8-a5b8c6099e70')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('3133a2c5-1bb9-4fc7-833e-cf9a1d160255')
+    @decorators.idempotent_id('3133a2c5-1bb9-4fc7-833e-cf9a1d160255')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('8252e2f0-b3da-4738-8e25-f6f8d878a2da')
+    @decorators.idempotent_id('8252e2f0-b3da-4738-8e25-f6f8d878a2da')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
 
-    @test.idempotent_id('fb102124-20f8-4cb3-8c81-f16f5e41d192')
+    @decorators.idempotent_id('fb102124-20f8-4cb3-8c81-f16f5e41d192')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
diff --git a/neutron/tests/tempest/api/test_routers_negative.py b/neutron/tests/tempest/api/test_routers_negative.py
index 309b6fd..049b9c8 100644
--- a/neutron/tests/tempest/api/test_routers_negative.py
+++ b/neutron/tests/tempest/api/test_routers_negative.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 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
 import testtools
@@ -39,7 +40,7 @@
 class RoutersNegativeTest(RoutersNegativeTestBase):
 
     @test.attr(type='negative')
-    @test.idempotent_id('e3e751af-15a2-49cc-b214-a7154579e94f')
+    @decorators.idempotent_id('e3e751af-15a2-49cc-b214-a7154579e94f')
     def test_delete_router_in_use(self):
         # This port is deleted after a test by remove_router_interface.
         port = self.client.create_port(network_id=self.network['id'])
@@ -54,7 +55,7 @@
     credentials = ['admin', 'primary', 'alt']
 
     @test.attr(type='negative')
-    @test.idempotent_id('159f576d-a423-46b5-b501-622694c02f6b')
+    @decorators.idempotent_id('159f576d-a423-46b5-b501-622694c02f6b')
     def test_add_interface_wrong_tenant(self):
         client2 = self.alt_manager.network_client
         network = client2.create_network()['network']
@@ -79,7 +80,7 @@
         super(DvrRoutersNegativeTest, cls).skip_checks()
 
     @test.attr(type='negative')
-    @test.idempotent_id('4990b055-8fc7-48ab-bba7-aa28beaad0b9')
+    @decorators.idempotent_id('4990b055-8fc7-48ab-bba7-aa28beaad0b9')
     def test_router_create_tenant_distributed_returns_forbidden(self):
         with testtools.ExpectedException(lib_exc.Forbidden):
             self.create_router(
diff --git a/neutron/tests/tempest/api/test_security_groups.py b/neutron/tests/tempest/api/test_security_groups.py
index 4520ecc..a99cd51 100644
--- a/neutron/tests/tempest/api/test_security_groups.py
+++ b/neutron/tests/tempest/api/test_security_groups.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base_security_groups as base
@@ -26,7 +27,7 @@
     def resource_setup(cls):
         super(SecGroupTest, cls).resource_setup()
 
-    @test.idempotent_id('bfd128e5-3c92-44b6-9d66-7fe29d22c802')
+    @decorators.idempotent_id('bfd128e5-3c92-44b6-9d66-7fe29d22c802')
     def test_create_list_update_show_delete_security_group(self):
         group_create_body, name = self._create_security_group()
 
@@ -54,7 +55,7 @@
         self.assertEqual(show_body['security_group']['description'],
                          new_description)
 
-    @test.idempotent_id('7c0ecb10-b2db-11e6-9b14-000c29248b0d')
+    @decorators.idempotent_id('7c0ecb10-b2db-11e6-9b14-000c29248b0d')
     def test_create_bulk_sec_groups(self):
         # Creates 2 sec-groups in one request
         sec_nm = [data_utils.rand_name('secgroup'),
diff --git a/neutron/tests/tempest/api/test_security_groups_negative.py b/neutron/tests/tempest/api/test_security_groups_negative.py
index 43bc88c..9202060 100644
--- a/neutron/tests/tempest/api/test_security_groups_negative.py
+++ b/neutron/tests/tempest/api/test_security_groups_negative.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -27,7 +28,7 @@
         super(NegativeSecGroupTest, cls).resource_setup()
 
     @test.attr(type='negative')
-    @test.idempotent_id('55100aa8-b24f-333c-0bef-64eefd85f15c')
+    @decorators.idempotent_id('55100aa8-b24f-333c-0bef-64eefd85f15c')
     def test_update_default_security_group_name(self):
         sg_list = self.client.list_security_groups(name='default')
         sg = sg_list['security_groups'][0]
diff --git a/neutron/tests/tempest/api/test_service_type_management.py b/neutron/tests/tempest/api/test_service_type_management.py
index 81e18ae..5d2d070 100644
--- a/neutron/tests/tempest/api/test_service_type_management.py
+++ b/neutron/tests/tempest/api/test_service_type_management.py
@@ -10,6 +10,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -22,7 +23,7 @@
     def resource_setup(cls):
         super(ServiceTypeManagementTest, cls).resource_setup()
 
-    @test.idempotent_id('2cbbeea9-f010-40f6-8df5-4eaa0c918ea6')
+    @decorators.idempotent_id('2cbbeea9-f010-40f6-8df5-4eaa0c918ea6')
     def test_service_provider_list(self):
         body = self.client.list_service_providers()
         self.assertIsInstance(body['service_providers'], list)
diff --git a/neutron/tests/tempest/api/test_subnetpools.py b/neutron/tests/tempest/api/test_subnetpools.py
index 763d06c..ec47606 100644
--- a/neutron/tests/tempest/api/test_subnetpools.py
+++ b/neutron/tests/tempest/api/test_subnetpools.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -91,7 +92,7 @@
             self.assertEqual(expected_values['prefixes'],
                              updated_pool['prefixes'])
 
-    @test.idempotent_id('6e1781ec-b45b-4042-aebe-f485c022996e')
+    @decorators.idempotent_id('6e1781ec-b45b-4042-aebe-f485c022996e')
     def test_create_list_subnetpool(self):
         created_subnetpool = self._create_subnetpool()
         body = self.client.list_subnetpools()
@@ -103,7 +104,7 @@
                       [sp['name'] for sp in subnetpools],
                       "Created subnetpool name should be in the list")
 
-    @test.idempotent_id('c72c1c0c-2193-4aca-ddd4-b1442640bbbb')
+    @decorators.idempotent_id('c72c1c0c-2193-4aca-ddd4-b1442640bbbb')
     @test.requires_ext(extension="standard-attr-description",
                        service="network")
     def test_create_update_subnetpool_description(self):
@@ -121,7 +122,7 @@
         body = subnet_pools[0]
         self.assertEqual('d2', body['description'])
 
-    @test.idempotent_id('741d08c2-1e3f-42be-99c7-0ea93c5b728c')
+    @decorators.idempotent_id('741d08c2-1e3f-42be-99c7-0ea93c5b728c')
     def test_get_subnetpool(self):
         created_subnetpool = self._create_subnetpool()
         prefixlen = self._subnetpool_data['min_prefixlen']
@@ -133,7 +134,7 @@
         self.assertEqual(prefixlen, subnetpool['default_prefixlen'])
         self.assertFalse(subnetpool['shared'])
 
-    @test.idempotent_id('5bf9f1e2-efc8-4195-acf3-d12b2bd68dd3')
+    @decorators.idempotent_id('5bf9f1e2-efc8-4195-acf3-d12b2bd68dd3')
     @test.requires_ext(extension="project-id", service="network")
     def test_show_subnetpool_has_project_id(self):
         subnetpool = self._create_subnetpool()
@@ -144,7 +145,7 @@
         self.assertEqual(self.client.tenant_id, show_subnetpool['project_id'])
         self.assertEqual(self.client.tenant_id, show_subnetpool['tenant_id'])
 
-    @test.idempotent_id('764f1b93-1c4a-4513-9e7b-6c2fc5e9270c')
+    @decorators.idempotent_id('764f1b93-1c4a-4513-9e7b-6c2fc5e9270c')
     def test_tenant_update_subnetpool(self):
         created_subnetpool = self._create_subnetpool()
         pool_id = created_subnetpool['id']
@@ -158,7 +159,7 @@
                                                 subnetpool)
         self.assertFalse(subnetpool['shared'])
 
-    @test.idempotent_id('4b496082-c992-4319-90be-d4a7ce646290')
+    @decorators.idempotent_id('4b496082-c992-4319-90be-d4a7ce646290')
     def test_update_subnetpool_prefixes_append(self):
         # We can append new prefixes to subnetpool
         create_subnetpool = self._create_subnetpool()
@@ -173,7 +174,7 @@
         self.assertIn(self.new_prefix, prefixes)
         self.assertIn(old_prefixes[0], prefixes)
 
-    @test.idempotent_id('2cae5d6a-9d32-42d8-8067-f13970ae13bb')
+    @decorators.idempotent_id('2cae5d6a-9d32-42d8-8067-f13970ae13bb')
     def test_update_subnetpool_prefixes_extend(self):
         # We can extend current subnetpool prefixes
         created_subnetpool = self._create_subnetpool()
@@ -186,7 +187,7 @@
         self.assertIn(self.larger_prefix, prefixes)
         self.assertNotIn(old_prefixes[0], prefixes)
 
-    @test.idempotent_id('d70c6c35-913b-4f24-909f-14cd0d29b2d2')
+    @decorators.idempotent_id('d70c6c35-913b-4f24-909f-14cd0d29b2d2')
     def test_admin_create_shared_subnetpool(self):
         created_subnetpool = self._create_subnetpool(is_admin=True,
                                                      shared=True)
@@ -219,7 +220,7 @@
         subnet = body['subnet']
         return pool_id, subnet
 
-    @test.idempotent_id('1362ed7d-3089-42eb-b3a5-d6cb8398ee77')
+    @decorators.idempotent_id('1362ed7d-3089-42eb-b3a5-d6cb8398ee77')
     def test_create_subnet_from_pool_with_prefixlen(self):
         subnet_values = {"prefixlen": self.max_prefixlen}
         pool_id, subnet = self._create_subnet_from_pool(
@@ -228,7 +229,7 @@
         self.assertEqual(pool_id, subnet['subnetpool_id'])
         self.assertTrue(cidr.endswith(str(self.max_prefixlen)))
 
-    @test.idempotent_id('86b86189-9789-4582-9c3b-7e2bfe5735ee')
+    @decorators.idempotent_id('86b86189-9789-4582-9c3b-7e2bfe5735ee')
     def test_create_subnet_from_pool_with_subnet_cidr(self):
         subnet_values = {"cidr": self.subnet_cidr}
         pool_id, subnet = self._create_subnet_from_pool(
@@ -237,7 +238,7 @@
         self.assertEqual(pool_id, subnet['subnetpool_id'])
         self.assertEqual(cidr, self.subnet_cidr)
 
-    @test.idempotent_id('83f76e3a-9c40-40c2-a015-b7c5242178d8')
+    @decorators.idempotent_id('83f76e3a-9c40-40c2-a015-b7c5242178d8')
     def test_create_subnet_from_pool_with_default_prefixlen(self):
         # If neither cidr nor prefixlen is specified,
         # subnet will use subnetpool default_prefixlen for cidr.
@@ -247,7 +248,7 @@
         prefixlen = self._subnetpool_data['min_prefixlen']
         self.assertTrue(cidr.endswith(str(prefixlen)))
 
-    @test.idempotent_id('a64af292-ec52-4bde-b654-a6984acaf477')
+    @decorators.idempotent_id('a64af292-ec52-4bde-b654-a6984acaf477')
     def test_create_subnet_from_pool_with_quota(self):
         pool_values = {'default_quota': 4}
         subnet_values = {"prefixlen": self.max_prefixlen}
@@ -257,7 +258,7 @@
         self.assertEqual(pool_id, subnet['subnetpool_id'])
         self.assertTrue(cidr.endswith(str(self.max_prefixlen)))
 
-    @test.idempotent_id('49b44c64-1619-4b29-b527-ffc3c3115dc4')
+    @decorators.idempotent_id('49b44c64-1619-4b29-b527-ffc3c3115dc4')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_subnetpool_associate_address_scope(self):
         address_scope = self.create_address_scope(
@@ -269,7 +270,7 @@
         self.assertEqual(address_scope['id'],
                          body['subnetpool']['address_scope_id'])
 
-    @test.idempotent_id('910b6393-db24-4f6f-87dc-b36892ad6c8c')
+    @decorators.idempotent_id('910b6393-db24-4f6f-87dc-b36892ad6c8c')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_associate_address_scope(self):
         address_scope = self.create_address_scope(
@@ -285,7 +286,7 @@
         self.assertEqual(address_scope['id'],
                          body['subnetpool']['address_scope_id'])
 
-    @test.idempotent_id('18302e80-46a3-4563-82ac-ccd1dd57f652')
+    @decorators.idempotent_id('18302e80-46a3-4563-82ac-ccd1dd57f652')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_associate_another_address_scope(self):
         address_scope = self.create_address_scope(
@@ -306,7 +307,7 @@
         self.assertEqual(another_address_scope['id'],
                          body['subnetpool']['address_scope_id'])
 
-    @test.idempotent_id('f8970048-e41b-42d6-934b-a1297b07706a')
+    @decorators.idempotent_id('f8970048-e41b-42d6-934b-a1297b07706a')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_disassociate_address_scope(self):
         address_scope = self.create_address_scope(
@@ -341,7 +342,7 @@
         cls._subnetpool_data = {'min_prefixlen': min_prefixlen,
                                 'prefixes': prefixes}
 
-    @test.idempotent_id('f62d73dc-cf6f-4879-b94b-dab53982bf3b')
+    @decorators.idempotent_id('f62d73dc-cf6f-4879-b94b-dab53982bf3b')
     def test_create_dual_stack_subnets_from_subnetpools(self):
         pool_id_v6, subnet_v6 = self._create_subnet_from_pool()
         pool_values_v4 = {'prefixes': ['192.168.0.0/16'],
@@ -368,42 +369,42 @@
         for name in cls.resource_names:
             cls._create_subnetpool(name=name)
 
-    @test.idempotent_id('6e3f842e-6bfb-49cb-82d3-0026be4e8e04')
+    @decorators.idempotent_id('6e3f842e-6bfb-49cb-82d3-0026be4e8e04')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('f336859b-b868-438c-a6fc-2c06374115f2')
+    @decorators.idempotent_id('f336859b-b868-438c-a6fc-2c06374115f2')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('1291fae7-c196-4372-ad59-ce7988518f7b')
+    @decorators.idempotent_id('1291fae7-c196-4372-ad59-ce7988518f7b')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('ddb20d14-1952-49b4-a17e-231cc2239a52')
+    @decorators.idempotent_id('ddb20d14-1952-49b4-a17e-231cc2239a52')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('b3bd9665-2769-4a43-b50c-31b1add12891')
+    @decorators.idempotent_id('b3bd9665-2769-4a43-b50c-31b1add12891')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('1ec1f325-43b0-406e-96ce-20539e38a61d')
+    @decorators.idempotent_id('1ec1f325-43b0-406e-96ce-20539e38a61d')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('f43a293e-4aaa-48f4-aeaf-de63a676357c')
+    @decorators.idempotent_id('f43a293e-4aaa-48f4-aeaf-de63a676357c')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('73511385-839c-4829-8ac1-b5ad992126c4')
+    @decorators.idempotent_id('73511385-839c-4829-8ac1-b5ad992126c4')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
 
-    @test.idempotent_id('82a13efc-c18f-4249-b8ec-cec7cf26fbd6')
+    @decorators.idempotent_id('82a13efc-c18f-4249-b8ec-cec7cf26fbd6')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
 
-    @test.idempotent_id('27feb3f8-40f4-4e50-8cd2-7d0096a98682')
+    @decorators.idempotent_id('27feb3f8-40f4-4e50-8cd2-7d0096a98682')
     def test_list_validation_filters(self):
         self._test_list_validation_filters()
diff --git a/neutron/tests/tempest/api/test_subnetpools_negative.py b/neutron/tests/tempest/api/test_subnetpools_negative.py
index 638d965..c973d76 100644
--- a/neutron/tests/tempest/api/test_subnetpools_negative.py
+++ b/neutron/tests/tempest/api/test_subnetpools_negative.py
@@ -16,6 +16,7 @@
 import netaddr
 from oslo_utils import uuidutils
 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
 
@@ -30,14 +31,14 @@
     smaller_prefix = u'10.11.12.0/26'
 
     @test.attr(type='negative')
-    @test.idempotent_id('0212a042-603a-4f46-99e0-e37de9374d30')
+    @decorators.idempotent_id('0212a042-603a-4f46-99e0-e37de9374d30')
     def test_get_non_existent_subnetpool(self):
         non_exist_id = data_utils.rand_name('subnetpool')
         self.assertRaises(lib_exc.NotFound, self.client.show_subnetpool,
                           non_exist_id)
 
     @test.attr(type='negative')
-    @test.idempotent_id('dc9336e5-f28f-4658-a0b0-cc79e607007d')
+    @decorators.idempotent_id('dc9336e5-f28f-4658-a0b0-cc79e607007d')
     def test_tenant_get_not_shared_admin_subnetpool(self):
         created_subnetpool = self._create_subnetpool(is_admin=True)
         # None-shared admin subnetpool cannot be retrieved by tenant user.
@@ -45,28 +46,28 @@
                           created_subnetpool['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('5e1f2f86-d81a-498c-82ed-32a49f4dc4d3')
+    @decorators.idempotent_id('5e1f2f86-d81a-498c-82ed-32a49f4dc4d3')
     def test_delete_non_existent_subnetpool(self):
         non_exist_id = data_utils.rand_name('subnetpool')
         self.assertRaises(lib_exc.NotFound, self.client.delete_subnetpool,
                           non_exist_id)
 
     @test.attr(type='negative')
-    @test.idempotent_id('d1143fe2-212b-4e23-a308-d18f7d8d78d6')
+    @decorators.idempotent_id('d1143fe2-212b-4e23-a308-d18f7d8d78d6')
     def test_tenant_create_shared_subnetpool(self):
         # 'shared' subnetpool can only be created by admin.
         self.assertRaises(lib_exc.Forbidden, self._create_subnetpool,
                           is_admin=False, shared=True)
 
     @test.attr(type='negative')
-    @test.idempotent_id('4be84d30-60ca-4bd3-8512-db5b36ce1378')
+    @decorators.idempotent_id('4be84d30-60ca-4bd3-8512-db5b36ce1378')
     def test_update_non_existent_subnetpool(self):
         non_exist_id = data_utils.rand_name('subnetpool')
         self.assertRaises(lib_exc.NotFound, self.client.update_subnetpool,
                           non_exist_id, name='foo-name')
 
     @test.attr(type='negative')
-    @test.idempotent_id('e6cd6d87-6173-45dd-bf04-c18ea7ec7537')
+    @decorators.idempotent_id('e6cd6d87-6173-45dd-bf04-c18ea7ec7537')
     def test_update_subnetpool_not_modifiable_shared(self):
         # 'shared' attributes can be specified during creation.
         # But this attribute is not modifiable after creation.
@@ -76,7 +77,7 @@
                           pool_id, shared=True)
 
     @test.attr(type='negative')
-    @test.idempotent_id('62f7c43b-bff1-4def-8bb7-4754b840aaad')
+    @decorators.idempotent_id('62f7c43b-bff1-4def-8bb7-4754b840aaad')
     def test_update_subnetpool_prefixes_shrink(self):
         # Shrink current subnetpool prefixes is not supported
         created_subnetpool = self._create_subnetpool()
@@ -86,7 +87,7 @@
                           prefixes=[self.smaller_prefix])
 
     @test.attr(type='negative')
-    @test.idempotent_id('fc011824-153e-4469-97ad-9808eb88cae1')
+    @decorators.idempotent_id('fc011824-153e-4469-97ad-9808eb88cae1')
     def test_create_subnet_different_pools_same_network(self):
         network = self.create_network(network_name='smoke-network')
         created_subnetpool = self._create_subnetpool(
@@ -103,21 +104,21 @@
                           client=self.admin_client)
 
     @test.attr(type='negative')
-    @test.idempotent_id('9589e332-638e-476e-81bd-013d964aa3cb')
+    @decorators.idempotent_id('9589e332-638e-476e-81bd-013d964aa3cb')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_subnetpool_associate_invalid_address_scope(self):
         self.assertRaises(lib_exc.BadRequest, self._create_subnetpool,
                           address_scope_id='foo-addr-scope')
 
     @test.attr(type='negative')
-    @test.idempotent_id('3b6c5942-485d-4964-a560-55608af020b5')
+    @decorators.idempotent_id('3b6c5942-485d-4964-a560-55608af020b5')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_subnetpool_associate_non_exist_address_scope(self):
         self.assertRaises(lib_exc.NotFound, self._create_subnetpool,
                           address_scope_id=uuidutils.generate_uuid())
 
     @test.attr(type='negative')
-    @test.idempotent_id('2dfb4269-8657-485a-a053-b022e911456e')
+    @decorators.idempotent_id('2dfb4269-8657-485a-a053-b022e911456e')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_subnetpool_associate_address_scope_prefix_intersect(self):
         address_scope = self.create_address_scope(
@@ -133,7 +134,7 @@
                           **subnetpool_data)
 
     @test.attr(type='negative')
-    @test.idempotent_id('83a19a13-5384-42e2-b579-43fc69c80914')
+    @decorators.idempotent_id('83a19a13-5384-42e2-b579-43fc69c80914')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_sp_associate_address_scope_multiple_prefix_intersect(self):
         address_scope = self.create_address_scope(
@@ -151,7 +152,7 @@
                           **subnetpool_data)
 
     @test.attr(type='negative')
-    @test.idempotent_id('f06d8e7b-908b-4e94-b570-8156be6a4bf1')
+    @decorators.idempotent_id('f06d8e7b-908b-4e94-b570-8156be6a4bf1')
     @test.requires_ext(extension='address-scope', service='network')
     def test_create_subnetpool_associate_address_scope_of_other_owner(self):
         address_scope = self.create_address_scope(
@@ -161,7 +162,7 @@
                           address_scope_id=address_scope['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('3396ec6c-cb80-4ebe-b897-84e904580bdf')
+    @decorators.idempotent_id('3396ec6c-cb80-4ebe-b897-84e904580bdf')
     @test.requires_ext(extension='address-scope', service='network')
     def test_tenant_create_subnetpool_associate_shared_address_scope(self):
         address_scope = self.create_address_scope(
@@ -171,7 +172,7 @@
                           address_scope_id=address_scope['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('6d3d9ad5-32d4-4d63-aa00-8c62f73e2881')
+    @decorators.idempotent_id('6d3d9ad5-32d4-4d63-aa00-8c62f73e2881')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_associate_address_scope_of_other_owner(self):
         address_scope = self.create_address_scope(
@@ -204,7 +205,7 @@
                           pool_id_1, prefixes=pool_1_updated_prefixes)
 
     @test.attr(type='negative')
-    @test.idempotent_id('96006292-7214-40e0-a471-153fb76e6b31')
+    @decorators.idempotent_id('96006292-7214-40e0-a471-153fb76e6b31')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_prefix_intersect(self):
         pool_1_prefix = [u'20.0.0.0/18']
@@ -214,7 +215,7 @@
             pool_1_prefix, pool_2_prefix, pool_1_updated_prefix)
 
     @test.attr(type='negative')
-    @test.idempotent_id('4d3f8a79-c530-4e59-9acf-6c05968adbfe')
+    @decorators.idempotent_id('4d3f8a79-c530-4e59-9acf-6c05968adbfe')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_multiple_prefix_intersect(self):
         pool_1_prefixes = [u'20.0.0.0/18', u'30.0.0.0/18']
@@ -225,7 +226,7 @@
             pool_1_prefixes, pool_2_prefixes, pool_1_updated_prefixes)
 
     @test.attr(type='negative')
-    @test.idempotent_id('7438e49e-1351-45d8-937b-892059fb97f5')
+    @decorators.idempotent_id('7438e49e-1351-45d8-937b-892059fb97f5')
     @test.requires_ext(extension='address-scope', service='network')
     def test_tenant_update_sp_prefix_associated_with_shared_addr_scope(self):
         address_scope = self.create_address_scope(
@@ -256,7 +257,7 @@
                          body['subnetpool']['prefixes'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('648fee7d-a909-4ced-bad3-3a169444c0a8')
+    @decorators.idempotent_id('648fee7d-a909-4ced-bad3-3a169444c0a8')
     @test.requires_ext(extension='address-scope', service='network')
     def test_update_subnetpool_associate_address_scope_wrong_ip_version(self):
         address_scope = self.create_address_scope(
@@ -268,7 +269,7 @@
                           address_scope_id=address_scope['id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('2f66dc2f-cc32-4caa-91ec-0c0cd7c46d70')
+    @decorators.idempotent_id('2f66dc2f-cc32-4caa-91ec-0c0cd7c46d70')
     def test_update_subnetpool_tenant_id(self):
         subnetpool = self._create_subnetpool()
         self.assertRaises(
diff --git a/neutron/tests/tempest/api/test_subnets.py b/neutron/tests/tempest/api/test_subnets.py
index 4e63a3a..210dcdc 100644
--- a/neutron/tests/tempest/api/test_subnets.py
+++ b/neutron/tests/tempest/api/test_subnets.py
@@ -10,7 +10,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import test
+from tempest.lib import decorators
 
 from neutron.tests.tempest.api import base
 
@@ -28,42 +28,42 @@
         for name in cls.resource_names:
             cls.create_subnet(net, name=name)
 
-    @test.idempotent_id('d2d61995-5dd5-4b93-bce7-3edefdb79563')
+    @decorators.idempotent_id('d2d61995-5dd5-4b93-bce7-3edefdb79563')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('c3c6b0af-c4ac-4da0-b568-8d08ae550604')
+    @decorators.idempotent_id('c3c6b0af-c4ac-4da0-b568-8d08ae550604')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('b93063b3-f713-406e-bf93-e5738e09153c')
+    @decorators.idempotent_id('b93063b3-f713-406e-bf93-e5738e09153c')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('2ddd9aa6-de28-410f-9cbc-ce752893c407')
+    @decorators.idempotent_id('2ddd9aa6-de28-410f-9cbc-ce752893c407')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('351183ef-6ed9-4d71-a9f2-a5ac049bd7ea')
+    @decorators.idempotent_id('351183ef-6ed9-4d71-a9f2-a5ac049bd7ea')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('dfaa20ca-6d84-4f26-962f-2fee4d247cd9')
+    @decorators.idempotent_id('dfaa20ca-6d84-4f26-962f-2fee4d247cd9')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('40552213-3e12-4d6a-86f3-dda92f3de88c')
+    @decorators.idempotent_id('40552213-3e12-4d6a-86f3-dda92f3de88c')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('3cea9053-a731-4480-93ee-19b2c28a9ce4')
+    @decorators.idempotent_id('3cea9053-a731-4480-93ee-19b2c28a9ce4')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
 
-    @test.idempotent_id('d851937c-9821-4b46-9d18-43e9077ecac0')
+    @decorators.idempotent_id('d851937c-9821-4b46-9d18-43e9077ecac0')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
 
-    @test.idempotent_id('c0f9280b-9d81-4728-a967-6be22659d4c8')
+    @decorators.idempotent_id('c0f9280b-9d81-4728-a967-6be22659d4c8')
     def test_list_validation_filters(self):
         self._test_list_validation_filters()
diff --git a/neutron/tests/tempest/api/test_tag.py b/neutron/tests/tempest/api/test_tag.py
index 7bdebc7..8ed44ae 100644
--- a/neutron/tests/tempest/api/test_tag.py
+++ b/neutron/tests/tempest/api/test_tag.py
@@ -10,6 +10,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 
@@ -78,7 +79,7 @@
         return network['id']
 
     @test.attr(type='smoke')
-    @test.idempotent_id('5621062d-fbfb-4437-9d69-138c78ea4188')
+    @decorators.idempotent_id('5621062d-fbfb-4437-9d69-138c78ea4188')
     def test_network_tags(self):
         self._test_tag_operations()
 
@@ -93,7 +94,7 @@
         return subnet['id']
 
     @test.attr(type='smoke')
-    @test.idempotent_id('2805aabf-a94c-4e70-a0b2-9814f06beb03')
+    @decorators.idempotent_id('2805aabf-a94c-4e70-a0b2-9814f06beb03')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_subnet_tags(self):
         self._test_tag_operations()
@@ -109,7 +110,7 @@
         return port['id']
 
     @test.attr(type='smoke')
-    @test.idempotent_id('c7c44f2c-edb0-4ebd-a386-d37cec155c34')
+    @decorators.idempotent_id('c7c44f2c-edb0-4ebd-a386-d37cec155c34')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_port_tags(self):
         self._test_tag_operations()
@@ -125,7 +126,7 @@
         return subnetpool['id']
 
     @test.attr(type='smoke')
-    @test.idempotent_id('bdc1c24b-c0b5-4835-953c-8f67dc11edfe')
+    @decorators.idempotent_id('bdc1c24b-c0b5-4835-953c-8f67dc11edfe')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_subnetpool_tags(self):
         self._test_tag_operations()
@@ -140,7 +141,7 @@
         return router['id']
 
     @test.attr(type='smoke')
-    @test.idempotent_id('b898ff92-dc33-4232-8ab9-2c6158c80d28')
+    @decorators.idempotent_id('b898ff92-dc33-4232-8ab9-2c6158c80d28')
     @test.requires_ext(extension="router", service="network")
     @test.requires_ext(extension="tag-ext", service="network")
     def test_router_tags(self):
@@ -232,7 +233,7 @@
         return res[self.resource]
 
     @test.attr(type='smoke')
-    @test.idempotent_id('a66b5cca-7db2-40f5-a33d-8ac9f864e53e')
+    @decorators.idempotent_id('a66b5cca-7db2-40f5-a33d-8ac9f864e53e')
     def test_filter_network_tags(self):
         self._test_filter_tags()
 
@@ -251,7 +252,7 @@
         return res[self.resource]
 
     @test.attr(type='smoke')
-    @test.idempotent_id('dd8f9ba7-bcf6-496f-bead-714bd3daac10')
+    @decorators.idempotent_id('dd8f9ba7-bcf6-496f-bead-714bd3daac10')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_filter_subnet_tags(self):
         self._test_filter_tags()
@@ -271,7 +272,7 @@
         return res[self.resource]
 
     @test.attr(type='smoke')
-    @test.idempotent_id('09c036b8-c8d0-4bee-b776-7f4601512898')
+    @decorators.idempotent_id('09c036b8-c8d0-4bee-b776-7f4601512898')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_filter_port_tags(self):
         self._test_filter_tags()
@@ -291,7 +292,7 @@
         return res[self.resource]
 
     @test.attr(type='smoke')
-    @test.idempotent_id('16ae7ad2-55c2-4821-9195-bfd04ab245b7')
+    @decorators.idempotent_id('16ae7ad2-55c2-4821-9195-bfd04ab245b7')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_filter_subnetpool_tags(self):
         self._test_filter_tags()
@@ -310,7 +311,7 @@
         return res[self.resource]
 
     @test.attr(type='smoke')
-    @test.idempotent_id('cdd3f3ea-073d-4435-a6cb-826a4064193d')
+    @decorators.idempotent_id('cdd3f3ea-073d-4435-a6cb-826a4064193d')
     @test.requires_ext(extension="tag-ext", service="network")
     def test_filter_router_tags(self):
         self._test_filter_tags()
diff --git a/neutron/tests/tempest/api/test_timestamp.py b/neutron/tests/tempest/api/test_timestamp.py
index d3a2361..2abef94 100644
--- a/neutron/tests/tempest/api/test_timestamp.py
+++ b/neutron/tests/tempest/api/test_timestamp.py
@@ -13,6 +13,7 @@
 import copy
 
 from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
 from tempest import test
 
 from neutron.tests.tempest.api import base
@@ -51,14 +52,14 @@
             kwargs[key] = subnetpool_data[key]
         return self.create_subnetpool(name=name, is_admin=is_admin, **kwargs)
 
-    @test.idempotent_id('462be770-b310-4df9-9c42-773217e4c8b1')
+    @decorators.idempotent_id('462be770-b310-4df9-9c42-773217e4c8b1')
     def test_create_network_with_timestamp(self):
         network = self.create_network()
         # Verifies body contains timestamp fields
         self.assertIsNotNone(network['created_at'])
         self.assertIsNotNone(network['updated_at'])
 
-    @test.idempotent_id('4db5417a-e11c-474d-a361-af00ebef57c5')
+    @decorators.idempotent_id('4db5417a-e11c-474d-a361-af00ebef57c5')
     def test_update_network_with_timestamp(self):
         network = self.create_network()
         origin_updated_at = network['updated_at']
@@ -71,7 +72,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('2ac50ab2-7ebd-4e27-b3ce-a9e399faaea2')
+    @decorators.idempotent_id('2ac50ab2-7ebd-4e27-b3ce-a9e399faaea2')
     def test_show_networks_attribute_with_timestamp(self):
         network = self.create_network()
         body = self.client.show_network(network['id'])
@@ -82,7 +83,7 @@
         self.assertEqual(network['updated_at'],
                          show_net['updated_at'])
 
-    @test.idempotent_id('8ee55186-454f-4b97-9f9f-eb2772ee891c')
+    @decorators.idempotent_id('8ee55186-454f-4b97-9f9f-eb2772ee891c')
     def test_create_subnet_with_timestamp(self):
         network = self.create_network()
         subnet = self.create_subnet(network)
@@ -90,7 +91,7 @@
         self.assertIsNotNone(subnet['created_at'])
         self.assertIsNotNone(subnet['updated_at'])
 
-    @test.idempotent_id('a490215a-6f4c-4af9-9a4c-57c41f1c4fa1')
+    @decorators.idempotent_id('a490215a-6f4c-4af9-9a4c-57c41f1c4fa1')
     def test_update_subnet_with_timestamp(self):
         network = self.create_network()
         subnet = self.create_subnet(network)
@@ -104,7 +105,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('1836a086-e7cf-4141-bf57-0cfe79e8051e')
+    @decorators.idempotent_id('1836a086-e7cf-4141-bf57-0cfe79e8051e')
     def test_show_subnet_attribute_with_timestamp(self):
         network = self.create_network()
         subnet = self.create_subnet(network)
@@ -116,7 +117,7 @@
         self.assertEqual(subnet['updated_at'],
                          show_subnet['updated_at'])
 
-    @test.idempotent_id('e2450a7b-d84f-4600-a093-45e78597bbac')
+    @decorators.idempotent_id('e2450a7b-d84f-4600-a093-45e78597bbac')
     def test_create_port_with_timestamp(self):
         network = self.create_network()
         port = self.create_port(network)
@@ -124,7 +125,7 @@
         self.assertIsNotNone(port['created_at'])
         self.assertIsNotNone(port['updated_at'])
 
-    @test.idempotent_id('4241e0d3-54b4-46ce-a9a7-093fc764161b')
+    @decorators.idempotent_id('4241e0d3-54b4-46ce-a9a7-093fc764161b')
     def test_update_port_with_timestamp(self):
         network = self.create_network()
         port = self.create_port(network)
@@ -138,7 +139,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('584c6723-40b6-4f26-81dd-f508f9d9fb51')
+    @decorators.idempotent_id('584c6723-40b6-4f26-81dd-f508f9d9fb51')
     def test_show_port_attribute_with_timestamp(self):
         network = self.create_network()
         port = self.create_port(network)
@@ -150,14 +151,14 @@
         self.assertEqual(port['updated_at'],
                          show_port['updated_at'])
 
-    @test.idempotent_id('87a8b196-4b90-44f0-b7f3-d2057d7d658e')
+    @decorators.idempotent_id('87a8b196-4b90-44f0-b7f3-d2057d7d658e')
     def test_create_subnetpool_with_timestamp(self):
         sp = self._create_subnetpool()
         # Verifies body contains timestamp fields
         self.assertIsNotNone(sp['created_at'])
         self.assertIsNotNone(sp['updated_at'])
 
-    @test.idempotent_id('d48c7578-c3d2-4f9b-a7a1-be2008c770a0')
+    @decorators.idempotent_id('d48c7578-c3d2-4f9b-a7a1-be2008c770a0')
     def test_update_subnetpool_with_timestamp(self):
         sp = self._create_subnetpool()
         origin_updated_at = sp['updated_at']
@@ -171,7 +172,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('1d3970e6-bcf7-46cd-b7d7-0807759c73b4')
+    @decorators.idempotent_id('1d3970e6-bcf7-46cd-b7d7-0807759c73b4')
     def test_show_subnetpool_attribute_with_timestamp(self):
         sp = self._create_subnetpool()
         body = self.client.show_subnetpool(sp['id'])
@@ -195,14 +196,14 @@
         super(TestTimeStampWithL3, cls).resource_setup()
         cls.ext_net_id = CONF.network.public_network_id
 
-    @test.idempotent_id('433ba770-b310-4da9-5d42-733217a1c7b1')
+    @decorators.idempotent_id('433ba770-b310-4da9-5d42-733217a1c7b1')
     def test_create_router_with_timestamp(self):
         router = self.create_router(router_name='test')
         # Verifies body contains timestamp fields
         self.assertIsNotNone(router['created_at'])
         self.assertIsNotNone(router['updated_at'])
 
-    @test.idempotent_id('4a65417a-c11c-4b4d-a351-af01abcf57c6')
+    @decorators.idempotent_id('4a65417a-c11c-4b4d-a351-af01abcf57c6')
     def test_update_router_with_timestamp(self):
         router = self.create_router(router_name='test')
         origin_updated_at = router['updated_at']
@@ -214,7 +215,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('1ab50ac2-7cbd-4a17-b23e-a9e36cfa4ec2')
+    @decorators.idempotent_id('1ab50ac2-7cbd-4a17-b23e-a9e36cfa4ec2')
     def test_show_router_attribute_with_timestamp(self):
         router = self.create_router(router_name='test')
         body = self.client.show_router(router['id'])
@@ -225,14 +226,14 @@
         self.assertEqual(router['updated_at'],
                          show_router['updated_at'])
 
-    @test.idempotent_id('8ae55186-464f-4b87-1c9f-eb2765ee81ac')
+    @decorators.idempotent_id('8ae55186-464f-4b87-1c9f-eb2765ee81ac')
     def test_create_floatingip_with_timestamp(self):
         fip = self.create_floatingip(self.ext_net_id)
         # Verifies body contains timestamp fields
         self.assertIsNotNone(fip['created_at'])
         self.assertIsNotNone(fip['updated_at'])
 
-    @test.idempotent_id('a3ac215a-61ac-13f9-9d3c-57c51f11afa1')
+    @decorators.idempotent_id('a3ac215a-61ac-13f9-9d3c-57c51f11afa1')
     def test_update_floatingip_with_timestamp(self):
         fip = self.create_floatingip(self.ext_net_id)
         origin_updated_at = fip['updated_at']
@@ -244,7 +245,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('32a6a086-e1ef-413b-b13a-0cfe13ef051e')
+    @decorators.idempotent_id('32a6a086-e1ef-413b-b13a-0cfe13ef051e')
     def test_show_floatingip_attribute_with_timestamp(self):
         fip = self.create_floatingip(self.ext_net_id)
         body = self.client.show_floatingip(fip['id'])
@@ -270,14 +271,14 @@
         super(TestTimeStampWithSecurityGroup, cls).resource_setup()
         cls.ext_net_id = CONF.network.public_network_id
 
-    @test.idempotent_id('a3150a7b-d31a-423a-abf3-45e71c97cbac')
+    @decorators.idempotent_id('a3150a7b-d31a-423a-abf3-45e71c97cbac')
     def test_create_sg_with_timestamp(self):
         sg, _ = self._create_security_group()
         # Verifies body contains timestamp fields
         self.assertIsNotNone(sg['security_group']['created_at'])
         self.assertIsNotNone(sg['security_group']['updated_at'])
 
-    @test.idempotent_id('432ae0d3-32b4-413e-a9b3-091ac76da31b')
+    @decorators.idempotent_id('432ae0d3-32b4-413e-a9b3-091ac76da31b')
     def test_update_sg_with_timestamp(self):
         sgc, _ = self._create_security_group()
         sg = sgc['security_group']
@@ -290,7 +291,7 @@
         # Verify that origin_updated_at is not same with new_updated_at
         self.assertIsNot(origin_updated_at, new_updated_at)
 
-    @test.idempotent_id('521e6723-43d6-12a6-8c3d-f5042ad9fc32')
+    @decorators.idempotent_id('521e6723-43d6-12a6-8c3d-f5042ad9fc32')
     def test_show_sg_attribute_with_timestamp(self):
         sg, _ = self._create_security_group()
         body = self.client.show_security_group(sg['security_group']['id'])
@@ -320,14 +321,14 @@
         )
         return rule_create_body['security_group_rule']
 
-    @test.idempotent_id('83e8bd32-43e0-a3f0-1af3-12a5733c653e')
+    @decorators.idempotent_id('83e8bd32-43e0-a3f0-1af3-12a5733c653e')
     def test_create_sgrule_with_timestamp(self):
         sgrule = self._prepare_sgrule_test()
         # Verifies body contains timestamp fields
         self.assertIsNotNone(sgrule['created_at'])
         self.assertIsNotNone(sgrule['updated_at'])
 
-    @test.idempotent_id('143da0e6-ba17-43ad-b3d7-03aa759c3cb4')
+    @decorators.idempotent_id('143da0e6-ba17-43ad-b3d7-03aa759c3cb4')
     def test_show_sgrule_attribute_with_timestamp(self):
         sgrule = self._prepare_sgrule_test()
         body = self.client.show_security_group_rule(sgrule['id'])
diff --git a/neutron/tests/tempest/api/test_trunk.py b/neutron/tests/tempest/api/test_trunk.py
index 6763517..62290c9 100644
--- a/neutron/tests/tempest/api/test_trunk.py
+++ b/neutron/tests/tempest/api/test_trunk.py
@@ -14,6 +14,7 @@
 
 from tempest.lib.common.utils import data_utils
 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
 
@@ -81,15 +82,15 @@
         observed_trunk = self._show_trunk(trunk['trunk']['id'])
         self.assertEqual(trunk, observed_trunk)
 
-    @test.idempotent_id('e1a6355c-4768-41f3-9bf8-0f1d192bd501')
+    @decorators.idempotent_id('e1a6355c-4768-41f3-9bf8-0f1d192bd501')
     def test_create_trunk_empty_subports_list(self):
         self._test_create_trunk([])
 
-    @test.idempotent_id('382dfa39-ca03-4bd3-9a1c-91e36d2e3796')
+    @decorators.idempotent_id('382dfa39-ca03-4bd3-9a1c-91e36d2e3796')
     def test_create_trunk_subports_not_specified(self):
         self._test_create_trunk(None)
 
-    @test.idempotent_id('7de46c22-e2b6-4959-ac5a-0e624632ab32')
+    @decorators.idempotent_id('7de46c22-e2b6-4959-ac5a-0e624632ab32')
     def test_create_show_delete_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(None)
         trunk_id = trunk['trunk']['id']
@@ -100,7 +101,7 @@
         self.client.delete_trunk(trunk_id)
         self.assertRaises(lib_exc.NotFound, self._show_trunk, trunk_id)
 
-    @test.idempotent_id('8d83a6ca-662d-45b8-8062-d513077296aa')
+    @decorators.idempotent_id('8d83a6ca-662d-45b8-8062-d513077296aa')
     @test.requires_ext(extension="project-id", service="network")
     def test_show_trunk_has_project_id(self):
         trunk = self._create_trunk_with_network_and_parent(None)
@@ -111,7 +112,7 @@
         self.assertEqual(self.client.tenant_id, show_trunk['project_id'])
         self.assertEqual(self.client.tenant_id, show_trunk['tenant_id'])
 
-    @test.idempotent_id('4ce46c22-a2b6-4659-bc5a-0ef2463cab32')
+    @decorators.idempotent_id('4ce46c22-a2b6-4659-bc5a-0ef2463cab32')
     def test_create_update_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(None)
         self.assertEqual(1, trunk['trunk']['revision_number'])
@@ -129,7 +130,7 @@
         # enable the trunk so that it can be managed
         self.client.update_trunk(trunk_id, admin_state_up=True)
 
-    @test.idempotent_id('5ff46c22-a2b6-5559-bc5a-0ef2463cab32')
+    @decorators.idempotent_id('5ff46c22-a2b6-5559-bc5a-0ef2463cab32')
     def test_create_update_trunk_with_description(self):
         trunk = self._create_trunk_with_network_and_parent(
             None, description="foo description")
@@ -138,7 +139,7 @@
         trunk = self.client.update_trunk(trunk_id, description='')
         self.assertEqual('', trunk['trunk']['description'])
 
-    @test.idempotent_id('73365f73-bed6-42cd-960b-ec04e0c99d85')
+    @decorators.idempotent_id('73365f73-bed6-42cd-960b-ec04e0c99d85')
     def test_list_trunks(self):
         trunk1 = self._create_trunk_with_network_and_parent(None)
         trunk2 = self._create_trunk_with_network_and_parent(None)
@@ -150,7 +151,7 @@
         for trunk in matched_trunks:
             self.assertEqual(expected_trunks[trunk['id']], trunk)
 
-    @test.idempotent_id('bb5fcead-09b5-484a-bbe6-46d1e06d6cc0')
+    @decorators.idempotent_id('bb5fcead-09b5-484a-bbe6-46d1e06d6cc0')
     def test_add_subport(self):
         trunk = self._create_trunk_with_network_and_parent([])
         network = self.create_network()
@@ -165,7 +166,7 @@
         created_subport = observed_subports[0]
         self.assertEqual(subports[0], created_subport)
 
-    @test.idempotent_id('ee5fcead-1abf-483a-bce6-43d1e06d6aa0')
+    @decorators.idempotent_id('ee5fcead-1abf-483a-bce6-43d1e06d6aa0')
     def test_delete_trunk_with_subport_is_allowed(self):
         network = self.create_network()
         port = self.create_port(network)
@@ -175,7 +176,7 @@
         trunk = self._create_trunk_with_network_and_parent(subports)
         self.client.delete_trunk(trunk['trunk']['id'])
 
-    @test.idempotent_id('96eea398-a03c-4c3e-a99e-864392c2ca53')
+    @decorators.idempotent_id('96eea398-a03c-4c3e-a99e-864392c2ca53')
     def test_remove_subport(self):
         subport_parent1 = self.create_port(self.create_network())
         subport_parent2 = self.create_port(self.create_network())
@@ -206,7 +207,7 @@
         self.assertEqual(1, len(observed_subports))
         self.assertEqual(expected_subport, observed_subports[0])
 
-    @test.idempotent_id('bb5fcaad-09b5-484a-dde6-4cd1ea6d6ff0')
+    @decorators.idempotent_id('bb5fcaad-09b5-484a-dde6-4cd1ea6d6ff0')
     def test_get_subports(self):
         network = self.create_network()
         port = self.create_port(network)
@@ -256,7 +257,7 @@
 
 class TrunkTestMtusJSON(TrunkTestMtusJSONBase):
 
-    @test.idempotent_id('0f05d98e-41f5-4629-ac29-9aee269c9602')
+    @decorators.idempotent_id('0f05d98e-41f5-4629-ac29-9aee269c9602')
     def test_create_trunk_with_mtu_greater_than_subport(self):
         subports = [{'port_id': self.smaller_mtu_port['id'],
                      'segmentation_type': 'vlan',
@@ -265,7 +266,7 @@
         trunk = self.client.create_trunk(self.larger_mtu_port['id'], subports)
         self.trunks.append(trunk['trunk'])
 
-    @test.idempotent_id('2004c5c6-e557-4c43-8100-c820ad4953e8')
+    @decorators.idempotent_id('2004c5c6-e557-4c43-8100-c820ad4953e8')
     def test_add_subport_with_mtu_smaller_than_trunk(self):
         subports = [{'port_id': self.smaller_mtu_port['id'],
                      'segmentation_type': 'vlan',
@@ -276,7 +277,7 @@
 
         self.client.add_subports(trunk['trunk']['id'], subports)
 
-    @test.idempotent_id('22725101-f4bc-4e00-84ec-4e02cd7e0500')
+    @decorators.idempotent_id('22725101-f4bc-4e00-84ec-4e02cd7e0500')
     def test_create_trunk_with_mtu_equal_to_subport(self):
         subports = [{'port_id': self.smaller_mtu_port['id'],
                      'segmentation_type': 'vlan',
@@ -286,7 +287,7 @@
                                          subports)
         self.trunks.append(trunk['trunk'])
 
-    @test.idempotent_id('175b05ae-66ad-44c7-857a-a12d16f1058f')
+    @decorators.idempotent_id('175b05ae-66ad-44c7-857a-a12d16f1058f')
     def test_add_subport_with_mtu_equal_to_trunk(self):
         subports = [{'port_id': self.smaller_mtu_port['id'],
                      'segmentation_type': 'vlan',
@@ -324,38 +325,38 @@
         trunks_cleanup(cls.client, cls.trunks)
         super(TrunksSearchCriteriaTest, cls).resource_cleanup()
 
-    @test.idempotent_id('fab73df4-960a-4ae3-87d3-60992b8d3e2d')
+    @decorators.idempotent_id('fab73df4-960a-4ae3-87d3-60992b8d3e2d')
     def test_list_sorts_asc(self):
         self._test_list_sorts_asc()
 
-    @test.idempotent_id('a426671d-7270-430f-82ff-8f33eec93010')
+    @decorators.idempotent_id('a426671d-7270-430f-82ff-8f33eec93010')
     def test_list_sorts_desc(self):
         self._test_list_sorts_desc()
 
-    @test.idempotent_id('b202fdc8-6616-45df-b6a0-463932de6f94')
+    @decorators.idempotent_id('b202fdc8-6616-45df-b6a0-463932de6f94')
     def test_list_pagination(self):
         self._test_list_pagination()
 
-    @test.idempotent_id('c4723b8e-8186-4b9a-bf9e-57519967e048')
+    @decorators.idempotent_id('c4723b8e-8186-4b9a-bf9e-57519967e048')
     def test_list_pagination_with_marker(self):
         self._test_list_pagination_with_marker()
 
-    @test.idempotent_id('dcd02a7a-f07e-4d5e-b0ca-b58e48927a9b')
+    @decorators.idempotent_id('dcd02a7a-f07e-4d5e-b0ca-b58e48927a9b')
     def test_list_pagination_with_href_links(self):
         self._test_list_pagination_with_href_links()
 
-    @test.idempotent_id('eafe7024-77ab-4cfe-824b-0b2bf4217727')
+    @decorators.idempotent_id('eafe7024-77ab-4cfe-824b-0b2bf4217727')
     def test_list_no_pagination_limit_0(self):
         self._test_list_no_pagination_limit_0()
 
-    @test.idempotent_id('f8857391-dc44-40cc-89b7-2800402e03ce')
+    @decorators.idempotent_id('f8857391-dc44-40cc-89b7-2800402e03ce')
     def test_list_pagination_page_reverse_asc(self):
         self._test_list_pagination_page_reverse_asc()
 
-    @test.idempotent_id('ae51e9c9-ceae-4ec0-afd4-147569247699')
+    @decorators.idempotent_id('ae51e9c9-ceae-4ec0-afd4-147569247699')
     def test_list_pagination_page_reverse_desc(self):
         self._test_list_pagination_page_reverse_desc()
 
-    @test.idempotent_id('b4293e59-d794-4a93-be09-38667199ef68')
+    @decorators.idempotent_id('b4293e59-d794-4a93-be09-38667199ef68')
     def test_list_pagination_page_reverse_with_href_links(self):
         self._test_list_pagination_page_reverse_with_href_links()
diff --git a/neutron/tests/tempest/api/test_trunk_details.py b/neutron/tests/tempest/api/test_trunk_details.py
index 0c91c45..2261b1c 100644
--- a/neutron/tests/tempest/api/test_trunk_details.py
+++ b/neutron/tests/tempest/api/test_trunk_details.py
@@ -12,7 +12,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import test
+from tempest.lib import decorators
 
 from neutron.tests.tempest.api import test_trunk
 
@@ -21,7 +21,7 @@
 
     extension = 'trunk-details'
 
-    @test.idempotent_id('f0bed24f-d36a-498b-b4e7-0d66e3fb7308')
+    @decorators.idempotent_id('f0bed24f-d36a-498b-b4e7-0d66e3fb7308')
     def test_port_resource_trunk_details_no_subports(self):
         trunk = self._create_trunk_with_network_and_parent([])
         port = self.client.show_port(trunk['trunk']['port_id'])
@@ -32,7 +32,7 @@
         self.assertEqual(expected_trunk_details,
                          observed_trunk_details)
 
-    @test.idempotent_id('544bcaf2-86fb-4930-93ab-ece1c3cc33df')
+    @decorators.idempotent_id('544bcaf2-86fb-4930-93ab-ece1c3cc33df')
     def test_port_resource_trunk_details_with_subport(self):
         subport_network = self.create_network()
         subport = self.create_port(subport_network)
@@ -49,7 +49,7 @@
         self.assertEqual(expected_trunk_details,
                          observed_trunk_details)
 
-    @test.idempotent_id('fe6d865f-1d5c-432e-b65d-904157172f24')
+    @decorators.idempotent_id('fe6d865f-1d5c-432e-b65d-904157172f24')
     def test_port_resource_empty_trunk_details(self):
         network = self.create_network()
         port = self.create_port(network)
diff --git a/neutron/tests/tempest/api/test_trunk_negative.py b/neutron/tests/tempest/api/test_trunk_negative.py
index b26dd75..585ef52 100644
--- a/neutron/tests/tempest/api/test_trunk_negative.py
+++ b/neutron/tests/tempest/api/test_trunk_negative.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 from oslo_utils import uuidutils
+from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 import testtools
@@ -23,13 +24,13 @@
 class TrunkTestJSON(test_trunk.TrunkTestJSONBase):
 
     @test.attr(type='negative')
-    @test.idempotent_id('1b5cf87a-1d3a-4a94-ba64-647153d54f32')
+    @decorators.idempotent_id('1b5cf87a-1d3a-4a94-ba64-647153d54f32')
     def test_create_trunk_nonexistent_port_id(self):
         self.assertRaises(lib_exc.NotFound, self.client.create_trunk,
                           uuidutils.generate_uuid(), [])
 
     @test.attr(type='negative')
-    @test.idempotent_id('980bca3b-b0be-45ac-8067-b401e445b796')
+    @decorators.idempotent_id('980bca3b-b0be-45ac-8067-b401e445b796')
     def test_create_trunk_nonexistent_subport_port_id(self):
         network = self.create_network()
         parent_port = self.create_port(network)
@@ -40,7 +41,7 @@
                             'segmentation_id': 2}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('a5c5200a-72a0-43c5-a11a-52f808490344')
+    @decorators.idempotent_id('a5c5200a-72a0-43c5-a11a-52f808490344')
     def test_create_subport_nonexistent_port_id(self):
         trunk = self._create_trunk_with_network_and_parent([])
         self.assertRaises(lib_exc.NotFound, self.client.add_subports,
@@ -50,7 +51,7 @@
                             'segmentation_id': 2}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('80deb6a9-da2a-48db-b7fd-bcef5b14edc1')
+    @decorators.idempotent_id('80deb6a9-da2a-48db-b7fd-bcef5b14edc1')
     def test_create_subport_nonexistent_trunk(self):
         network = self.create_network()
         parent_port = self.create_port(network)
@@ -61,7 +62,7 @@
                             'segmentation_id': 2}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('7e0f99ab-fe37-408b-a889-9e44ef300084')
+    @decorators.idempotent_id('7e0f99ab-fe37-408b-a889-9e44ef300084')
     def test_create_subport_missing_segmentation_id(self):
         trunk = self._create_trunk_with_network_and_parent([])
         subport_network = self.create_network()
@@ -72,7 +73,7 @@
                             'segmentation_type': 'vlan'}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('a315d78b-2f43-4efa-89ae-166044c568aa')
+    @decorators.idempotent_id('a315d78b-2f43-4efa-89ae-166044c568aa')
     def test_create_trunk_with_subport_missing_segmentation_id(self):
         subport_network = self.create_network()
         parent_port = self.create_port(subport_network)
@@ -82,7 +83,7 @@
                             'segmentation_type': 'vlan'}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('33498618-f75a-4796-8ae6-93d4fd203fa4')
+    @decorators.idempotent_id('33498618-f75a-4796-8ae6-93d4fd203fa4')
     def test_create_trunk_with_subport_missing_segmentation_type(self):
         subport_network = self.create_network()
         parent_port = self.create_port(subport_network)
@@ -92,7 +93,7 @@
                             'segmentation_id': 3}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('a717691c-4e07-4d81-a98d-6f1c18c5d183')
+    @decorators.idempotent_id('a717691c-4e07-4d81-a98d-6f1c18c5d183')
     def test_create_trunk_with_subport_missing_port_id(self):
         subport_network = self.create_network()
         parent_port = self.create_port(subport_network)
@@ -102,7 +103,7 @@
                             'segmentation_id': 3}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('40aed9be-e976-47d0-a555-bde2c7e74e57')
+    @decorators.idempotent_id('40aed9be-e976-47d0-a555-bde2c7e74e57')
     def test_create_trunk_duplicate_subport_segmentation_ids(self):
         trunk = self._create_trunk_with_network_and_parent([])
         subport_network1 = self.create_network()
@@ -119,7 +120,7 @@
                             'segmentation_type': 'vlan'}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('6f132ccc-1380-42d8-9c44-50411612bd01')
+    @decorators.idempotent_id('6f132ccc-1380-42d8-9c44-50411612bd01')
     def test_add_subport_port_id_uses_trunk_port_id(self):
         trunk = self._create_trunk_with_network_and_parent(None)
         self.assertRaises(lib_exc.Conflict, self.client.add_subports,
@@ -129,7 +130,7 @@
                             'segmentation_id': 2}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('7f132ccc-1380-42d8-9c44-50411612bd01')
+    @decorators.idempotent_id('7f132ccc-1380-42d8-9c44-50411612bd01')
     def test_add_subport_port_id_disabled_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(
             None, admin_state_up=False)
@@ -143,7 +144,7 @@
             trunk['trunk']['id'], admin_state_up=True)
 
     @test.attr(type='negative')
-    @test.idempotent_id('8f132ccc-1380-42d8-9c44-50411612bd01')
+    @decorators.idempotent_id('8f132ccc-1380-42d8-9c44-50411612bd01')
     def test_remove_subport_port_id_disabled_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(
             None, admin_state_up=False)
@@ -157,7 +158,7 @@
             trunk['trunk']['id'], admin_state_up=True)
 
     @test.attr(type='negative')
-    @test.idempotent_id('9f132ccc-1380-42d8-9c44-50411612bd01')
+    @decorators.idempotent_id('9f132ccc-1380-42d8-9c44-50411612bd01')
     def test_delete_trunk_disabled_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(
             None, admin_state_up=False)
@@ -168,7 +169,7 @@
             trunk['trunk']['id'], admin_state_up=True)
 
     @test.attr(type='negative')
-    @test.idempotent_id('00cb40bb-1593-44c8-808c-72b47e64252f')
+    @decorators.idempotent_id('00cb40bb-1593-44c8-808c-72b47e64252f')
     def test_add_subport_duplicate_segmentation_details(self):
         trunk = self._create_trunk_with_network_and_parent(None)
         network = self.create_network()
@@ -185,7 +186,7 @@
                             'segmentation_id': 2}])
 
     @test.attr(type='negative')
-    @test.idempotent_id('4eac8c25-83ee-4051-9620-34774f565730')
+    @decorators.idempotent_id('4eac8c25-83ee-4051-9620-34774f565730')
     def test_add_subport_passing_dict(self):
         trunk = self._create_trunk_with_network_and_parent(None)
         self.assertRaises(lib_exc.BadRequest, self.client.add_subports,
@@ -195,7 +196,7 @@
                            'segmentation_id': 2})
 
     @test.attr(type='negative')
-    @test.idempotent_id('17ca7dd7-96a8-445a-941e-53c0c86c2fe2')
+    @decorators.idempotent_id('17ca7dd7-96a8-445a-941e-53c0c86c2fe2')
     def test_remove_subport_passing_dict(self):
         network = self.create_network()
         parent_port = self.create_port(network)
@@ -207,7 +208,7 @@
                           trunk['trunk']['id'], subport_data)
 
     @test.attr(type='negative')
-    @test.idempotent_id('aaca7dd7-96b8-445a-931e-63f0d86d2fe2')
+    @decorators.idempotent_id('aaca7dd7-96b8-445a-931e-63f0d86d2fe2')
     def test_remove_subport_not_found(self):
         network = self.create_network()
         parent_port = self.create_port(network)
@@ -219,14 +220,14 @@
                           trunk['trunk']['id'], [subport_data])
 
     @test.attr(type='negative')
-    @test.idempotent_id('6c9c5126-4f61-11e6-8248-40a8f063c891')
+    @decorators.idempotent_id('6c9c5126-4f61-11e6-8248-40a8f063c891')
     def test_delete_port_in_use_by_trunk(self):
         trunk = self._create_trunk_with_network_and_parent(None)
         self.assertRaises(lib_exc.Conflict, self.client.delete_port,
                           trunk['trunk']['port_id'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('343a03d0-4f7c-11e6-97fa-40a8f063c891')
+    @decorators.idempotent_id('343a03d0-4f7c-11e6-97fa-40a8f063c891')
     def test_delete_port_in_use_by_subport(self):
         network = self.create_network()
         port = self.create_port(network)
@@ -244,7 +245,7 @@
         ['net-mtu'] + test_trunk.TrunkTestMtusJSONBase.required_extensions)
 
     @test.attr(type='negative')
-    @test.idempotent_id('228380ef-1b7a-495e-b759-5b1f08e3e858')
+    @decorators.idempotent_id('228380ef-1b7a-495e-b759-5b1f08e3e858')
     def test_create_trunk_with_mtu_smaller_than_subport(self):
         subports = [{'port_id': self.larger_mtu_port['id'],
                      'segmentation_type': 'vlan',
@@ -256,7 +257,7 @@
             self.trunks.append(trunk['trunk'])
 
     @test.attr(type='negative')
-    @test.idempotent_id('3b32bf77-8002-403e-ad01-6f4cf018daa5')
+    @decorators.idempotent_id('3b32bf77-8002-403e-ad01-6f4cf018daa5')
     def test_add_subport_with_mtu_greater_than_trunk(self):
         subports = [{'port_id': self.larger_mtu_port['id'],
                      'segmentation_type': 'vlan',