Remove unused logging import and LOG global var
In some modules the global LOG is not used any more. And the import of logging is not used. This patch removes the unused logging import and LOG vars. Change-Id: I28572c325f8c31ff38161010047bba00c5d5b833
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
"""The bare-metal admin extension with Ironic Proxy."""
|
"""The bare-metal admin extension with Ironic Proxy."""
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
@@ -55,8 +54,6 @@ CONF.import_opt('admin_tenant_name',
|
|||||||
group='ironic')
|
group='ironic')
|
||||||
CONF.import_opt('compute_driver', 'nova.virt.driver')
|
CONF.import_opt('compute_driver', 'nova.virt.driver')
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def _check_ironic_client_enabled():
|
def _check_ironic_client_enabled():
|
||||||
"""Check whether Ironic is installed or not."""
|
"""Check whether Ironic is installed or not."""
|
||||||
|
|||||||
@@ -12,13 +12,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova.api.openstack import extensions
|
from nova.api.openstack import extensions
|
||||||
from nova.api.openstack import wsgi
|
from nova.api.openstack import wsgi
|
||||||
from nova import compute
|
from nova import compute
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
authorize = extensions.soft_extension_authorizer('compute', 'server_usage')
|
authorize = extensions.soft_extension_authorizer('compute', 'server_usage')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,9 @@
|
|||||||
Cell scheduler filters
|
Cell scheduler filters
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova import filters
|
from nova import filters
|
||||||
from nova import policy
|
from nova import policy
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class BaseCellFilter(filters.BaseFilter):
|
class BaseCellFilter(filters.BaseFilter):
|
||||||
"""Base class for cell filters."""
|
"""Base class for cell filters."""
|
||||||
|
|||||||
@@ -27,12 +27,8 @@ cells.
|
|||||||
|
|
||||||
from distutils import versionpredicate
|
from distutils import versionpredicate
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova.cells import filters
|
from nova.cells import filters
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class ImagePropertiesFilter(filters.BaseCellFilter):
|
class ImagePropertiesFilter(filters.BaseCellFilter):
|
||||||
"""Image properties filter. Works by specifying the hypervisor required in
|
"""Image properties filter. Works by specifying the hypervisor required in
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ This module provides Manager, a base class for managers.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_service import periodic_task
|
from oslo_service import periodic_task
|
||||||
|
|
||||||
from nova.db import base
|
from nova.db import base
|
||||||
@@ -61,7 +60,6 @@ from nova import rpc
|
|||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('host', 'nova.netconf')
|
CONF.import_opt('host', 'nova.netconf')
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class PeriodicTasks(periodic_task.PeriodicTasks):
|
class PeriodicTasks(periodic_task.PeriodicTasks):
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import functools
|
|||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
from oslo_log import log as logging
|
|
||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
from oslo_utils import versionutils
|
from oslo_utils import versionutils
|
||||||
from oslo_versionedobjects import base as ovoo_base
|
from oslo_versionedobjects import base as ovoo_base
|
||||||
@@ -33,9 +32,6 @@ from nova.objects import fields as obj_fields
|
|||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger('object')
|
|
||||||
|
|
||||||
|
|
||||||
def get_attrname(name):
|
def get_attrname(name):
|
||||||
"""Return the mangled name of the attribute's underlying storage."""
|
"""Return the mangled name of the attribute's underlying storage."""
|
||||||
# FIXME(danms): This is just until we use o.vo's class properties
|
# FIXME(danms): This is just until we use o.vo's class properties
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_utils import versionutils
|
from oslo_utils import versionutils
|
||||||
|
|
||||||
@@ -26,9 +25,6 @@ from nova.objects import base
|
|||||||
from nova.objects import fields
|
from nova.objects import fields
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def compare_pci_device_attributes(obj_a, obj_b):
|
def compare_pci_device_attributes(obj_a, obj_b):
|
||||||
pci_ignore_fields = base.NovaPersistentObject.fields.keys()
|
pci_ignore_fields = base.NovaPersistentObject.fields.keys()
|
||||||
for name in obj_a.obj_fields:
|
for name in obj_a.obj_fields:
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
@@ -25,8 +24,6 @@ from nova.objects import fields
|
|||||||
from nova.objects import instance as obj_instance
|
from nova.objects import instance as obj_instance
|
||||||
from nova.virt import hardware
|
from nova.virt import hardware
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@base.NovaObjectRegistry.register
|
@base.NovaObjectRegistry.register
|
||||||
class RequestSpec(base.NovaObject):
|
class RequestSpec(base.NovaObject):
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ import copy
|
|||||||
|
|
||||||
import jsonschema
|
import jsonschema
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
import six
|
import six
|
||||||
|
|
||||||
@@ -71,8 +70,6 @@ PCI_NET_TAG = 'physical_network'
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(pci_alias_opts)
|
CONF.register_opts(pci_alias_opts)
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
_ALIAS_DEV_TYPE = ['NIC', 'ACCEL', 'GPU']
|
_ALIAS_DEV_TYPE = ['NIC', 'ACCEL', 'GPU']
|
||||||
_ALIAS_CAP_TYPE = ['pci']
|
_ALIAS_CAP_TYPE = ['pci']
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from nova import exception
|
from nova import exception
|
||||||
@@ -32,8 +31,6 @@ pci_opts = [cfg.MultiStrOpt('pci_passthrough_whitelist',
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(pci_opts)
|
CONF.register_opts(pci_opts)
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class Whitelist(object):
|
class Whitelist(object):
|
||||||
|
|
||||||
|
|||||||
@@ -21,16 +21,12 @@ This host manager will consume all cpu's, disk space, and
|
|||||||
ram from a host / node as it is supporting Baremetal hosts, which can not be
|
ram from a host / node as it is supporting Baremetal hosts, which can not be
|
||||||
subdivided into multiple instances.
|
subdivided into multiple instances.
|
||||||
"""
|
"""
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova.compute import hv_type
|
from nova.compute import hv_type
|
||||||
import nova.conf
|
import nova.conf
|
||||||
from nova.scheduler import host_manager
|
from nova.scheduler import host_manager
|
||||||
|
|
||||||
CONF = nova.conf.CONF
|
CONF = nova.conf.CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class IronicNodeState(host_manager.HostState):
|
class IronicNodeState(host_manager.HostState):
|
||||||
"""Mutable and immutable information tracked for a host.
|
"""Mutable and immutable information tracked for a host.
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
Scheduler Service
|
Scheduler Service
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_service import periodic_task
|
from oslo_service import periodic_task
|
||||||
@@ -31,8 +30,6 @@ from nova import manager
|
|||||||
from nova import quota
|
from nova import quota
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
CONF = nova.conf.CONF
|
CONF = nova.conf.CONF
|
||||||
|
|
||||||
QUOTAS = quota.QUOTAS
|
QUOTAS = quota.QUOTAS
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ from nova import test
|
|||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class NovaAPIModelsSync(test_migrations.ModelsMigrationsSync):
|
class NovaAPIModelsSync(test_migrations.ModelsMigrationsSync):
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ from nova import test
|
|||||||
from nova.tests import fixtures as nova_fixtures
|
from nova.tests import fixtures as nova_fixtures
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class NovaMigrationsCheckers(test_migrations.ModelsMigrationsSync,
|
class NovaMigrationsCheckers(test_migrations.ModelsMigrationsSync,
|
||||||
test_migrations.WalkVersionsMixin):
|
test_migrations.WalkVersionsMixin):
|
||||||
"""Test sqlalchemy-migrate migrations."""
|
"""Test sqlalchemy-migrate migrations."""
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ from mox3 import mox
|
|||||||
import netifaces
|
import netifaces
|
||||||
from oslo_concurrency import processutils
|
from oslo_concurrency import processutils
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_utils import fileutils
|
from oslo_utils import fileutils
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
@@ -37,7 +36,6 @@ from nova import objects
|
|||||||
from nova import test
|
from nova import test
|
||||||
from nova import utils
|
from nova import utils
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.import_opt('share_dhcp_address', 'nova.objects.network')
|
CONF.import_opt('share_dhcp_address', 'nova.objects.network')
|
||||||
CONF.import_opt('network_device_mtu', 'nova.objects.network')
|
CONF.import_opt('network_device_mtu', 'nova.objects.network')
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova import objects
|
from nova import objects
|
||||||
@@ -21,9 +20,6 @@ from nova import utils
|
|||||||
from nova.virt.libvirt.storage import rbd_utils
|
from nova.virt.libvirt.storage import rbd_utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
CEPH_MON_DUMP = """dumped monmap epoch 1
|
CEPH_MON_DUMP = """dumped monmap epoch 1
|
||||||
{ "epoch": 1,
|
{ "epoch": 1,
|
||||||
"fsid": "33630410-6d93-4d66-8e42-3b953cf194aa",
|
"fsid": "33630410-6d93-4d66-8e42-3b953cf194aa",
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
from oslo_utils import fileutils
|
from oslo_utils import fileutils
|
||||||
from oslo_utils import units
|
from oslo_utils import units
|
||||||
|
|
||||||
@@ -29,8 +28,6 @@ from nova.objects import fields
|
|||||||
from nova import utils
|
from nova import utils
|
||||||
from nova import version
|
from nova import version
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
configdrive_opts = [
|
configdrive_opts = [
|
||||||
cfg.StrOpt('config_drive_format',
|
cfg.StrOpt('config_drive_format',
|
||||||
default='iso9660',
|
default='iso9660',
|
||||||
|
|||||||
@@ -13,12 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
"""Support for mounting block device based images directly."""
|
"""Support for mounting block device based images directly."""
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova.virt.disk.mount import api
|
from nova.virt.disk.mount import api
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class BlockMount(api.Mount):
|
class BlockMount(api.Mount):
|
||||||
"""Block device backed images do not need to be linked because
|
"""Block device backed images do not need to be linked because
|
||||||
|
|||||||
@@ -17,14 +17,11 @@ import os
|
|||||||
|
|
||||||
from os_win.utils import pathutils
|
from os_win.utils import pathutils
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova.i18n import _
|
from nova.i18n import _
|
||||||
from nova.virt.hyperv import constants
|
from nova.virt.hyperv import constants
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
hyperv_opts = [
|
hyperv_opts = [
|
||||||
cfg.StrOpt('instances_path_share',
|
cfg.StrOpt('instances_path_share',
|
||||||
default="",
|
default="",
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import abc
|
|||||||
|
|
||||||
from os_win import utilsfactory
|
from os_win import utilsfactory
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
hyperv_opts = [
|
hyperv_opts = [
|
||||||
cfg.StrOpt('vswitch_name',
|
cfg.StrOpt('vswitch_name',
|
||||||
@@ -30,8 +29,6 @@ hyperv_opts = [
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(hyperv_opts, 'hyperv')
|
CONF.register_opts(hyperv_opts, 'hyperv')
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class HyperVBaseVIFDriver(object):
|
class HyperVBaseVIFDriver(object):
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
|
|||||||
@@ -15,14 +15,10 @@
|
|||||||
|
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from nova import keymgr
|
from nova import keymgr
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class VolumeEncryptor(object):
|
class VolumeEncryptor(object):
|
||||||
|
|||||||
@@ -13,14 +13,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_log import log as logging
|
|
||||||
|
|
||||||
from nova.volume.encryptors import base
|
from nova.volume.encryptors import base
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class NoOpEncryptor(base.VolumeEncryptor):
|
class NoOpEncryptor(base.VolumeEncryptor):
|
||||||
"""A VolumeEncryptor that does nothing.
|
"""A VolumeEncryptor that does nothing.
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ CONF = cfg.CONF
|
|||||||
config_files = ['/etc/nova/api-paste.ini', '/etc/nova/nova.conf']
|
config_files = ['/etc/nova/api-paste.ini', '/etc/nova/nova.conf']
|
||||||
config.parse_args([], default_config_files=config_files)
|
config.parse_args([], default_config_files=config_files)
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
|
||||||
logging.setup(CONF, "nova")
|
logging.setup(CONF, "nova")
|
||||||
utils.monkey_patch()
|
utils.monkey_patch()
|
||||||
objects.register_all()
|
objects.register_all()
|
||||||
|
|||||||
Reference in New Issue
Block a user