Revert "Add last_request_id member to HTTPClient and SessionClient"

This reverts commit 9e532db8b0.

If glanceclient is used in multi-threaded environment, then there is a
possibility of getting invalid/wrong last request-id. To avoid this,
need to use thread local storage to store last-request-id and add
public method to return this request-id to caller.

http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html#alternatives

Change-Id: I08d8d87fc0cc291f1b930b2c0cfc110ec8394131
This commit is contained in:
Abhishek Kekane
2016-05-23 14:14:11 +00:00
parent 9e532db8b0
commit 7d106c677a
2 changed files with 0 additions and 12 deletions
-8
View File
@@ -200,14 +200,6 @@ class TestClient(testtools.TestCase):
resp, body = self.client.get(path, headers=headers)
self.assertEqual(text, resp.text)
def test_request_id(self):
path = '/v1/images/detail'
self.mock.get(self.endpoint + path,
headers={"x-openstack-request-id": "req-aaa"})
self.client.get(path)
self.assertEqual(self.client.last_request_id, 'req-aaa')
def test_headers_encoding(self):
if not hasattr(self.client, 'encode_headers'):
self.skipTest('Cannot do header encoding check on SessionClient')