Merge "Switch rest_client module to tempest-lib"
diff --git a/tempest/clients.py b/tempest/clients.py
index de03f1d..63bae6c 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -133,6 +133,13 @@
     Top level manager for OpenStack tempest clients
     """
 
+    default_params = {
+        'disable_ssl_certificate_validation':
+            CONF.identity.disable_ssl_certificate_validation,
+        'ca_certs': CONF.identity.ca_certificates_file,
+        'trace_requests': CONF.debug.trace_requests
+    }
+
     def __init__(self, credentials=None, interface='json', service=None):
         # Set interface and client type first
         self.interface = interface
@@ -170,7 +177,14 @@
         self.container_client = ContainerClient(self.auth_provider)
         self.object_client = ObjectClient(self.auth_provider)
         self.orchestration_client = OrchestrationClient(
-            self.auth_provider)
+            self.auth_provider,
+            CONF.orchestration.catalog_type,
+            CONF.orchestration.region or CONF.identity.region,
+            endpoint_type=CONF.orchestration.endpoint_type,
+            build_interval=CONF.orchestration.build_interval,
+            build_timeout=CONF.orchestration.build_timeout,
+            **self.default_params)
+
         self.ec2api_client = botoclients.APIClientEC2(*ec2_client_args)
         self.s3_client = botoclients.ObjectClientS3(*ec2_client_args)
         self.data_processing_client = DataProcessingClient(
diff --git a/tempest/common/service_client.py b/tempest/common/service_client.py
index 66c684b..45a07f1 100644
--- a/tempest/common/service_client.py
+++ b/tempest/common/service_client.py
@@ -24,13 +24,21 @@
 class ServiceClient(rest_client.RestClient):
 
     def __init__(self, auth_provider, service, region,
-                 endpoint_type=None, build_interval=None, build_timeout=None):
+                 endpoint_type=None, build_interval=None, build_timeout=None,
+                 disable_ssl_certificate_validation=None, ca_certs=None,
+                 trace_requests=None):
+
+        # TODO(oomichi): This params setting should be removed after all
+        # service clients pass these values, and we can make ServiceClient
+        # free from CONF values.
+        dscv = (disable_ssl_certificate_validation or
+                CONF.identity.disable_ssl_certificate_validation)
         params = {
-            'disable_ssl_certificate_validation':
-                CONF.identity.disable_ssl_certificate_validation,
-            'ca_certs': CONF.identity.ca_certificates_file,
-            'trace_requests': CONF.debug.trace_requests
+            'disable_ssl_certificate_validation': dscv,
+            'ca_certs': ca_certs or CONF.identity.ca_certificates_file,
+            'trace_requests': trace_requests or CONF.debug.trace_requests
         }
+
         if endpoint_type is not None:
             params.update({'endpoint_type': endpoint_type})
         if build_interval is not None:
diff --git a/tempest/services/orchestration/json/orchestration_client.py b/tempest/services/orchestration/json/orchestration_client.py
index d23d934..e2dd558 100644
--- a/tempest/services/orchestration/json/orchestration_client.py
+++ b/tempest/services/orchestration/json/orchestration_client.py
@@ -19,23 +19,11 @@
 import urllib
 
 from tempest.common import service_client
-from tempest import config
 from tempest import exceptions
 
-CONF = config.CONF
-
 
 class OrchestrationClient(service_client.ServiceClient):
 
-    def __init__(self, auth_provider):
-        super(OrchestrationClient, self).__init__(
-            auth_provider,
-            CONF.orchestration.catalog_type,
-            CONF.orchestration.region or CONF.identity.region,
-            endpoint_type=CONF.orchestration.endpoint_type,
-            build_interval=CONF.orchestration.build_interval,
-            build_timeout=CONF.orchestration.build_timeout)
-
     def list_stacks(self, params=None):
         """Lists all stacks for a user."""