Add ObjectStorageClient for cleanup

In object storage clients, there is a lot of duplicated code for
setting CONF. This patch adds ObjectStorageClient for removing them.

Change-Id: I07eb4af34b20ae94a09b6fa90ffeb3bc19e14762
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index a2044ef..23984cd 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -18,17 +18,14 @@
 from xml.etree import ElementTree as etree
 
 from tempest.common import http
-from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from tempest.services.object_storage import base
 
 CONF = config.CONF
 
 
-class AccountClient(rest_client.RestClient):
-    def __init__(self, auth_provider):
-        super(AccountClient, self).__init__(auth_provider)
-        self.service = CONF.object_storage.catalog_type
+class AccountClient(base.ObjectStorageClient):
 
     def create_account(self, data=None,
                        params=None,
@@ -167,17 +164,10 @@
         return resp, body
 
 
-class AccountClientCustomizedHeader(rest_client.RestClient):
+class AccountClientCustomizedHeader(base.ObjectStorageClient):
 
     # TODO(andreaf) This class is now redundant, to be removed in next patch
 
-    def __init__(self, auth_provider):
-        super(AccountClientCustomizedHeader, self).__init__(
-            auth_provider)
-        # Overwrites json-specific header encoding in rest_client.RestClient
-        self.service = CONF.object_storage.catalog_type
-        self.format = 'json'
-
     def request(self, method, url, extra_headers=False, headers=None,
                 body=None):
         """A simple HTTP request interface."""