~ubuntu-branches/ubuntu/quantal/python-keystoneclient/quantal

« back to all changes in this revision

Viewing changes to keystoneclient/client.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-08-16 12:34:22 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120816123422-hw1qunw9j19gixpa
Tags: 1:0.1.2-0ubuntu1
* New upstream release.
* debian/watch: Updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
    def __init__(self, username=None, tenant_id=None, tenant_name=None,
40
40
                 password=None, auth_url=None, region_name=None, timeout=None,
41
 
                 endpoint=None, token=None):
42
 
        super(HTTPClient, self).__init__(timeout=timeout)
 
41
                 endpoint=None, token=None, cacert=None, key=None,
 
42
                 cert=None, insecure=False):
 
43
        super(HTTPClient, self).__init__(timeout=timeout, ca_certs=cacert)
 
44
        if cert:
 
45
            if key:
 
46
                self.add_certificate(key=key, cert=cert, domain='')
 
47
            else:
 
48
                self.add_certificate(key=cert, cert=cert, domain='')
43
49
        self.username = username
44
50
        self.tenant_id = tenant_id
45
51
        self.tenant_name = tenant_name
53
59
 
54
60
        # httplib2 overrides
55
61
        self.force_exception_to_status_code = True
 
62
        self.disable_ssl_certificate_validation = insecure
56
63
 
57
64
    def authenticate(self):
58
65
        """ Authenticate against the keystone API.