Revision history [back]

click to hide/show revision 1
initial version

If you want to make any user or container, then use the 'curl' and upload/download/verify the stat or list ... then use the 'swift'

EX:> curl>>**************************

>> Below, I have made the user 'ssluser', accout 'sslacct', and password 'sslpass'

curl -k -v -H 'X-Storage-User: sslacct:ssluser' -H 'X-Storage-Pass: sslpass' https://192.168.56.101/auth/v1.0

  • About to connect() to 192.168.56.101 port 443 (#0)
  • Trying 192.168.56.101... connected
  • Connected to 192.168.56.101 (192.168.56.101) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using AES256-SHA
  • Server certificate:
  • subject: C=KO; emailAddress=jih1103@paran.com
  • start date: 2012-06-21 06:21:35 GMT
  • expire date: 2012-07-21 06:21:35 GMT
  • SSL: unable to obtain common name from peer certificate > GET /auth/v1.0 HTTP/1.1 > User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18 > Host: 192.168.56.101 > Accept: / > X-Storage-User: sslacct:ssluser > X-Storage-Pass: sslpass > < HTTP/1.1 200 OK < X-Storage-Url: https://127.0.0.1/v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb < X-Storage-Token: AUTH_tkf7f78ee834784f9aa557b658a85cdebc < X-Auth-Token: AUTH_tkf7f78ee834784f9aa557b658a85cdebc < Content-Length: 108 < Date: Thu, 21 Jun 2012 06:55:00 GMT <
  • Connection #0 to host 192.168.56.101 left intact
  • Closing connection #0
  • SSLv3, TLS alert, Client hello (1): {"storage": {"default": "local", "local": "https://127.0.0.1/v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb"}}root@swiftmain:/etc/swift# curl -k -i -H "X-Auth-Token: AUTH_tkf7f78ee834784f9aa557b658a85cdebc" -X PUT https://127.0.0.1/v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb/sslcontainer HTTP/1.1 201 Created Content-Length: 18 Content-Type: text/html; charset=UTF-8 Date: Thu, 21 Jun 2012 07:00:07 GMT

201 Created

>> Below, I have made the container 'sslcontainer'

curl -k -i -H "X-Auth-Token: AUTH_tkf7f78ee834784f9aa557b658a85cdebc" -X PUT https://127.0.0.1/v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb/sslcontainer HTTP/1.1 201 Created Content-Length: 18 Content-Type: text/html; charset=UTF-8 Date: Thu, 21 Jun 2012 07:00:07 GMT

201 Created

swift>>************************

>> Below, I have up/down/check the object in any container : lib.tar is object, sslcont1 is container, and sslacct:ssluser is account...

swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser -K sslpass upload sslcont1 lib.tar

lib.tar

swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser -K sslpass download sslcont1 lib.tar

lib.tar

swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser -K sslpass delete sslcont1 lib.tar

lib.tar

root@swiftmain:~# swift -v -A https://192.168.56.101/auth/v1.0 -U sslacct:ssluser -K sslpass stat -v StorageURL: https://127.0.0.1/v1/AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb Auth Token: AUTH_tkf7f78ee834784f9aa557b658a85cdebc Account: AUTH_65918ac5-ec88-4b32-8509-b68fd019d6bb Containers: 5 Objects: 1 Bytes: 182855680 Accept-Ranges: byteslist