Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello, The error sent back by curl means he isn't able to reach the url "url-from-x-storage-url-above". Actually, curl tried to reach an unknown url and failed badly. This is normal because in the tutoriel, the parts which are surrounded by "<" and ">" are supposed to be changed when you try the commands.

The meaning of this part of the tutorial is that you should be able to get some informations back from the first call of the curl command : curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' This should display some informations concerning the http request you made and the answer which is given back to you by your swift installation. The result of this command may display something like that :

       User-Agent: curl/7.27.0
       > Host:
       > Accept: */*
       > X-Storage-User: admin:admin
       > X-Storage-Pass:admin
       * HTTP 1.1 or later with persistent connection, pipelining supported
       < HTTP/1.1 200 OK
       < Vary: X-Auth-Token
       < Content-Type: application/json>

With some more informations, included the "X-Auth-Token" (which is required to interact with swift), and the "X-Storage-Url" which is the url to request with curl. Once you found these two informations, you can use the second command to get informations on the account you requested (test:tester, in this example). Finally, the second command looks like : curl -v -H 'X-Auth-Token: 600898b5e6304187b3bdfd304f3bea04'

Of course, the url and the token you will get will change a bit :)

Curl is just another way than using the swift command to interact with your swift environnement. Curl is just a program made to execute http requests. This allows you to explore further the way swift works by being forced to manually play the authentication steps before you do your "real" request. You can read the Curl's man to see what exactly does this program and understanding the options it propose.

Anyway, when you use the Swift command, these steps gets played by the python script but you can't see it, you only get the final result.

You are welcome :)