Migrate to oslo.log
It's mostly a matter of changing imports to a new location. Non-obvious changes needed: * pass overwrite= argument to oslo_context since oslo.log reads context from its thread local store and not local.store from incubator * don't store context at local.store now that there is no code that would consume it * LOG.deprecated() -> versionutils.report_deprecated_feature() * dropped LOG.audit check from hacking rule since now the method does not exist * WritableLogger is now located in oslo_log.loggers Dropped log module from the tree. Also dropped local module that is now of no use (and obsolete, as per oslo team). Added versionutils back to openstack-common.conf since now we use the module directly from neutron code and not just as a dependency of some other oslo-incubator module. Note: tempest tests are expected to be broken now, so instead of fixing all the oslo.log related issues for the subtree in this patch, I only added TODOs with directions for later fix. Closes-Bug: #1425013 Change-Id: I310e059a815377579de6bb2aa204de168e72571echanges/38/159638/15
parent
e3df45daa7
commit
22328baf1f
|
@ -16,9 +16,9 @@
|
|||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.common import config
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -19,6 +19,7 @@ import os
|
|||
import eventlet
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import importutils
|
||||
|
||||
|
@ -34,7 +35,6 @@ from neutron.common import utils
|
|||
from neutron import context
|
||||
from neutron.i18n import _LE, _LI, _LW
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import loopingcall
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
import abc
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
|
||||
from neutron.common import constants as n_const
|
||||
from neutron.common import log
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.ml2.drivers.l2pop import rpc as l2pop_rpc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
import eventlet
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import excutils
|
||||
from oslo_utils import importutils
|
||||
|
@ -45,7 +46,6 @@ from neutron.common import utils as common_utils
|
|||
from neutron import context as n_context
|
||||
from neutron.i18n import _LE, _LI, _LW
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import loopingcall
|
||||
from neutron.openstack.common import periodic_task
|
||||
from neutron.services import advanced_service as adv_svc
|
||||
|
|
|
@ -13,16 +13,17 @@
|
|||
# under the License.
|
||||
|
||||
import binascii
|
||||
import netaddr
|
||||
import weakref
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.l3 import dvr_fip_ns
|
||||
from neutron.agent.l3 import dvr_snat_ns
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import iptables_manager
|
||||
from neutron.common import constants as l3_constants
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -12,15 +12,16 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
import os
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.l3 import link_local_allocator as lla
|
||||
from neutron.agent.l3 import namespaces
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import iptables_manager
|
||||
from neutron.common import utils as common_utils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron.agent.l3 import dvr_fip_ns
|
||||
|
@ -21,7 +22,6 @@ from neutron.agent.linux import ip_lib
|
|||
from neutron.common import constants as l3_constants
|
||||
from neutron.common import utils as common_utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.l3 import namespaces
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
SNAT_NS_PREFIX = 'snat-'
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import keepalived
|
||||
from neutron.common import constants as l3_constants
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -12,17 +12,18 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
import shutil
|
||||
import signal
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.l3 import router_info as router
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import keepalived
|
||||
from neutron.agent.metadata import driver as metadata_driver
|
||||
from neutron.common import constants as n_consts
|
||||
from neutron.common import utils as common_utils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
HA_DEV_PREFIX = 'ha-'
|
||||
|
|
|
@ -10,11 +10,12 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.l3 import dvr_snat_ns
|
||||
from neutron.agent.l3 import namespaces
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.l3 import namespaces
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import iptables_manager
|
||||
|
@ -19,7 +21,6 @@ from neutron.common import constants as l3_constants
|
|||
from neutron.common import exceptions as n_exc
|
||||
from neutron.common import utils as common_utils
|
||||
from neutron.i18n import _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
INTERNAL_DEV_PREFIX = 'qr-'
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
import eventlet
|
||||
import eventlet.event
|
||||
import eventlet.queue
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -20,9 +20,10 @@ import pwd
|
|||
import signal
|
||||
import sys
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.common import exceptions
|
||||
from neutron.i18n import _LE, _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import re
|
|||
import shutil
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
|
||||
|
@ -31,7 +32,6 @@ from neutron.common import exceptions
|
|||
from neutron.common import ipv6_utils
|
||||
from neutron.common import utils as commonutils
|
||||
from neutron.i18n import _LE, _LI, _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -20,13 +20,13 @@ import six
|
|||
import eventlet
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.common import config as agent_cfg
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import fileutils
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import abc
|
|||
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
|
||||
|
@ -27,7 +28,6 @@ from neutron.common import constants as n_const
|
|||
from neutron.common import exceptions
|
||||
from neutron.extensions import flavor
|
||||
from neutron.i18n import _LE, _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -14,14 +14,13 @@
|
|||
# under the License.
|
||||
|
||||
import eventlet
|
||||
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,10 +15,11 @@
|
|||
|
||||
import re
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions as n_exc
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron.agent.linux import async_process
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent import firewall
|
||||
from neutron.agent.linux import ipset_manager
|
||||
|
@ -23,7 +24,6 @@ from neutron.agent.linux import iptables_manager
|
|||
from neutron.common import constants
|
||||
from neutron.common import ipv6_utils
|
||||
from neutron.i18n import _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -25,6 +25,7 @@ import sys
|
|||
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron.agent.common import config
|
||||
|
@ -33,7 +34,6 @@ from neutron.agent.linux import utils as linux_utils
|
|||
from neutron.common import exceptions as n_exc
|
||||
from neutron.common import utils
|
||||
from neutron.i18n import _LE, _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -19,11 +19,11 @@ import stat
|
|||
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import external_process
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
VALID_STATES = ['MASTER', 'BACKUP']
|
||||
VALID_NOTIFY_STATES = ['master', 'backup', 'fault']
|
||||
|
|
|
@ -18,6 +18,7 @@ import itertools
|
|||
import operator
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
import retrying
|
||||
import six
|
||||
|
@ -27,7 +28,6 @@ from neutron.agent.linux import utils
|
|||
from neutron.agent.ovsdb import api as ovsdb
|
||||
from neutron.common import exceptions
|
||||
from neutron.i18n import _LE, _LI, _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants
|
||||
|
||||
# Default timeout for ovs-vsctl command
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
# under the License.
|
||||
|
||||
import eventlet
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import async_process
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
import jinja2
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
|
||||
from neutron.agent.linux import external_process
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import constants
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
RADVD_SERVICE_NAME = 'radvd'
|
||||
|
|
|
@ -25,13 +25,13 @@ import eventlet
|
|||
from eventlet.green import subprocess
|
||||
from eventlet import greenthread
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron.agent.common import config
|
||||
from neutron.common import constants
|
||||
from neutron.common import utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -21,6 +21,8 @@ import eventlet
|
|||
import httplib2
|
||||
from neutronclient.v2_0 import client
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_log import loggers
|
||||
import oslo_messaging
|
||||
from oslo_utils import excutils
|
||||
import six.moves.urllib.parse as urlparse
|
||||
|
@ -34,7 +36,6 @@ from neutron.common import utils
|
|||
from neutron import context
|
||||
from neutron.i18n import _LE, _LW
|
||||
from neutron.openstack.common.cache import cache
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import loopingcall
|
||||
from neutron import wsgi
|
||||
|
||||
|
@ -294,7 +295,7 @@ class UnixDomainWSGIServer(wsgi.Server):
|
|||
application,
|
||||
max_size=self.num_threads,
|
||||
protocol=UnixDomainHttpProtocol,
|
||||
log=logging.WritableLogger(logger))
|
||||
log=loggers.WritableLogger(logger))
|
||||
|
||||
|
||||
class UnixDomainMetadataProxy(object):
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.common import config
|
||||
from neutron.agent.linux import external_process
|
||||
from neutron.common import exceptions
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.services import advanced_service
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -17,6 +17,7 @@ import socket
|
|||
|
||||
import httplib2
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import webob
|
||||
|
||||
|
@ -25,7 +26,6 @@ from neutron.common import config
|
|||
from neutron.common import exceptions
|
||||
from neutron.common import utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.common import config as agent_conf
|
||||
from neutron.agent.metadata import agent
|
||||
|
@ -22,7 +23,6 @@ from neutron.agent.metadata import config as metadata_conf
|
|||
from neutron.common import config
|
||||
from neutron.common import utils
|
||||
from neutron.openstack.common.cache import cache
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -16,13 +16,13 @@ import collections
|
|||
import itertools
|
||||
import uuid
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.agent.ovsdb import api as ovsdb
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import itertools
|
||||
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import timeutils
|
||||
|
||||
|
@ -21,7 +23,6 @@ from neutron.common import constants
|
|||
from neutron.common import rpc as n_rpc
|
||||
from neutron.common import topics
|
||||
from neutron.i18n import _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
import functools
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import importutils
|
||||
|
||||
|
@ -25,7 +26,6 @@ from neutron.common import constants
|
|||
from neutron.common import rpc as n_rpc
|
||||
from neutron.common import topics
|
||||
from neutron.i18n import _LI, _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
# history
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
import urllib
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from webob import exc
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions
|
||||
from neutron.i18n import _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -21,6 +21,7 @@ import itertools
|
|||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import routes
|
||||
import six
|
||||
import webob.dec
|
||||
|
@ -31,7 +32,6 @@ from neutron.common import repos
|
|||
import neutron.extensions
|
||||
from neutron.i18n import _LE, _LI, _LW
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
|
||||
from neutron.common import constants
|
||||
|
@ -21,7 +22,6 @@ from neutron.common import topics
|
|||
from neutron.common import utils
|
||||
from neutron.i18n import _LE, _LW
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
import random
|
||||
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
|
||||
from neutron.common import constants
|
||||
|
@ -23,7 +24,6 @@ from neutron.common import topics
|
|||
from neutron.common import utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants as service_constants
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
|
||||
from neutron.common import constants
|
||||
|
@ -19,7 +20,6 @@ from neutron.common import rpc as n_rpc
|
|||
from neutron.common import topics
|
||||
from neutron.common import utils
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants as service_constants
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -18,6 +18,7 @@ import operator
|
|||
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import excutils
|
||||
|
||||
|
@ -28,7 +29,6 @@ from neutron.common import utils
|
|||
from neutron.extensions import portbindings
|
||||
from neutron.i18n import _LW
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
|
||||
from neutron.common import constants
|
||||
|
@ -20,7 +21,6 @@ from neutron.common import log
|
|||
from neutron.common import rpc as n_rpc
|
||||
from neutron.common import topics
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
|
@ -25,7 +26,6 @@ from neutron.extensions import l3
|
|||
from neutron.extensions import portbindings
|
||||
from neutron.i18n import _LE
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.plugins.common import constants as plugin_constants
|
||||
|
||||
|
||||
|
|
|
@ -13,12 +13,13 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import netaddr
|
||||
import re
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.common import exceptions as n_exc
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
|
||||
|
||||
|
|
|
@ -14,11 +14,12 @@
|
|||
# under the License.
|
||||
|
||||
import copy
|
||||
import netaddr
|
||||
import webob.exc
|
||||
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
import webob.exc
|
||||
|
||||
from neutron.api import api_common
|
||||
from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api
|
||||
|
@ -28,7 +29,6 @@ from neutron.common import constants as const
|
|||
from neutron.common import exceptions
|
||||
from neutron.common import rpc as n_rpc
|
||||
from neutron.i18n import _LE, _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import policy as common_policy
|
||||
from neutron import policy
|
||||
from neutron import quota
|
||||
|
|
|
@ -21,13 +21,13 @@ import sys
|
|||
|
||||
import netaddr
|
||||
import oslo_i18n
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from neutron.common import exceptions
|
||||
from neutron.i18n import _LE, _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import policy as common_policy
|
||||
from neutron import wsgi
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import routes as routes_mapper
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import webob
|
||||
|
@ -24,7 +25,6 @@ from neutron.api import extensions
|
|||
from neutron.api.v2 import attributes
|
||||
from neutron.api.v2 import base
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import policy
|
||||
from neutron import wsgi
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
# under the License.
|
||||
|
||||
import oslo_i18n
|
||||
from oslo_log import log as logging
|
||||
import webob.dec
|
||||
|
||||
from neutron.api.views import versions as versions_view
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_middleware import request_id
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from neutron import context
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import wsgi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
import collections
|
||||
import weakref
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import reflection
|
||||
|
||||
from neutron.callbacks import events
|
||||
from neutron.callbacks import exceptions
|
||||
from neutron.callbacks import resources
|
||||
from neutron.i18n import _LE, _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import re
|
|||
import time
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron.agent.common import config as agent_config
|
||||
|
@ -29,7 +30,6 @@ from neutron.agent.linux import ovs_lib
|
|||
from neutron.api.v2 import attributes
|
||||
from neutron.common import config
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.common import config as agent_config
|
||||
from neutron.agent.l3 import config as l3_config
|
||||
|
@ -22,7 +23,6 @@ from neutron.agent.linux import ip_lib
|
|||
from neutron.agent.linux import ovs_lib
|
||||
from neutron.common import config
|
||||
from neutron.i18n import _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
import re
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import ip_link_support
|
||||
|
@ -23,7 +24,6 @@ from neutron.agent.linux import ovs_lib
|
|||
from neutron.agent.linux import utils as agent_utils
|
||||
from neutron.common import utils
|
||||
from neutron.i18n import _LE
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import uuidutils
|
||||
from neutron.plugins.common import constants as const
|
||||
from neutron.plugins.openvswitch.common import constants as ovs_const
|
||||
|
|
|
@ -15,12 +15,13 @@
|
|||
|
||||
import sys
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.agent import dhcp_agent
|
||||
from neutron.cmd.sanity import checks
|
||||
from neutron.common import config
|
||||
from neutron.i18n import _LE, _LW
|
||||
from neutron.openstack.common import log as logging
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -24,13 +24,13 @@ from keystoneclient import auth
|
|||
from keystoneclient import session as ks_session
|
||||
from oslo_config import cfg
|
||||
from oslo_db import options as db_options
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from paste import deploy
|
||||
|
||||
from neutron.api.v2 import attributes
|
||||
from neutron.common import utils
|
||||
from neutron.i18n import _LI
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import version
|
||||
|
||||
|
||||
|
@ -163,6 +163,8 @@ nova_opts = [
|
|||
]
|
||||
cfg.CONF.register_opts(nova_opts, group=NOVA_CONF_SECTION)
|
||||
|
||||
logging.register_options(cfg.CONF)
|
||||
|
||||
|
||||
def init(args, **kwargs):
|
||||
cfg.CONF(args=args, project='neutron',
|
||||
|
@ -185,7 +187,7 @@ def init(args, **kwargs):
|
|||
def setup_logging():
|
||||
"""Sets up the logging options for a log with supplied name."""
|
||||
product_name = "neutron"
|
||||
logging.setup(product_name)
|
||||
logging.setup(cfg.CONF, product_name)
|
||||
LOG.info(_LI("Logging enabled!"))
|
||||
LOG.info(_LI("%(prog)s version %(version)s"),
|
||||
{'prog': sys.argv[0],
|
||||
|
|
|
@ -19,10 +19,10 @@ IPv6-related utilities and helper functions.
|
|||
import os
|
||||
|
||||
import netaddr
|
||||
from oslo_log import log
|
||||
|
||||
from neutron.common import constants
|
||||
from neutron.i18n import _LI
|
||||
from neutron.openstack.common import log
|
||||
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"""Log helper functions."""
|
||||
import functools
|
||||
|
||||
from neutron.openstack.common import log as logging
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
||||
def log(method):
|
||||
|
|
|
@ -18,8 +18,7 @@ import importlib
|
|||
import os
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron.openstack.common import log as logging
|
||||
from oslo_log import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_messaging import serializer as om_serializer
|
||||
|
||||
from neutron.common import exceptions
|
||||
from neutron import context
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron.openstack.common import service
|
||||
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ import uuid
|
|||
from eventlet.green import subprocess
|
||||
from oslo_concurrency import lockutils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from neutron.common import constants as q_const
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
|
||||
TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
|
||||
|
|
|
@ -19,10 +19,9 @@ import copy
|
|||
import datetime
|
||||
|
||||
from oslo_context import context as oslo_context
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron.db import api as db_api
|
||||
from neutron.openstack.common import local
|
||||
from neutron.openstack.common import log as logging
|
||||
from neutron import policy
|
||||
|
||||
|
||||
|
@ -55,7 +54,8 @@ class ContextBase(oslo_context.RequestContext):
|
|||
super(ContextBase, self).__init__(auth_token=auth_token,
|
||||
user=user_id, tenant=tenant_id,
|
||||
is_admin=is_admin,
|
||||
request_id=request_id)
|
||||
request_id=request_id,
|
||||
overwrite=overwrite)
|
||||
self.user_name = user_name
|
||||
self.tenant_name = tenant_name
|
||||
|
||||
|
@ -73,10 +73,6 @@ class ContextBase(oslo_context.RequestContext):
|
|||
admin_roles = policy.get_admin_roles()
|
||||
if admin_roles:
|
||||
self.roles = list(set(self.roles) | set(admin_roles))
|
||||
# Allow openstack.common.log to access the context
|
||||
if overwrite or not hasattr(local.store, 'context'):
|
||||
local.store.context = self
|
||||
|
||||
# Log only once the context has been configured to prevent
|
||||
# format errors.
|
||||
if kwargs:
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
# under the License.
|
||||
|
||||
from eventlet import greenthread
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
|
@ -31,7 +31,6 @@ from neutron.db import models_v2
|
|||
from neutron.extensions import agent as ext_agent
|
||||
from neutron.i18n import _LW
|
||||
from neutron import manager
|
||||
from neutron.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
cfg.CONF.register_opt(
|
||||
|
|