diff --git a/quantum/plugins/nec/agent/nec_quantum_agent.py b/quantum/plugins/nec/agent/nec_quantum_agent.py index 551ff1705f..6b9eba03d0 100755 --- a/quantum/plugins/nec/agent/nec_quantum_agent.py +++ b/quantum/plugins/nec/agent/nec_quantum_agent.py @@ -21,7 +21,6 @@ # under the License. # @author: Ryota MIBU -import logging import socket import sys import time @@ -30,11 +29,11 @@ from quantum.agent.linux import ovs_lib from quantum.common import config as logging_config from quantum.common import topics from quantum.openstack.common import context +from quantum.openstack.common import log as logging from quantum.openstack.common import rpc from quantum.plugins.nec.common import config -logging.basicConfig() LOG = logging.getLogger(__name__) diff --git a/quantum/plugins/nec/common/ofc_client.py b/quantum/plugins/nec/common/ofc_client.py index f8db74da70..3ec99092b4 100644 --- a/quantum/plugins/nec/common/ofc_client.py +++ b/quantum/plugins/nec/common/ofc_client.py @@ -17,9 +17,9 @@ import httplib import json -import logging import socket +from quantum.openstack.common import log as logging from quantum.plugins.nec.common import exceptions as nexc diff --git a/quantum/plugins/nec/db/api.py b/quantum/plugins/nec/db/api.py index 853f2944a6..b74e77dd40 100644 --- a/quantum/plugins/nec/db/api.py +++ b/quantum/plugins/nec/db/api.py @@ -15,12 +15,11 @@ # under the License. # @author: Ryota MIBU -import logging - import sqlalchemy as sa from quantum.db import api as db from quantum.db import model_base +from quantum.openstack.common import log as logging from quantum.plugins.nec.common import config from quantum.plugins.nec.common import exceptions as nexc from quantum.plugins.nec.db import models as nmodels diff --git a/quantum/plugins/nec/db/nec_plugin_base.py b/quantum/plugins/nec/db/nec_plugin_base.py index 8e86f3d14d..9d1e53a21f 100644 --- a/quantum/plugins/nec/db/nec_plugin_base.py +++ b/quantum/plugins/nec/db/nec_plugin_base.py @@ -15,12 +15,11 @@ # under the License. # @author: Ryota MIBU -import logging - from sqlalchemy.orm import exc from quantum.api.v2 import attributes from quantum.db import db_base_plugin_v2 +from quantum.openstack.common import log as logging from quantum.openstack.common import uuidutils from quantum.plugins.nec.common import exceptions as q_exc from quantum.plugins.nec.db import models as nmodels diff --git a/quantum/plugins/nec/drivers/__init__.py b/quantum/plugins/nec/drivers/__init__.py index 09e803b31b..b226faaa23 100644 --- a/quantum/plugins/nec/drivers/__init__.py +++ b/quantum/plugins/nec/drivers/__init__.py @@ -15,9 +15,8 @@ # under the License. # @author: Ryota MIBU -import logging - from quantum.openstack.common import importutils +from quantum.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/quantum/plugins/nec/nec_plugin.py b/quantum/plugins/nec/nec_plugin.py index 6f36dc15b6..d7e07e91e5 100644 --- a/quantum/plugins/nec/nec_plugin.py +++ b/quantum/plugins/nec/nec_plugin.py @@ -15,12 +15,11 @@ # under the License. # @author: Ryota MIBU -import logging - from quantum.common import topics from quantum import context from quantum.db import dhcp_rpc_base from quantum.db import l3_db +from quantum.openstack.common import log as logging from quantum.openstack.common import rpc from quantum.openstack.common.rpc import dispatcher from quantum.plugins.nec.common import config diff --git a/quantum/plugins/nec/ofc_manager.py b/quantum/plugins/nec/ofc_manager.py index 40517f5e27..75ee68d73f 100644 --- a/quantum/plugins/nec/ofc_manager.py +++ b/quantum/plugins/nec/ofc_manager.py @@ -43,7 +43,8 @@ class OFCManager(object): model = self.resource_map[resource] ofc_item = ndb.find_ofc_item(model, quantum_id) if not ofc_item: - reason = "NotFound %s for quantum_id=%s." % (resource, quantum_id) + reason = _("NotFound %(resource)s for " + "quantum_id=%(quantum_id)s.") % locals() raise nexc.OFCConsistencyBroken(reason=reason) return ofc_item.id