diff options
author | Adam Harwell <flux.adam@gmail.com> | 2018-12-20 14:54:25 -0800 |
---|---|---|
committer | Frank Zhang <zxuuzx@gmail.com> | 2019-01-02 21:00:25 +0000 |
commit | f14511dd9d8806d777f81f33f34ef522245af6a0 (patch) | |
tree | e6d3610ca568a2f72e51f188c6d41b8ed437ea2a /barbicanclient/v1 | |
parent | c8b10fdb657f144258df871383fa61cead8a0b61 (diff) | |
download | python-barbicanclient-f14511dd9d8806d777f81f33f34ef522245af6a0.tar.gz |
We changed the client to fetch containers and secrets via their UUID
from the API, rather than by HREF, so that the endpoint URLs set in the
keystone client would be respected. Unfortunately, we (I) missed
updating the payload fetch function to do the same. This brings it into
line with the other fetches.
Change-Id: Ic71cf6771563d669a2fa37a56d4b40c637db1511
Story: 2004653
Task: 28608
(cherry picked from commit 4eec7121b39de3849b469c56d85b95520aab7bad)
Diffstat (limited to 'barbicanclient/v1')
-rw-r--r-- | barbicanclient/v1/secrets.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/barbicanclient/v1/secrets.py b/barbicanclient/v1/secrets.py index 5b0c4a1..a604160 100644 --- a/barbicanclient/v1/secrets.py +++ b/barbicanclient/v1/secrets.py @@ -266,10 +266,8 @@ class Secret(SecretFormatter): "content-type.") headers = {'Accept': self.payload_content_type} - if self._secret_ref[-1] != "/": - payload_url = self._secret_ref + '/payload' - else: - payload_url = self._secret_ref + 'payload' + uuid_ref = base.calculate_uuid_ref(self._secret_ref, self._entity) + payload_url = uuid_ref + '/payload' payload = self._api._get_raw(payload_url, headers=headers) if self.payload_content_type == u'text/plain': self._payload = payload.decode('UTF-8') |