← Back to team overview

openstack team mailing list archive

Re: Need help and guidance of Openstack Swift

 

On 06/19/2012 04:34 PM, Yogesh Bansal wrote:
Hi Jay,

Thanks a lot for quick response. This was little helpful. I need how to send
the parameters to the swift server by making the connection. I think that
task is happening in inside the below code. Could you please tell me what is
happening in cloudfiles.get_connection method

def swift_api(request):
     endpoint = url_for(request, 'object-store')
     LOG.debug('Swift connection created using token "%s" and url "%s"'
               % (request.session['token'], endpoint))
     auth = SwiftAuthentication(endpoint, request.session['token'])
     return cloudfiles.get_connection(auth=auth)

Sorry Yogesh, I have absolutely no idea. I've only used the regular Swift client, not the python-cloudfiles library. Seems the cloudfiles library has a different way of authenticating...

You can see the cloudfiles library here:

https://github.com/rackspace/python-cloudfiles/blob/2c6f454bef05da7cd1eb28fa90f21914dc5dd6f2/cloudfiles/__init__.py

Though I will note that I don't see anything about the get_connection() method expecting that SwiftAuthentication object. :(

Best,
-jay


References