Hi, gholt,
I have tried Python bindings as your suggestion. After setting up virtual machine, I installed Python-cloudfiles.
Following steps are ok:
conn = cloudfiles.get_connection(authurl='http://127.0.0.1:11000/v1.0',username='test:tester', api_key='testing')
containers = conn.get_all_containers()
type(containers)
<class 'cloudfiles.container.containerresults'="">
len(containers)
2
for container in containers: print container.name
...
ttt
ttt2
fruit_container = containers[0]
myfile = fruit_container.create_object('file1')
However, when uploading files, I got error messages.
myfile.write('COPYING,my first file.')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cloudfiles/utils.py", line 43, in decorator
return f(args, *kwargs)
File "cloudfiles/storage_object.py", line 334, in write
raise ResponseError(response.status, response.reason)
cloudfiles.errors.ResponseError: 503: Internal Server Error
myfile.load_from_filename('COPYING')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cloudfiles/storage_object.py", line 451, in load_from_filename
self.write(fobj, verify=verify, callback=callback)
File "cloudfiles/utils.py", line 43, in decorator
return f(args, *kwargs)
File "cloudfiles/storage_object.py", line 334, in write
raise ResponseError(response.status, response.reason)
cloudfiles.errors.ResponseError: 503: Internal Server Error
The syslog information (for >>>myfile.load_from_filename('COPYING')):
Aug 21 15:19:07 csxbwang-ubuntu account 127.0.0.1 - - [21/Aug/2010:07:19:07 +0000] "HEAD /sdb2/231428/85c07fae-5caf-416a-b68e-8758ab30232b" 204 - "tx37d8b49d-b25d-479d-b515-26b5f8c37d76" "-" "-" 0.0016 ""
Aug 21 15:19:07 csxbwang-ubuntu container 127.0.0.1 - - [21/Aug/2010:07:19:07 +0000] "HEAD /sdb4/61660/85c07fae-5caf-416a-b68e-8758ab30232b/ttt" 204 - "tx37d8b49d-b25d-479d-b515-26b5f8c37d76" "-" "-" 0.0015
Aug 21 15:19:07 csxbwang-ubuntu object ERROR __call__ error with PUT /sdb3/217384/85c07fae-5caf-416a-b68e-8758ab30232b/ttt/file1 transaction tx37d8b49d-b25d-479d-b515-26b5f8c37d76: #012Traceback (most recent call last):#012 File "/home/csxbwang/swift/trunk/swift/obj/server.py", line 570, in __call__#012 res = getattr(self, req.method)(req)#012 File "/home/csxbwang/swift/trunk/swift/obj/server.py", line 408, in PUT#012 file.put(fd, tmppath, metadata)#012 File "/usr/lib/python2.6/contextlib.py", line 34, in __exit__#012 self.gen.throw(type, value, traceback)#012 File "/home/csxbwang/swift/trunk/swift/obj/server.py", line 188, in mkstemp#012 yield fd, tmppath#012 File "/home/csxbwang/swift/trunk/swift/obj/server.py", line 408, in PUT#012 file.put(fd, tmppath, metadata)#012 File "/home/csxbwang/swift/trunk/swift/obj/server.py", line 215, in put#012 setxattr(fd, '%s%s' % (METADATA_KEY, key or ''), metastr[:254])#012 File "/usr/lib/pymodules/python2.6/xattr/__init__.py", line 188, in setxattr#012 return xattr(f).set(attr, value, options=options)#012 File "/usr/lib/pymodules/python2.6/xattr/__init__.py", line 81, in set#012 self._set(name, value, 0, options | self.options)#012 File "/usr/lib/pymodules/python2.6/xattr/__init__.py", line 16, in _func#012 return func(first, *args)#012IOError: [Errno 95] Operation not supported
Aug 21 15:19:07 csxbwang-ubuntu object 127.0.0.1 - - [21/Aug/2010:07:19:07 +0000] "PUT /sdb1/217384/85c07fae-5caf-416a-b68e-8758ab30232b/ttt/file1" 500 1133 "-" "tx37d8b49d-b25d-479d-b515-26b5f8c37d76" "python-cloudfiles/1.7.2" 0.0230
Aug 21 15 ... (more)