Browse Source

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
Miguel Alex Cantu 1 year ago
parent
commit
a411f5f272
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      monitorstack/utils/os_utils.py

+ 2
- 1
monitorstack/utils/os_utils.py View File

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

Loading…
Cancel
Save