Add UUIDs to all tempest tests and gate check

Adds uuid4 as a decorator of the form:
@test.idempotent_id('12345678-1234-1234-1234-123456789abc')
to every test in the Tempest tree. Includes a gate check to
ensure the existence and uniqueness of the ids.

Modify check tool to ignore Tempest unit tests.

Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559
Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com>
Implements: bp test-uuid
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index f22ceec..6fbd544 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -51,6 +51,7 @@
         self.creds_client.delete_credential(cred_id)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('7cd59bf9-bda4-4c72-9467-d21cab278355')
     def test_credentials_create_get_update_delete(self):
         keys = [data_utils.rand_name('Access-'),
                 data_utils.rand_name('Secret-')]
@@ -83,6 +84,7 @@
                              get_body['blob'][value2])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('13202c00-0021-42a1-88d4-81b44d448aab')
     def test_credentials_list_delete(self):
         created_cred_ids = list()
         fetched_cred_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_default_project_id.py b/tempest/api/identity/admin/v3/test_default_project_id.py
index 649ca34..ae4951d 100644
--- a/tempest/api/identity/admin/v3/test_default_project_id.py
+++ b/tempest/api/identity/admin/v3/test_default_project_id.py
@@ -34,6 +34,7 @@
         self.client.delete_domain(domain_id)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('d6110661-6a71-49a7-a453-b5e26640ff6d')
     def test_default_project_id(self):
         # create a domain
         dom_name = data_utils.rand_name('dom')
diff --git a/tempest/api/identity/admin/v3/test_domains.py b/tempest/api/identity/admin/v3/test_domains.py
index 0914674..6c634b8 100644
--- a/tempest/api/identity/admin/v3/test_domains.py
+++ b/tempest/api/identity/admin/v3/test_domains.py
@@ -28,6 +28,7 @@
         self.client.delete_domain(domain_id)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('8cf516ef-2114-48f1-907b-d32726c734d4')
     def test_list_domains(self):
         # Test to list domains
         domain_ids = list()
@@ -47,6 +48,7 @@
         self.assertEqual(0, len(missing_doms))
 
     @test.attr(type='smoke')
+    @test.idempotent_id('f2f5b44a-82e8-4dad-8084-0661ea3b18cf')
     def test_create_update_delete_domain(self):
         d_name = data_utils.rand_name('domain-')
         d_desc = data_utils.rand_name('domain-desc-')
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 75cb6bd..4a11c95 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -57,6 +57,7 @@
         super(EndPointsTestJSON, cls).resource_cleanup()
 
     @test.attr(type='gate')
+    @test.idempotent_id('c19ecf90-240e-4e23-9966-21cee3f6a618')
     def test_list_endpoints(self):
         # Get a list of endpoints
         fetched_endpoints = self.client.list_endpoints()
@@ -68,6 +69,7 @@
                          ', '.join(str(e) for e in missing_endpoints))
 
     @test.attr(type='gate')
+    @test.idempotent_id('0e2446d2-c1fd-461b-a729-b9e73e3e3b37')
     def test_create_list_delete_endpoint(self):
         region = data_utils.rand_name('region')
         url = data_utils.rand_url()
@@ -91,6 +93,7 @@
         self.assertNotIn(endpoint['id'], fetched_endpoints_id)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('37e8f15e-ee7c-4657-a1e7-f6b61e375eff')
     def test_update_endpoint(self):
         # Creating an endpoint so as to check update endpoint
         # with new values
diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py
index ff450e1..06c8e77 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -49,6 +49,7 @@
         super(EndpointsNegativeTestJSON, cls).resource_cleanup()
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('ac6c137e-4d3d-448f-8c83-4f13d0942651')
     def test_create_with_enabled_False(self):
         # Enabled should be a boolean, not a string like 'False'
         interface = 'public'
@@ -59,6 +60,7 @@
                           force_enabled='False')
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('9c43181e-0627-484a-8c79-923e8a59598b')
     def test_create_with_enabled_True(self):
         # Enabled should be a boolean, not a string like 'True'
         interface = 'public'
