Merge "Add num_retries configuration option"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 7ff458a..cc91716 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -134,6 +134,11 @@
 # performed, which requires XenServer pools in case of using XS)
 use_block_migration_for_live_migration = false
 
+# By default, rely on the status of the diskConfig extension to
+# decide if to execute disk config tests. When set to false, tests
+# are forced to skip, regardless of the extension status
+disk_config_enabled_override = true
+
 [image]
 # This section contains configuration options used when executing tests
 # against the OpenStack Images API
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 12cf923..8924fd3 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -103,7 +103,7 @@
         params['headers'] = {'User-Agent': 'Test-Client', 'X-Auth-User': user,
                              'X-Auth-Key': password}
 
-        self.http_obj = httplib2.Http()
+        self.http_obj = httplib2.Http(disable_ssl_certificate_validation=True)
         resp, body = self.http_obj.request(auth_url, 'GET', **params)
         try:
             return resp['x-auth-token'], resp['x-server-management-url']
@@ -125,7 +125,7 @@
             }
         }
 
-        self.http_obj = httplib2.Http()
+        self.http_obj = httplib2.Http(disable_ssl_certificate_validation=True)
         headers = {'Content-Type': 'application/json'}
         body = json.dumps(creds)
         resp, body = self.http_obj.request(auth_url, 'POST',
@@ -201,7 +201,7 @@
         if (self.token is None) or (self.base_url is None):
             self._set_auth()
 
-        self.http_obj = httplib2.Http()
+        self.http_obj = httplib2.Http(disable_ssl_certificate_validation=True)
         if headers is None:
             headers = {}
         headers['X-Auth-Token'] = self.token
diff --git a/tempest/config.py b/tempest/config.py
index 691a898..25fbbb9 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -294,6 +294,12 @@
         """Path to a private key file for SSH access to remote hosts"""
         return self.get("path_to_private_key")
 
+    @property
+    def disk_config_enabled_override(self):
+        """If false, skip config tests regardless of the extension status"""
+        return self.get("disk_config_enabled_override",
+                        'true').lower() == 'true'
+
 
 class ComputeAdminConfig(BaseConfig):
 
diff --git a/tempest/tests/compute/__init__.py b/tempest/tests/compute/__init__.py
index 7396833..53dc415 100644
--- a/tempest/tests/compute/__init__.py
+++ b/tempest/tests/compute/__init__.py
@@ -30,6 +30,7 @@
 CHANGE_PASSWORD_AVAILABLE = CONFIG.compute.change_password_available
 WHITEBOX_ENABLED = CONFIG.compute.whitebox_enabled
 DISK_CONFIG_ENABLED = False
+DISK_CONFIG_ENABLED_OVERRIDE = CONFIG.compute.disk_config_enabled_override
 FLAVOR_EXTRA_DATA_ENABLED = False
 MULTI_USER = False
 
@@ -43,7 +44,8 @@
     images_client = os.images_client
     flavors_client = os.flavors_client
     extensions_client = os.extensions_client
-    DISK_CONFIG_ENABLED = extensions_client.is_enabled('DiskConfig')
+    DISK_CONFIG_ENABLED = (DISK_CONFIG_ENABLED_OVERRIDE and
+                           extensions_client.is_enabled('DiskConfig'))
     FLAVOR_EXTRA_DATA_ENABLED = extensions_client.is_enabled('FlavorExtraData')
 
     # Validate reference data exists
diff --git a/tempest/tests/compute/servers/test_create_server.py b/tempest/tests/compute/servers/test_create_server.py
index 8964fc2..4fe4284 100644
--- a/tempest/tests/compute/servers/test_create_server.py
+++ b/tempest/tests/compute/servers/test_create_server.py
@@ -16,6 +16,7 @@
 #    under the License.
 
 import base64
+import nose
 
 from nose.plugins.attrib import attr
 import unittest2 as unittest
diff --git a/tools/pip-requires b/tools/pip-requires
index e9baed5..3a2283f 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -4,3 +4,4 @@
 unittest2
 lxml
 boto>=2.2.1
+paramiko