[V3 identity] Renaming service_client into services_client

1. The service_client.py file was renamed into services_client.py
2. The ServiceClient class was renamed into ServicesClient
3. The service_client variables were renamed into services_client

Partially implements blueprint consistent-service-method-names

Change-Id: I766841b19ea33426371f53651d55bc31feb6790c
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 429e2e3..2ac832e 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -34,8 +34,8 @@
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
         cls.service_data = (
-            cls.service_client.create_service(name=s_name, type=s_type,
-                                              description=s_description))
+            cls.services_client.create_service(name=s_name, type=s_type,
+                                               description=s_description))
         cls.service_data = cls.service_data['service']
         cls.service_id = cls.service_data['id']
         cls.service_ids.append(cls.service_id)
@@ -56,7 +56,7 @@
         for e in cls.setup_endpoints:
             cls.client.delete_endpoint(e['id'])
         for s in cls.service_ids:
-            cls.service_client.delete_service(s)
+            cls.services_client.delete_service(s)
         super(EndPointsTestJSON, cls).resource_cleanup()
 
     @test.idempotent_id('c19ecf90-240e-4e23-9966-21cee3f6a618')
@@ -113,8 +113,8 @@
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
         service2 = (
-            self.service_client.create_service(name=s_name, type=s_type,
-                                               description=s_description))
+            self.services_client.create_service(name=s_name, type=s_type,
+                                                description=s_description))
         service2 = service2['service']
         self.service_ids.append(service2['id'])
         # Updating 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 8f9bf2a..372254f 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -37,8 +37,8 @@
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
         cls.service_data = (
-            cls.service_client.create_service(name=s_name, type=s_type,
-                                              description=s_description)
+            cls.services_client.create_service(name=s_name, type=s_type,
+                                               description=s_description)
             ['service'])
         cls.service_id = cls.service_data['id']
         cls.service_ids.append(cls.service_id)
@@ -46,7 +46,7 @@
     @classmethod
     def resource_cleanup(cls):
         for s in cls.service_ids:
-            cls.service_client.delete_service(s)
+            cls.services_client.delete_service(s)
         super(EndpointsNegativeTestJSON, cls).resource_cleanup()
 
     @test.attr(type=['negative'])
diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
index d1595dd..c6e3df4 100644
--- a/tempest/api/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -24,9 +24,9 @@
 
     def _del_service(self, service_id):
         # Used for deleting the services created in this class
-        self.service_client.delete_service(service_id)
+        self.services_client.delete_service(service_id)
         # Checking whether service is deleted successfully
