diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 95e09423..993ab597 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -19,7 +19,7 @@ function install_taas { - pip_install --no-deps --editable $TAAS_PLUGIN_PATH + setup_develop $TAAS_PLUGIN_PATH } function configure_taas_plugin { diff --git a/neutron_taas/services/taas/agents/ovs/taas_ovs_agent.py b/neutron_taas/services/taas/agents/ovs/taas_ovs_agent.py index 1ee78176..b88f2463 100644 --- a/neutron_taas/services/taas/agents/ovs/taas_ovs_agent.py +++ b/neutron_taas/services/taas/agents/ovs/taas_ovs_agent.py @@ -118,7 +118,7 @@ class TaasOvsAgentRpcCallback(api.TaasAgentRpcCallbackMixin): topics.TAAS_PLUGIN, self.conf.host) endpoints = [self] - conn = n_rpc.create_connection() + conn = n_rpc.Connection() conn.create_consumer(topics.TAAS_AGENT, endpoints, fanout=False) conn.consume_in_threads() diff --git a/neutron_taas/services/taas/service_drivers/taas_rpc.py b/neutron_taas/services/taas/service_drivers/taas_rpc.py index ea06561a..72c3e181 100644 --- a/neutron_taas/services/taas/service_drivers/taas_rpc.py +++ b/neutron_taas/services/taas/service_drivers/taas_rpc.py @@ -33,7 +33,7 @@ class TaasRpcDriver(service_drivers.TaasBaseDriver): LOG.debug("Loading TaasRpcDriver.") super(TaasRpcDriver, self).__init__(service_plugin) self.endpoints = [taas_agent_api.TaasCallbacks(service_plugin)] - self.conn = n_rpc.create_connection() + self.conn = n_rpc.Connection() self.conn.create_consumer(topics.TAAS_PLUGIN, self.endpoints, fanout=False) diff --git a/neutron_taas/tests/unit/services/taas/test_taas_plugin.py b/neutron_taas/tests/unit/services/taas/test_taas_plugin.py index a01bcaa2..18f9c388 100644 --- a/neutron_taas/tests/unit/services/taas/test_taas_plugin.py +++ b/neutron_taas/tests/unit/services/taas/test_taas_plugin.py @@ -39,7 +39,7 @@ class DummyError(Exception): class TestTaasPlugin(testlib_api.SqlTestCase): def setUp(self): super(TestTaasPlugin, self).setUp() - mock.patch.object(n_rpc, 'create_connection', auto_spec=True).start() + mock.patch.object(n_rpc, 'Connection', auto_spec=True).start() mock.patch.object(taas_agent_api, 'TaasCallbacks', auto_spec=True).start() mock.patch.object(taas_agent_api, diff --git a/requirements.txt b/requirements.txt index 7acf1b0b..5ccc8495 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 Babel!=2.4.0,>=2.3.4 # BSD +neutron>=12.0.0 # Apache-2.0 diff --git a/tools/tox_install.sh b/tools/tox_install.sh deleted file mode 100755 index 23f5d8ab..00000000 --- a/tools/tox_install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -set -e - -DIR=$(dirname $0) -${DIR}/tox_install_project.sh neutron neutron $* - -CONSTRAINTS_FILE=$1 -shift - -install_cmd="pip install" -if [ $CONSTRAINTS_FILE != "unconstrained" ]; then - install_cmd="$install_cmd -c$CONSTRAINTS_FILE" -fi - -$install_cmd -U $* diff --git a/tools/tox_install_project.sh b/tools/tox_install_project.sh deleted file mode 100755 index e95dd836..00000000 --- a/tools/tox_install_project.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -# Many of neutron's repos suffer from the problem of depending on neutron, -# but it not existing on pypi. - -# This wrapper for tox's package installer will use the existing package -# if it exists, else use zuul-cloner if that program exists, else grab it -# from neutron master via a hard-coded URL. That last case should only -# happen with devs running unit tests locally. - -# From the tox.ini config page: -# install_command=ARGV -# default: -# pip install {opts} {packages} - -PROJ=$1 -MOD=$2 -shift 2 - -ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner -neutron_installed=$(echo "import ${MOD}" | python 2>/dev/null ; echo $?) -BRANCH_NAME=master - -set -e - -CONSTRAINTS_FILE=$1 -shift - -install_cmd="pip install" -if [ $CONSTRAINTS_FILE != "unconstrained" ]; then - install_cmd="$install_cmd -c$CONSTRAINTS_FILE" -fi - -if [ $neutron_installed -eq 0 ]; then - echo "ALREADY INSTALLED" > /tmp/tox_install-${PROJ}.txt - echo "${PROJ} already installed; using existing package" -elif [ -x "$ZUUL_CLONER" ]; then - echo "ZUUL CLONER" > /tmp/tox_install-${PROJ}.txt - cwd=$(/bin/pwd) - cd /tmp - $ZUUL_CLONER --cache-dir \ - /opt/git \ - --branch ${BRANCH_NAME} \ - git://git.openstack.org \ - openstack/${PROJ} - cd openstack/${PROJ} - $install_cmd -e . - cd "$cwd" -else - echo "PIP HARDCODE" > /tmp/tox_install-${PROJ}.txt - $install_cmd -U -egit+https://git.openstack.org/openstack/${PROJ}@${BRANCH_NAME}#egg=${PROJ} -fi diff --git a/tox.ini b/tox.ini index b3a578ec..9b377189 100644 --- a/tox.ini +++ b/tox.ini @@ -7,8 +7,9 @@ skipsdist = True setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning usedevelop = True -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 +install_command = pip install {opts} {packages} +deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.py[c|o]" -delete find . -type d -name "__pycache__" -delete