Merge "Use single underscore variable in loop iteration(in identity)"
diff --git a/tempest/api/identity/admin/v2/test_endpoints.py b/tempest/api/identity/admin/v2/test_endpoints.py
index 651a316..0da579c 100644
--- a/tempest/api/identity/admin/v2/test_endpoints.py
+++ b/tempest/api/identity/admin/v2/test_endpoints.py
@@ -34,7 +34,7 @@
         cls.service_ids.append(cls.service_id)
         # Create endpoints so as to use for LIST and GET test cases
         cls.setup_endpoints = list()
-        for i in range(2):
+        for _ in range(2):
             region = data_utils.rand_name('region')
             url = data_utils.rand_url()
             endpoint = cls.endpoints_client.create_endpoint(
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index a0d8748..d4fe32d 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -31,7 +31,7 @@
         u_desc = '%s description' % u_name
         u_email = '%s@testmail.tm' % u_name
         u_password = data_utils.rand_password()
-        for i in range(2):
+        for _ in range(2):
             cls.project = cls.projects_client.create_project(
                 data_utils.rand_name('project'),
                 description=data_utils.rand_name('project-desc'))['project']
@@ -92,7 +92,7 @@
         created_cred_ids = list()
         fetched_cred_ids = list()
 
-        for i in range(2):
+        for _ in range(2):
             blob = '{"access": "%s", "secret": "%s"}' % (
                 data_utils.rand_name('Access'), data_utils.rand_name('Secret'))
             cred = self.creds_client.create_credential(
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 655e4ef..ef450a2 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -40,7 +40,7 @@
         cls.service_ids.append(cls.service_id)
         # Create endpoints so as to use for LIST and GET test cases
         cls.setup_endpoints = list()
-        for i in range(2):
+        for _ in range(2):
             region = data_utils.rand_name('region')
             url = data_utils.rand_url()
             interface = 'public'
diff --git a/tempest/api/identity/admin/v3/test_groups.py b/tempest/api/identity/admin/v3/test_groups.py
index 3cbcc1f..34b4468 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -80,7 +80,7 @@
         self.addCleanup(self.groups_client.delete_group, group['id'])
         # add user into group
         users = []
-        for i in range(3):
+        for _ in range(3):
             name = data_utils.rand_name('User')
             password = data_utils.rand_password()
             user = self.users_client.create_user(name=name,
@@ -110,7 +110,7 @@
         self.addCleanup(self.users_client.delete_user, user['id'])
         # create two groups, and add user into them
         groups = []
-        for i in range(2):
+        for _ in range(2):
             name = data_utils.rand_name('Group')
             group = self.groups_client.create_group(
                 name=name, domain_id=self.domain['id'])['group']
diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py
index 95894a6..b5ea90d 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.py
@@ -30,7 +30,7 @@
     def resource_setup(cls):
         super(RegionsTestJSON, cls).resource_setup()
         cls.setup_regions = list()
-        for i in range(2):
+        for _ in range(2):
             r_description = data_utils.rand_name('description')
             region = cls.client.create_region(
                 description=r_description)['region']
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 3ec4ff1..54c62c7 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -125,7 +125,7 @@
 
         user = self.users_client.show_user(user_body['id'])['user']
         role = self.roles_client.show_role(role_body['id'])['role']
-        for i in range(2):
+        for _ in range(2):
             # Creating project so as to assign role
             project_body = self.projects_client.create_project(
                 data_utils.rand_name('project'),
diff --git a/tempest/api/identity/v2/test_users.py b/tempest/api/identity/v2/test_users.py
index bafb1f2..06730f8 100644
--- a/tempest/api/identity/v2/test_users.py
+++ b/tempest/api/identity/v2/test_users.py
@@ -58,7 +58,7 @@
         if CONF.identity_feature_enabled.security_compliance:
             # First we need to clear the password history
             unique_count = CONF.identity.user_unique_last_password_count
-            for i in range(unique_count):
+            for _ in range(unique_count):
                 random_pass = data_utils.rand_password()
                 self._update_password(
                     user_id, original_password=new_pass, password=random_pass)
diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py
index f389a8f..9592cb9 100644
--- a/tempest/api/identity/v3/test_users.py
+++ b/tempest/api/identity/v3/test_users.py
@@ -60,7 +60,7 @@
         if CONF.identity_feature_enabled.security_compliance:
             # First we need to clear the password history
             unique_count = CONF.identity.user_unique_last_password_count
-            for i in range(unique_count):
+            for _ in range(unique_count):
                 random_pass = data_utils.rand_password()
                 self._update_password(
                     original_password=new_pass, password=random_pass)
@@ -142,7 +142,7 @@
 
         # Lock user account by using the wrong password to login
         bad_password = data_utils.rand_password()
-        for i in range(CONF.identity.user_lockout_failure_attempts):
+        for _ in range(CONF.identity.user_lockout_failure_attempts):
             self.assertRaises(exceptions.Unauthorized,
                               self.non_admin_token.auth,
                               user_id=self.user_id,