| ... | ... |
@@ -191,3 +191,22 @@ nova secgroup-delete $SECGROUP |
| 191 | 191 |
|
| 192 | 192 |
# make sure that we can describe instances |
| 193 | 193 |
euca-describe-instances |
| 194 |
+ |
|
| 195 |
+# Testing Swift |
|
| 196 |
+# ============= |
|
| 197 |
+ |
|
| 198 |
+# Check if we have to swift via keystone |
|
| 199 |
+swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD stat
|
|
| 200 |
+ |
|
| 201 |
+# We start by creating a test container |
|
| 202 |
+swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD post testcontainer
|
|
| 203 |
+ |
|
| 204 |
+# add some files into it. |
|
| 205 |
+swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD upload testcontainer /etc/issue
|
|
| 206 |
+ |
|
| 207 |
+# list them |
|
| 208 |
+swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD list testcontainer
|
|
| 209 |
+ |
|
| 210 |
+# And we may want to delete them now that we have tested that |
|
| 211 |
+# everything works. |
|
| 212 |
+swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD delete --all testcontainer
|
| ... | ... |
@@ -1011,10 +1011,6 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then |
| 1011 | 1011 |
echo "examples on using novaclient command line is in exercise.sh" |
| 1012 | 1012 |
echo "the default users are: admin and demo" |
| 1013 | 1013 |
echo "the password: $ADMIN_PASSWORD" |
| 1014 |
- if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then |
|
| 1015 |
- echo "Swift: swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin:admin -K $ADMIN_PASSWORD stat"
|
|
| 1016 |
- fi |
|
| 1017 |
- |
|
| 1018 | 1014 |
fi |
| 1019 | 1015 |
|
| 1020 | 1016 |
# indicate how long this took to run (bash maintained variable 'SECONDS') |