From a411f5f2728d9ba37ecbd8e3ca31e287f0866277 Mon Sep 17 00:00:00 2001 From: Miguel Alex Cantu Date: Mon, 5 Jun 2017 17:07:36 +0000 Subject: [PATCH] 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 --- monitorstack/utils/os_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitorstack/utils/os_utils.py b/monitorstack/utils/os_utils.py index 2572d78..0a7bf1f 100644 --- a/monitorstack/utils/os_utils.py +++ b/monitorstack/utils/os_utils.py @@ -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.