Browse Source

Trivial: Remove unused logging import

In some Manila source code files, oslo log is imported but not used.
Remove it.
from oslo_log import logging
LOG = logging.getLogger(__name__)

Closes-Bug: #1529254
Change-Id: I06a98b4929e2adb5c43c754799026d4637107bd7
changes/38/261538/3
houming-wang 6 years ago
parent
commit
3cb2500722
  1. 3
      manila/api/urlmap.py
  2. 4
      manila/api/v1/router.py
  3. 4
      manila/api/v1/scheduler_stats.py
  4. 4
      manila/api/v2/router.py
  5. 3
      manila/api/v2/services.py
  6. 5
      manila/api/views/cgsnapshots.py
  7. 5
      manila/api/views/consistency_groups.py
  8. 2
      manila/network/neutron/neutron_network_plugin.py
  9. 2
      manila/share/configuration.py
  10. 3
      manila/share/drivers/emc/plugins/isilon/isilon_api.py
  11. 3
      manila/test.py
  12. 2
      manila/tests/fake_compute.py
  13. 2
      manila/tests/fake_network.py
  14. 3
      manila/tests/fake_service_instance.py
  15. 2
      manila/tests/fake_volume.py
  16. 3
      manila/tests/share/drivers/emc/test_driver.py

3
manila/api/urlmap.py

@ -19,7 +19,6 @@ try:
except ImportError:
from urllib2 import parse_http_list # noqa
from oslo_log import log
import paste.urlmap
from manila.api.openstack import wsgi
@ -31,8 +30,6 @@ _option_header_piece_re = re.compile(
r'(?:=\s*([^;]+|%s))?\s*' %
(_quoted_string_re, _quoted_string_re))
LOG = log.getLogger(__name__)
def unquote_header_value(value):
"""Unquotes a header value.

4
manila/api/v1/router.py

@ -19,8 +19,6 @@
WSGI middleware for OpenStack Share API v1.
"""
from oslo_log import log
from manila.api import extensions
import manila.api.openstack
from manila.api.v1 import limits
@ -41,8 +39,6 @@ from manila.api.v2 import services
from manila.api.v2 import share_types
from manila.api import versions
LOG = log.getLogger(__name__)
class APIRouter(manila.api.openstack.APIRouter):
"""Route API requests.

4
manila/api/v1/scheduler_stats.py

@ -12,14 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log
from manila.api.openstack import wsgi
from manila.api.views import scheduler_stats as scheduler_stats_views
from manila.scheduler import rpcapi
LOG = log.getLogger(__name__)
class SchedulerStatsController(wsgi.Controller):
"""The Scheduler Stats API controller for the OpenStack API."""

4
manila/api/v2/router.py

@ -20,8 +20,6 @@
WSGI middleware for OpenStack Share API v2.
"""
from oslo_log import log
from manila.api import extensions
import manila.api.openstack
from manila.api.v1 import limits
@ -45,8 +43,6 @@ from manila.api.v2 import share_types
from manila.api.v2 import shares
from manila.api import versions
LOG = log.getLogger(__name__)
class APIRouter(manila.api.openstack.APIRouter):
"""Route API requests.

3
manila/api/v2/services.py

@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log
import webob.exc
from manila.api.openstack import wsgi
@ -22,8 +21,6 @@ from manila.api.views import services as services_views
from manila import db
from manila import utils
LOG = log.getLogger(__name__)
class ServiceMixin(object):
"""The Services API controller common logic.

5
manila/api/views/cgsnapshots.py

@ -15,14 +15,9 @@
"""The consistency groups snapshot API."""
from oslo_log import log
from manila.api import common
LOG = log.getLogger(__name__)
class CGSnapshotViewBuilder(common.ViewBuilder):
"""Model a cgsnapshot API response as a python dictionary."""

5
manila/api/views/consistency_groups.py

@ -15,14 +15,9 @@
"""The consistency groups API."""
from oslo_log import log
from manila.api import common
LOG = log.getLogger(__name__)
class CGViewBuilder(common.ViewBuilder):
"""Model a consistency group API response as a python dictionary."""

2
manila/network/neutron/neutron_network_plugin.py

@ -15,7 +15,6 @@
# under the License.
from oslo_config import cfg
from oslo_log import log
from manila.common import constants
from manila import exception
@ -41,7 +40,6 @@ neutron_single_network_plugin_opts = [
]
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class NeutronNetworkPlugin(network.NetworkBaseAPI):

2
manila/share/configuration.py

@ -43,10 +43,8 @@ and registered in the group in which they are used.
"""
from oslo_config import cfg
from oslo_log import log
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class Configuration(object):

3
manila/share/drivers/emc/plugins/isilon/isilon_api.py

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log
from oslo_serialization import jsonutils
import requests
import six
@ -21,8 +20,6 @@ import six
from manila import exception
from manila.i18n import _
LOG = log.getLogger(__name__)
class IsilonApi(object):

3
manila/test.py

@ -31,7 +31,6 @@ from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
import oslo_i18n
from oslo_log import log
from oslo_messaging import conffixture as messaging_conffixture
import oslotest.base as base_test
import six
@ -53,8 +52,6 @@ test_opts = [
CONF = cfg.CONF
CONF.register_opts(test_opts)
LOG = log.getLogger(__name__)
_DB_CACHE = None

2
manila/tests/fake_compute.py

@ -15,10 +15,8 @@
from oslo_config import cfg
from oslo_log import log
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class FakeServer(object):

2
manila/tests/fake_network.py

@ -16,10 +16,8 @@
import uuid
from oslo_config import cfg
from oslo_log import log
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class FakeNetwork(object):

3
manila/tests/fake_service_instance.py

@ -13,12 +13,9 @@
# under the License.
import mock
from oslo_log import log
from manila.tests import fake_compute
LOG = log.getLogger(__name__)
class FakeServiceInstanceManager(object):

2
manila/tests/fake_volume.py

@ -15,10 +15,8 @@
from oslo_config import cfg
from oslo_log import log
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class FakeVolume(object):

3
manila/tests/share/drivers/emc/test_driver.py

@ -14,7 +14,6 @@
# under the License.
import mock
from oslo_log import log
from stevedore import extension
from manila import network
@ -23,8 +22,6 @@ from manila.share.drivers.emc import driver as emcdriver
from manila.share.drivers.emc.plugins import base
from manila import test
LOG = log.getLogger(__name__)
class FakeConnection(base.StorageConnection):
def __init__(self, logger):

Loading…
Cancel
Save