diff --git a/exercises/bundle.sh b/exercises/bundle.sh index ca35c9afa3..d5c78af32b 100755 --- a/exercises/bundle.sh +++ b/exercises/bundle.sh @@ -46,3 +46,6 @@ if ! timeout $REGISTER_TIMEOUT sh -c "while euca-describe-images | grep '$AMI' | echo "Image $AMI not available within $REGISTER_TIMEOUT seconds" exit 1 fi + +# Clean up +euca-deregister $AMI diff --git a/exercises/client-env.sh b/exercises/client-env.sh index f4172bcb9d..a15a5c04d9 100755 --- a/exercises/client-env.sh +++ b/exercises/client-env.sh @@ -52,18 +52,13 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then if [[ "$SKIP_EXERCISES" =~ "key" ]] ; then STATUS_KEYSTONE="Skipped" else - if [[ -n "$VERIFY" ]]; then - # Save original environment - xOS_AUTH_URL=$OS_AUTH_URL - xOS_TENANT_NAME=$OS_TENANT_NAME - xOS_USERNAME=$OS_USERNAME - xOS_PASSWORD=$OS_PASSWORD - # keystone can't handle a trailing '/' - export OS_AUTH_URL=${OS_AUTH_URL%/} - # does any non-admin request work? - export OS_USERNAME=admin - export OS_TENANT_NAME=admin - fi + # We need to run the keystone test as admin since there doesn't + # seem to be anything to test the cli vars that runs as a user + # tenant-list should do that, it isn't implemented (yet) + xOS_TENANT_NAME=$OS_TENANT_NAME + xOS_USERNAME=$OS_USERNAME + export OS_USERNAME=admin + export OS_TENANT_NAME=admin echo -e "\nTest Keystone" if keystone service-list; then @@ -72,13 +67,9 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then STATUS_KEYSTONE="Failed" RETURN=1 fi - if [[ -n "$VERIFY" ]]; then - # Save original environment - OS_AUTH_URL=$xOS_AUTH_URL - OS_TENANT_NAME=$xOS_TENANT_NAME - OS_USERNAME=$xOS_USERNAME - OS_PASSWORD=$xOS_PASSWORD - fi + + OS_TENANT_NAME=$xOS_TENANT_NAME + OS_USERNAME=$xOS_USERNAME fi fi @@ -89,12 +80,6 @@ if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then if [[ "$SKIP_EXERCISES" =~ "n-api" ]] ; then STATUS_NOVA="Skipped" else - if [[ -n "$VERIFY" ]]; then - # Known novaclient breakage: - # NOVA_VERSION must be set or nova silently fails - export NOVA_VERSION=2 - fi - echo -e "\nTest Nova" if nova flavor-list; then STATUS_NOVA="Succeeded" @@ -112,14 +97,6 @@ if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then if [[ "$SKIP_EXERCISES" =~ "g-api" ]] ; then STATUS_GLANCE="Skipped" else - if [[ -n "$VERIFY" ]]; then - # Known glance client differage: - export OS_AUTH_TENANT=$OS_TENANT_NAME - export OS_AUTH_USER=$OS_USERNAME - export OS_AUTH_KEY=$OS_PASSWORD - export OS_AUTH_STRATEGY=keystone - fi - echo -e "\nTest Glance" if glance index; then STATUS_GLANCE="Succeeded" @@ -138,8 +115,7 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then STATUS_SWIFT="Skipped" else echo -e "\nTest Swift" - # FIXME(dtroyer): implement swift test - if true; then + if swift stat; then STATUS_SWIFT="Succeeded" else STATUS_SWIFT="Failed" diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh index c1cffa4a73..233313e829 100755 --- a/exercises/floating_ips.sh +++ b/exercises/floating_ips.sh @@ -48,15 +48,6 @@ DEFAULT_FLOATING_POOL=${DEFAULT_FLOATING_POOL:-nova} # Additional floating IP pool and range TEST_FLOATING_POOL=${TEST_FLOATING_POOL:-test} -# Get a token for clients that don't support service catalog -# ========================================================== - -# manually create a token by querying keystone (sending JSON data). Keystone -# returns a token and catalog of endpoints. We use python to parse the token -# and save it. - -TOKEN=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OS_USERNAME\", \"password\": \"$OS_PASSWORD\"}}}" -H "Content-type: application/json" ${OS_AUTH_URL%/}/tokens | python -c "import sys; import json; tok = json.loads(sys.stdin.read()); print tok['access']['token']['id'];"` - # Launching a server # ================== @@ -70,10 +61,10 @@ nova list nova image-list # But we recommend using glance directly -glance -f -A $TOKEN -H $GLANCE_HOST index +glance -f index # Grab the id of the image to launch -IMAGE=`glance -f -A $TOKEN -H $GLANCE_HOST index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1` +IMAGE=`glance -f index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1` # Security Groups # --------------- diff --git a/exercises/volumes.sh b/exercises/volumes.sh index 1f7c25f5b1..1fcc034bbf 100755 --- a/exercises/volumes.sh +++ b/exercises/volumes.sh @@ -34,15 +34,6 @@ DEFAULT_INSTANCE_TYPE=${DEFAULT_INSTANCE_TYPE:-m1.tiny} # Boot this image, use first AMi image if unset DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-ami} -# Get a token for clients that don't support service catalog -# ========================================================== - -# manually create a token by querying keystone (sending JSON data). Keystone -# returns a token and catalog of endpoints. We use python to parse the token -# and save it. - -TOKEN=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$OS_USERNAME\", \"password\": \"$OS_PASSWORD\"}}}" -H "Content-type: application/json" ${OS_AUTH_URL%/}/tokens | python -c "import sys; import json; tok = json.loads(sys.stdin.read()); print tok['access']['token']['id'];"` - # Launching a server # ================== @@ -56,10 +47,10 @@ nova list nova image-list # But we recommend using glance directly -glance -f -A $TOKEN -H $GLANCE_HOST index +glance -f index # Grab the id of the image to launch -IMAGE=`glance -f -A $TOKEN -H $GLANCE_HOST index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1` +IMAGE=`glance -f index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1` # determinine instance type # ------------------------- diff --git a/stack.sh b/stack.sh index 788c16049e..d803816ca9 100755 --- a/stack.sh +++ b/stack.sh @@ -981,12 +981,6 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then # We install the memcache server as this is will be used by the # middleware to cache the tokens auths for a long this is needed. apt_get install memcached - - # We need a special version of bin/swift which understand the - # OpenStack api 2.0, we download it until this is getting - # integrated in swift. - sudo https_proxy=$https_proxy curl -s -o/usr/local/bin/swift \ - 'https://review.openstack.org/gitweb?p=openstack/swift.git;a=blob_plain;f=bin/swift;hb=48bfda6e2fdf3886c98bd15649887d54b9a2574e' else swift_auth_server=tempauth fi