summaryrefslogtreecommitdiff
path: root/barbicanclient/client.py
diff options
context:
space:
mode:
authorjfwood <john.wood@rackspace.com>2013-11-20 23:38:14 -0600
committerjfwood <john.wood@rackspace.com>2013-11-20 23:38:14 -0600
commitdd67d98462923e50936aaf189b57f1aea9bf0f84 (patch)
treea845a80360d4b51e4dfb1e105de235499ebf48c9 /barbicanclient/client.py
parent297120ce1bd37c46a5f5bf6796c67c11599c890c (diff)
downloadpython-barbicanclient-dd67d98462923e50936aaf189b57f1aea9bf0f84.tar.gz
Add verifications resource
Diffstat (limited to 'barbicanclient/client.py')
-rw-r--r--barbicanclient/client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/barbicanclient/client.py b/barbicanclient/client.py
index 81d2c6f..414c425 100644
--- a/barbicanclient/client.py
+++ b/barbicanclient/client.py
@@ -21,6 +21,7 @@ from barbicanclient.openstack.common import log as logging
from barbicanclient.openstack.common.gettextutils import _
from barbicanclient import orders
from barbicanclient import secrets
+from barbicanclient import verifications
LOG = logging.getLogger(__name__)
@@ -50,7 +51,8 @@ class HTTPAuthError(HTTPError):
class Client(object):
- def __init__(self, auth_plugin=None, endpoint=None, tenant_id=None):
+ def __init__(self, session=None, auth_plugin=None,
+ endpoint=None, tenant_id=None):
"""
Barbican client object used to interact with barbican service.
@@ -65,7 +67,7 @@ class Client(object):
"""
LOG.debug(_("Creating Client object"))
- self._session = requests.Session()
+ self._session = session or requests.Session()
self.auth_plugin = auth_plugin
if self.auth_plugin is not None:
@@ -90,6 +92,7 @@ class Client(object):
self.base_url = '{0}/{1}'.format(self._barbican_url, self._tenant_id)
self.secrets = secrets.SecretManager(self)
self.orders = orders.OrderManager(self)
+ self.verifications = verifications.VerificationManager(self)
def get(self, href, params=None):
headers = {'Accept': 'application/json'}