Merge "Add compute feature enabled flag for the ec2 api"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 949302f..0eeb738 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -439,6 +439,9 @@
 # running instances? (boolean value)
 #snapshot = true
 
+# Does the test environment have the ec2 api running? (boolean value)
+#ec2_api = true
+
 
 [dashboard]
 
diff --git a/tempest/config.py b/tempest/config.py
index 70f972f..c60434a 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -349,7 +349,10 @@
     cfg.BoolOpt('snapshot',
                 default=True,
                 help='Does the test environment support creating snapshot '
-                     'images of running instances?')
+                     'images of running instances?'),
+    cfg.BoolOpt('ec2_api',
+                default=True,
+                help='Does the test environment have the ec2 api running?')
 ]
 
 
diff --git a/tempest/thirdparty/boto/test.py b/tempest/thirdparty/boto/test.py
index 62073bd..5bd3556 100644
--- a/tempest/thirdparty/boto/test.py
+++ b/tempest/thirdparty/boto/test.py
@@ -195,6 +195,12 @@
     """Recommended to use as base class for boto related test."""
 
     @classmethod
+    def skip_checks(cls):
+        super(BotoTestCase, cls).skip_checks()
+        if not CONF.compute_feature_enabled.ec2_api:
+            raise cls.skipException("The EC2 API is not available")
+
+    @classmethod
     def resource_setup(cls):
         super(BotoTestCase, cls).resource_setup()
         cls.conclusion = decision_maker()