Merge "Correctly set the L3 service plugin for ML2"
diff --git a/functions b/functions
index bff2e26..83826f9 100644
--- a/functions
+++ b/functions
@@ -551,6 +551,7 @@
     GIT_REMOTE=$1
     GIT_DEST=$2
     GIT_REF=$3
+    RECLONE=$(trueorfalse False $RECLONE)
 
     if [[ "$OFFLINE" = "True" ]]; then
         echo "Running in offline mode, clones already exist"
@@ -576,7 +577,7 @@
             cd $GIT_DEST
             # This checkout syntax works for both branches and tags
             git checkout $GIT_REF
-        elif [[ "$RECLONE" == "yes" ]]; then
+        elif [[ "$RECLONE" = "True" ]]; then
             # if it does exist then simulate what clone does if asked to RECLONE
             cd $GIT_DEST
             # set the url to pull from and fetch
@@ -1268,16 +1269,16 @@
 
 
 # Normalize config values to True or False
-# Accepts as False: 0 no false False FALSE
-# Accepts as True: 1 yes true True TRUE
+# Accepts as False: 0 no No NO false False FALSE
+# Accepts as True: 1 yes Yes YES true True TRUE
 # VAR=$(trueorfalse default-value test-value)
 function trueorfalse() {
     local default=$1
     local testval=$2
 
     [[ -z "$testval" ]] && { echo "$default"; return; }
-    [[ "0 no false False FALSE" =~ "$testval" ]] && { echo "False"; return; }
-    [[ "1 yes true True TRUE" =~ "$testval" ]] && { echo "True"; return; }
+    [[ "0 no No NO false False FALSE" =~ "$testval" ]] && { echo "False"; return; }
+    [[ "1 yes Yes YES true True TRUE" =~ "$testval" ]] && { echo "True"; return; }
     echo "$default"
 }
 
diff --git a/lib/ironic b/lib/ironic
index 2ce5038..072d2de 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -148,9 +148,9 @@
             keystone endpoint-create \
                 --region RegionOne \
                 --service_id $IRONIC_SERVICE \
-                --publicurl "$IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT/v1/" \
-                --adminurl "$IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT/v1/" \
-                --internalurl "$IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT/v1/"
+                --publicurl "$IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT" \
+                --adminurl "$IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT" \
+                --internalurl "$IRONIC_SERVICE_PROTOCOL://$IRONIC_HOSTPORT"
         fi
     fi
 }
diff --git a/lib/nova_plugins/hypervisor-vsphere b/lib/nova_plugins/hypervisor-vsphere
new file mode 100644
index 0000000..1666246
--- /dev/null
+++ b/lib/nova_plugins/hypervisor-vsphere
@@ -0,0 +1,72 @@
+# lib/nova_plugins/hypervisor-vsphere
+# Configure the vSphere hypervisor
+
+# Enable with:
+# VIRT_DRIVER=vsphere
+
+# Dependencies:
+# ``functions`` file
+# ``nova`` configuration
+
+# install_nova_hypervisor - install any external requirements
+# configure_nova_hypervisor - make configuration changes, including those to other services
+# start_nova_hypervisor - start any external services
+# stop_nova_hypervisor - stop any external services
+# cleanup_nova_hypervisor - remove transient data and cache
+
+# Save trace setting
+MY_XTRACE=$(set +o | grep xtrace)
+set +o xtrace
+
+
+# Defaults
+# --------
+
+
+# Entry Points
+# ------------
+
+# clean_nova_hypervisor - Clean up an installation
+function cleanup_nova_hypervisor() {
+    # This function intentionally left blank
+    :
+}
+
+# configure_nova_hypervisor - Set config files, create data dirs, etc
+function configure_nova_hypervisor() {
+    iniset $NOVA_CONF DEFAULT compute_driver "vmwareapi.VMwareVCDriver"
+    VMWAREAPI_USER=${VMWAREAPI_USER:-"root"}
+    iniset $NOVA_CONF vmware host_ip "$VMWAREAPI_IP"
+    iniset $NOVA_CONF vmware host_username "$VMWAREAPI_USER"
+    iniset $NOVA_CONF vmware host_password "$VMWAREAPI_PASSWORD"
+    iniset $NOVA_CONF vmware cluster_name "$VMWAREAPI_CLUSTER"
+    if is_service_enabled neutron; then
+        iniset $NOVA_CONF vmware integration_bridge $OVS_BRIDGE
+    fi
+}
+
+# install_nova_hypervisor() - Install external components
+function install_nova_hypervisor() {
+    # This function intentionally left blank
+    :
+}
+
+# start_nova_hypervisor - Start any required external services
+function start_nova_hypervisor() {
+    # This function intentionally left blank
+    :
+}
+
+# stop_nova_hypervisor - Stop any external services
+function stop_nova_hypervisor() {
+    # This function intentionally left blank
+    :
+}
+
+
+# Restore xtrace
+$MY_XTRACE
+
+# Local variables:
+# mode: shell-script
+# End:
diff --git a/lib/tempest b/lib/tempest
index bc0b18d..646d42b 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -230,11 +230,6 @@
 
     # Compute
     iniset $TEMPEST_CONF compute change_password_available False
-    # Note(nati) current tempest don't create network for each tenant
-    # so reuse same tenant for now
-    if is_service_enabled neutron; then
-        TEMPEST_ALLOW_TENANT_ISOLATION=${TEMPEST_ALLOW_TENANT_ISOLATION:-False}
-    fi
     iniset $TEMPEST_CONF compute allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
     iniset $TEMPEST_CONF compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
     iniset $TEMPEST_CONF compute network_for_ssh $PRIVATE_NETWORK_NAME
diff --git a/stack.sh b/stack.sh
index 46c3f44..03d5632 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1089,22 +1089,6 @@
         iniset $NOVA_CONF DEFAULT powervm_img_local_path $POWERVM_IMG_LOCAL_PATH
 
 
-    # vSphere API
-    # -----------
-
-    elif [ "$VIRT_DRIVER" = 'vsphere' ]; then
-        echo_summary "Using VMware vCenter driver"
-        iniset $NOVA_CONF DEFAULT compute_driver "vmwareapi.VMwareVCDriver"
-        VMWAREAPI_USER=${VMWAREAPI_USER:-"root"}
-        iniset $NOVA_CONF vmware host_ip "$VMWAREAPI_IP"
-        iniset $NOVA_CONF vmware host_username "$VMWAREAPI_USER"
-        iniset $NOVA_CONF vmware host_password "$VMWAREAPI_PASSWORD"
-        iniset $NOVA_CONF vmware cluster_name "$VMWAREAPI_CLUSTER"
-        if is_service_enabled neutron; then
-            iniset $NOVA_CONF vmware integration_bridge $OVS_BRIDGE
-        fi
-
-
     # Default libvirt
     # ---------------