@@ -83,11 +85,13 @@
                           endpoint_for_update['id'], force_enabled=enabled)
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('65e41f32-5eb7-498f-a92a-a6ccacf7439a')
     def test_update_with_enabled_False(self):
         # Enabled should be a boolean, not a string like 'False'
         self._assert_update_raises_bad_request('False')
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('faba3587-f066-4757-a48e-b4a3f01803bb')
     def test_update_with_enabled_True(self):
         # Enabled should be a boolean, not a string like 'True'
         self._assert_update_raises_bad_request('True')
diff --git a/tempest/api/identity/admin/v3/test_groups.py b/tempest/api/identity/admin/v3/test_groups.py
index d4a83e2..2c70a7c 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -21,6 +21,7 @@
 class GroupsV3TestJSON(base.BaseIdentityV3AdminTest):
 
     @test.attr(type='smoke')
+    @test.idempotent_id('2e80343b-6c81-4ac3-88c7-452f3e9d5129')
     def test_group_create_update_get(self):
         name = data_utils.rand_name('Group')
         description = data_utils.rand_name('Description')
@@ -44,6 +45,7 @@
         self.assertEqual(new_desc, new_group['description'])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('1598521a-2f36-4606-8df9-30772bd51339')
     def test_group_users_add_list_delete(self):
         name = data_utils.rand_name('Group')
         group = self.client.create_group(name)
@@ -68,6 +70,7 @@
         self.assertEqual(len(group_users), 0)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('64573281-d26a-4a52-b899-503cb0f4e4ec')
     def test_list_user_groups(self):
         # create a user
         user = self.client.create_user(
@@ -88,6 +91,7 @@
         self.assertEqual(2, len(user_groups))
 
     @test.attr(type='smoke')
+    @test.idempotent_id('cc9a57a5-a9ed-4f2d-a29f-4f979a06ec71')
     def test_list_groups(self):
         # Test to list groups
         group_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_list_projects.py b/tempest/api/identity/admin/v3/test_list_projects.py
index 24b130c..ca30b6e 100644
--- a/tempest/api/identity/admin/v3/test_list_projects.py
+++ b/tempest/api/identity/admin/v3/test_list_projects.py
@@ -38,6 +38,7 @@
         cls.project_ids.append(cls.p2['id'])
 
     @test.attr(type='gate')
+    @test.idempotent_id('1d830662-22ad-427c-8c3e-4ec854b0af44')
     def test_projects_list(self):
         # List projects
         list_projects = self.client.list_projects()
@@ -47,17 +48,20 @@
             self.assertIn(get_project, list_projects)
 
     @test.attr(type='gate')
+    @test.idempotent_id('fab13f3c-f6a6-4b9f-829b-d32fd44fdf10')
     def test_list_projects_with_domains(self):
         # List projects with domain
         self._list_projects_with_params(
             {'domain_id': self.data.domain['id']}, 'domain_id')
 
     @test.attr(type='gate')
+    @test.idempotent_id('0fe7a334-675a-4509-b00e-1c4b95d5dae8')
     def test_list_projects_with_enabled(self):
         # List the projects with enabled
         self._list_projects_with_params({'enabled': False}, 'enabled')
 
     @test.attr(type='gate')
+    @test.idempotent_id('fa178524-4e6d-4925-907c-7ab9f42c7e26')
     def test_list_projects_with_name(self):
         # List projects with name
         self._list_projects_with_params({'name': self.p1_name}, 'name')
diff --git a/tempest/api/identity/admin/v3/test_list_users.py b/tempest/api/identity/admin/v3/test_list_users.py
index a6c3309..1407f38 100644
--- a/tempest/api/identity/admin/v3/test_list_users.py
+++ b/tempest/api/identity/admin/v3/test_list_users.py
@@ -51,6 +51,7 @@
         cls.data.v3_users.append(cls.non_domain_enabled_user)
 
     @test.attr(type='gate')
+    @test.idempotent_id('08f9aabb-dcfe-41d0-8172-82b5fa0bd73d')
     def test_list_user_domains(self):
         # List users with domain
         params = {'domain_id': self.data.domain['id']}
@@ -59,6 +60,7 @@
                                      self.non_domain_enabled_user)
 
     @test.attr(type='gate')
