installing swift client tool

Asked by victor

how do I install ONLY the swift tool on a client machine that needs to talk to a openstack swift storage?

I copy the /bin/st file and tried running that which doesn't work.

I did not install the swift storage but I need to run some batch script in unix(centos or ubuntu) to download/upload some files to the swift storage.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
victor
Solved:
Last query:
Last reply:
Revision history for this message
Florian Hines (pandemicsyn) said :
#1

The st/swift script is self contained:

http://bazaar.launchpad.net/~hudson-openstack/swift/trunk/view/head:/bin/swift

You should be able to copy it to a host and run it without having to install Swift packages on the systems. What error where you getting when you attempted to use it ?

Revision history for this message
victor (victor-tey) said :
#2

Ahh I might have got an older version. I copied bin/st instead of bin/swift. I will give that a shot again thanks :)

Revision history for this message
victor (victor-tey) said :
#3

 bin/swift -A https://example:8080/auth/v1.0 -U myAccessKey -K mySecretKey stat

i tried the above but got the error

File "bin/swift", line 164
    proxy_parsed = urlparse(proxy) if proxy else None

Am i doing something wrong?

Revision history for this message
Soren Hansen (soren) said :
#4

Can you post the full output, please?

Revision history for this message
victor (victor-tey) said :
#5

that is the full output.

Revision history for this message
victor (victor-tey) said :
#6

-bash-3.2# bin/swift -A 'https://example.org:8080/auth/v1.0' -U vortal -K hj38ddjj3ksk-2kdkkw stat
  File "bin/swift", line 164
    proxy_parsed = urlparse(proxy) if proxy else None
                                    ^
SyntaxError: invalid syntax

Revision history for this message
victor (victor-tey) said :
#7

I found the issue. seem like the ternary operator is not available on the version of python i had which is 2.4.3.