-        self.assertRaises(lib_exc.NotFound, self.service_client.show_service,
+        self.assertRaises(lib_exc.NotFound, self.services_client.show_service,
                           service_id)
 
     @test.attr(type='smoke')
@@ -36,7 +36,7 @@
         name = data_utils.rand_name('service')
         serv_type = data_utils.rand_name('type')
         desc = data_utils.rand_name('description')
-        create_service = self.service_client.create_service(
+        create_service = self.services_client.create_service(
             type=serv_type, name=name, description=desc)['service']
         self.addCleanup(self._del_service, create_service['id'])
         self.assertIsNotNone(create_service['id'])
@@ -49,14 +49,14 @@
         s_id = create_service['id']
         resp1_desc = create_service['description']
         s_desc2 = data_utils.rand_name('desc2')
-        update_service = self.service_client.update_service(
+        update_service = self.services_client.update_service(
             s_id, description=s_desc2)['service']
         resp2_desc = update_service['description']
 
         self.assertNotEqual(resp1_desc, resp2_desc)
 
         # Get service
-        fetched_service = self.service_client.show_service(s_id)['service']
+        fetched_service = self.services_client.show_service(s_id)['service']
         resp3_desc = fetched_service['description']
 
         self.assertEqual(resp2_desc, resp3_desc)
@@ -67,9 +67,9 @@
         # Create a service only with name and type
         name = data_utils.rand_name('service')
         serv_type = data_utils.rand_name('type')
-        service = self.service_client.create_service(
+        service = self.services_client.create_service(
             type=serv_type, name=name)['service']
-        self.addCleanup(self.service_client.delete_service, service['id'])
+        self.addCleanup(self.services_client.delete_service, service['id'])
         self.assertIn('id', service)
         expected_data = {'name': name, 'type': serv_type}
         self.assertDictContainsSubset(expected_data, service)
@@ -81,14 +81,14 @@
         for _ in range(3):
             name = data_utils.rand_name('service')
             serv_type = data_utils.rand_name('type')
-            create_service = self.service_client.create_service(
+            create_service = self.services_client.create_service(
                 type=serv_type, name=name)['service']
-            self.addCleanup(self.service_client.delete_service,
+            self.addCleanup(self.services_client.delete_service,
                             create_service['id'])
             service_ids.append(create_service['id'])
 
         # List and Verify Services
-        services = self.service_client.list_services()['services']
+        services = self.services_client.list_services()['services']
         fetched_ids = [service['id'] for service in services]
         found = [s for s in fetched_ids if s in service_ids]
         self.assertEqual(len(found), len(service_ids))
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 1a4c8bb..d98e3b1 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -144,7 +144,7 @@
         cls.token = cls.os_adm.token_v3_client
         cls.endpoints_client = cls.os_adm.endpoints_client
         cls.region_client = cls.os_adm.region_client
-        cls.service_client = cls.os_adm.service_client
+        cls.services_client = cls.os_adm.identity_services_client
         cls.policy_client = cls.os_adm.policy_client
         cls.creds_client = cls.os_adm.credentials_client
         cls.groups_client = cls.os_adm.groups_client
diff --git a/tempest/clients.py b/tempest/clients.py
index a837ce1..f9fe404 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -104,8 +104,8 @@
     PolicyClient as PolicyV3Client
 from tempest.services.identity.v3.json.region_client import \
     RegionClient as RegionV3Client
-from tempest.services.identity.v3.json.service_client import \
-    ServiceClient as ServiceV3Client
+from tempest.services.identity.v3.json.services_client import \
+    ServicesClient as IdentityServicesV3Client
 from tempest.services.image.v1.json.images_client import ImagesClient
 from tempest.services.image.v2.json.images_client import ImagesClientV2
 from tempest.services.messaging.json.messaging_client import \
@@ -458,7 +458,8 @@
                                                    **params_v3)
         self.endpoints_client = EndPointV3Client(self.auth_provider,
                                                  **params_v3)
-        self.service_client = ServiceV3Client(self.auth_provider, **params_v3)
+        self.identity_services_client = IdentityServicesV3Client(
+            self.auth_provider, **params_v3)
         self.policy_client = PolicyV3Client(self.auth_provider, **params_v3)
         self.region_client = RegionV3Client(self.auth_provider, **params_v3)
         self.credentials_client = CredentialsV3Client(self.auth_provider,
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/services_client.py
similarity index 97%
rename from tempest/services/identity/v3/json/service_client.py
rename to tempest/services/identity/v3/json/services_client.py
index 3dbfe5e..dd65f1d 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/services_client.py
@@ -22,7 +22,7 @@
 from tempest.common import service_client
 
 
-class ServiceClient(service_client.ServiceClient):
+class ServicesClient(service_client.ServiceClient):
     api_version = "v3"
 
     def update_service(self, service_id, **kwargs):
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index c313071..8e8bbb6 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -32,7 +32,7 @@
     identity_v3_identity_client
 from tempest.services.identity.v3.json import policy_client
 from tempest.services.identity.v3.json import region_client
-from tempest.services.identity.v3.json import service_client
+from tempest.services.identity.v3.json import services_client
 from tempest.services.image.v1.json import images_client
 from tempest.services.image.v2.json import images_client as images_v2_client
 from tempest.services.messaging.json import messaging_client
@@ -128,7 +128,7 @@
             identity_v3_identity_client.IdentityV3Client,
             policy_client.PolicyClient,
             region_client.RegionClient,
-            service_client.ServiceClient,
+            services_client.ServicesClient,
             images_client.ImagesClient,
             images_v2_client.ImagesClientV2
         ]