Don't fall when just loading barbicanv1 modules

this avoids loading warnings on salt-master that may not have
os-client-config installed, as salt tries to load them irrespective of
__virtual__() result.

Change-Id: I819d46d5dbd0339e7a5e53609d43e34da992db60
Related-Issue: https://mirantis.jira.com/browse/PROD-26920
diff --git a/_modules/barbicanv1/common.py b/_modules/barbicanv1/common.py
index 83fd6ff..df18df9 100644
--- a/_modules/barbicanv1/common.py
+++ b/_modules/barbicanv1/common.py
@@ -1,6 +1,14 @@
 import logging
-import os_client_config
 from uuid import UUID
+
+
+try:
+    import os_client_config
+except ImportError:
+    os_client_config = None
+from salt import exceptions
+
+
 try:
     from urllib.parse import urlsplit
 except ImportError:
@@ -47,6 +55,10 @@
 
 
 def _get_raw_client(cloud_name):
+    if not os_client_config:
+        raise exceptions.SaltInvocationError(
+            "Cannot load os-client-config. Please check your environment "
+            "configuration.")
     service_type = 'key-manager'
     config = os_client_config.OpenStackConfig()
     cloud = config.get_one_cloud(cloud_name)