Tolerate gnocchiclient import errors

currently we are experiencing errors due to `ujson` dependency
of gnocchiclient (see https://github.com/esnme/ultrajson/issues/346).

For now it seems to affect Py2 only, and is fixed in master of that lib,
but until then let's just tolerate failure to load gnocchiclient
and skip that single scenario test where it is used in case of an error.

Change-Id: Ice4f12d875c940c07e22af9170aaa0b258dd5c06
Related-Issue: PRODX-2479
(cherry picked from commit 296769a825a671baf984297af8a655acba71a2ac)
diff --git a/heat_tempest_plugin/services/clients.py b/heat_tempest_plugin/services/clients.py
index 4567968..7604670 100644
--- a/heat_tempest_plugin/services/clients.py
+++ b/heat_tempest_plugin/services/clients.py
@@ -13,7 +13,12 @@
 import os
 
 from cinderclient import client as cinder_client
-from gnocchiclient import client as gnocchi_client
+try:
+    from gnocchiclient import client as gnocchi_client
+except ImportError:
+    # catches ujson vs Python GCC compat problem,
+    # see https://github.com/esnme/ultrajson/issues/346
+    gnocchi_client = None
 from heatclient import client as heat_client
 from keystoneauth1 import exceptions as kc_exceptions
 from keystoneauth1.identity.generic import password
@@ -186,6 +191,8 @@
         return swift_client.Connection(**args)
 
     def _get_metric_client(self):
+        if gnocchi_client is None:
+            return None
 
         adapter_options = {'interface': self.conf.endpoint_type,
                            'region_name': self.conf.region}