Rename image_client to images_client

Module names of service clients should be <resource name>s_client.py,
and class names also should be <resouce name>sClient.
So this patch renames image_client for matching to the naming rule.

Partially implements blueprint consistent-service-method-names

Change-Id: Id9d8488251d7b1a4642eab08270b787aa6c74050
diff --git a/tempest/clients.py b/tempest/clients.py
index 2566d79..257fa49 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -35,7 +35,8 @@
 from tempest_lib.services.compute.hosts_client import HostsClient
 from tempest_lib.services.compute.hypervisor_client import \
     HypervisorClient
-from tempest_lib.services.compute.images_client import ImagesClient
+from tempest_lib.services.compute.images_client import ImagesClient \
+    as ComputeImagesClient
 from tempest_lib.services.compute.instance_usage_audit_log_client import \
     InstanceUsagesAuditLogClient
 from tempest_lib.services.compute.limits_client import LimitsClient
@@ -102,8 +103,8 @@
     RegionClient as RegionV3Client
 from tempest.services.identity.v3.json.service_client import \
     ServiceClient as ServiceV3Client
-from tempest.services.image.v1.json.image_client import ImageClient
-from tempest.services.image.v2.json.image_client import ImageClientV2
+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 \
     MessagingClient
 from tempest.services.network.json.floating_ips_client import FloatingIPsClient
@@ -250,7 +251,7 @@
                 endpoint_type=CONF.alarming.endpoint_type,
                 **self.default_params_with_timeout_values)
         if CONF.service_available.glance:
-            self.image_client = ImageClient(
+            self.image_client = ImagesClient(
                 self.auth_provider,
                 CONF.image.catalog_type,
                 CONF.image.region or CONF.identity.region,
@@ -258,7 +259,7 @@
                 build_interval=CONF.image.build_interval,
                 build_timeout=CONF.image.build_timeout,
                 **self.default_params)
-            self.image_client_v2 = ImageClientV2(
+            self.image_client_v2 = ImagesClientV2(
                 self.auth_provider,
                 CONF.image.catalog_type,
                 CONF.image.region or CONF.identity.region,
@@ -319,7 +320,7 @@
         self.server_groups_client = ServerGroupsClient(
             self.auth_provider, **params)
         self.limits_client = LimitsClient(self.auth_provider, **params)
-        self.images_client = ImagesClient(self.auth_provider, **params)
+        self.images_client = ComputeImagesClient(self.auth_provider, **params)
         self.keypairs_client = KeyPairsClient(self.auth_provider, **params)
         self.quotas_client = QuotasClient(self.auth_provider, **params)
         self.quota_classes_client = QuotaClassesClient(self.auth_provider,
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index b126ef6..c5e4a7e 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -128,7 +128,7 @@
 from tempest.services.compute.json import security_group_rules_client
 from tempest.services.compute.json import servers_client
 from tempest.services.identity.v2.json import identity_client
-from tempest.services.image.v2.json import image_client
+from tempest.services.image.v2.json import images_client
 from tempest.services.network.json import network_client
 from tempest.services.network.json import subnets_client
 from tempest.services.object_storage import container_client
@@ -213,7 +213,7 @@
                                                   **object_storage_params)
         self.containers = container_client.ContainerClient(
             _auth, **object_storage_params)
-        self.images = image_client.ImageClientV2(
+        self.images = images_client.ImagesClientV2(
             _auth,
             CONF.image.catalog_type,
             CONF.image.region or CONF.identity.region,
diff --git a/tempest/services/image/v1/json/image_client.py b/tempest/services/image/v1/json/images_client.py
similarity index 99%
rename from tempest/services/image/v1/json/image_client.py
rename to tempest/services/image/v1/json/images_client.py
index d97da36..4884106 100644
--- a/tempest/services/image/v1/json/image_client.py
+++ b/tempest/services/image/v1/json/images_client.py
@@ -32,13 +32,13 @@
 LOG = logging.getLogger(__name__)
 
 
-class ImageClient(service_client.ServiceClient):
+class ImagesClient(service_client.ServiceClient):
 
     def __init__(self, auth_provider, catalog_type, region, endpoint_type=None,
                  build_interval=None, build_timeout=None,
                  disable_ssl_certificate_validation=None,
                  ca_certs=None, trace_requests=None):
-        super(ImageClient, self).__init__(
+        super(ImagesClient, self).__init__(
             auth_provider,
             catalog_type,
             region,
diff --git a/tempest/services/image/v2/json/image_client.py b/tempest/services/image/v2/json/images_client.py
similarity index 98%
rename from tempest/services/image/v2/json/image_client.py
rename to tempest/services/image/v2/json/images_client.py
index f7d70ea..33bfcb8 100644
--- a/tempest/services/image/v2/json/image_client.py
+++ b/tempest/services/image/v2/json/images_client.py
@@ -22,13 +22,13 @@
 from tempest.common import service_client
 
 
-class ImageClientV2(service_client.ServiceClient):
+class ImagesClientV2(service_client.ServiceClient):
 
     def __init__(self, auth_provider, catalog_type, region, endpoint_type=None,
                  build_interval=None, build_timeout=None,
                  disable_ssl_certificate_validation=None, ca_certs=None,
                  trace_requests=None):
-        super(ImageClientV2, self).__init__(
+        super(ImagesClientV2, self).__init__(
             auth_provider,
             catalog_type,
             region,
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index 272eba4..8de014f 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -36,8 +36,8 @@
 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.image.v1.json import image_client
-from tempest.services.image.v2.json import image_client as image_v2_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
 from tempest.services.network.json import network_client
 from tempest.services.object_storage import account_client
@@ -130,8 +130,8 @@
             policy_client.PolicyClient,
             region_client.RegionClient,
             service_client.ServiceClient,
-            image_client.ImageClient,
-            image_v2_client.ImageClientV2
+            images_client.ImagesClient,
+            images_v2_client.ImagesClientV2
         ]
 
         for client in test_clients: