Add swift to exercise.sh

This commit is contained in:
Chmouel Boudjnah 2011-11-02 18:22:43 +01:00
parent e8d1158091
commit bbed01d390
2 changed files with 19 additions and 4 deletions

View file

@ -191,3 +191,22 @@ nova secgroup-delete $SECGROUP
# make sure that we can describe instances
euca-describe-instances
# Testing Swift
# =============
# Check if we have to swift via keystone
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD stat
# We start by creating a test container
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD post testcontainer
# add some files into it.
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD upload testcontainer /etc/issue
# list them
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD list testcontainer
# And we may want to delete them now that we have tested that
# everything works.
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD delete --all testcontainer

View file

@ -1011,10 +1011,6 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
echo "examples on using novaclient command line is in exercise.sh"
echo "the default users are: admin and demo"
echo "the password: $ADMIN_PASSWORD"
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
echo "Swift: swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin:admin -K $ADMIN_PASSWORD stat"
fi
fi
# indicate how long this took to run (bash maintained variable 'SECONDS')