Set verify to False when insecure is True

The Connection object requires the verify parameter to be set
to False when insecure is True. This is required for monitorstack
to work with self-signed cerificates.

Change-Id: I18604662a0935065676dfbe2f11cf97c5c5d85ff
This commit is contained in:
Miguel Alex Cantu 2017-06-05 17:07:36 +00:00
parent 6eae6ea8db
commit a411f5f272
1 changed files with 2 additions and 1 deletions

View File

@ -43,6 +43,7 @@ class OpenStack(object):
:type os_auth_args: dict
"""
self.os_auth_args = os_auth_args
self.verify = self.os_auth_args.get('insecure', True) is False
@property
def conn(self):
@ -50,7 +51,7 @@ class OpenStack(object):
:returns: object
"""
return os_conn.Connection(**self.os_auth_args)
return os_conn.Connection(verify=self.verify, **self.os_auth_args)
def _session_req(self, path, service_type, interface='internal'):
"""Return compute resource limits for a project.