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/40/147240/4
Ihar Hrachyshka 8 years ago
parent c88d5f298d
commit 8cf618c8ba
  1. 4
      neutron_vpnaas/db/migration/alembic_migrations/env.py
  2. 2
      neutron_vpnaas/db/vpn/vpn_db.py
  3. 2
      neutron_vpnaas/services/vpn/agent.py
  4. 4
      neutron_vpnaas/services/vpn/common/netns_wrapper.py
  5. 2
      neutron_vpnaas/services/vpn/device_drivers/cisco_csr_rest_client.py
  6. 10
      neutron_vpnaas/services/vpn/device_drivers/cisco_ipsec.py
  7. 8
      neutron_vpnaas/services/vpn/device_drivers/ipsec.py
  8. 4
      neutron_vpnaas/services/vpn/service_drivers/__init__.py
  9. 2
      neutron_vpnaas/services/vpn/service_drivers/cisco_csr_db.py
  10. 6
      neutron_vpnaas/services/vpn/service_drivers/cisco_ipsec.py
  11. 6
      neutron_vpnaas/services/vpn/service_drivers/ipsec.py
  12. 4
      neutron_vpnaas/services/vpn/vpn_service.py
  13. 2
      neutron_vpnaas/tests/base.py
  14. 2
      neutron_vpnaas/tests/unit/__init__.py
  15. 2
      neutron_vpnaas/tests/unit/db/vpn/test_db_vpnaas.py
  16. 2
      neutron_vpnaas/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py
  17. 2
      neutron_vpnaas/tests/unit/services/vpn/service_drivers/test_ipsec.py
  18. 2
      neutron_vpnaas/tests/unit/services/vpn/test_vpn_service.py

@ -16,8 +16,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

@ -14,7 +14,7 @@
# under the License.
import netaddr
from oslo.utils import excutils
from oslo_utils import excutils
import sqlalchemy as sa
from sqlalchemy import orm
from sqlalchemy.orm import exc

@ -15,7 +15,7 @@
from neutron.agent.l3 import agent as l3_agent
from neutron.agent import l3_agent as entry
from oslo.config import cfg
from oslo_config import cfg
from neutron_vpnaas.services.vpn import vpn_service

@ -19,8 +19,8 @@ import os
import sys
from eventlet.green import subprocess
from oslo.config import cfg
from oslo.rootwrap import wrapper
from oslo_config import cfg
from oslo_rootwrap import wrapper
from neutron.common import config
from neutron.common import utils

@ -15,7 +15,7 @@
import time
import netaddr
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import requests
from requests import exceptions as r_exc

@ -13,11 +13,11 @@
# under the License.
import collections
import requests
from oslo.config import cfg
from oslo import messaging
from oslo_concurrency import lockutils
from oslo_config import cfg
import oslo_messaging
import requests
from neutron.common import exceptions
from neutron.common import rpc as n_rpc
@ -69,7 +69,7 @@ class CiscoCsrIPsecVpnDriverApi(object):
"""RPC API for agent to plugin messaging."""
def __init__(self, topic):
target = messaging.Target(topic=topic, version='1.0')
target = oslo_messaging.Target(topic=topic, version='1.0')
self.client = n_rpc.get_client(target)
def get_vpn_services_on_host(self, context, host):
@ -98,7 +98,7 @@ class CiscoCsrIPsecDriver(device_drivers.DeviceDriver):
# history
# 1.0 Initial version
target = messaging.Target(version='1.0')
target = oslo_messaging.Target(version='1.0')
def __init__(self, agent, host):
self.host = host

@ -20,9 +20,9 @@ import shutil
import jinja2
import netaddr
from oslo.config import cfg
from oslo import messaging
from oslo_concurrency import lockutils
from oslo_config import cfg
import oslo_messaging
import six
from neutron.agent.linux import ip_lib
@ -447,7 +447,7 @@ class IPsecVpnDriverApi(object):
"""IPSecVpnDriver RPC api."""
def __init__(self, topic):
target = messaging.Target(topic=topic, version='1.0')
target = oslo_messaging.Target(topic=topic, version='1.0')
self.client = n_rpc.get_client(target)
def get_vpn_services_on_host(self, context, host):
@ -481,7 +481,7 @@ class IPsecDriver(device_drivers.DeviceDriver):
# history
# 1.0 Initial version
target = messaging.Target(version='1.0')
target = oslo_messaging.Target(version='1.0')
def __init__(self, agent, host):
self.agent = agent

