Merge "Stop Neutron advanced service external processes"
diff --git a/.gitignore b/.gitignore
index 49eb188..c49b4a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
 local.sh
 files/*.gz
 files/images
+files/pip-*
 stack-screenrc
 *.pem
 accrc
diff --git a/exercises/marconi.sh b/exercises/marconi.sh
index 1b9788d..9d83a99 100755
--- a/exercises/marconi.sh
+++ b/exercises/marconi.sh
@@ -35,7 +35,7 @@
 
 is_service_enabled marconi-server || exit 55
 
-curl http://$SERVICE_HOST:8888/v1/ 2>/dev/null | grep -q 'Auth' || die $LINENO "Marconi API not functioning!"
+curl http://$SERVICE_HOST:8888/v1/ 2>/dev/null | grep -q 'queue_name' || die $LINENO "Marconi API not functioning!"
 
 set +o xtrace
 echo "*********************************************************************"
diff --git a/files/apts/tempest b/files/apts/tempest
new file mode 100644
index 0000000..f244e4e
--- /dev/null
+++ b/files/apts/tempest
@@ -0,0 +1 @@
+libxslt1-dev
\ No newline at end of file
diff --git a/files/rpms/tempest b/files/rpms/tempest
new file mode 100644
index 0000000..de32b81
--- /dev/null
+++ b/files/rpms/tempest
@@ -0,0 +1 @@
+libxslt-dev
\ No newline at end of file
diff --git a/functions b/functions
index 995be57..e79e1d5 100644
--- a/functions
+++ b/functions
@@ -422,6 +422,7 @@
         os_CODENAME=$(lsb_release -c -s)
     elif [[ -r /etc/redhat-release ]]; then
         # Red Hat Enterprise Linux Server release 5.5 (Tikanga)
+        # Red Hat Enterprise Linux Server release 7.0 Beta (Maipo)
         # CentOS release 5.5 (Final)
         # CentOS Linux release 6.0 (Final)
         # Fedora release 16 (Verne)
@@ -430,7 +431,7 @@
         for r in "Red Hat" CentOS Fedora XenServer; do
             os_VENDOR=$r
             if [[ -n "`grep \"$r\" /etc/redhat-release`" ]]; then
-                ver=`sed -e 's/^.* \(.*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release`
+                ver=`sed -e 's/^.* \([0-9].*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release`
                 os_CODENAME=${ver#*|}
                 os_RELEASE=${ver%|*}
                 os_UPDATE=${os_RELEASE##*.}
@@ -1159,6 +1160,11 @@
         NL=`echo -ne '\015'`
         echo "screen -t $1 bash" >> $SCREENRC
         echo "stuff \"$2$NL\"" >> $SCREENRC
+
+        if [[ -n ${SCREEN_LOGDIR} ]]; then
+            echo "logfile ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log" >>$SCREENRC
+            echo "log on" >>$SCREENRC
+        fi
     fi
 }
 
diff --git a/lib/cinder b/lib/cinder
index ef3bd81..cbe732e 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -174,6 +174,12 @@
 
     # Set the paths of certain binaries
     CINDER_ROOTWRAP=$(get_rootwrap_location cinder)
+    if [[ ! -x $CINDER_ROOTWRAP ]]; then
+        CINDER_ROOTWRAP=$(get_rootwrap_location oslo)
+        if [[ ! -x $CINDER_ROOTWRAP ]]; then
+            die $LINENO "No suitable rootwrap found."
+        fi
+    fi
 
     # If Cinder ships the new rootwrap filters files, deploy them
     # (owned by root) and add a parameter to $CINDER_ROOTWRAP
@@ -189,11 +195,16 @@
         sudo chown -R root:root $CINDER_CONF_DIR/rootwrap.d
         sudo chmod 644 $CINDER_CONF_DIR/rootwrap.d/*
         # Set up rootwrap.conf, pointing to /etc/cinder/rootwrap.d
-        sudo cp $CINDER_DIR/etc/cinder/rootwrap.conf $CINDER_CONF_DIR/
+        if [[ -f $CINDER_DIR/etc/cinder/rootwrap.conf ]]; then
+            sudo cp $CINDER_DIR/etc/cinder/rootwrap.conf $CINDER_CONF_DIR/
+        else
+            # rootwrap.conf is no longer shipped in Cinder itself
+            echo "filters_path=" | sudo tee $CINDER_CONF_DIR/rootwrap.conf > /dev/null
+        fi
         sudo sed -e "s:^filters_path=.*$:filters_path=$CINDER_CONF_DIR/rootwrap.d:" -i $CINDER_CONF_DIR/rootwrap.conf
         sudo chown root:root $CINDER_CONF_DIR/rootwrap.conf
         sudo chmod 0644 $CINDER_CONF_DIR/rootwrap.conf
-        # Specify rootwrap.conf as first parameter to cinder-rootwrap
+        # Specify rootwrap.conf as first parameter to rootwrap
         CINDER_ROOTWRAP="$CINDER_ROOTWRAP $CINDER_CONF_DIR/rootwrap.conf"
         ROOTWRAP_CINDER_SUDOER_CMD="$CINDER_ROOTWRAP *"
     fi
diff --git a/lib/marconi b/lib/marconi
index 8e0b82b..742f866 100644
--- a/lib/marconi
+++ b/lib/marconi
@@ -148,10 +148,11 @@
                             --user-id $MARCONI_USER \
                             --role-id $ADMIN_ROLE
     if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
-        MARCONI_SERVICE=$(get_id keystone service-create \
+        MARCONI_SERVICE=$(keystone service-create \
             --name=marconi \
             --type=queuing \
-            --description="Marconi Service")
+            --description="Marconi Service" \
+            | grep " id " | get_field 2)
         keystone endpoint-create \
             --region RegionOne \
             --service_id $MARCONI_SERVICE \
diff --git a/lib/neutron b/lib/neutron
index 851b2ac..dbc5843 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -69,7 +69,7 @@
 
 # Gateway and subnet defaults, in case they are not customized in localrc
 NETWORK_GATEWAY=${NETWORK_GATEWAY:-10.0.0.1}
-PUBLIC_NETWORK_GATEWAY=${PUBLIC_NETWORK_GATEWAY:-172.24.4.225}
+PUBLIC_NETWORK_GATEWAY=${PUBLIC_NETWORK_GATEWAY:-172.24.4.1}
 PRIVATE_SUBNET_NAME=${PRIVATE_SUBNET_NAME:-"private-subnet"}
 PUBLIC_SUBNET_NAME=${PUBLIC_SUBNET_NAME:-"public-subnet"}
 
diff --git a/lib/neutron_thirdparty/nicira b/lib/neutron_thirdparty/nicira
index 3efb5a9..a24392c 100644
--- a/lib/neutron_thirdparty/nicira
+++ b/lib/neutron_thirdparty/nicira
@@ -20,7 +20,7 @@
 NVP_GATEWAY_NETWORK_INTERFACE=${NVP_GATEWAY_NETWORK_INTERFACE:-eth2}
 # Re-declare floating range as it's needed also in stop_nicira, which
 # is invoked by unstack.sh
-FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.224/28}
+FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.0/24}
 
 function configure_nicira() {
     :
diff --git a/lib/tempest b/lib/tempest
index aa06791..0969b2d 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -324,6 +324,9 @@
     # cli
     iniset $TEMPEST_CONF cli cli_dir $NOVA_BIN_DIR
 
+    # Networking
+    iniset $TEMPEST_CONF network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-all}"
+
     # service_available
     for service in nova cinder glance neutron swift heat horizon ceilometer ironic savanna; do
         if is_service_enabled $service ; then
diff --git a/stack.sh b/stack.sh
index 22d184e..ce5fbd4 100755
--- a/stack.sh
+++ b/stack.sh
@@ -260,7 +260,7 @@
 # from either range when attempting to guess the IP to use for the host.
 # Note that setting FIXED_RANGE may be necessary when running DevStack
 # in an OpenStack cloud that uses either of these address ranges internally.
-FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.224/28}
+FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.0/24}
 FIXED_RANGE=${FIXED_RANGE:-10.0.0.0/24}
 FIXED_NETWORK_SIZE=${FIXED_NETWORK_SIZE:-256}
 
diff --git a/stackrc b/stackrc
index 410f9d8..e89e64d 100644
--- a/stackrc
+++ b/stackrc
@@ -282,6 +282,9 @@
         IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
 esac
 
+if [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-i386-20-20131211.1-sda" ]]; then
+    IMAGE_URLS+=",https://dl.fedoraproject.org/pub/alt/stage/20-RC1.1/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
+fi
 
 # 10Gb default volume backing file size
 VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-10250M}