solidfire: Enable SSL with requests
SSL requests are not being verified when contacting
the REST API. Use the driver_ssl_cert_verify
config option to turn on or off. Defaults to False.
@@ -254,6 +254,7 @@ class SolidFireDriver(san.SanISCSIDriver):
configuration=self.configuration)
self.default_cluster = self._create_cluster_reference()
self.active_cluster = self.default_cluster
+ self.verify_ssl = self.configuration.driver_ssl_cert_verify
# If we're failed over, we need to parse things out and set the active
# cluster appropriately
@@ -515,7 +516,7 @@ class SolidFireDriver(san.SanISCSIDriver):
req = requests.post(url,
data=json.dumps(payload),
auth=(endpoint['login'], endpoint['passwd']),
- verify=False,
+ verify=self.verify_ssl,
timeout=30)
response = req.json()
req.close()
