Merge "Add Sahara client for scenarios tests"
diff --git a/tempest/clients.py b/tempest/clients.py
index ab89cfa..bad7ffd 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -465,6 +465,7 @@
     CINDERCLIENT_VERSION = '1'
     HEATCLIENT_VERSION = '1'
     IRONICCLIENT_VERSION = '1'
+    SAHARACLIENT_VERSION = '1.1'
 
     def __init__(self, username, password, tenant_name):
         # FIXME(andreaf) Auth provider for client_type 'official' is
@@ -494,6 +495,10 @@
             username,
             password,
             tenant_name)
+        self.data_processing_client = self._get_data_processing_client(
+            username,
+            password,
+            tenant_name)
 
     def _get_roles(self):
         keystone_admin = self._get_identity_client(
@@ -685,3 +690,25 @@
                                                 endpoint_type=endpoint_type,
                                                 auth_url=auth_url,
                                                 insecure=dscv)
+
+    def _get_data_processing_client(self, username, password, tenant_name):
+        if not CONF.service_available.sahara:
+            # Sahara isn't available
+            return None
+
+        import saharaclient.client
+
+        self._validate_credentials(username, password, tenant_name)
+
+        endpoint_type = CONF.data_processing.endpoint_type
+        catalog_type = CONF.data_processing.catalog_type
+        auth_url = CONF.identity.uri
+
+        client = saharaclient.client.Client(self.SAHARACLIENT_VERSION,
+                                            username, password,
+                                            project_name=tenant_name,
+                                            endpoint_type=endpoint_type,
+                                            service_type=catalog_type,
+                                            auth_url=auth_url)
+
+        return client
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index d7be534..5895c37 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -78,6 +78,7 @@
         cls.volume_client = cls.manager.volume_client
         cls.object_storage_client = cls.manager.object_storage_client
         cls.orchestration_client = cls.manager.orchestration_client
+        cls.data_processing_client = cls.manager.data_processing_client
         cls.resource_keys = {}
         cls.os_resources = []