+    @test.idempotent_id('bff8bf2f-9408-4ef5-b63a-753c8c2124eb')
     def test_list_users_with_not_enabled(self):
         # List the users with not enabled
         params = {'enabled': False}
@@ -67,6 +69,7 @@
                                      self.domain_enabled_user)
 
     @test.attr(type='gate')
+    @test.idempotent_id('c285bb37-7325-4c02-bff3-3da5d946d683')
     def test_list_users_with_name(self):
         # List users with name
         params = {'name': self.domain_enabled_user['name']}
@@ -75,6 +78,7 @@
                                      self.non_domain_enabled_user)
 
     @test.attr(type='gate')
+    @test.idempotent_id('b30d4651-a2ea-4666-8551-0c0e49692635')
     def test_list_users(self):
         # List users
         body = self.client.get_users()
@@ -86,6 +90,7 @@
                          ', '.join(m_user for m_user in missing_users))
 
     @test.attr(type='gate')
+    @test.idempotent_id('b4baa3ae-ac00-4b4e-9e27-80deaad7771f')
     def test_get_user(self):
         # Get a user detail
         user = self.client.get_user(self.data.v3_users[0]['id'])
diff --git a/tempest/api/identity/admin/v3/test_policies.py b/tempest/api/identity/admin/v3/test_policies.py
index 0d5dc47..900c26e 100644
--- a/tempest/api/identity/admin/v3/test_policies.py
+++ b/tempest/api/identity/admin/v3/test_policies.py
@@ -24,6 +24,7 @@
         self.policy_client.delete_policy(policy_id)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('1a0ad286-2d06-4123-ab0d-728893a76201')
     def test_list_policies(self):
         # Test to list policies
         policy_ids = list()
@@ -44,6 +45,7 @@
         self.assertEqual(0, len(missing_pols))
 
     @test.attr(type='smoke')
+    @test.idempotent_id('e544703a-2f03-4cf2-9b0f-350782fdb0d3')
     def test_create_update_delete_policy(self):
         # Test to update policy
         blob = data_utils.rand_name('BlobName-')
diff --git a/tempest/api/identity/admin/v3/test_projects.py b/tempest/api/identity/admin/v3/test_projects.py
index d879c7a..052cf0e 100644
--- a/tempest/api/identity/admin/v3/test_projects.py
+++ b/tempest/api/identity/admin/v3/test_projects.py
@@ -21,6 +21,7 @@
 class ProjectsTestJSON(base.BaseIdentityV3AdminTest):
 
     @test.attr(type='gate')
+    @test.idempotent_id('0ecf465c-0dc4-4532-ab53-91ffeb74d12d')
     def test_project_create_with_description(self):
         # Create project with a description
         project_name = data_utils.rand_name('project-')
@@ -38,6 +39,7 @@
                          'to be set')
 
     @test.attr(type='gate')
+    @test.idempotent_id('5f50fe07-8166-430b-a882-3b2ee0abe26f')
     def test_project_create_with_domain(self):
         # Create project with a domain
         self.data.setup_test_domain()
@@ -53,6 +55,7 @@
         self.assertEqual(self.data.domain['id'], body['domain_id'])
 
     @test.attr(type='gate')
+    @test.idempotent_id('1f66dc76-50cc-4741-a200-af984509e480')
     def test_project_create_enabled(self):
         # Create a project that is enabled
         project_name = data_utils.rand_name('project-')
@@ -67,6 +70,7 @@
         self.assertTrue(en2, 'Enable should be True in lookup')
 
     @test.attr(type='gate')
