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
This commit is contained in:
Ihar Hrachyshka 2015-01-13 00:18:07 +01:00
parent c88d5f298d
commit 8cf618c8ba
18 changed files with 33 additions and 33 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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__(

View File

@ -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__(

View File

@ -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

View File

@ -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():

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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