]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Dell SC: Disable REST verify warnings
authorTom Swanson <tom_swanson@dell.com>
Tue, 13 Oct 2015 15:28:22 +0000 (10:28 -0500)
committerTom Swanson <tom_swanson@dell.com>
Tue, 13 Oct 2015 15:30:30 +0000 (10:30 -0500)
The option to verify REST https requests is user selectable.  If the
user has not enabled this then we spam the c-vol logs with warnings.
This patch disables those warnings when verify is set to false.

Change-Id: I9fd2023d7ca4898f4c206a2ddfaf35ce5cf9ca7e

cinder/volume/drivers/dell/dell_storagecenter_api.py

index afb28a3d76ad589a1959aa0b7a7370fa5ec56511..47b85ddcb20b52d45c9f7a5beb1b171764687fdc 100644 (file)
@@ -96,6 +96,11 @@ class HttpClient(object):
         self.header['x-dell-api-version'] = '2.0'
         self.verify = verify
 
+        # Verify is a configurable option.  So if this is false do not
+        # spam the c-vol log.
+        if not verify:
+            requests.packages.urllib3.disable_warnings()
+
     def __enter__(self):
         return self