SSL Certificate Validation

This adds support for validation of ssl certs returned by remote
servers over SSL. The --ca-file param represents the CA cert used
to sign the remote server's cert. Use --insecure if the remote
server is using a self-signed cert or you don't have the CA cert.

Related to bp glance-client-parity

Change-Id: I45253a6e2d88da599addfcc464571e62ae920166
This commit is contained in:
Brian Waldon
2012-08-02 14:16:13 -07:00
parent 18543b1a46
commit ff34cfc50f
4 changed files with 86 additions and 25 deletions
+2 -3
View File
@@ -28,9 +28,8 @@ class Client(http.HTTPClient):
http requests. (optional)
"""
def __init__(self, endpoint, token=None, timeout=600, insecure=False):
def __init__(self, *args, **kwargs):
""" Initialize a new client for the Images v1 API. """
super(Client, self).__init__(endpoint, token=token,
timeout=timeout, insecure=insecure)
super(Client, self).__init__(*args, **kwargs)
self.images = images.ImageManager(self)
self.image_members = image_members.ImageMemberManager(self)