-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
+echo '---> Installing openvswitch from relevant openstack branch'
+yum install -y "centos-release-openstack-${branch_name}"
+
+# install 2.8.2 for queens.
+# 2.9.0 is the current version in openstack-queens, but it is buggy.
+# Remove this when https://review.rdoproject.org/r/#/c/13839/ merges and 2.9.2 is in the repo.
+yum repolist
+yum --showduplicates list openvswitch
+if [ "${branch}" == "stable/queens" ]; then
+ yum install -y --nogpgcheck openvswitch-2.8.2-1.el7