@ -15,7 +15,7 @@
import abc
from oslo import messaging
import oslo_messaging
import six
from neutron.common import rpc as n_rpc
@ -78,7 +78,7 @@ class BaseIPsecVpnAgentApi(object):
def __init__(self, topic, default_version, driver):
self.topic = topic
self.driver = driver
target = messaging.Target(topic=topic, version=default_version)
target = oslo_messaging.Target(topic=topic, version=default_version)
self.client = n_rpc.get_client(target)
def _agent_notification(self, context, method, router_id,

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.db import exception as db_exc
from oslo_db import exception as db_exc
import sqlalchemy as sa
from sqlalchemy.orm import exc as sql_exc

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo import messaging
import oslo_messaging
from neutron.common import rpc as n_rpc
from neutron.openstack.common import log as logging
@ -43,7 +43,7 @@ class CiscoCsrIPsecVpnDriverCallBack(object):
# history
# 1.0 Initial version
target = messaging.Target(version=BASE_IPSEC_VERSION)
target = oslo_messaging.Target(version=BASE_IPSEC_VERSION)
def __init__(self, driver):
super(CiscoCsrIPsecVpnDriverCallBack, self).__init__()
@ -84,7 +84,7 @@ class CiscoCsrIPsecVpnAgentApi(service_drivers.BaseIPsecVpnAgentApi):
"""API and handler for Cisco IPSec plugin to agent RPC messaging."""
target = messaging.Target(version=BASE_IPSEC_VERSION)
target = oslo_messaging.Target(version=BASE_IPSEC_VERSION)
def __init__(self, topic, default_version, driver):
super(CiscoCsrIPsecVpnAgentApi, self).__init__(

@ -14,7 +14,7 @@
# under the License.
import netaddr
from oslo import messaging
import oslo_messaging
from neutron.common import rpc as n_rpc
from neutron.openstack.common import log as logging
@ -34,7 +34,7 @@ class IPsecVpnDriverCallBack(object):
# history
# 1.0 Initial version
target = messaging.Target(version=BASE_IPSEC_VERSION)
target = oslo_messaging.Target(version=BASE_IPSEC_VERSION)
def __init__(self, driver):
super(IPsecVpnDriverCallBack, self).__init__()
@ -57,7 +57,7 @@ class IPsecVpnDriverCallBack(object):
class IPsecVpnAgentApi(service_drivers.BaseIPsecVpnAgentApi):
"""Agent RPC API for IPsecVPNAgent."""
target = messaging.Target(version=BASE_IPSEC_VERSION)
target = oslo_messaging.Target(version=BASE_IPSEC_VERSION)
def __init__(self, topic, default_version, driver):
super(IPsecVpnAgentApi, self).__init__(

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo.config import cfg
from oslo.utils import importutils
from oslo_config import cfg
from oslo_utils import importutils
from neutron import context as n_context
from neutron.openstack.common import log as logging

@ -20,7 +20,7 @@ import neutron
from neutron.tests import base as n_base
from neutron.tests.unit import test_api_v2_extension
from neutron.tests.unit import test_db_plugin
from oslo.config import cfg
from oslo_config import cfg
def override_nvalues():

@ -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
cfg.CONF.use_stderr = False

@ -16,7 +16,7 @@
import contextlib
import os
from oslo.config import cfg
from oslo_config import cfg
import webob.exc
from neutron.api import extensions as api_extensions

@ -15,7 +15,7 @@
import contextlib
import mock
from oslo.config import cfg
from oslo_config import cfg
from neutron import context as n_ctx
from neutron.db import servicetype_db as st_db

@ -21,7 +21,7 @@ from neutron.db import l3_db
from neutron.db import servicetype_db as st_db
from neutron.openstack.common import uuidutils
from neutron.plugins.common import constants
from oslo.config import cfg
from oslo_config import cfg
from neutron_vpnaas.db.vpn import vpn_validator
from neutron_vpnaas.extensions import vpnaas

@ -18,7 +18,7 @@ from neutron.agent.common import config as agent_config
from neutron.agent.l3 import router_info
from neutron.agent.linux import iptables_manager
from neutron.openstack.common import uuidutils
from oslo.config import cfg
from oslo_config import cfg
from neutron_vpnaas.extensions import vpnaas
from neutron_vpnaas.services.vpn import agent as vpn_agent

Loading…
Cancel
Save