From: Tom Swanson Date: Tue, 13 Oct 2015 15:28:22 +0000 (-0500) Subject: Dell SC: Disable REST verify warnings X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3b159c9526f96c51db302d6f2cc278e7666c28f4;p=openstack-build%2Fcinder-build.git Dell SC: Disable REST verify warnings 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 --- diff --git a/cinder/volume/drivers/dell/dell_storagecenter_api.py b/cinder/volume/drivers/dell/dell_storagecenter_api.py index afb28a3d7..47b85ddcb 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_api.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_api.py @@ -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