Merge "Update quantum.sh for glance client change"
diff --git a/files/apts/glance b/files/apts/glance
index 9612267..a05e9f2 100644
--- a/files/apts/glance
+++ b/files/apts/glance
@@ -1,4 +1,5 @@
 gcc
+libxml2-dev
 python-dev
 python-eventlet
 python-routes
diff --git a/files/rpms/glance b/files/rpms/glance
index 141fe97..e38f239 100644
--- a/files/rpms/glance
+++ b/files/rpms/glance
@@ -1,3 +1,4 @@
+libxml2-devel
 python-argparse
 python-eventlet
 python-greenlet
diff --git a/stack.sh b/stack.sh
index 1b69475..71c5ffc 100755
--- a/stack.sh
+++ b/stack.sh
@@ -802,15 +802,28 @@
     # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
     sudo mysql -uroot -p$MYSQL_PASSWORD -h127.0.0.1 -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASSWORD';"
 
-    # Edit /etc/mysql/my.cnf to change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and restart the mysql service:
+    # Update ``my.cnf`` for some local needs and restart the mysql service
     if [[ "$os_PACKAGE" = "deb" ]]; then
-        MY_CNF=/etc/mysql/my.cnf
+        MY_CONF=/etc/mysql/my.cnf
         MYSQL=mysql
     else
-        MY_CNF=/etc/my.cnf
+        MY_CONF=/etc/my.cnf
         MYSQL=mysqld
     fi
-    sudo sed -i 's/127.0.0.1/0.0.0.0/g' $MY_CNF
+
+    # Change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0)
+    sudo sed -i '/^bind-address/s/127.0.0.1/0.0.0.0/g' $MY_CONF
+
+    # Set default db type to InnoDB
+    if grep -q "default-storage-engine" $MY_CONF; then
+        # Change it
+        sudo bash -c "source $TOP_DIR/functions; iniset $MY_CONF mysqld default-storage-engine InnoDB"
+    else
+        # Add it
+        sudo sed -i -e "/^\[mysqld\]/ a \
+default-storage-engine = InnoDB" $MY_CONF
+    fi
+
     restart_service $MYSQL
 fi
 
@@ -1663,7 +1676,6 @@
     # Rewrite stock keystone.conf:
     iniset $KEYSTONE_CONF DEFAULT admin_token "$SERVICE_TOKEN"
     iniset $KEYSTONE_CONF sql connection "$BASE_SQL_CONN/keystone?charset=utf8"
-    iniset $KEYSTONE_CONF catalog template_file "$KEYSTONE_CATALOG"
     iniset $KEYSTONE_CONF ec2 driver "keystone.contrib.ec2.backends.sql.Ec2"
     # Configure keystone.conf to use templates
     iniset $KEYSTONE_CONF catalog driver "keystone.catalog.backends.templated.TemplatedCatalog"
diff --git a/tools/configure_tempest.sh b/tools/configure_tempest.sh
index dd43313..bed3d67 100755
--- a/tools/configure_tempest.sh
+++ b/tools/configure_tempest.sh
@@ -119,9 +119,9 @@
 FLAVOR_REF=1
 FLAVOR_REF_ALT=2
 
-ADMIN_USERNAME={$ADMIN_USERNAME:-admin}
-ADMIN_PASSWORD={$ADMIN_PASSWORD:-secrete}
-ADMIN_TENANT_NAME={$ADMIN_TENANT:-admin}
+ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
+ADMIN_PASSWORD=${ADMIN_PASSWORD:-secrete}
+ADMIN_TENANT_NAME=${ADMIN_TENANT:-admin}
 
 # Do any of the following need to be configurable?
 COMPUTE_CATALOG_TYPE=compute
@@ -131,6 +131,11 @@
 BUILD_INTERVAL=10
 BUILD_TIMEOUT=600
 
+# Image test configuration options...
+IMAGE_HOST=${IMAGE_HOST:-127.0.0.1}
+IMAGE_PORT=${IMAGE_PORT:-9292}
+IMAGE_API_VERSION="1"
+
 sed -e "
     s,%IDENTITY_USE_SSL%,$IDENTITY_USE_SSL,g;
     s,%IDENTITY_HOST%,$IDENTITY_HOST,g;
@@ -154,6 +159,9 @@
     s,%IMAGE_ID_ALT%,$IMAGE_UUID_ALT,g;
     s,%FLAVOR_REF%,$FLAVOR_REF,g;
     s,%FLAVOR_REF_ALT%,$FLAVOR_REF_ALT,g;
+    s,%IMAGE_HOST%,$IMAGE_HOST,g;
+    s,%IMAGE_PORT%,$IMAGE_PORT,g;
+    s,%IMAGE_API_VERSION%,$IMAGE_API_VERSION,g;
     s,%ADMIN_USERNAME%,$ADMIN_USERNAME,g;
     s,%ADMIN_PASSWORD%,$ADMIN_PASSWORD,g;
     s,%ADMIN_TENANT_NAME%,$ADMIN_TENANT_NAME,g;