From 4d58d51eeda18b833f935452bbd14d4c6e1e4783 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 27 Feb 2015 16:24:38 +0100 Subject: [PATCH] Migrate to oslo.log This is just a matter of switching import paths and adding appropriate dependency. Related-Bug: #1425013 Change-Id: I310e059a815377579de6bb2aa204de168e72571e --- neutron_lbaas/common/cert_manager/barbican_cert_manager.py | 2 +- neutron_lbaas/common/cert_manager/local_cert_manager.py | 2 +- neutron_lbaas/db/loadbalancer/loadbalancer_db.py | 2 +- neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py | 2 +- neutron_lbaas/drivers/haproxy/synchronous_namespace_driver.py | 2 +- neutron_lbaas/drivers/logging_noop/driver.py | 2 +- neutron_lbaas/services/loadbalancer/agent/agent_manager.py | 2 +- neutron_lbaas/services/loadbalancer/agent_scheduler.py | 2 +- .../services/loadbalancer/drivers/a10networks/driver_v1.py | 2 +- .../services/loadbalancer/drivers/common/agent_driver_base.py | 2 +- .../services/loadbalancer/drivers/embrane/agent/dispatcher.py | 2 +- .../loadbalancer/drivers/embrane/agent/lb_operations.py | 2 +- neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py | 2 +- neutron_lbaas/services/loadbalancer/drivers/embrane/poller.py | 2 +- .../services/loadbalancer/drivers/haproxy/namespace_driver.py | 2 +- .../drivers/haproxy/synchronous_namespace_driver.py | 3 ++- .../services/loadbalancer/drivers/logging_noop/__init__.py | 3 ++- .../services/loadbalancer/drivers/netscaler/ncc_client.py | 2 +- .../loadbalancer/drivers/netscaler/netscaler_driver.py | 2 +- neutron_lbaas/services/loadbalancer/drivers/radware/driver.py | 2 +- neutron_lbaas/services/loadbalancer/plugin.py | 2 +- requirements.txt | 1 + 22 files changed, 24 insertions(+), 21 deletions(-) diff --git a/neutron_lbaas/common/cert_manager/barbican_cert_manager.py b/neutron_lbaas/common/cert_manager/barbican_cert_manager.py index a5c51fed3..2bd205b8b 100644 --- a/neutron_lbaas/common/cert_manager/barbican_cert_manager.py +++ b/neutron_lbaas/common/cert_manager/barbican_cert_manager.py @@ -16,8 +16,8 @@ from barbicanclient import client as barbican_client from keystoneclient.auth.identity import v3 as keystone_client from keystoneclient import session from neutron.i18n import _LI, _LW, _LE -from neutron.openstack.common import log as logging from oslo_config import cfg +from oslo_log import log as logging from oslo_utils import excutils from neutron_lbaas.common.cert_manager import cert_manager diff --git a/neutron_lbaas/common/cert_manager/local_cert_manager.py b/neutron_lbaas/common/cert_manager/local_cert_manager.py index 11ca64b4b..7a71b65ab 100644 --- a/neutron_lbaas/common/cert_manager/local_cert_manager.py +++ b/neutron_lbaas/common/cert_manager/local_cert_manager.py @@ -16,8 +16,8 @@ import os import uuid from neutron.i18n import _LI, _LE -from neutron.openstack.common import log as logging from oslo_config import cfg +from oslo_log import log as logging from neutron_lbaas.common.cert_manager import cert_manager from neutron_lbaas.common import exceptions diff --git a/neutron_lbaas/db/loadbalancer/loadbalancer_db.py b/neutron_lbaas/db/loadbalancer/loadbalancer_db.py index 1754d98bb..f991cb466 100644 --- a/neutron_lbaas/db/loadbalancer/loadbalancer_db.py +++ b/neutron_lbaas/db/loadbalancer/loadbalancer_db.py @@ -20,10 +20,10 @@ from neutron.db import model_base from neutron.db import models_v2 from neutron.db import servicetype_db as st_db 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_log import log as logging from oslo_utils import excutils import sqlalchemy as sa from sqlalchemy import orm diff --git a/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py b/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py index 539208ff9..2c37ee8e4 100644 --- a/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py +++ b/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py @@ -16,9 +16,9 @@ from neutron.api.v2 import attributes from neutron.db import common_db_mixin as base_db from neutron import manager -from neutron.openstack.common import log as logging from neutron.plugins.common import constants from oslo_db import exception +from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import uuidutils from sqlalchemy import orm diff --git a/neutron_lbaas/drivers/haproxy/synchronous_namespace_driver.py b/neutron_lbaas/drivers/haproxy/synchronous_namespace_driver.py index ee216def0..cd37dd993 100644 --- a/neutron_lbaas/drivers/haproxy/synchronous_namespace_driver.py +++ b/neutron_lbaas/drivers/haproxy/synchronous_namespace_driver.py @@ -26,10 +26,10 @@ from neutron.common import log from neutron import context as ncontext from neutron.extensions import portbindings from neutron.i18n import _LE, _LW -from neutron.openstack.common import log as logging from neutron.openstack.common import service from neutron.plugins.common import constants from oslo_config import cfg +from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import importutils diff --git a/neutron_lbaas/drivers/logging_noop/driver.py b/neutron_lbaas/drivers/logging_noop/driver.py index c51801dc4..dcfc373f7 100644 --- a/neutron_lbaas/drivers/logging_noop/driver.py +++ b/neutron_lbaas/drivers/logging_noop/driver.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.openstack.common import log as logging +from oslo_log import log as logging from neutron_lbaas.drivers import driver_base diff --git a/neutron_lbaas/services/loadbalancer/agent/agent_manager.py b/neutron_lbaas/services/loadbalancer/agent/agent_manager.py index 12b81a8a6..48ea9455d 100644 --- a/neutron_lbaas/services/loadbalancer/agent/agent_manager.py +++ b/neutron_lbaas/services/loadbalancer/agent/agent_manager.py @@ -18,12 +18,12 @@ from neutron.common import exceptions as n_exc from neutron.common import topics from neutron import context as ncontext from neutron.i18n import _LE, _LI -from neutron.openstack.common import log as logging 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_log import log as logging import oslo_messaging from oslo_utils import importutils diff --git a/neutron_lbaas/services/loadbalancer/agent_scheduler.py b/neutron_lbaas/services/loadbalancer/agent_scheduler.py index 084e761d0..26582d4a7 100644 --- a/neutron_lbaas/services/loadbalancer/agent_scheduler.py +++ b/neutron_lbaas/services/loadbalancer/agent_scheduler.py @@ -20,7 +20,7 @@ from neutron.db import agents_db from neutron.db import agentschedulers_db from neutron.db import model_base from neutron.i18n import _LW -from neutron.openstack.common import log as logging +from oslo_log import log as logging import sqlalchemy as sa from sqlalchemy import orm from sqlalchemy.orm import joinedload diff --git a/neutron_lbaas/services/loadbalancer/drivers/a10networks/driver_v1.py b/neutron_lbaas/services/loadbalancer/drivers/a10networks/driver_v1.py index 728a1a47c..68691d5da 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/a10networks/driver_v1.py +++ b/neutron_lbaas/services/loadbalancer/drivers/a10networks/driver_v1.py @@ -14,8 +14,8 @@ import a10_neutron_lbaas from neutron.db import l3_db -from neutron.openstack.common import log as logging from neutron.plugins.common import constants +from oslo_log import log as logging from neutron_lbaas.db.loadbalancer import loadbalancer_db as lb_db from neutron_lbaas.services.loadbalancer.drivers import abstract_driver diff --git a/neutron_lbaas/services/loadbalancer/drivers/common/agent_driver_base.py b/neutron_lbaas/services/loadbalancer/drivers/common/agent_driver_base.py index 0a071b71b..e81b5f80d 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/common/agent_driver_base.py +++ b/neutron_lbaas/services/loadbalancer/drivers/common/agent_driver_base.py @@ -21,10 +21,10 @@ from neutron.common import topics from neutron.db import agents_db from neutron.extensions import portbindings 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_log import log as logging import oslo_messaging from oslo_utils import importutils diff --git a/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/dispatcher.py b/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/dispatcher.py index 058fe4ef2..75564ec9b 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/dispatcher.py +++ b/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/dispatcher.py @@ -17,8 +17,8 @@ from eventlet import greenthread from eventlet import queue from heleosapi import exceptions as h_exc from neutron.i18n import _LE -from neutron.openstack.common import log as logging from neutron.plugins.embrane.common import contexts as ctx +from oslo_log import log as logging from neutron_lbaas.services.loadbalancer.drivers.embrane.agent \ import lb_operations diff --git a/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/lb_operations.py b/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/lb_operations.py index 3daac0041..bc9b10328 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/lb_operations.py +++ b/neutron_lbaas/services/loadbalancer/drivers/embrane/agent/lb_operations.py @@ -17,7 +17,7 @@ import functools from heleosapi import exceptions as h_exc from neutron.i18n import _LW -from neutron.openstack.common import log as logging +from oslo_log import log as logging from neutron_lbaas.services.loadbalancer import constants as lcon from neutron_lbaas.services.loadbalancer.drivers.embrane \ diff --git a/neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py b/neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py index ac889eb52..8227d22c6 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py +++ b/neutron_lbaas/services/loadbalancer/drivers/embrane/driver.py @@ -19,12 +19,12 @@ from heleosapi import info as h_info from neutron.api.v2 import attributes from neutron.common import exceptions as n_exc from neutron.i18n import _LW -from neutron.openstack.common import log as logging 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_log import log as logging from neutron_lbaas.db.loadbalancer import loadbalancer_db as ldb from neutron_lbaas.extensions import loadbalancer as lb_ext diff --git a/neutron_lbaas/services/loadbalancer/drivers/embrane/poller.py b/neutron_lbaas/services/loadbalancer/drivers/embrane/poller.py index ad4c63f2e..cf8d224c4 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/embrane/poller.py +++ b/neutron_lbaas/services/loadbalancer/drivers/embrane/poller.py @@ -17,10 +17,10 @@ from heleosapi import exceptions as h_exc from neutron import context from neutron.db import servicetype_db as sdb from neutron.i18n import _LE -from neutron.openstack.common import log as logging from neutron.openstack.common import loopingcall from neutron.plugins.common import constants as ccon from neutron.plugins.embrane.common import contexts as embrane_ctx +from oslo_log import log as logging from neutron_lbaas.db.loadbalancer import loadbalancer_db as ldb from neutron_lbaas.services.loadbalancer.drivers.embrane \ diff --git a/neutron_lbaas/services/loadbalancer/drivers/haproxy/namespace_driver.py b/neutron_lbaas/services/loadbalancer/drivers/haproxy/namespace_driver.py index 54311ba38..985b2e71b 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/haproxy/namespace_driver.py +++ b/neutron_lbaas/services/loadbalancer/drivers/haproxy/namespace_driver.py @@ -22,9 +22,9 @@ from neutron.agent.linux import utils from neutron.common import exceptions 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_log import log as logging from oslo_utils import excutils from oslo_utils import importutils diff --git a/neutron_lbaas/services/loadbalancer/drivers/haproxy/synchronous_namespace_driver.py b/neutron_lbaas/services/loadbalancer/drivers/haproxy/synchronous_namespace_driver.py index dc1886f26..893e97ce6 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/haproxy/synchronous_namespace_driver.py +++ b/neutron_lbaas/services/loadbalancer/drivers/haproxy/synchronous_namespace_driver.py @@ -13,7 +13,8 @@ # under the License. from neutron.i18n import _LW -from neutron.openstack.common import log as logging +from oslo_log import log as logging + from neutron_lbaas.drivers.haproxy import synchronous_namespace_driver LOG = logging.getLogger(__name__) diff --git a/neutron_lbaas/services/loadbalancer/drivers/logging_noop/__init__.py b/neutron_lbaas/services/loadbalancer/drivers/logging_noop/__init__.py index 6c118a598..2469eda40 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/logging_noop/__init__.py +++ b/neutron_lbaas/services/loadbalancer/drivers/logging_noop/__init__.py @@ -13,7 +13,8 @@ # under the License. from neutron.i18n import _LW -from neutron.openstack.common import log as logging +from oslo_log import log as logging + from neutron_lbaas.drivers import logging_noop LOG = logging.getLogger(__name__) diff --git a/neutron_lbaas/services/loadbalancer/drivers/netscaler/ncc_client.py b/neutron_lbaas/services/loadbalancer/drivers/netscaler/ncc_client.py index 824ddc513..f5d3a963b 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/netscaler/ncc_client.py +++ b/neutron_lbaas/services/loadbalancer/drivers/netscaler/ncc_client.py @@ -16,7 +16,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_log import log as logging from oslo_serialization import jsonutils import requests diff --git a/neutron_lbaas/services/loadbalancer/drivers/netscaler/netscaler_driver.py b/neutron_lbaas/services/loadbalancer/drivers/netscaler/netscaler_driver.py index 0f4950142..0e59ea8c0 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/netscaler/netscaler_driver.py +++ b/neutron_lbaas/services/loadbalancer/drivers/netscaler/netscaler_driver.py @@ -14,9 +14,9 @@ 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_log import log as logging from neutron_lbaas.db.loadbalancer import loadbalancer_db from neutron_lbaas.services.loadbalancer.drivers import abstract_driver diff --git a/neutron_lbaas/services/loadbalancer/drivers/radware/driver.py b/neutron_lbaas/services/loadbalancer/drivers/radware/driver.py index 71cef64bb..1d6ee2ffd 100644 --- a/neutron_lbaas/services/loadbalancer/drivers/radware/driver.py +++ b/neutron_lbaas/services/loadbalancer/drivers/radware/driver.py @@ -27,9 +27,9 @@ from neutron.api.v2 import attributes from neutron.common import log as call_log from neutron import context as ncontext 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_log import log as logging from oslo_serialization import jsonutils from oslo_utils import excutils from six.moves import queue as Queue diff --git a/neutron_lbaas/services/loadbalancer/plugin.py b/neutron_lbaas/services/loadbalancer/plugin.py index 6a85de783..34c036e97 100644 --- a/neutron_lbaas/services/loadbalancer/plugin.py +++ b/neutron_lbaas/services/loadbalancer/plugin.py @@ -18,11 +18,11 @@ from neutron.common import exceptions as n_exc from neutron import context as ncontext from neutron.db import servicetype_db as st_db from neutron.i18n import _LI, _LE -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_config import cfg +from oslo_log import log as logging from oslo_utils import excutils from neutron_lbaas.db.loadbalancer import loadbalancer_db as ldb diff --git a/requirements.txt b/requirements.txt index f70be2ece..8d9ad4025 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,7 @@ alembic>=0.7.2 six>=1.9.0 oslo.config>=1.6.0 # Apache-2.0 oslo.db>=1.4.1 # Apache-2.0 +oslo.log>=0.1.0 # Apache-2.0 oslo.messaging>=1.6.0 oslo.serialization>=1.2.0 # Apache-2.0 oslo.utils>=1.2.0 # Apache-2.0