oslo: migrate to namespace-less import paths

Oslo project decided to move away from using oslo.* namespace for all their
libraries, so we should migrate to new import path.

This patch applies new paths for:
- oslo.config
- oslo.db
- oslo.messaging
- oslo.serialization
- oslo.utils

Hacking check will be added in Neutron once all *aas repositories are converted
to namespace-less imports.

Related-Bug: #1409733
Change-Id: If0dce29a0980206ace9866112be529436194d47e
changes/45/147245/3
Ihar Hrachyshka 8 years ago
parent 67a9c62b89
commit fff9f37873
  1. 4
      neutron_lbaas/db/loadbalancer/loadbalancer_db.py
  2. 4
      neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py
  3. 4
      neutron_lbaas/db/migration/alembic_migrations/env.py
  4. 2
      neutron_lbaas/services/loadbalancer/agent/agent.py
  5. 4
      neutron_lbaas/services/loadbalancer/agent/agent_api.py
  6. 8
      neutron_lbaas/services/loadbalancer/agent/agent_manager.py
  7. 10
      neutron_lbaas/services/loadbalancer/drivers/common/agent_driver_base.py
  8. 2
      neutron_lbaas/services/loadbalancer/drivers/embrane/config.py
  9. 2
      neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py
  10. 2
      neutron_lbaas/services/loadbalancer/drivers/haproxy/jinja_cfg.py
  11. 6
      neutron_lbaas/services/loadbalancer/drivers/haproxy/namespace_driver.py
  12. 2
      neutron_lbaas/services/loadbalancer/drivers/netscaler/ncc_client.py
  13. 2
      neutron_lbaas/services/loadbalancer/drivers/netscaler/netscaler_driver.py
  14. 6
      neutron_lbaas/services/loadbalancer/drivers/radware/driver.py
  15. 2
      neutron_lbaas/services/loadbalancer/plugin.py
  16. 2
      neutron_lbaas/tests/base.py
  17. 2
      neutron_lbaas/tests/unit/db/loadbalancer/test_db_loadbalancer.py
  18. 2
      neutron_lbaas/tests/unit/db/loadbalancer/test_db_loadbalancerv2.py
  19. 2
      neutron_lbaas/tests/unit/services/loadbalancer/agent/test_agent.py
  20. 2
      neutron_lbaas/tests/unit/services/loadbalancer/drivers/embrane/test_embrane_defaults.py
  21. 4
      neutron_lbaas/tests/unit/services/loadbalancer/drivers/embrane/test_plugin_driver.py
  22. 4
      neutron_lbaas/tests/unit/services/loadbalancer/drivers/radware/test_plugin_driver.py
  23. 2
      neutron_lbaas/tests/unit/services/loadbalancer/test_agent_scheduler.py
  24. 2
      neutron_lbaas/tests/unit/services/loadbalancer/test_loadbalancer_quota_ext.py
  25. 2
      requirements.txt

@ -24,8 +24,8 @@ from neutron import manager
from neutron.openstack.common import log as logging
from neutron.openstack.common import uuidutils
from neutron.plugins.common import constants
from oslo.db import exception
from oslo.utils import excutils
from oslo_db import exception
from oslo_utils import excutils
import sqlalchemy as sa
from sqlalchemy import orm
from sqlalchemy.orm import exc

@ -14,8 +14,8 @@
# under the License.
from oslo.db import exception
from oslo.utils import excutils
from oslo_db import exception
from oslo_utils import excutils
from sqlalchemy import orm
from sqlalchemy.orm import exc

@ -14,8 +14,8 @@ from logging import config as logging_config
from alembic import context
from neutron.db import model_base
from oslo.config import cfg
from oslo.db.sqlalchemy import session
from oslo_config import cfg
from oslo_db.sqlalchemy import session
import sqlalchemy as sa
from sqlalchemy import event

@ -23,7 +23,7 @@ from neutron.common import config as common_config
from neutron.common import rpc as n_rpc
from neutron.common import topics
from neutron.openstack.common import service
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.services.loadbalancer.agent import agent_manager as manager

@ -13,7 +13,7 @@
# under the License.
from neutron.common import rpc as n_rpc
from oslo import messaging
import oslo_messaging
class LbaasAgentApi(object):
@ -28,7 +28,7 @@ class LbaasAgentApi(object):
def __init__(self, topic, context, host):
self.context = context
self.host = host
target = messaging.Target(topic=topic, version='2.0')
target = oslo_messaging.Target(topic=topic, version='2.0')
self.client = n_rpc.get_client(target)
def get_ready_devices(self):

@ -23,9 +23,9 @@ from neutron.openstack.common import loopingcall
from neutron.openstack.common import periodic_task
from neutron.plugins.common import constants
from neutron.services import provider_configuration as provconfig
from oslo.config import cfg
from oslo import messaging
from oslo.utils import importutils
from oslo_config import cfg
import oslo_messaging
from oslo_utils import importutils
from neutron_lbaas.services.loadbalancer.agent import agent_api
@ -56,7 +56,7 @@ class LbaasAgentManager(periodic_task.PeriodicTasks):
# - modify/reload/destroy_pool methods were removed;
# - added methods to handle create/update/delete for every lbaas
# object individually;
target = messaging.Target(version='2.0')
target = oslo_messaging.Target(version='2.0')
def __init__(self, conf):
super(LbaasAgentManager, self).__init__()

