summaryrefslogtreecommitdiff
path: root/barbicanclient/client.py
diff options
context:
space:
mode:
authorFernando Diaz <diazjf@us.ibm.com>2015-06-29 16:15:09 -0500
committerFernando Diaz <diazjf@us.ibm.com>2015-08-25 09:56:24 -0500
commit34256de82d61a7030204a715dd2901dddb46c8e9 (patch)
treebeb86e375108531a59aca00d89a673a55d6e21bf /barbicanclient/client.py
parent6c0eb3f3803491fd2eaf7b81b2c85ef2eb323ff7 (diff)
downloadpython-barbicanclient-34256de82d61a7030204a715dd2901dddb46c8e9.tar.gz
Allow Barbican Client Secret Update Functionality
This patch will allow the python-barbicanclient to perform Secret Updates. This functionality will also be added to the barbican command line client. I will also allow for a secret to be created without a payload. Change-Id: Ia53e1cc463f9a274feb11f6e3bb3cbbe981c3444
Diffstat (limited to 'barbicanclient/client.py')
-rw-r--r--barbicanclient/client.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/barbicanclient/client.py b/barbicanclient/client.py
index 6e0a47e..bb676c1 100644
--- a/barbicanclient/client.py
+++ b/barbicanclient/client.py
@@ -70,11 +70,15 @@ class _HTTPClient(adapter.Adapter):
return super(_HTTPClient, self).get(*args, **kwargs).json()
def post(self, path, *args, **kwargs):
- if not path[-1] == '/':
- path += '/'
+ path = self._fix_path(path)
return super(_HTTPClient, self).post(path, *args, **kwargs).json()
+ def _fix_path(self, path):
+ if not path[-1] == '/':
+ path += '/'
+ return path
+
def _get_raw(self, path, *args, **kwargs):
return self.request(path, 'GET', *args, **kwargs).content