From 8c87875f627b6ba17e202396f44b5b12710736cd Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Wed, 4 Mar 2015 20:06:51 +0200 Subject: [PATCH] Use oslo_log for logging neutron.openstack.common.log replaced with oslo_log.log Change-Id: Ieaf19ec19aa7d9c75ad2c04c7f80045062977171 --- requirements.txt | 1 + vmware_nsx/neutron/plugins/vmware/api_client/base.py | 2 +- vmware_nsx/neutron/plugins/vmware/api_client/client.py | 2 +- .../neutron/plugins/vmware/api_client/eventlet_client.py | 2 +- .../neutron/plugins/vmware/api_client/eventlet_request.py | 2 +- vmware_nsx/neutron/plugins/vmware/api_client/request.py | 2 +- vmware_nsx/neutron/plugins/vmware/api_client/version.py | 2 +- vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py | 2 +- vmware_nsx/neutron/plugins/vmware/common/securitygroups.py | 3 ++- vmware_nsx/neutron/plugins/vmware/common/sync.py | 7 +++---- vmware_nsx/neutron/plugins/vmware/common/utils.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/db.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py | 2 +- vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py | 2 +- vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py | 2 +- vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py | 2 +- vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py | 2 +- vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsx_cluster.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsxlib/router.py | 2 +- vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py | 7 +++---- vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py | 7 +++---- vmware_nsx/neutron/plugins/vmware/plugins/base.py | 2 +- vmware_nsx/neutron/plugins/vmware/plugins/managers.py | 2 +- vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py | 2 +- .../neutron/plugins/vmware/plugins/nsx_v_md_proxy.py | 2 +- .../plugins/vmware/vshield/edge_appliance_driver.py | 2 +- vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py | 2 +- .../neutron/plugins/vmware/vshield/nsxv_loadbalancer.py | 3 ++- .../neutron/plugins/vmware/vshield/securitygroup_utils.py | 2 +- vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py | 4 ++-- vmware_nsx/neutron/plugins/vmware/vshield/vcns.py | 2 +- vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py | 2 +- vmware_nsx/neutron/tests/unit/vmware/apiclient/fake.py | 2 +- .../unit/vmware/apiclient/test_api_eventlet_request.py | 3 +-- vmware_nsx/neutron/tests/unit/vmware/test_nsx_plugin.py | 2 +- vmware_nsx/neutron/tests/unit/vmware/test_nsx_sync.py | 2 +- 46 files changed, 55 insertions(+), 56 deletions(-) diff --git a/requirements.txt b/requirements.txt index dd2898f4f3..05e031aa94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,5 +14,6 @@ oslo.concurrency>=0.3.0,!=0.4.0 oslo.config>=1.4.0 # Apache-2.0 oslo.db>=1.1.0 # Apache-2.0 oslo.i18n>=1.0.0 # Apache-2.0 +oslo.log>=0.1.0 # Apache-2.0 oslo.serialization>=1.0.0 # Apache-2.0 oslo.utils>=1.1.0 # Apache-2.0 diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/base.py b/vmware_nsx/neutron/plugins/vmware/api_client/base.py index 1f6d04223b..3d7daba1c9 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/base.py +++ b/vmware_nsx/neutron/plugins/vmware/api_client/base.py @@ -20,9 +20,9 @@ import six import time from oslo.config import cfg +from oslo_log import log as logging from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware import api_client LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/client.py b/vmware_nsx/neutron/plugins/vmware/api_client/client.py index 2c329bc20e..c6ac8edbbe 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/client.py +++ b/vmware_nsx/neutron/plugins/vmware/api_client/client.py @@ -18,7 +18,7 @@ import httplib from neutron.i18n import _LE -from neutron.openstack.common import log as logging +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.api_client import base from vmware_nsx.neutron.plugins.vmware.api_client import eventlet_client diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py b/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py index 54d809bd7b..e2d284fa37 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py +++ b/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py @@ -19,9 +19,9 @@ import time import eventlet eventlet.monkey_patch() +from oslo_log import log as logging from neutron.i18n import _LE -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware.api_client import base from vmware_nsx.neutron.plugins.vmware.api_client import eventlet_request diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py b/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py index 650ed86355..f07bfb3559 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py +++ b/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py @@ -19,9 +19,9 @@ import urllib import eventlet from oslo.serialization import jsonutils +from oslo_log import log as logging from neutron.i18n import _LI, _LW -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware.api_client import request LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/request.py b/vmware_nsx/neutron/plugins/vmware/api_client/request.py index 52e2c2604f..141157d551 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/request.py +++ b/vmware_nsx/neutron/plugins/vmware/api_client/request.py @@ -22,11 +22,11 @@ import time import eventlet from oslo.utils import excutils +from oslo_log import log as logging import six import six.moves.urllib.parse as urlparse from neutron.i18n import _LI, _LW -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware import api_client LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/version.py b/vmware_nsx/neutron/plugins/vmware/api_client/version.py index 189f31897d..499e5ef8f2 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/version.py +++ b/vmware_nsx/neutron/plugins/vmware/api_client/version.py @@ -16,7 +16,7 @@ # from neutron.i18n import _LW -from neutron.openstack.common import log as logging +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py b/vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py index a8fc9c5495..dd315c1782 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py +++ b/vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py @@ -18,7 +18,7 @@ from neutron.common import exceptions as n_exc from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import providernet as pnet from neutron.i18n import _LW -from neutron.openstack.common import log +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.api_client import client from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc diff --git a/vmware_nsx/neutron/plugins/vmware/common/securitygroups.py b/vmware_nsx/neutron/plugins/vmware/common/securitygroups.py index bb59accdd5..b17f758bc3 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/securitygroups.py +++ b/vmware_nsx/neutron/plugins/vmware/common/securitygroups.py @@ -13,7 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.openstack.common import log +from oslo_log import log + from vmware_nsx.neutron.plugins.vmware.common import nsx_utils LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/common/sync.py b/vmware_nsx/neutron/plugins/vmware/common/sync.py index d99df5f36c..90dcb35b39 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/sync.py +++ b/vmware_nsx/neutron/plugins/vmware/common/sync.py @@ -15,9 +15,6 @@ import random -from oslo.serialization import jsonutils -from oslo.utils import timeutils - from neutron.common import constants from neutron.common import exceptions from neutron import context @@ -26,8 +23,10 @@ from neutron.db import l3_db from neutron.db import models_v2 from neutron.extensions import l3 from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log from neutron.openstack.common import loopingcall +from oslo.serialization import jsonutils +from oslo.utils import timeutils +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/common/utils.py b/vmware_nsx/neutron/plugins/vmware/common/utils.py index 58497a000d..c544f83bad 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/utils.py +++ b/vmware_nsx/neutron/plugins/vmware/common/utils.py @@ -16,8 +16,8 @@ import hashlib from neutron.api.v2 import attributes -from neutron.openstack.common import log from neutron import version +from oslo_log import log LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/db.py index 12c086a935..42761b6b62 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/db.py @@ -16,10 +16,10 @@ from oslo.db import exception as db_exc from oslo.utils import excutils +from oslo_log import log as logging from sqlalchemy.orm import exc import neutron.db.api as db -from neutron.openstack.common import log as logging from neutron.plugins.vmware.dbexts import nsx_models LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py index d5e9c9eef1..756f1bd097 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py @@ -15,9 +15,9 @@ # under the License. # -from neutron.openstack.common import log as logging from neutron.plugins.vmware.dbexts import nsx_models from oslo.db import exception as d_exc +from oslo_log import log as logging from sqlalchemy import orm from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py b/vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py index 6a85162e1d..fb923dd86c 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py @@ -17,9 +17,9 @@ from sqlalchemy.orm import exc from neutron.api.v2 import attributes from neutron.db import db_base_plugin_v2 -from neutron.openstack.common import log as logging from neutron.plugins.vmware.dbexts import nsx_models from neutron.plugins.vmware.extensions import maclearning as mac +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py index 8f23a9d6bb..fef1eb0d0e 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py @@ -17,10 +17,10 @@ from sqlalchemy.orm import exc as sa_orm_exc from neutron.api.v2 import attributes from neutron.common import exceptions from neutron.common import utils -from neutron.openstack.common import log as logging from neutron.openstack.common import uuidutils from neutron.plugins.vmware.dbexts import nsx_models from neutron.plugins.vmware.extensions import networkgw +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py b/vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py index d9f8df5e2a..20e7194242 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py @@ -15,8 +15,8 @@ from neutron.db import db_base_plugin_v2 from neutron.extensions import l3 -from neutron.openstack.common import log as logging from neutron.plugins.vmware.dbexts import nsxv_models +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py index 7a3a64b1f3..65fdbe36ae 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py @@ -16,12 +16,12 @@ from oslo.db import exception as db_exc from oslo.utils import excutils +from oslo_log import log as logging from sqlalchemy.orm import exc from sqlalchemy.sql import expression as expr import neutron.db.api as db from neutron.i18n import _, _LE -from neutron.openstack.common import log as logging from neutron.plugins.vmware.dbexts import nsxv_models from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py index a20b6ab035..1ee7bd05e8 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py @@ -19,10 +19,10 @@ from neutron.api.v2 import attributes as attr from neutron.db import db_base_plugin_v2 from neutron.db import models_v2 from neutron.i18n import _LI -from neutron.openstack.common import log from neutron.openstack.common import uuidutils from neutron.plugins.vmware.dbexts import nsx_models from neutron.plugins.vmware.extensions import qos +from oslo_log import log LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py index 89eb83ecb8..ceb0bb2e15 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py @@ -17,9 +17,9 @@ from sqlalchemy.orm import exc from neutron.api.v2 import attributes as attr from neutron.db import db_base_plugin_v2 -from neutron.openstack.common import log as logging from neutron.plugins.vmware.dbexts import nsxv_models from neutron.plugins.vmware.extensions import vnicindex as vnicidx +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py index 5cd8b7aaf1..68ca975e0e 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py +++ b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py @@ -17,10 +17,10 @@ from neutron.common import exceptions as n_exc from neutron.i18n import _LE, _LW -from neutron.openstack.common import log as logging from oslo.config import cfg from oslo.db import exception as db_exc from oslo.utils import excutils +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py index 312afc1d12..3817cb3f41 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py +++ b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py @@ -19,7 +19,7 @@ from neutron.common import constants as const from neutron.common import exceptions as n_exc from neutron.extensions import external_net from neutron.i18n import _LE -from neutron.openstack.common import log as logging +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc from vmware_nsx.neutron.plugins.vmware.dhcp_meta import nsx diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py index 3b42dc5cc1..d0ea38bb5b 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py +++ b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py @@ -22,9 +22,9 @@ from neutron.db import db_base_plugin_v2 from neutron.db import l3_db from neutron.extensions import external_net from neutron.i18n import _LE, _LI -from neutron.openstack.common import log as logging from oslo.config import cfg from oslo.utils import excutils +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc from vmware_nsx.neutron.plugins.vmware.dhcp_meta import constants as d_const diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py index d8547b7ab4..fb9963977f 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py +++ b/vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py @@ -24,8 +24,8 @@ from neutron.db import db_base_plugin_v2 from neutron.db import l3_db from neutron.db import models_v2 from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log as logging from oslo.config import cfg +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import config diff --git a/vmware_nsx/neutron/plugins/vmware/nsx_cluster.py b/vmware_nsx/neutron/plugins/vmware/nsx_cluster.py index 40bccc8c37..7fc2857764 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsx_cluster.py +++ b/vmware_nsx/neutron/plugins/vmware/nsx_cluster.py @@ -14,8 +14,8 @@ # under the License. from neutron.i18n import _LI -from neutron.openstack.common import log as logging from oslo.config import cfg +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.common import exceptions diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py index cafbed7c06..887a7466bc 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py @@ -14,9 +14,9 @@ # under the License. from neutron.common import exceptions as exception -from neutron.openstack.common import log from neutron import version from oslo.serialization import jsonutils +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py index eec9127de5..86f44c5afb 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py @@ -14,8 +14,8 @@ # under the License. # -from neutron.openstack.common import log from oslo.serialization import jsonutils +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py index 118a31fc22..e57c2606d9 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py @@ -14,8 +14,8 @@ # under the License. from neutron.common import exceptions as exception -from neutron.openstack.common import log from oslo.serialization import jsonutils +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py index 47eaa76a16..feb5ff968b 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py @@ -15,10 +15,10 @@ from oslo.serialization import jsonutils from oslo.utils import excutils +from oslo_log import log from neutron.api.v2 import attributes as attr from neutron.common import exceptions as exception -from neutron.openstack.common import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import utils diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/router.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/router.py index c6c561dc64..2fb69eb1f6 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/router.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/router.py @@ -16,10 +16,10 @@ from oslo.config import cfg from oslo.serialization import jsonutils from oslo.utils import excutils +from oslo_log import log from neutron.common import exceptions as exception from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py index 9c07cdbba9..2d21f6f4aa 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py @@ -13,13 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.serialization import jsonutils -from oslo.utils import excutils - from neutron.common import constants from neutron.common import exceptions from neutron.i18n import _LW -from neutron.openstack.common import log +from oslo.serialization import jsonutils +from oslo.utils import excutils +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.common import utils from vmware_nsx.neutron.plugins.vmware import nsxlib diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py index 283d50477c..0c1a4592ca 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py @@ -14,13 +14,12 @@ # under the License. # -from oslo.config import cfg -from oslo.serialization import jsonutils - from neutron.common import constants from neutron.common import exceptions as exception from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log +from oslo.config import cfg +from oslo.serialization import jsonutils +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/base.py b/vmware_nsx/neutron/plugins/vmware/plugins/base.py index cf6eff81cc..ccd51dee01 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/base.py +++ b/vmware_nsx/neutron/plugins/vmware/plugins/base.py @@ -19,6 +19,7 @@ from oslo.config import cfg from oslo.db import exception as db_exc from oslo.utils import excutils from oslo_concurrency import lockutils +from oslo_log import log as logging from sqlalchemy import exc as sql_exc from sqlalchemy.orm import exc as sa_exc import webob.exc @@ -53,7 +54,6 @@ from neutron.extensions import portsecurity as psec from neutron.extensions import providernet as pnet from neutron.extensions import securitygroup as ext_sg from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log as logging from neutron.plugins.common import constants as plugin_const from neutron.plugins.vmware.dbexts import nsx_models from neutron.plugins.vmware.extensions import maclearning as mac_ext diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/managers.py b/vmware_nsx/neutron/plugins/vmware/plugins/managers.py index d6aa003724..4cd1d9ddfc 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/managers.py +++ b/vmware_nsx/neutron/plugins/vmware/plugins/managers.py @@ -16,7 +16,7 @@ from oslo.config import cfg import stevedore -from neutron.openstack.common import log +from oslo_log import log from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py b/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py index ab89f4bec3..c4a5367f7b 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py +++ b/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py @@ -19,6 +19,7 @@ import netaddr from oslo.config import cfg from oslo.utils import excutils from oslo_concurrency import lockutils +from oslo_log import log as logging from sqlalchemy.orm import exc as sa_exc from neutron.api import extensions as neutron_extensions @@ -46,7 +47,6 @@ from neutron.extensions import portsecurity as psec from neutron.extensions import providernet as pnet from neutron.extensions import securitygroup as ext_sg from neutron.i18n import _LE, _LW -from neutron.openstack.common import log as logging from neutron.openstack.common import uuidutils from neutron.plugins.vmware.extensions import ( advancedserviceproviders as as_providers) diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py b/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py index 875ad2e8d5..295fbcbf83 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py +++ b/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py @@ -26,7 +26,7 @@ from oslo_utils import excutils from neutron.api.v2 import attributes as attr from neutron.common import constants from neutron import context as neutron_context -from neutron.openstack.common import log as logging +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsxv_exc from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py b/vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py index e7c6acdf9e..5dd4948886 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py @@ -19,9 +19,9 @@ import time from oslo.config import cfg from oslo.serialization import jsonutils from oslo.utils import excutils +from oslo_log import log as logging from neutron.i18n import _LE, _LI, _LW -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants from vmware_nsx.neutron.plugins.vmware.common import utils from vmware_nsx.neutron.plugins.vmware.vshield.common import constants diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py b/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py index 17713f02a7..9d0b4fbc74 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py @@ -19,13 +19,13 @@ import time from oslo.config import cfg from oslo.utils import excutils from oslo_concurrency import lockutils +from oslo_log import log as logging from sqlalchemy.orm import exc as sa_exc from neutron.common import exceptions as n_exc from neutron import context as q_context from neutron.extensions import l3 from neutron.i18n import _LE, _LW -from neutron.openstack.common import log as logging from neutron.openstack.common import uuidutils from neutron.plugins.common import constants as plugin_const from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py b/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py index 7e7a03afb7..2b8771f15b 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py @@ -14,7 +14,8 @@ # under the License. # -from neutron.openstack.common import log as logging +from oslo_log import log as logging + from vmware_nsx.neutron.plugins.vmware.vshield import nsxv_edge_cfg_obj diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/securitygroup_utils.py b/vmware_nsx/neutron/plugins/vmware/vshield/securitygroup_utils.py index c2fc4028b4..6d7d3187bb 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/securitygroup_utils.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/securitygroup_utils.py @@ -15,7 +15,7 @@ import xml.etree.ElementTree as et -from neutron.openstack.common import log as logging +from oslo_log import log as logging WAIT_INTERVAL = 2000 MAX_ATTEMPTS = 5 diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py b/vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py index 0ea9fcca16..999a7a6081 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py @@ -18,11 +18,11 @@ import uuid from eventlet import event from eventlet import greenthread - from neutron.common import exceptions from neutron.i18n import _LE, _LI -from neutron.openstack.common import log as logging from neutron.openstack.common import loopingcall +from oslo_log import log as logging + from vmware_nsx.neutron.plugins.vmware.vshield.tasks import constants DEFAULT_INTERVAL = 1000 diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py b/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py index 1cd447f0b5..91c4e3c360 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py @@ -16,10 +16,10 @@ from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_log import log as logging import retrying import xml.etree.ElementTree as et -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware.vshield.common import exceptions from vmware_nsx.neutron.plugins.vmware.vshield.common import VcnsApiClient diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py b/vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py index e3550a3cc2..b19b0bdbf4 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py +++ b/vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py @@ -15,8 +15,8 @@ # under the License. from oslo.config import cfg +from oslo_log import log as logging -from neutron.openstack.common import log as logging from vmware_nsx.neutron.plugins.vmware.common import config # noqa from vmware_nsx.neutron.plugins.vmware.vshield import edge_appliance_driver from vmware_nsx.neutron.plugins.vmware.vshield import edge_firewall_driver diff --git a/vmware_nsx/neutron/tests/unit/vmware/apiclient/fake.py b/vmware_nsx/neutron/tests/unit/vmware/apiclient/fake.py index 23b64564a0..1e4b4ff9dd 100644 --- a/vmware_nsx/neutron/tests/unit/vmware/apiclient/fake.py +++ b/vmware_nsx/neutron/tests/unit/vmware/apiclient/fake.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.openstack.common import log as logging from neutron.openstack.common import uuidutils from oslo.serialization import jsonutils +from oslo_log import log as logging import six.moves.urllib.parse as urlparse from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc diff --git a/vmware_nsx/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py b/vmware_nsx/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py index 63cc4024a8..89fd6318d6 100644 --- a/vmware_nsx/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py +++ b/vmware_nsx/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py @@ -18,10 +18,9 @@ import random import eventlet from eventlet.green import urllib2 import mock - from neutron.i18n import _LI -from neutron.openstack.common import log as logging from neutron.tests import base +from oslo_log import log as logging from vmware_nsx.neutron.plugins.vmware.api_client import ( eventlet_client as client) from vmware_nsx.neutron.plugins.vmware.api_client import ( diff --git a/vmware_nsx/neutron/tests/unit/vmware/test_nsx_plugin.py b/vmware_nsx/neutron/tests/unit/vmware/test_nsx_plugin.py index 9ef69dd651..355cf309a5 100644 --- a/vmware_nsx/neutron/tests/unit/vmware/test_nsx_plugin.py +++ b/vmware_nsx/neutron/tests/unit/vmware/test_nsx_plugin.py @@ -20,6 +20,7 @@ import mock import netaddr from oslo.config import cfg from oslo.db import exception as db_exc +from oslo_log import log from sqlalchemy import exc as sql_exc import webob.exc @@ -36,7 +37,6 @@ from neutron.extensions import portbindings from neutron.extensions import providernet as pnet from neutron.extensions import securitygroup as secgrp from neutron import manager -from neutron.openstack.common import log from neutron.openstack.common import uuidutils from neutron.tests.unit import _test_extension_portbindings as test_bindings import neutron.tests.unit.test_db_plugin as test_plugin diff --git a/vmware_nsx/neutron/tests/unit/vmware/test_nsx_sync.py b/vmware_nsx/neutron/tests/unit/vmware/test_nsx_sync.py index 3781442c54..df748d06d5 100644 --- a/vmware_nsx/neutron/tests/unit/vmware/test_nsx_sync.py +++ b/vmware_nsx/neutron/tests/unit/vmware/test_nsx_sync.py @@ -20,13 +20,13 @@ import time import mock from oslo.config import cfg from oslo.serialization import jsonutils +from oslo_log import log from neutron.api.v2 import attributes as attr from neutron.common import constants from neutron.common import exceptions as n_exc from neutron import context from neutron.extensions import l3 -from neutron.openstack.common import log from neutron.tests import base from neutron.tests.unit import test_api_v2 from neutron.tests.unit import testlib_api