Merge "Add ResellerAdmin role to ceilometer user."
diff --git a/files/keystone_data.sh b/files/keystone_data.sh
index 35793d8..20749bc 100755
--- a/files/keystone_data.sh
+++ b/files/keystone_data.sh
@@ -98,16 +98,16 @@
 
 # Keystone
 if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
-	KEYSTONE_SERVICE=$(get_id keystone service-create \
-		--name=keystone \
-		--type=identity \
-		--description="Keystone Identity Service")
-	keystone endpoint-create \
-	    --region RegionOne \
-		--service_id $KEYSTONE_SERVICE \
-		--publicurl "http://$SERVICE_HOST:\$(public_port)s/v2.0" \
-		--adminurl "http://$SERVICE_HOST:\$(admin_port)s/v2.0" \
-		--internalurl "http://$SERVICE_HOST:\$(public_port)s/v2.0"
+    KEYSTONE_SERVICE=$(get_id keystone service-create \
+        --name=keystone \
+        --type=identity \
+        --description="Keystone Identity Service")
+    keystone endpoint-create \
+        --region RegionOne \
+        --service_id $KEYSTONE_SERVICE \
+        --publicurl "http://$SERVICE_HOST:\$(public_port)s/v2.0" \
+        --adminurl "http://$SERVICE_HOST:\$(admin_port)s/v2.0" \
+        --internalurl "http://$SERVICE_HOST:\$(public_port)s/v2.0"
 fi
 
 # Nova
diff --git a/lib/cinder b/lib/cinder
index 058fcc2..1aa34cd 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -24,6 +24,9 @@
 # Defaults
 # --------
 
+# set up default driver
+CINDER_DRIVER=${CINDER_DRIVER:-default}
+
 # set up default directories
 CINDER_DIR=$DEST/cinder
 CINDERCLIENT_DIR=$DEST/python-cinderclient
@@ -145,6 +148,19 @@
         iniset $CINDER_CONF DEFAULT logging_debug_format_suffix "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d"
         iniset $CINDER_CONF DEFAULT logging_exception_prefix "%(color)s%(asctime)s TRACE %(name)s %(instance)s"
     fi
+
+    if [ "$CINDER_DRIVER" == "XenAPINFS" ]; then
+        (
+            set -u
+            iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.xenapi_sm.XenAPINFSDriver"
+            iniset $CINDER_CONF DEFAULT xenapi_connection_url "$CINDER_XENAPI_CONNECTION_URL"
+            iniset $CINDER_CONF DEFAULT xenapi_connection_username "$CINDER_XENAPI_CONNECTION_USERNAME"
+            iniset $CINDER_CONF DEFAULT xenapi_connection_password "$CINDER_XENAPI_CONNECTION_PASSWORD"
+            iniset $CINDER_CONF DEFAULT xenapi_nfs_server "$CINDER_XENAPI_NFS_SERVER"
+            iniset $CINDER_CONF DEFAULT xenapi_nfs_serverpath "$CINDER_XENAPI_NFS_SERVERPATH"
+        )
+        [ $? -ne 0 ] && exit 1
+    fi
 }
 
 # init_cinder() - Initialize database and volume group
diff --git a/lib/horizon b/lib/horizon
index af09f77..6173042 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -79,6 +79,8 @@
         # Be a good citizen and use the distro tools here
         sudo touch /etc/$APACHE_NAME/$APACHE_CONF
         sudo a2ensite horizon
+        # WSGI doesn't enable by default, enable it
+        sudo a2enmod wsgi
     else
         # Install httpd, which is NOPRIME'd
         if is_suse; then
diff --git a/lib/nova b/lib/nova
index d15d9e3..6445a07 100644
--- a/lib/nova
+++ b/lib/nova
@@ -423,6 +423,7 @@
     # The group **libvirtd** is added to the current user in this script.
     # Use 'sg' to execute nova-compute as a member of the **libvirtd** group.
     # ``screen_it`` checks ``is_service_enabled``, it is not needed here
+    screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor"
     screen_it n-cpu "cd $NOVA_DIR && sg libvirtd $NOVA_BIN_DIR/nova-compute"
     screen_it n-crt "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cert"
     screen_it n-net "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-network"
@@ -430,7 +431,6 @@
     screen_it n-novnc "cd $NOVNC_DIR && ./utils/nova-novncproxy --config-file $NOVA_CONF --web ."
     screen_it n-xvnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-xvpvncproxy --config-file $NOVA_CONF"
     screen_it n-cauth "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-consoleauth"
-    screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor"
 }
 
 # stop_nova() - Stop running processes (non-screen)
diff --git a/lib/quantum b/lib/quantum
index ba98b64..373d521 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -6,6 +6,7 @@
 set +o xtrace
 
 export QUANTUM_TEST_CONFIG_FILE=${QUANTUM_TEST_CONFIG_FILE:-"/etc/quantum/debug.ini"}
+QUANTUM_AUTH_CACHE_DIR=${QUANTUM_AUTH_CACHE_DIR:-/var/cache/quantum}
 
 # Configures keystone integration for quantum service and agents
 function quantum_setup_keystone() {
@@ -22,6 +23,12 @@
     iniset $conf_file $section admin_tenant_name $SERVICE_TENANT_NAME
     iniset $conf_file $section admin_user $Q_ADMIN_USERNAME
     iniset $conf_file $section admin_password $SERVICE_PASSWORD
+    if [[ "$KEYSTONE_TOKEN_FORMAT" == "PKI" ]]; then
+        iniset $conf_file $section signing_dir $QUANTUM_AUTH_CACHE_DIR
+        # Create cache dir
+        sudo mkdir -p $QUANTUM_AUTH_CACHE_DIR
+        sudo chown `whoami` $QUANTUM_AUTH_CACHE_DIR
+    fi
 }
 
 function quantum_setup_ovs_bridge() {
diff --git a/tools/configure_tempest.sh b/tools/configure_tempest.sh
index 9b543ab..03dc683 100755
--- a/tools/configure_tempest.sh
+++ b/tools/configure_tempest.sh
@@ -209,6 +209,9 @@
 LIVE_MIGRATION_AVAILABLE=${LIVE_MIGRATION_AVAILABLE:-False}
 USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION=${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
 
+# Object Storage
+OBJECT_CATALOG_TYPE="object-store"
+
 # EC2 and S3 test configuration
 BOTO_EC2_URL="http://$IDENTITY_HOST:8773/services/Cloud"
 BOTO_S3_URL="http://$IDENTITY_HOST:3333"
@@ -281,6 +284,7 @@
     s,%VOLUME_BUILD_TIMEOUT%,$VOLUME_BUILD_TIMEOUT,g;
     s,%LIVE_MIGRATION_AVAILABLE%,$LIVE_MIGRATION_AVAILABLE,g;
     s,%USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION%,$USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION,g;
+    s,%OBJECT_CATALOG_TYPE%,$OBJECT_CATALOG_TYPE,g;
     s,%BOTO_EC2_URL%,$BOTO_EC2_URL,g;
     s,%BOTO_S3_URL%,$BOTO_S3_URL,g;
     s,%BOTO_AWS_ACCESS%,$BOTO_AWS_ACCESS,g;