+    @test.idempotent_id('78f96a9c-e0e0-4ee6-a3ba-fbf6dfd03207')
     def test_project_create_not_enabled(self):
         # Create a project that is not enabled
         project_name = data_utils.rand_name('project-')
@@ -82,6 +86,7 @@
                          'Enable should be False in lookup')
 
     @test.attr(type='gate')
+    @test.idempotent_id('f608f368-048c-496b-ad63-d286c26dab6b')
     def test_project_update_name(self):
         # Update name attribute of a project
         p_name1 = data_utils.rand_name('project-')
@@ -103,6 +108,7 @@
         self.assertEqual(resp2_name, resp3_name)
 
     @test.attr(type='gate')
+    @test.idempotent_id('f138b715-255e-4a7d-871d-351e1ef2e153')
     def test_project_update_desc(self):
         # Update description attribute of a project
         p_name = data_utils.rand_name('project-')
@@ -126,6 +132,7 @@
         self.assertEqual(resp2_desc, resp3_desc)
 
     @test.attr(type='gate')
+    @test.idempotent_id('b6b25683-c97f-474d-a595-55d410b68100')
     def test_project_update_enable(self):
         # Update the enabled attribute of a project
         p_name = data_utils.rand_name('project-')
@@ -149,6 +156,7 @@
         self.assertEqual(resp2_en, resp3_en)
 
     @test.attr(type='gate')
+    @test.idempotent_id('59398d4a-5dc5-4f86-9a4c-c26cc804d6c6')
     def test_associate_user_to_project(self):
         # Associate a user to a project
         # Create a Project
diff --git a/tempest/api/identity/admin/v3/test_projects_negative.py b/tempest/api/identity/admin/v3/test_projects_negative.py
index a194198..bc92900 100644
--- a/tempest/api/identity/admin/v3/test_projects_negative.py
+++ b/tempest/api/identity/admin/v3/test_projects_negative.py
@@ -23,12 +23,14 @@
 class ProjectsNegativeTestJSON(base.BaseIdentityV3AdminTest):
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('24c49279-45dd-4155-887a-cb738c2385aa')
     def test_list_projects_by_unauthorized_user(self):
         # Non-admin user should not be able to list projects
         self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_projects)
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('874c3e84-d174-4348-a16b-8c01f599561b')
     def test_project_create_duplicate(self):
         # Project names should be unique
         project_name = data_utils.rand_name('project-dup-')
@@ -39,6 +41,7 @@
             lib_exc.Conflict, self.client.create_project, project_name)
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('8fba9de2-3e1f-4e77-812a-60cb68f8df13')
     def test_create_project_by_unauthorized_user(self):
         # Non-admin user should not be authorized to create a project
         project_name = data_utils.rand_name('project-')
@@ -47,12 +50,14 @@
             project_name)
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('7828db17-95e5-475b-9432-9a51b4aa79a9')
     def test_create_project_with_empty_name(self):
         # Project name should not be empty
         self.assertRaises(lib_exc.BadRequest, self.client.create_project,
                           name='')
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('502b6ceb-b0c8-4422-bf53-f08fdb21e2f0')
     def test_create_projects_name_length_over_64(self):
         # Project name length should not be greater than 64 characters
         project_name = 'a' * 65
@@ -60,6 +65,7 @@
                           project_name)
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('8d68c012-89e0-4394-8d6b-ccd7196def97')
     def test_project_delete_by_unauthorized_user(self):
         # Non-admin user should not be able to delete a project
         project_name = data_utils.rand_name('project-')
@@ -70,6 +76,7 @@
             project['id'])
 
     @test.attr(type=['negative', 'gate'])
+    @test.idempotent_id('7965b581-60c1-43b7-8169-95d4ab7fc6fb')
     def test_delete_non_existent_project(self):
         # Attempt to delete a non existent project should fail
         self.assertRaises(lib_exc.NotFound, self.client.delete_project,
diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py
index 2ea7107..bf3c12e 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.py
@@ -48,6 +48,7 @@
                           self.client.get_region, region_id)
 
     @test.attr(type='gate')
