Fix openflowplugin gate job names
[releng/builder.git] / packer / provision / devstack-pre-pip.sh
index 936ac3bd1bbfd5aca8e4c616fe1ad7e2b3c3503f..a91d7619d68d843467b6a73d0153f402bf5189e9 100644 (file)
@@ -1,7 +1,18 @@
 #!/bin/bash
 
+# force any errors to cause the script and job to end in failure
+set -xeu -o pipefail
+
+# add in a test copr repo
+wget http://copr.fedoraproject.org/coprs/tykeal/odl-updates/repo/epel-7/tykeal-odl-updates-epel-7.repo -O /etc/yum.repos.d/tykeal-odl-updates-epel-7.repo
+# Install xpath
+yum install -y perl-XML-XPath python-pip python-six
+
+# install crudini command line tool for editing config files
+yum install -y crudini
+
 echo '---> Installing non-baseline requirements'
-yum install -y deltarpm python{,-{crypto,devel,lxml,setuptools}} \
+yum install -y deltarpm nc python{,-{crypto,devel,lxml,setuptools}} \
     @development {lib{xml2,xslt,ffi},openssl}-devel git wget
 
 echo '---> Updating net link setup'
@@ -32,6 +43,18 @@ do
     pip install -c requirements/upper-constraints.txt -r ${proj}/test-requirements.txt
 done
 
+if [ "$branch" == "stable/mitaka" ] || [ "$branch" == "stable/liberty" ]; then
+    # the newton release has ovs 2.5.0
+    echo '---> Installing openvswitch from openstack Newton repo (2.5.0)'
+    yum install -y http://rdoproject.org/repos/openstack-newton/rdo-release-newton.rpm
+else
+    # the ocata release has ovs 2.6.1
+    echo '---> Installing openvswitch from openstack Ocata repo (2.6.1)'
+    yum install -y http://rdoproject.org/repos/openstack-ocata/rdo-release-ocata.rpm
+fi
+
+yum install -y --nogpgcheck openvswitch
+
 cd $OLDPWD
 rm -fr tmp