From 88e2d801d5172b5cd5b261fcaff9276807bcd735 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 14 Jan 2015 17:39:43 +0100 Subject: [PATCH] Migrate to oslo.concurrency Namespaces are not used anymore, so imports are for oslo_concurrency, not oslo.concurrency. lockutils direct call is not supported anymore, so using shipped lockutils-wrapper instead. Closes-Bug: #1387092 Change-Id: I2ba2295f8f5d55f272a9d23555940586b25b5a1c --- neutron_vpnaas/services/vpn/device_drivers/cisco_ipsec.py | 2 +- neutron_vpnaas/services/vpn/device_drivers/ipsec.py | 2 +- requirements.txt | 1 + tools/pretty_tox.sh | 2 +- tox.ini | 6 +++--- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/neutron_vpnaas/services/vpn/device_drivers/cisco_ipsec.py b/neutron_vpnaas/services/vpn/device_drivers/cisco_ipsec.py index 3bd78677c..2c18d3a2e 100644 --- a/neutron_vpnaas/services/vpn/device_drivers/cisco_ipsec.py +++ b/neutron_vpnaas/services/vpn/device_drivers/cisco_ipsec.py @@ -17,12 +17,12 @@ import requests from oslo.config import cfg from oslo import messaging +from oslo_concurrency import lockutils from neutron.common import exceptions from neutron.common import rpc as n_rpc from neutron import context as ctx from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import lockutils from neutron.openstack.common import log as logging from neutron.openstack.common import loopingcall from neutron.plugins.common import constants diff --git a/neutron_vpnaas/services/vpn/device_drivers/ipsec.py b/neutron_vpnaas/services/vpn/device_drivers/ipsec.py index 745942fd7..e069cb951 100644 --- a/neutron_vpnaas/services/vpn/device_drivers/ipsec.py +++ b/neutron_vpnaas/services/vpn/device_drivers/ipsec.py @@ -22,6 +22,7 @@ import jinja2 import netaddr from oslo.config import cfg from oslo import messaging +from oslo_concurrency import lockutils import six from neutron.agent.linux import ip_lib @@ -29,7 +30,6 @@ from neutron.agent.linux import utils from neutron.common import rpc as n_rpc from neutron import context from neutron.i18n import _LE -from neutron.openstack.common import lockutils from neutron.openstack.common import log as logging from neutron.openstack.common import loopingcall from neutron.plugins.common import constants diff --git a/requirements.txt b/requirements.txt index b78e8c168..719804c5f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ netaddr>=0.7.12 SQLAlchemy>=0.9.7,<=0.9.99 alembic>=0.7.1 six>=1.7.0 +oslo.concurrency>=0.3.0,!=0.4.0 oslo.config>=1.6.0 # Apache-2.0 oslo.db>=1.3.0 # Apache-2.0 oslo.messaging>=1.4.0,!=1.5.0 diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh index e1bc9acfc..fb0ea2d87 100755 --- a/tools/pretty_tox.sh +++ b/tools/pretty_tox.sh @@ -3,4 +3,4 @@ TESTRARGS=$1 exec 3>&1 -status=$(exec 4>&1 >&3; ( python -m neutron.openstack.common.lockutils python setup.py testr --slowest --testr-args="--subunit $TESTRARGS"; echo $? >&4 ) | $(dirname $0)/subunit-trace.py -f) && exit $status +status=$(exec 4>&1 >&3; ( lockutils-wrapper python setup.py testr --slowest --testr-args="--subunit $TESTRARGS"; echo $? >&4 ) | $(dirname $0)/subunit-trace.py -f) && exit $status diff --git a/tox.ini b/tox.ini index a4978ffb9..8a411cb1e 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ setenv = VIRTUAL_ENV={envdir} [testenv:functional] setenv = OS_TEST_PATH=./neutron-vpnaas/tests/functional commands = - python -m neutron_vpnaas.openstack.common.lockutils python setup.py testr --slowest --testr-args='{posargs}' + lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' [testenv:dsvm-functional] setenv = OS_TEST_PATH=./neutron_vpnaas/tests/functional @@ -37,7 +37,7 @@ setenv = OS_TEST_PATH=./neutron_vpnaas/tests/functional OS_FAIL_ON_MISSING_DEPS=1 sitepackages=True commands = - python -m neutron_vpnaas.openstack.common.lockutils python setup.py testr --slowest --testr-args='{posargs}' + lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' [tox:jenkins] sitepackages = True @@ -56,7 +56,7 @@ commands = python ./tools/check_i18n.py ./neutron-vpnaas ./tools/i18n_cfg.py [testenv:cover] commands = - python -m neutron.openstack.common.lockutils python setup.py testr --coverage --testr-args='{posargs}' + lockutils-wrapper python setup.py testr --coverage --testr-args='{posargs}' [testenv:venv] commands = {posargs}