+    @test.idempotent_id('56186092-82e4-43f2-b954-91013218ba42')
     def test_create_update_get_delete_region(self):
         r_description = data_utils.rand_name('description-')
         region = self.client.create_region(
@@ -72,6 +73,7 @@
                          region['parent_region_id'])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('2c12c5b5-efcf-4aa5-90c5-bff1ab0cdbe2')
     def test_create_region_with_specific_id(self):
         # Create a region with a specific id
         r_region_id = data_utils.rand_uuid()
@@ -84,6 +86,7 @@
         self.assertEqual(r_description, region['description'])
 
     @test.attr(type='gate')
+    @test.idempotent_id('d180bf99-544a-445c-ad0d-0c0d27663796')
     def test_list_regions(self):
         # Get a list of regions
         fetched_regions = self.client.list_regions()
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index 747911b..24da22a 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -66,6 +66,7 @@
         self.assertIn(role_id, fetched_role_ids)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('18afc6c0-46cf-4911-824e-9989cc056c3a')
     def test_role_create_update_get_list(self):
         r_name = data_utils.rand_name('Role-')
         role = self.client.create_role(r_name)
@@ -88,6 +89,7 @@
         self.assertIn(role['id'], [r['id'] for r in roles])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('c6b80012-fe4a-498b-9ce8-eb391c05169f')
     def test_grant_list_revoke_role_to_user_on_project(self):
         self.client.assign_user_role_on_project(
             self.project['id'], self.user_body['id'], self.role['id'])
@@ -105,6 +107,7 @@
             self.project['id'], self.user_body['id'], self.role['id'])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('6c9a2940-3625-43a3-ac02-5dcec62ef3bd')
     def test_grant_list_revoke_role_to_user_on_domain(self):
         self.client.assign_user_role_on_domain(
             self.domain['id'], self.user_body['id'], self.role['id'])
@@ -122,6 +125,7 @@
             self.domain['id'], self.user_body['id'], self.role['id'])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('cbf11737-1904-4690-9613-97bcbb3df1c4')
     def test_grant_list_revoke_role_to_group_on_project(self):
         # Grant role to group on project
         self.client.assign_group_role_on_project(
@@ -152,6 +156,7 @@
             self.project['id'], self.group_body['id'], self.role['id'])
 
     @test.attr(type='smoke')
+    @test.idempotent_id('4bf8a70b-e785-413a-ad53-9f91ce02faa7')
     def test_grant_list_revoke_role_to_group_on_domain(self):
         self.client.assign_group_role_on_domain(
             self.domain['id'], self.group_body['id'], self.role['id'])
@@ -169,6 +174,7 @@
             self.domain['id'], self.group_body['id'], self.role['id'])
 
     @test.attr(type='gate')
+    @test.idempotent_id('f5654bcc-08c4-4f71-88fe-05d64e06de94')
     def test_list_roles(self):
         # Return a list of all roles
         body = self.client.list_roles()
diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
index 13e6d66..bf5cc3e 100644
--- a/tempest/api/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -30,6 +30,7 @@
                           service_id)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('5193aad5-bcb7-411d-85b0-b3b61b96ef06')
     def test_create_update_get_service(self):
         # Creating a Service
         name = data_utils.rand_name('service')
@@ -62,6 +63,7 @@
         self.assertDictContainsSubset(update_service, fetched_service)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('d1dcb1a1-2b6b-4da8-bbb8-5532ef6e8269')
     def test_create_service_without_description(self):
         # Create a service only with name and type
         name = data_utils.rand_name('service')
@@ -74,6 +76,7 @@
         self.assertDictContainsSubset(expected_data, service)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('e55908e8-360e-439e-8719-c3230a3e179e')
     def test_list_services(self):
         # Create, List, Verify and Delete Services
         service_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py
