[Openstack] [Swift]Is the cloudfiles compatible with keystone v2.0?

Alex Yang alex890714 at gmail.com
Thu Jul 5 10:21:48 UTC 2012


Hello all,
I tried to config the swift using keystone. It seems ok that I use the
swift command:
swift -V 2 -A http://127.0.0.1:5000/v2.0 -U service:swift -K swift stat
   Account: AUTH_a715e6bff8f54a1b85a8a61c0d2be1ca
Containers: 1
   Objects: 0
     Bytes: 0
Accept-Ranges: bytes
X-Timestamp: 1341464397.05768
X-Trans-Id: tx7a6fd2d77e144253a003dab4f6a4fa21

My swift is 1.5.0.
The keystone is the newest version.

I also tried to use python-cloudfiles to access the swift service, but
failed.
conn = cloudfiles.get_connection(
        username='service:swift', api_key='swift', authurl='
http://127.0.0.1:5000/v2.0'
       )
Traceback (most recent call last):
  File "con.py", line 7, in <module>
    username='service:swift', api_key='swift', authurl='
http://127.0.0.1:5000/v2.0'
  File
"/home/alex/workspace/sws/cloudfiles/python-cloudfiles/cloudfiles/__init__.py",
line 98, in get_connection
    return Connection(*args, **kwargs)
  File
"/home/alex/workspace/sws/cloudfiles/python-cloudfiles/cloudfiles/connection.py",
line 85, in __init__
    self._authenticate()
  File
"/home/alex/workspace/sws/cloudfiles/python-cloudfiles/cloudfiles/connection.py",
line 90, in _authenticate
    (url, self.cdn_url, self.token) = self.auth.authenticate()
  File
"/home/alex/workspace/sws/cloudfiles/python-cloudfiles/cloudfiles/authentication.py",
line 78, in authenticate
    raise ResponseError(response.status, response.reason)
cloudfiles.errors.ResponseError: 501: Not Implemented

I found that the swift-client is use the 2.0 compatible api which sent a
json string to kyestone port(5000),
but the cloudfiles use the 1.0 api which sent the 'X-Auth-User' and
'X-Auth-Token' headers to keystone.

If i want use the cloudfiles with the keystone(the newest version), I need
change the code of cloudfiles by myself?

thanks!
-- 
  杨雨
  Email:       alex890714 at gmail.com
GitHub:       https://github.com/AlexYangYu
    Blog:        http://alexyang.sinaapp.com
 Weibo:       http://www.weibo.com/alexyangyu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120705/a69a8be0/attachment.html>


More information about the Openstack mailing list