From 3b159c9526f96c51db302d6f2cc278e7666c28f4 Mon Sep 17 00:00:00 2001 From: Tom Swanson Date: Tue, 13 Oct 2015 10:28:22 -0500 Subject: [PATCH] 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 --- cinder/volume/drivers/dell/dell_storagecenter_api.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.45.2