index 919eab9..47f9dbd 100644
--- a/tempest/api/identity/admin/v3/test_tokens.py
+++ b/tempest/api/identity/admin/v3/test_tokens.py
@@ -23,6 +23,7 @@
 class TokensV3TestJSON(base.BaseIdentityV3AdminTest):
 
     @test.attr(type='smoke')
+    @test.idempotent_id('0f9f5a5f-d5cd-4a86-8a5b-c5ded151f212')
     def test_tokens(self):
         # Valid user's token is authenticated
         # Create a User
@@ -48,6 +49,7 @@
                           subject_token)
 
     @test.attr(type='gate')
+    @test.idempotent_id('565fa210-1da1-4563-999b-f7b5b67cf112')
     def test_rescope_token(self):
         """Rescope a token.
 
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index e73ad1d..4b5075c 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -188,6 +188,7 @@
         self.addCleanup(self.cleanup_user_and_roles)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('5a0a91a4-baef-4a14-baba-59bf4d7fcace')
     def test_trust_impersonate(self):
         # Test case to check we can create, get and delete a trust
         # updates are not supported for trusts
@@ -200,6 +201,7 @@
         self.check_trust_roles()
 
     @test.attr(type='smoke')
+    @test.idempotent_id('ed2a8779-a7ac-49dc-afd7-30f32f936ed2')
     def test_trust_noimpersonate(self):
         # Test case to check we can create, get and delete a trust
         # with impersonation=False
@@ -212,6 +214,7 @@
         self.check_trust_roles()
 
     @test.attr(type='smoke')
+    @test.idempotent_id('0ed14b66-cefd-4b5c-a964-65759453e292')
     def test_trust_expire(self):
         # Test case to check we can create, get and delete a trust
         # with an expiry specified
@@ -234,6 +237,7 @@
         self.check_trust_roles()
 
     @test.attr(type='smoke')
+    @test.idempotent_id('3e48f95d-e660-4fa9-85e0-5a3d85594384')
     def test_trust_expire_invalid(self):
         # Test case to check we can check an invlaid expiry time
         # is rejected with the correct error
@@ -244,6 +248,7 @@
                           expires=expires_str)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('6268b345-87ca-47c0-9ce3-37792b43403a')
     def test_get_trusts_query(self):
         self.create_trust()
         trusts_get = self.trustor_client.get_trusts(
@@ -252,6 +257,7 @@
         self.validate_trust(trusts_get[0], summary=True)
 
     @test.attr(type='smoke')
+    @test.idempotent_id('4773ebd5-ecbf-4255-b8d8-b63e6f72b65d')
     def test_get_trusts_all(self):
         self.create_trust()
         trusts_get = self.client.get_trusts()
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 2481d9d..8120fa7 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -21,6 +21,7 @@
 class UsersV3TestJSON(base.BaseIdentityV3AdminTest):
 
     @test.attr(type='gate')
+    @test.idempotent_id('b537d090-afb9-4519-b95d-270b0708e87e')
     def test_user_update(self):
         # Test case to check if updating of user attributes is successful.
         # Creating first user
@@ -64,6 +65,7 @@
         self.assertEqual('false', str(new_user_get['enabled']).lower())
 
     @test.attr(type='gate')
+    @test.idempotent_id('2d223a0e-e457-4a70-9fb1-febe027a0ff9')
     def test_update_user_password(self):
         # Creating User to check password updation
         u_name = data_utils.rand_name('user')
@@ -85,6 +87,7 @@
         self.assertEqual(token_details['user']['name'], u_name)
 
     @test.attr(type='gate')
+    @test.idempotent_id('a831e70c-e35b-430b-92ed-81ebbc5437b8')
     def test_list_user_projects(self):
         # List the projects that a user has access upon
         assigned_project_ids = list()
@@ -138,6 +141,7 @@
                                    in missing_projects))
 
     @test.attr(type='gate')
+    @test.idempotent_id('c10dcd90-461d-4b16-8e23-4eb836c00644')
     def test_get_user(self):
         # Get a user detail
         self.data.setup_test_v3_user()