Merge "Add barbican_integration_enabled"
diff --git a/_modules/runtest/conditions.py b/_modules/runtest/conditions.py
index 05fe24e..5eb4763 100644
--- a/_modules/runtest/conditions.py
+++ b/_modules/runtest/conditions.py
@@ -1,4 +1,9 @@
-import jsonpath_rw as jsonpath
+try:
+    import jsonpath_rw as jsonpath
+except ImportError:
+    jsonpath = None
+from salt import exceptions
+
 import operator
 
 
@@ -19,6 +24,10 @@
 class BaseRule(object):
 
     def __init__(self, field, op, val, multiple='first'):
+        if not jsonpath:
+            raise exceptions.SaltInvocationError(
+                "Cannot load jsonpath_rw. Please check your environment "
+                "configuration.")
         self.field = field
         self.op = op
         self.value = val
diff --git a/_modules/runtest/tempest_sections/base_section.py b/_modules/runtest/tempest_sections/base_section.py
index 5e2ea3a..b2c12ca 100644
--- a/_modules/runtest/tempest_sections/base_section.py
+++ b/_modules/runtest/tempest_sections/base_section.py
@@ -1,6 +1,11 @@
 
 import abc
-import jsonpath_rw as jsonpath
+
+try:
+    import jsonpath_rw as jsonpath
+except ImportError:
+    jsonpath = None
+from salt import exceptions
 
 import salt
 
@@ -9,6 +14,10 @@
 class BaseSection(object):
 
     def __init__(self, pillar, runtest_opts):
+        if not jsonpath:
+            raise exceptions.SaltInvocationError(
+                "Cannot load jsonpath_rw. Please check your environment "
+                "configuration.")
         super(BaseSection, self).__init__()
         self.pillar = pillar
         self.runtest_opts = runtest_opts
diff --git a/_modules/runtest/tempest_sections/tungsten_plugin.py b/_modules/runtest/tempest_sections/tungsten_plugin.py
index 2b86029..7d52ac7 100644
--- a/_modules/runtest/tempest_sections/tungsten_plugin.py
+++ b/_modules/runtest/tempest_sections/tungsten_plugin.py
@@ -11,6 +11,7 @@
         'service_name',
         'endpoint_type',
         'catalog_type',
+        'contrail_version',
     ]
 
     @property
@@ -29,5 +30,12 @@
             c = conditions.BaseRule('keystone.client.enabled', 'eq', True)
             return self.get_item_when_condition_match(
                 'keystone.client.server.identity.service.opencontrail.type', c)
-        else:
-            pass
+
+    @property
+    def contrail_version(self):
+        contrail_enabled = conditions.BaseRule('*.opencontrail.control.enabled',
+                                               'eq', True, multiple='any')
+        if contrail_enabled.check(self.pillar):
+            c = conditions.BaseRule('opencontrail.control.enabled', 'eq', True)
+            return self.get_item_when_condition_match(
+                'opencontrail.control.version', c)