@ -25,9 +25,9 @@ from neutron.i18n import _LW
from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from neutron.services import provider_configuration as provconf
from oslo.config import cfg
from oslo import messaging
from oslo.utils import importutils
from oslo_config import cfg
import oslo_messaging
from oslo_utils import importutils
from neutron_lbaas.db.loadbalancer import loadbalancer_db
from neutron_lbaas.services.loadbalancer.drivers import abstract_driver
@ -59,7 +59,7 @@ class LoadBalancerCallbacks(object):
# 2.0 Generic API for agent based drivers
# - get_logical_device() handling changed;
# - pool_deployed() and update_status() methods added;
target = messaging.Target(version='2.0')
target = oslo_messaging.Target(version='2.0')
def __init__(self, plugin):
super(LoadBalancerCallbacks, self).__init__()
@ -247,7 +247,7 @@ class LoadBalancerAgentApi(object):
# object individually;
def __init__(self, topic):
target = messaging.Target(topic=topic, version='2.0')
target = oslo_messaging.Target(topic=topic, version='2.0')
self.client = n_rpc.get_client(target)
def create_vip(self, context, vip, host):

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
# User may want to use LB service together with the L3 plugin, but using
# different resources. The service will inherit the configuration from the

@ -25,7 +25,7 @@ from neutron.plugins.common import constants as pcon
from neutron.plugins.embrane.common import contexts as embrane_ctx
from neutron.plugins.embrane.common import exceptions as h_exc
from neutron.plugins.embrane.common import utils
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.db.loadbalancer import loadbalancer_db as ldb
from neutron_lbaas.services.loadbalancer import constants as lbcon

@ -19,7 +19,7 @@ import six
from neutron.agent.linux import utils
from neutron.plugins.common import constants as plugin_constants
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.services.loadbalancer import constants

@ -25,9 +25,9 @@ from neutron.common import utils as n_utils
from neutron.i18n import _LE, _LW
from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from oslo.config import cfg
from oslo.utils import excutils
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import excutils
from oslo_utils import importutils
from neutron_lbaas.services.loadbalancer.agent import agent_device_driver
from neutron_lbaas.services.loadbalancer import constants as lb_const

@ -17,7 +17,7 @@ import base64
from neutron.common import exceptions as n_exc
from neutron.i18n import _LE
from neutron.openstack.common import log as logging
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import requests
LOG = logging.getLogger(__name__)

@ -16,7 +16,7 @@ from neutron.api.v2 import attributes
from neutron.i18n import _LI
from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.db.loadbalancer import loadbalancer_db
from neutron_lbaas.services.loadbalancer.drivers import abstract_driver

@ -30,9 +30,9 @@ from neutron.extensions import loadbalancer
from neutron.i18n import _LE, _LI, _LW
from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import excutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from oslo_utils import excutils
from six.moves import queue as Queue
from neutron_lbaas.db.loadbalancer import loadbalancer_db as lb_db

@ -24,7 +24,7 @@ from neutron.openstack.common import log as logging
from neutron.plugins.common import constants
from neutron.services import provider_configuration as pconf
from neutron.services import service_base
from oslo.utils import excutils
from oslo_utils import excutils
from neutron_lbaas.db.loadbalancer import loadbalancer_db as ldb
from neutron_lbaas.db.loadbalancer import loadbalancer_dbv2 as ldbv2

@ -22,7 +22,7 @@ from neutron.tests.unit import test_api_v2_extension
from neutron.tests.unit import test_db_plugin
from neutron.tests.unit import test_quota_ext
from neutron.tests.unit import testlib_api
from oslo.config import cfg
from oslo_config import cfg
from testtools import matchers

@ -28,7 +28,7 @@ from neutron import manager
from neutron.plugins.common import constants
from neutron.services import provider_configuration as pconf
from neutron.tests.unit import test_db_plugin
from oslo.config import cfg
from oslo_config import cfg
import testtools
import webob.exc

@ -26,7 +26,7 @@ from neutron.extensions import loadbalancerv2
from neutron.openstack.common import uuidutils
from neutron.plugins.common import constants
from neutron.tests.unit import test_db_plugin
from oslo.config import cfg
from oslo_config import cfg
import testtools
import webob.exc

@ -14,7 +14,7 @@
import contextlib
import mock
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.services.loadbalancer.agent import agent
from neutron_lbaas.tests import base

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.services.loadbalancer.drivers.embrane import config # noqa
from neutron_lbaas.tests import base

@ -17,8 +17,8 @@ import sys
import mock
from neutron import context
from oslo.config import cfg
from oslo.db import exception as n_exc
from oslo_config import cfg
from oslo_db import exception as n_exc
from neutron_lbaas.tests.unit.db.loadbalancer import test_db_loadbalancer

@ -21,8 +21,8 @@ from neutron import context
from neutron.extensions import loadbalancer
from neutron import manager
from neutron.plugins.common import constants
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo_config import cfg
from oslo_serialization import jsonutils
from six.moves import queue as Queue
from neutron_lbaas.services.loadbalancer.drivers.radware import driver

@ -27,7 +27,7 @@ from neutron.plugins.common import constants as plugin_const
from neutron.tests.unit.openvswitch import test_agent_scheduler
from neutron.tests.unit import test_agent_ext_plugin
from neutron.tests.unit import test_extensions
from oslo.config import cfg
from oslo_config import cfg
from webob import exc
from neutron_lbaas.tests import base

@ -16,7 +16,7 @@
from neutron import context
from neutron import quota
from neutron.tests.unit import test_api_v2
from oslo.config import cfg
from oslo_config import cfg
from neutron_lbaas.tests import base

@ -11,7 +11,7 @@ alembic>=0.7.2
six>=1.7.0
oslo.config>=1.6.0 # Apache-2.0
oslo.db>=1.4.1 # Apache-2.0
oslo.messaging>=1.4.0,!=1.5.0
oslo.messaging>=1.6.0
oslo.serialization>=1.2.0 # Apache-2.0
oslo.utils>=1.2.0 # Apache-2.0

Loading…
Cancel
Save