summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-08-13 12:13:23 -0400
committerSimo Sorce <simo@redhat.com>2013-08-19 14:47:16 -0400
commit71a62b2cbc489470c96ac771392270b6058ddaa1 (patch)
tree32229c7bb69298b5ea32a6a5a60a4eeaf57cccbf
parent1a9966e52d7bf35774b9a009afe6412e6c5f014a (diff)
downloadoslo-71a62b2cbc489470c96ac771392270b6058ddaa1.tar.gz
oslo-71a62b2cbc489470c96ac771392270b6058ddaa1.tar.xz
oslo-71a62b2cbc489470c96ac771392270b6058ddaa1.zip
Adjust KDS communication protocol
The KDS review process has determined some changes to the API. This patch fixes KDSClient to interoperate properly. Change-Id: I888e8a41573f171048356a9d277de1d7610537ce
-rw-r--r--openstack/common/rpc/securemessage.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/openstack/common/rpc/securemessage.py b/openstack/common/rpc/securemessage.py
index c5530a6..a935f9b 100644
--- a/openstack/common/rpc/securemessage.py
+++ b/openstack/common/rpc/securemessage.py
@@ -209,7 +209,7 @@ class _KDSClient(object):
else:
self.timeout = None
- def _do_get(self, url, request):
+ def _do_post(self, url, request):
req_kwargs = dict()
req_kwargs['headers'] = dict()
req_kwargs['headers']['User-Agent'] = self.USER_AGENT
@@ -219,7 +219,7 @@ class _KDSClient(object):
req_kwargs['timeout'] = self.timeout
try:
- resp = requests.get(url, **req_kwargs)
+ resp = requests.post(url, **req_kwargs)
except requests.ConnectionError as e:
err = "Unable to establish connection. %s" % e
raise CommunicationError(url, err)
@@ -248,10 +248,10 @@ class _KDSClient(object):
if url is None:
if not self._endpoint:
raise CommunicationError(url, 'Endpoint not configured')
- url = self._endpoint + '/kds/ticket'
+ url = self._endpoint + '/kds/ticket/' + request['signature']
while redirects:
- resp = self._do_get(url, request)
+ resp = self._do_post(url, request)
if resp.status_code in (301, 302, 305):
# Redirected. Reissue the request to the new location.
url = resp.headers['location']