Add Constraints support

Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove designate-tempest-plugin.

Change-Id: I2f9c14a84089047bff5f6a77bbd234fda175d229
diff --git a/tox.ini b/tox.ini
index 31e305b..9c21dac 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,14 +1,17 @@
 [tox]
-minversion = 1.6
+minversion = 2.0
 envlist = py34,py27,flake8
 skipsdist = True
 
 [testenv]
 usedevelop = True
-install_command = pip install {opts} {packages}
+install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
 deps = -r{toxinidir}/requirements.txt
        -r{toxinidir}/test-requirements.txt
 setenv =
+    VIRTUAL_ENV={envdir}
+    BRANCH_NAME=master
+    CLIENT_NAME=designate-tempest-plugin
   PYTHONDONTWRITEBYTECODE=1
 whitelist_externals = sh
                       find