Created
February 25, 2016 05:08
-
-
Save charz/fb6ad4d8b231f8c01d6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOKEN=AUTH_tk025422bc77c24bd0b123661e610f6c0c | |
ACCOUNT=$1 | |
CONTANER=$2 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}1" a1 | |
echo | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}2" a2 | |
echo | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}3" a3 | |
echo | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}4" a4 | |
echo | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}5" a5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat run_account_reaper_test.sh | |
#!/bin/bash | |
TOKEN=AUTH_tk025422bc77c24bd0b123661e610f6c0c | |
ACCOUNT=$1 | |
CONTANER=$2 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} upload "${CONTAINER}1" rc.local --object-name a1 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} upload "${CONTAINER}2" rc.local --object-name a2 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} upload "${CONTAINER}3" rc.local --object-name a3 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} upload "${CONTAINER}4" rc.local --object-name a4 | |
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} upload "${CONTAINER}5" rc.local --object-name a5 | |
# delete account by reseller | |
curl -i http://192.168.200.21/v1/AUTH_${ACCOUNT} -I -H "X-Auth-Token: ${TOKEN}" -X DELETE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment