[Openstack] [OpenStack][Swift] Cannot perform multiple requests with Python API
Leander Bessa Beernaert
leanderbb at gmail.com
Tue Jan 8 16:05:53 UTC 2013
Output:
>>> c.get_container("test")
REQ: curl -i http://192.168.111.215:8080/v1/[AUTH]?format=json -X GET -H
"X-Auth-Token: [TOKEN]"
DEBUG:swiftclient:REQ: curl -i
http://192.168.111.215:8080/v1/[AUTH]?format=json -X GET -H
"X-Auth-Token: [TOKEN]"
RESP STATUS: 200
DEBUG:swiftclient:RESP STATUS: 200
RESP BODY: [{"hash": "fbaf48ec981a5eecdb57b929fdd426e8", "last_modified":
"2013-01-07T18:07:17.289060", "bytes": 200, "name": "test_object",
"content_type": "application/octet-stream"}]
DEBUG:swiftclient:RESP BODY: [{"hash": "fbaf48ec981a5eecdb57b929fdd426e8",
"last_modified": "2013-01-07T18:07:17.289060", "bytes": 200, "name":
"test_object", "content_type": "application/octet-stream"}]
({'content-length': '174', 'x-container-object-count': '1',
'accept-ranges': 'bytes', 'x-container-bytes-used': '200', 'x-timestamp':
'1357299184.84634', 'date': 'Tue, 08 Jan 2013 16:01:45 GMT',
'content-type': 'application/json; charset=utf-8'}, [{'bytes': 200,
'last_modified': '2013-01-07T18:07:17.289060', 'hash':
'fbaf48ec981a5eecdb57b929fdd426e8', 'name': 'test_object', 'content_type':
'application/octet-stream'}])
>>> c.get_container("test")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "swiftclient/client.py", line 1053, in get_container
full_listing=full_listing)
File "swiftclient/client.py", line 1000, in _retry
rv = func(self.url, self.token, *args, **kwargs)
File "swiftclient/client.py", line 505, in get_container
resp = conn.getresponse()
File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py",
line 103, in getresponse
logging.debug(_("HTTP PERF: %(time).5f seconds to %(method)s "
TypeError: 'tuple' object is not callable
On Tue, Jan 8, 2013 at 3:58 PM, Chmouel Boudjnah <chmouel at chmouel.com>wrote:
> SWIFTCLIENT_DEBUG=true
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130108/b093c17d/attachment.html>
More information about the Openstack
mailing list