libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [2/9] libcloud git commit: pass ca_cert at DockerContainerDriver if a user wants to not change the environmental variables
Date Fri, 11 Aug 2017 04:53:18 GMT
pass ca_cert at DockerContainerDriver if a user wants to not change the environmental variables


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/26670ab0
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/26670ab0
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/26670ab0

Branch: refs/heads/trunk
Commit: 26670ab00a738480388c8661c6c4597b37f52d4e
Parents: 5496a0a
Author: johnnyWalnut <ikarydis0@gmail.com>
Authored: Fri Jun 2 14:02:45 2017 +0200
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Fri Aug 11 14:43:39 2017 +1000

----------------------------------------------------------------------
 libcloud/container/drivers/docker.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/26670ab0/libcloud/container/drivers/docker.py
----------------------------------------------------------------------
diff --git a/libcloud/container/drivers/docker.py b/libcloud/container/drivers/docker.py
index e258c42..5b9536b 100644
--- a/libcloud/container/drivers/docker.py
+++ b/libcloud/container/drivers/docker.py
@@ -180,7 +180,7 @@ class DockerContainerDriver(ContainerDriver):
     version = '1.24'
 
     def __init__(self, key='', secret='', secure=False, host='localhost',
-                 port=4243, key_file=None, cert_file=None):
+                 port=4243, key_file=None, cert_file=None, ca_cert=None):
         """
         :param    key: API key or username to used (required)
         :type     key: ``str``
@@ -237,11 +237,12 @@ class DockerContainerDriver(ContainerDriver):
                 raise Exception(
                     'Needs both private key file and '
                     'certificate file for tls authentication')
-            self.connection.key_file = key_file
-            self.connection.cert_file = cert_file
-            self.connection.secure = True
+
+        if ca_cert:
+            self.connection.connection.ca_cert = ca_cert
         else:
-            self.connection.secure = secure
+            # do not verify SSL certificate
+            self.connection.connection.ca_cert = False
 
         self.connection.secure = secure
         self.connection.host = host


Mime
View raw message