from oslo_config import cfg
+from oslo_log import log as logging
import paste.urlmap
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
CONF = cfg.CONF
import urllib
from oslo_config import cfg
+from oslo_log import log as logging
import six.moves.urllib.parse as urlparse
import webob
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import utils
"""
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.api import extensions
-from cinder.openstack.common import log as logging
CONF = cfg.CONF
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from oslo_utils import strutils
import webob
from webob import exc
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import volume
"""The backups api."""
-
+from oslo_log import log as logging
import webob
from webob import exc
from cinder import backup as backupAPI
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
LOG = logging.getLogger(__name__)
"""The cgsnapshots api."""
-
+from oslo_log import log as logging
import webob
from webob import exc
from cinder import consistencygroup as consistencygroupAPI
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
LOG = logging.getLogger(__name__)
"""The consistencygroups api."""
-
+from oslo_log import log as logging
import webob
from webob import exc
from cinder import consistencygroup as consistencygroupAPI
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
LOG = logging.getLogger(__name__)
"""The Extended Snapshot Attributes API extension."""
+from oslo_log import log as logging
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from xml.parsers import expat
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
import webob.exc
from cinder import db
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import api as volume_api
"""The QoS specs extension"""
+from oslo_log import log as logging
from oslo_utils import strutils
import six
import webob
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import utils
from cinder.volume import qos_specs
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import webob.exc
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api.v2 import volumes
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
"""The Scheduler Stats extension"""
+from oslo_log import log as logging
+
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api.views import scheduler_stats as scheduler_stats_view
-from cinder.openstack.common import log as logging
from cinder.scheduler import rpcapi
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
import webob.exc
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
+from cinder.openstack.common import versionutils
from cinder import utils
service = ''
if 'service' in req.GET:
service = req.GET['service']
- LOG.deprecated(_("Query by service parameter is deprecated. "
- "Please use binary parameter instead."))
+ versionutils.report_deprecated_feature(LOG, _(
+ "Query by service parameter is deprecated. "
+ "Please use binary parameter instead."))
binary = ''
if 'binary' in req.GET:
binary = req.GET['binary']
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import webob
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder import db
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# under the License.
+from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_utils import strutils
import webob
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import volume
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder.api import xmlutil
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# under the License.
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import uuidutils
from webob import exc
from cinder.api.v2 import volumes
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import volume as cinder_volume
from cinder.volume import volume_types
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import webob
from webob import exc
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import replication as replicationAPI
from cinder import volume
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import webob
from webob import exc
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import transfer as transferAPI
from cinder import utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import webob
from webob import exc
from cinder.api.openstack import wsgi
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import volume
LOG = logging.getLogger(__name__)
import os
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
import webob.dec
import webob.exc
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
import cinder.policy
import os
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils
import webob.dec
import webob.exc
from cinder.api.openstack import wsgi
from cinder import context
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.openstack.common.middleware import request_id
from cinder import wsgi as base_wsgi
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import webob.dec
import webob.exc
from cinder.api.openstack import wsgi
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi as base_wsgi
from oslo_config import cfg
+from oslo_log import log as logging
import webob.dec
import webob.exc
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import wsgi
WSGI middleware for OpenStack API controllers.
"""
+from oslo_log import log as logging
import routes
from cinder.api.openstack import wsgi
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder import wsgi as base_wsgi
from xml.parsers import expat
from lxml import etree
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import excutils
import six
from cinder import exception
from cinder import i18n
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi
import re
import urllib2
+from oslo_log import log as logging
import paste.urlmap
from cinder.api.openstack import wsgi
-from cinder.openstack.common import log as logging
_quoted_string_re = r'"[^"\\]*(?:\\.[^"\\]*)*"'
WSGI middleware for OpenStack Volume API.
"""
+from oslo_log import log as logging
+
from cinder.api import extensions
import cinder.api.openstack
from cinder.api.v1 import limits
from cinder.api.v1 import volume_metadata
from cinder.api.v1 import volumes
from cinder.api import versions
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
"""The volumes snapshots api."""
+from oslo_log import log as logging
from oslo_utils import strutils
import webob
from webob import exc
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import volume
import ast
+from oslo_log import log as logging
from oslo_utils import uuidutils
import webob
from webob import exc
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import volume as cinder_volume
from cinder.volume import utils as volume_utils
WSGI middleware for OpenStack Volume API.
"""
+from oslo_log import log as logging
+
from cinder.api import extensions
import cinder.api.openstack
from cinder.api.v2 import limits
from cinder.api.v2 import volume_metadata
from cinder.api.v2 import volumes
from cinder.api import versions
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
"""The volumes snapshots api."""
+from oslo_log import log as logging
from oslo_utils import strutils
import webob
from webob import exc
from cinder.api import xmlutil
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import volume
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import common
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import ast
+from oslo_log import log as logging
from oslo_utils import uuidutils
import webob
from webob import exc
from cinder import exception
from cinder.i18n import _, _LI
from cinder.image import glance
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import volume as cinder_volume
from cinder.volume import utils as volume_utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import common
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import common
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import common
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import common
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.api import common
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from eventlet import greenthread
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder.backup import rpcapi as backup_rpcapi
from cinder.db import base
from cinder import exception
from cinder.i18n import _, _LI, _LW
-from cinder.openstack.common import log as logging
import cinder.policy
from cinder import quota
from cinder import utils
import eventlet
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder.backup import driver
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume import utils as volume_utils
import abc
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils
import six
from cinder import exception
from cinder.i18n import _, _LI, _LE, _LW
from cinder import keymgr
-from cinder.openstack.common import log as logging
service_opts = [
cfg.IntOpt('backup_metadata_version', default=2,
import eventlet
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import encodeutils
from oslo_utils import excutils
from oslo_utils import units
from cinder.backup import driver
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
import cinder.volume.drivers.rbd as rbd_driver
import os.path
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.backup import chunkeddriver
from cinder.brick.remotefs import remotefs as remotefs_brick
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import utils
LOG = logging.getLogger(__name__)
import socket
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
import six
from swiftclient import client as swift
from cinder import exception
from cinder.i18n import _
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.backup import driver
from cinder import exception
from cinder.i18n import _LE, _
-from cinder.openstack.common import log as logging
from cinder import utils
LOG = logging.getLogger(__name__)
"""
from oslo_config import cfg
+from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_utils import excutils
from oslo_utils import importutils
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder import manager
-from cinder.openstack.common import log as logging
from cinder import quota
from cinder import rpc
from cinder import utils
from oslo_config import cfg
+from oslo_log import log as logging
import oslo_messaging as messaging
-from cinder.openstack.common import log as logging
from cinder import rpc
"""Exceptions for the Brick library."""
+from oslo_log import log as logging
+
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from oslo_concurrency import lockutils
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
import six
from cinder.brick import exception
from cinder.brick.initiator import linuxscsi
from cinder.brick.remotefs import remotefs
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
S390X = "s390x"
import errno
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from cinder.brick.initiator import linuxscsi
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import re
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from cinder.brick import executor
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import re
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder.brick import exception
from cinder.brick import executor
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
import re
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
import six
from cinder.brick import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import i18n
i18n.enable_lazy()
# Need to register global_opts
from cinder.common import config # noqa
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder import version
def main():
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
LOG = logging.getLogger('cinder.all')
utils.monkey_patch()
warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import i18n
i18n.enable_lazy()
# Need to register global_opts
from cinder.common import config # noqa
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import service
from cinder import utils
objects.register_all()
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
utils.monkey_patch()
rpc.init(CONF)
import eventlet
from oslo_config import cfg
+from oslo_log import log as logging
eventlet.monkey_patch()
# Need to register global_opts
from cinder.common import config # noqa
-from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder import version
def main():
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
utils.monkey_patch()
server = service.Service.create(binary='cinder-backup')
service.serve(server)
from oslo_config import cfg
from oslo_db.sqlalchemy import migration
+from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_utils import uuidutils
from cinder.db.sqlalchemy import api as db_api
from cinder.i18n import _
from cinder.objects import base as objects_base
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import utils
from cinder import version
try:
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
except cfg.ConfigFilesNotFoundError:
cfgfile = CONF.config_file[-1] if CONF.config_file else None
if cfgfile and not os.access(cfgfile, os.R_OK):
warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import i18n
i18n.enable_lazy()
# Need to register global_opts
from cinder.common import config # noqa
-from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder import version
def main():
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
utils.monkey_patch()
server = service.Service.create(binary='cinder-scheduler')
service.serve(server)
warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import i18n
i18n.enable_lazy()
# Need to register global_opts
from cinder.common import config # noqa
-from cinder.openstack.common import log as logging
from cinder import service
from cinder import utils
from cinder import version
objects.register_all()
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
utils.monkey_patch()
launcher = service.get_launcher()
if CONF.enabled_backends:
warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import i18n
i18n.enable_lazy()
from cinder import context
from cinder import db
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import utils
from cinder import version
admin_context = context.get_admin_context()
CONF(sys.argv[1:], project='cinder',
version=version.version_string())
- logging.setup("cinder")
+ logging.setup(CONF, "cinder")
LOG = logging.getLogger("cinder")
rpc.init(CONF)
begin, end = utils.last_completed_audit_period()
import socket
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import netutils
from cinder.i18n import _
CONF = cfg.CONF
+logging.register_options(CONF)
core_opts = [
cfg.StrOpt('api_paste_config',
"""Implementation of paginate query."""
+from oslo_log import log as logging
import sqlalchemy
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from novaclient.v1_1.contrib import assisted_volume_snapshots
from novaclient.v1_1.contrib import list_extensions
from oslo_config import cfg
+from oslo_log import log as logging
from requests import exceptions as request_exceptions
from cinder import context as ctx
from cinder.db import base
from cinder import exception
-from cinder.openstack.common import log as logging
nova_opts = [
cfg.StrOpt('nova_catalog_info',
import functools
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import timeutils
from cinder.db import base
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
import cinder.policy
from cinder import quota
from cinder.scheduler import rpcapi as scheduler_rpcapi
import copy
from oslo_context import context
+from oslo_log import log as logging
from oslo_utils import timeutils
from cinder.i18n import _
from cinder.openstack.common import local
-from cinder.openstack.common import log as logging
from cinder import policy
from oslo_db import exception as db_exc
from oslo_db import options
from oslo_db.sqlalchemy import session as db_session
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import uuidutils
import osprofiler.sqlalchemy
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder.i18n import _, _LW, _LE, _LI
-from cinder.openstack.common import log as logging
CONF = cfg.CONF
# License for the specific language governing permissions and limitations
# under the License.
-
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime, ForeignKey
from sqlalchemy import Integer, MetaData, String, Table
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# under the License.
from migrate import ForeignKeyConstraint
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import MetaData, Integer, String, Table, ForeignKey
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Column, DateTime, Text, Boolean
from sqlalchemy import MetaData, Integer, String, Table, ForeignKey
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import uuid
from migrate import ForeignKeyConstraint
+from oslo_log import log as logging
from sqlalchemy import Integer, MetaData, String, Table
-from cinder.openstack.common import log as logging
-
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
-
+from oslo_log import log as logging
from sqlalchemy import Column
from sqlalchemy import MetaData, String, Table
-from cinder.openstack.common import log as logging
-
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import MetaData, Integer, String, Table
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import Integer, MetaData, String, Table, ForeignKey
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import MetaData, String, Table, ForeignKey
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime, Integer
from sqlalchemy import MetaData, String, Table
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime, ForeignKey
from sqlalchemy import Integer, MetaData, String, Table
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Column, ForeignKey, MetaData, Table
from sqlalchemy import Boolean, DateTime, Integer, String
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import ForeignKey, MetaData, String, Table
from migrate import ForeignKeyConstraint
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import Integer, MetaData, String, Table, ForeignKey
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import datetime
from oslo_config import cfg
+from oslo_log import log as logging
from sqlalchemy import MetaData, Table
from cinder.i18n import _LE, _LI
-from cinder.openstack.common import log as logging
# Get default values via config. The defaults will either
# come from the default values set in the quota option
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Index, MetaData, Table
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Column
from sqlalchemy import MetaData, String, Table
-from cinder.openstack.common import log as logging
-
LOG = logging.getLogger(__name__)
# under the License.
from migrate import ForeignKeyConstraint
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import ForeignKey, MetaData, String, Table
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import datetime
from oslo_config import cfg
+from oslo_log import log as logging
from sqlalchemy import MetaData, Table
from cinder.i18n import _
-from cinder.openstack.common import log as logging
# Get default values via config. The defaults will either
# come from the default values set in the quota option
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Boolean, Column, DateTime, UniqueConstraint
from sqlalchemy import Integer, MetaData, String, Table, ForeignKey
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Column
from sqlalchemy import MetaData, String, Table
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Column, DateTime, Integer
from sqlalchemy import MetaData, String, Table, UniqueConstraint
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from sqlalchemy import Column, MetaData, String, Table
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import datetime
import uuid
+from oslo_log import log as logging
import six
from sqlalchemy import Boolean, Column, DateTime
from sqlalchemy import ForeignKey, MetaData, String, Table
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import sys
from oslo_config import cfg
+from oslo_log import log as logging
import six
import webob.exc
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import os
+from oslo_log import log as logging
# For more information please visit: https://wiki.openstack.org/wiki/TaskFlow
from taskflow.listeners import base
from taskflow.listeners import logging as logging_listener
from taskflow import task
from cinder import exception
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import glanceclient.exc
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import timeutils
import six.moves.urllib.parse as urlparse
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
glance_opts = [
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
from cinder.i18n import _
from cinder.openstack.common import fileutils
from cinder.openstack.common import imageutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import throttling
from cinder.volume import utils as volume_utils
from keystoneclient.auth import identity
from keystoneclient import session
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE
from cinder.keymgr import key as keymgr_key
from cinder.keymgr import key_mgr
-from cinder.openstack.common import log as logging
CONF = cfg.CONF
CONF.import_opt('encryption_auth_url', 'cinder.keymgr.key_mgr', group='keymgr')
import array
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LW
from cinder.keymgr import key
from cinder.keymgr import key_mgr
-from cinder.openstack.common import log as logging
key_mgr_opts = [
from oslo_config import cfg
+from oslo_log import log as logging
import oslo_messaging as messaging
from cinder.db import base
-from cinder.openstack.common import log as logging
from cinder.openstack.common import periodic_task
from cinder.scheduler import rpcapi as scheduler_rpcapi
from cinder import version
import netaddr
from oslo import messaging
+from oslo_log import log as logging
from oslo_utils import timeutils
import six
from cinder.i18n import _, _LE
from cinder import objects
from cinder.objects import fields
-from cinder.openstack.common import log as logging
from cinder.openstack.common import versionutils
from cinder import utils
# under the License.
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import db
from cinder import exception
from cinder import objects
from cinder.objects import base
from cinder.objects import fields
-from cinder.openstack.common import log as logging
from cinder import utils
CONF = cfg.CONF
# under the License.
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import db
from cinder import exception
from cinder import objects
from cinder.objects import base
from cinder.objects import fields
-from cinder.openstack.common import log as logging
from cinder import utils
CONF = cfg.CONF
+++ /dev/null
-# Copyright 2011 OpenStack Foundation.
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-"""OpenStack logging handler.
-
-This module adds to logging functionality by adding the option to specify
-a context object when calling the various log methods. If the context object
-is not specified, default formatting is used. Additionally, an instance uuid
-may be passed as part of the log message, which is intended to make it easier
-for admins to find messages related to a specific instance.
-
-It also allows setting of formatting information through conf.
-
-"""
-
-import copy
-import inspect
-import itertools
-import logging
-import logging.config
-import logging.handlers
-import os
-import socket
-import sys
-import traceback
-
-from oslo.config import cfg
-from oslo.serialization import jsonutils
-from oslo.utils import importutils
-import six
-from six import moves
-
-_PY26 = sys.version_info[0:2] == (2, 6)
-
-from cinder.openstack.common._i18n import _
-from cinder.openstack.common import local
-
-
-_DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
-
-
-common_cli_opts = [
- cfg.BoolOpt('debug',
- short='d',
- default=False,
- help='Print debugging output (set logging level to '
- 'DEBUG instead of default WARNING level).'),
- cfg.BoolOpt('verbose',
- short='v',
- default=False,
- help='Print more verbose output (set logging level to '
- 'INFO instead of default WARNING level).'),
-]
-
-logging_cli_opts = [
- cfg.StrOpt('log-config-append',
- metavar='PATH',
- deprecated_name='log-config',
- help='The name of a logging configuration file. This file '
- 'is appended to any existing logging configuration '
- 'files. For details about logging configuration files, '
- 'see the Python logging module documentation.'),
- cfg.StrOpt('log-format',
- metavar='FORMAT',
- help='DEPRECATED. '
- 'A logging.Formatter log message format string which may '
- 'use any of the available logging.LogRecord attributes. '
- 'This option is deprecated. Please use '
- 'logging_context_format_string and '
- 'logging_default_format_string instead.'),
- cfg.StrOpt('log-date-format',
- default=_DEFAULT_LOG_DATE_FORMAT,
- metavar='DATE_FORMAT',
- help='Format string for %%(asctime)s in log records. '
- 'Default: %(default)s .'),
- cfg.StrOpt('log-file',
- metavar='PATH',
- deprecated_name='logfile',
- help='(Optional) Name of log file to output to. '
- 'If no default is set, logging will go to stdout.'),
- cfg.StrOpt('log-dir',
- deprecated_name='logdir',
- help='(Optional) The base directory used for relative '
- '--log-file paths.'),
- cfg.BoolOpt('use-syslog',
- default=False,
- help='Use syslog for logging. '
- 'Existing syslog format is DEPRECATED during I, '
- 'and will change in J to honor RFC5424.'),
- cfg.BoolOpt('use-syslog-rfc-format',
- # TODO(bogdando) remove or use True after existing
- # syslog format deprecation in J
- default=False,
- help='(Optional) Enables or disables syslog rfc5424 format '
- 'for logging. If enabled, prefixes the MSG part of the '
- 'syslog message with APP-NAME (RFC5424). The '
- 'format without the APP-NAME is deprecated in I, '
- 'and will be removed in J.'),
- cfg.StrOpt('syslog-log-facility',
- default='LOG_USER',
- help='Syslog facility to receive log lines.')
-]
-
-generic_log_opts = [
- cfg.BoolOpt('use_stderr',
- default=True,
- help='Log output to standard error.')
-]
-
-DEFAULT_LOG_LEVELS = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN',
- 'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO',
- 'oslo.messaging=INFO', 'iso8601=WARN',
- 'requests.packages.urllib3.connectionpool=WARN',
- 'urllib3.connectionpool=WARN', 'websocket=WARN',
- "keystonemiddleware=WARN", "routes.middleware=WARN",
- "stevedore=WARN"]
-
-log_opts = [
- cfg.StrOpt('logging_context_format_string',
- default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s '
- '%(name)s [%(request_id)s %(user_identity)s] '
- '%(instance)s%(message)s',
- help='Format string to use for log messages with context.'),
- cfg.StrOpt('logging_default_format_string',
- default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s '
- '%(name)s [-] %(instance)s%(message)s',
- help='Format string to use for log messages without context.'),
- cfg.StrOpt('logging_debug_format_suffix',
- default='%(funcName)s %(pathname)s:%(lineno)d',
- help='Data to append to log format when level is DEBUG.'),
- cfg.StrOpt('logging_exception_prefix',
- default='%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s '
- '%(instance)s',
- help='Prefix each line of exception output with this format.'),
- cfg.ListOpt('default_log_levels',
- default=DEFAULT_LOG_LEVELS,
- help='List of logger=LEVEL pairs.'),
- cfg.BoolOpt('publish_errors',
- default=False,
- help='Enables or disables publication of error events.'),
- cfg.BoolOpt('fatal_deprecations',
- default=False,
- help='Enables or disables fatal status of deprecations.'),
-
- # NOTE(mikal): there are two options here because sometimes we are handed
- # a full instance (and could include more information), and other times we
- # are just handed a UUID for the instance.
- cfg.StrOpt('instance_format',
- default='[instance: %(uuid)s] ',
- help='The format for an instance that is passed with the log '
- 'message.'),
- cfg.StrOpt('instance_uuid_format',
- default='[instance: %(uuid)s] ',
- help='The format for an instance UUID that is passed with the '
- 'log message.'),
-]
-
-CONF = cfg.CONF
-CONF.register_cli_opts(common_cli_opts)
-CONF.register_cli_opts(logging_cli_opts)
-CONF.register_opts(generic_log_opts)
-CONF.register_opts(log_opts)
-
-
-def list_opts():
- """Entry point for oslo.config-generator."""
- return [(None, copy.deepcopy(common_cli_opts)),
- (None, copy.deepcopy(logging_cli_opts)),
- (None, copy.deepcopy(generic_log_opts)),
- (None, copy.deepcopy(log_opts)),
- ]
-
-
-# our new audit level
-# NOTE(jkoelker) Since we synthesized an audit level, make the logging
-# module aware of it so it acts like other levels.
-logging.AUDIT = logging.INFO + 1
-logging.addLevelName(logging.AUDIT, 'AUDIT')
-
-
-try:
- NullHandler = logging.NullHandler
-except AttributeError: # NOTE(jkoelker) NullHandler added in Python 2.7
- class NullHandler(logging.Handler):
- def handle(self, record):
- pass
-
- def emit(self, record):
- pass
-
- def createLock(self):
- self.lock = None
-
-
-def _dictify_context(context):
- if context is None:
- return None
- if not isinstance(context, dict) and getattr(context, 'to_dict', None):
- context = context.to_dict()
- return context
-
-
-def _get_binary_name():
- return os.path.basename(inspect.stack()[-1][1])
-
-
-def _get_log_file_path(binary=None):
- logfile = CONF.log_file
- logdir = CONF.log_dir
-
- if logfile and not logdir:
- return logfile
-
- if logfile and logdir:
- return os.path.join(logdir, logfile)
-
- if logdir:
- binary = binary or _get_binary_name()
- return '%s.log' % (os.path.join(logdir, binary),)
-
- return None
-
-
-class BaseLoggerAdapter(logging.LoggerAdapter):
-
- def audit(self, msg, *args, **kwargs):
- self.log(logging.AUDIT, msg, *args, **kwargs)
-
- def isEnabledFor(self, level):
- if _PY26:
- # This method was added in python 2.7 (and it does the exact
- # same logic, so we need to do the exact same logic so that
- # python 2.6 has this capability as well).
- return self.logger.isEnabledFor(level)
- else:
- return super(BaseLoggerAdapter, self).isEnabledFor(level)
-
-
-class LazyAdapter(BaseLoggerAdapter):
- def __init__(self, name='unknown', version='unknown'):
- self._logger = None
- self.extra = {}
- self.name = name
- self.version = version
-
- @property
- def logger(self):
- if not self._logger:
- self._logger = getLogger(self.name, self.version)
- if six.PY3:
- # In Python 3, the code fails because the 'manager' attribute
- # cannot be found when using a LoggerAdapter as the
- # underlying logger. Work around this issue.
- self._logger.manager = self._logger.logger.manager
- return self._logger
-
-
-class ContextAdapter(BaseLoggerAdapter):
- warn = logging.LoggerAdapter.warning
-
- def __init__(self, logger, project_name, version_string):
- self.logger = logger
- self.project = project_name
- self.version = version_string
- self._deprecated_messages_sent = dict()
-
- @property
- def handlers(self):
- return self.logger.handlers
-
- def deprecated(self, msg, *args, **kwargs):
- """Call this method when a deprecated feature is used.
-
- If the system is configured for fatal deprecations then the message
- is logged at the 'critical' level and :class:`DeprecatedConfig` will
- be raised.
-
- Otherwise, the message will be logged (once) at the 'warn' level.
-
- :raises: :class:`DeprecatedConfig` if the system is configured for
- fatal deprecations.
-
- """
- stdmsg = _("Deprecated: %s") % msg
- if CONF.fatal_deprecations:
- self.critical(stdmsg, *args, **kwargs)
- raise DeprecatedConfig(msg=stdmsg)
-
- # Using a list because a tuple with dict can't be stored in a set.
- sent_args = self._deprecated_messages_sent.setdefault(msg, list())
-
- if args in sent_args:
- # Already logged this message, so don't log it again.
- return
-
- sent_args.append(args)
- self.warn(stdmsg, *args, **kwargs)
-
- def process(self, msg, kwargs):
- # NOTE(jecarey): If msg is not unicode, coerce it into unicode
- # before it can get to the python logging and
- # possibly cause string encoding trouble
- if not isinstance(msg, six.text_type):
- msg = six.text_type(msg)
-
- if 'extra' not in kwargs:
- kwargs['extra'] = {}
- extra = kwargs['extra']
-
- context = kwargs.pop('context', None)
- if not context:
- context = getattr(local.store, 'context', None)
- if context:
- extra.update(_dictify_context(context))
-
- instance = kwargs.pop('instance', None)
- instance_uuid = (extra.get('instance_uuid') or
- kwargs.pop('instance_uuid', None))
- instance_extra = ''
- if instance:
- instance_extra = CONF.instance_format % instance
- elif instance_uuid:
- instance_extra = (CONF.instance_uuid_format
- % {'uuid': instance_uuid})
- extra['instance'] = instance_extra
-
- extra.setdefault('user_identity', kwargs.pop('user_identity', None))
-
- extra['project'] = self.project
- extra['version'] = self.version
- extra['extra'] = extra.copy()
- return msg, kwargs
-
-
-class JSONFormatter(logging.Formatter):
- def __init__(self, fmt=None, datefmt=None):
- # NOTE(jkoelker) we ignore the fmt argument, but its still there
- # since logging.config.fileConfig passes it.
- self.datefmt = datefmt
-
- def formatException(self, ei, strip_newlines=True):
- lines = traceback.format_exception(*ei)
- if strip_newlines:
- lines = [moves.filter(
- lambda x: x,
- line.rstrip().splitlines()) for line in lines]
- lines = list(itertools.chain(*lines))
- return lines
-
- def format(self, record):
- message = {'message': record.getMessage(),
- 'asctime': self.formatTime(record, self.datefmt),
- 'name': record.name,
- 'msg': record.msg,
- 'args': record.args,
- 'levelname': record.levelname,
- 'levelno': record.levelno,
- 'pathname': record.pathname,
- 'filename': record.filename,
- 'module': record.module,
- 'lineno': record.lineno,
- 'funcname': record.funcName,
- 'created': record.created,
- 'msecs': record.msecs,
- 'relative_created': record.relativeCreated,
- 'thread': record.thread,
- 'thread_name': record.threadName,
- 'process_name': record.processName,
- 'process': record.process,
- 'traceback': None}
-
- if hasattr(record, 'extra'):
- message['extra'] = record.extra
-
- if record.exc_info:
- message['traceback'] = self.formatException(record.exc_info)
-
- return jsonutils.dumps(message)
-
-
-def _create_logging_excepthook(product_name):
- def logging_excepthook(exc_type, value, tb):
- extra = {'exc_info': (exc_type, value, tb)}
- getLogger(product_name).critical(
- "".join(traceback.format_exception_only(exc_type, value)),
- **extra)
- return logging_excepthook
-
-
-class LogConfigError(Exception):
-
- message = _('Error loading logging config %(log_config)s: %(err_msg)s')
-
- def __init__(self, log_config, err_msg):
- self.log_config = log_config
- self.err_msg = err_msg
-
- def __str__(self):
- return self.message % dict(log_config=self.log_config,
- err_msg=self.err_msg)
-
-
-def _load_log_config(log_config_append):
- try:
- logging.config.fileConfig(log_config_append,
- disable_existing_loggers=False)
- except (moves.configparser.Error, KeyError) as exc:
- raise LogConfigError(log_config_append, six.text_type(exc))
-
-
-def setup(product_name, version='unknown'):
- """Setup logging."""
- if CONF.log_config_append:
- _load_log_config(CONF.log_config_append)
- else:
- _setup_logging_from_conf(product_name, version)
- sys.excepthook = _create_logging_excepthook(product_name)
-
-
-def set_defaults(logging_context_format_string=None,
- default_log_levels=None):
- # Just in case the caller is not setting the
- # default_log_level. This is insurance because
- # we introduced the default_log_level parameter
- # later in a backwards in-compatible change
- if default_log_levels is not None:
- cfg.set_defaults(
- log_opts,
- default_log_levels=default_log_levels)
- if logging_context_format_string is not None:
- cfg.set_defaults(
- log_opts,
- logging_context_format_string=logging_context_format_string)
-
-
-def _find_facility_from_conf():
- facility_names = logging.handlers.SysLogHandler.facility_names
- facility = getattr(logging.handlers.SysLogHandler,
- CONF.syslog_log_facility,
- None)
-
- if facility is None and CONF.syslog_log_facility in facility_names:
- facility = facility_names.get(CONF.syslog_log_facility)
-
- if facility is None:
- valid_facilities = facility_names.keys()
- consts = ['LOG_AUTH', 'LOG_AUTHPRIV', 'LOG_CRON', 'LOG_DAEMON',
- 'LOG_FTP', 'LOG_KERN', 'LOG_LPR', 'LOG_MAIL', 'LOG_NEWS',
- 'LOG_AUTH', 'LOG_SYSLOG', 'LOG_USER', 'LOG_UUCP',
- 'LOG_LOCAL0', 'LOG_LOCAL1', 'LOG_LOCAL2', 'LOG_LOCAL3',
- 'LOG_LOCAL4', 'LOG_LOCAL5', 'LOG_LOCAL6', 'LOG_LOCAL7']
- valid_facilities.extend(consts)
- raise TypeError(_('syslog facility must be one of: %s') %
- ', '.join("'%s'" % fac
- for fac in valid_facilities))
-
- return facility
-
-
-class RFCSysLogHandler(logging.handlers.SysLogHandler):
- def __init__(self, *args, **kwargs):
- self.binary_name = _get_binary_name()
- # Do not use super() unless type(logging.handlers.SysLogHandler)
- # is 'type' (Python 2.7).
- # Use old style calls, if the type is 'classobj' (Python 2.6)
- logging.handlers.SysLogHandler.__init__(self, *args, **kwargs)
-
- def format(self, record):
- # Do not use super() unless type(logging.handlers.SysLogHandler)
- # is 'type' (Python 2.7).
- # Use old style calls, if the type is 'classobj' (Python 2.6)
- msg = logging.handlers.SysLogHandler.format(self, record)
- msg = self.binary_name + ' ' + msg
- return msg
-
-
-def _setup_logging_from_conf(project, version):
- log_root = getLogger(None).logger
- for handler in log_root.handlers:
- log_root.removeHandler(handler)
-
- logpath = _get_log_file_path()
- if logpath:
- filelog = logging.handlers.WatchedFileHandler(logpath)
- log_root.addHandler(filelog)
-
- if CONF.use_stderr:
- streamlog = ColorHandler()
- log_root.addHandler(streamlog)
-
- elif not logpath:
- # pass sys.stdout as a positional argument
- # python2.6 calls the argument strm, in 2.7 it's stream
- streamlog = logging.StreamHandler(sys.stdout)
- log_root.addHandler(streamlog)
-
- if CONF.publish_errors:
- handler = importutils.import_object(
- "oslo.messaging.notify.log_handler.PublishErrorsHandler",
- logging.ERROR)
- log_root.addHandler(handler)
-
- datefmt = CONF.log_date_format
- for handler in log_root.handlers:
- # NOTE(alaski): CONF.log_format overrides everything currently. This
- # should be deprecated in favor of context aware formatting.
- if CONF.log_format:
- handler.setFormatter(logging.Formatter(fmt=CONF.log_format,
- datefmt=datefmt))
- log_root.info('Deprecated: log_format is now deprecated and will '
- 'be removed in the next release')
- else:
- handler.setFormatter(ContextFormatter(project=project,
- version=version,
- datefmt=datefmt))
-
- if CONF.debug:
- log_root.setLevel(logging.DEBUG)
- elif CONF.verbose:
- log_root.setLevel(logging.INFO)
- else:
- log_root.setLevel(logging.WARNING)
-
- for pair in CONF.default_log_levels:
- mod, _sep, level_name = pair.partition('=')
- logger = logging.getLogger(mod)
- # NOTE(AAzza) in python2.6 Logger.setLevel doesn't convert string name
- # to integer code.
- if sys.version_info < (2, 7):
- level = logging.getLevelName(level_name)
- logger.setLevel(level)
- else:
- logger.setLevel(level_name)
-
- if CONF.use_syslog:
- try:
- facility = _find_facility_from_conf()
- # TODO(bogdando) use the format provided by RFCSysLogHandler
- # after existing syslog format deprecation in J
- if CONF.use_syslog_rfc_format:
- syslog = RFCSysLogHandler(address='/dev/log',
- facility=facility)
- else:
- syslog = logging.handlers.SysLogHandler(address='/dev/log',
- facility=facility)
- log_root.addHandler(syslog)
- except socket.error:
- log_root.error('Unable to add syslog handler. Verify that syslog '
- 'is running.')
-
-
-_loggers = {}
-
-
-def getLogger(name='unknown', version='unknown'):
- if name not in _loggers:
- _loggers[name] = ContextAdapter(logging.getLogger(name),
- name,
- version)
- return _loggers[name]
-
-
-def getLazyLogger(name='unknown', version='unknown'):
- """Returns lazy logger.
-
- Creates a pass-through logger that does not create the real logger
- until it is really needed and delegates all calls to the real logger
- once it is created.
- """
- return LazyAdapter(name, version)
-
-
-class WritableLogger(object):
- """A thin wrapper that responds to `write` and logs."""
-
- def __init__(self, logger, level=logging.INFO):
- self.logger = logger
- self.level = level
-
- def write(self, msg):
- self.logger.log(self.level, msg.rstrip())
-
-
-class ContextFormatter(logging.Formatter):
- """A context.RequestContext aware formatter configured through flags.
-
- The flags used to set format strings are: logging_context_format_string
- and logging_default_format_string. You can also specify
- logging_debug_format_suffix to append extra formatting if the log level is
- debug.
-
- For information about what variables are available for the formatter see:
- http://docs.python.org/library/logging.html#formatter
-
- If available, uses the context value stored in TLS - local.store.context
-
- """
-
- def __init__(self, *args, **kwargs):
- """Initialize ContextFormatter instance
-
- Takes additional keyword arguments which can be used in the message
- format string.
-
- :keyword project: project name
- :type project: string
- :keyword version: project version
- :type version: string
-
- """
-
- self.project = kwargs.pop('project', 'unknown')
- self.version = kwargs.pop('version', 'unknown')
-
- logging.Formatter.__init__(self, *args, **kwargs)
-
- def format(self, record):
- """Uses contextstring if request_id is set, otherwise default."""
-
- # NOTE(jecarey): If msg is not unicode, coerce it into unicode
- # before it can get to the python logging and
- # possibly cause string encoding trouble
- if not isinstance(record.msg, six.text_type):
- record.msg = six.text_type(record.msg)
-
- # store project info
- record.project = self.project
- record.version = self.version
-
- # store request info
- context = getattr(local.store, 'context', None)
- if context:
- d = _dictify_context(context)
- for k, v in d.items():
- setattr(record, k, v)
-
- # NOTE(sdague): default the fancier formatting params
- # to an empty string so we don't throw an exception if
- # they get used
- for key in ('instance', 'color', 'user_identity'):
- if key not in record.__dict__:
- record.__dict__[key] = ''
-
- if record.__dict__.get('request_id'):
- fmt = CONF.logging_context_format_string
- else:
- fmt = CONF.logging_default_format_string
-
- if (record.levelno == logging.DEBUG and
- CONF.logging_debug_format_suffix):
- fmt += " " + CONF.logging_debug_format_suffix
-
- if sys.version_info < (3, 2):
- self._fmt = fmt
- else:
- self._style = logging.PercentStyle(fmt)
- self._fmt = self._style._fmt
- # Cache this on the record, Logger will respect our formatted copy
- if record.exc_info:
- record.exc_text = self.formatException(record.exc_info, record)
- return logging.Formatter.format(self, record)
-
- def formatException(self, exc_info, record=None):
- """Format exception output with CONF.logging_exception_prefix."""
- if not record:
- return logging.Formatter.formatException(self, exc_info)
-
- stringbuffer = moves.StringIO()
- traceback.print_exception(exc_info[0], exc_info[1], exc_info[2],
- None, stringbuffer)
- lines = stringbuffer.getvalue().split('\n')
- stringbuffer.close()
-
- if CONF.logging_exception_prefix.find('%(asctime)') != -1:
- record.asctime = self.formatTime(record, self.datefmt)
-
- formatted_lines = []
- for line in lines:
- pl = CONF.logging_exception_prefix % record.__dict__
- fl = '%s%s' % (pl, line)
- formatted_lines.append(fl)
- return '\n'.join(formatted_lines)
-
-
-class ColorHandler(logging.StreamHandler):
- LEVEL_COLORS = {
- logging.DEBUG: '\033[00;32m', # GREEN
- logging.INFO: '\033[00;36m', # CYAN
- logging.AUDIT: '\033[01;36m', # BOLD CYAN
- logging.WARN: '\033[01;33m', # BOLD YELLOW
- logging.ERROR: '\033[01;31m', # BOLD RED
- logging.CRITICAL: '\033[01;31m', # BOLD RED
- }
-
- def format(self, record):
- record.color = self.LEVEL_COLORS[record.levelno]
- return logging.StreamHandler.format(self, record)
-
-
-class DeprecatedConfig(Exception):
- message = _("Fatal call to deprecated config: %(msg)s")
-
- def __init__(self, msg):
- super(Exception, self).__init__(self.message % dict(msg=msg))
+++ /dev/null
-# Copyright 2013 IBM Corp.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-import logging
-
-from oslo.config import cfg
-
-from cinder import rpc
-
-
-class PublishErrorsHandler(logging.Handler):
- def emit(self, record):
- # NOTE(flaper87): This will have to be changed in the
- # future. Leaving for backwar compatibility
- if ('cinder.openstack.common.notifier.log_notifier' in
- cfg.CONF.notification_driver):
- return
- msg = record.getMessage()
- rpc.get_notifier('error.publisher').error(None, 'error_notification',
- dict(error=msg))
import datetime
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import timeutils
from cinder import db
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
+from cinder.openstack.common import versionutils
LOG = logging.getLogger(__name__)
for resource in resources.values():
if resource.name not in default_quotas:
- LOG.deprecated(_("Default quota for resource: %(res)s is set "
- "by the default quota flag: quota_%(res)s, "
- "it is now deprecated. Please use the "
- "default quota class for default "
- "quota.") % {'res': resource.name})
+ versionutils.report_deprecated_feature(LOG, _(
+ "Default quota for resource: %(res)s is set "
+ "by the default quota flag: quota_%(res)s, "
+ "it is now deprecated. Please use the "
+ "default quota class for default "
+ "quota.") % {'res': resource.name})
quotas[resource.name] = default_quotas.get(resource.name,
resource.default)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import quota
import functools
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.db import base
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import policy
from cinder import volume as cinder_volume
from cinder.volume import rpcapi as volume_rpcapi
"""
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.scheduler import driver
from cinder.scheduler import scheduler_options
from cinder.volume import utils
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
+from oslo_log import log as logging
from oslo_utils import uuidutils
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import filters
from cinder.volume import api as volume
import math
+from oslo_log import log as logging
+
from cinder.i18n import _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import filters
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import six
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import filters
from cinder.scheduler.evaluator import evaluator
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
+from oslo_log import log as logging
from oslo_utils import uuidutils
from cinder.compute import nova
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import filters
from cinder.volume import utils as volume_utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from oslo_utils import excutils
import taskflow.engines
from taskflow.patterns import linear_flow
from cinder import exception
from cinder import flow_utils
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import utils
from cinder.volume.flows import common
import UserDict
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
from cinder import db
from cinder import exception
from cinder.i18n import _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import filters
from cinder.openstack.common.scheduler import weights
from cinder import utils
"""
from oslo_config import cfg
+from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_utils import excutils
from oslo_utils import importutils
from cinder import flow_utils
from cinder.i18n import _, _LE
from cinder import manager
-from cinder.openstack.common import log as logging
+from cinder.openstack.common import versionutils
from cinder import quota
from cinder import rpc
from cinder.scheduler.flows import create_volume
'cinder.scheduler.simple.SimpleScheduler']:
scheduler_driver = ('cinder.scheduler.filter_scheduler.'
'FilterScheduler')
- LOG.deprecated(_('ChanceScheduler and SimpleScheduler have been '
- 'deprecated due to lack of support for advanced '
- 'features like: volume types, volume encryption,'
- ' QoS etc. These two schedulers can be fully '
- 'replaced by FilterScheduler with certain '
- 'combination of filters and weighers.'))
+ versionutils.report_deprecated_feature(LOG, _(
+ 'ChanceScheduler and SimpleScheduler have been '
+ 'deprecated due to lack of support for advanced '
+ 'features like: volume types, volume encryption,'
+ ' QoS etc. These two schedulers can be fully '
+ 'replaced by FilterScheduler with certain '
+ 'combination of filters and weighers.'))
self.driver = importutils.import_object(scheduler_driver)
super(SchedulerManager, self).__init__(*args, **kwargs)
import os
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
scheduler_json_config_location_opt = cfg.StrOpt(
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import six
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import weights
from cinder.scheduler.evaluator import evaluator
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import db
-from cinder.openstack.common import log as logging
from cinder.openstack.common.scheduler import weights
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_db import exception as db_exc
+from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_utils import importutils
import osprofiler.notifier
from cinder import exception
from cinder.i18n import _
from cinder.objects import base as objects_base
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.openstack.common import service
from cinder import rpc
from eventlet import pools
from oslo_config import cfg
+from oslo_log import log as logging
import paramiko
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_config import fixture as config_fixture
+from oslo_log import log
from oslo_messaging import conffixture as messaging_conffixture
from oslo_utils import strutils
from oslo_utils import timeutils
from cinder.db.sqlalchemy import api as sqla_api
from cinder import i18n
from cinder import objects
-from cinder.openstack.common import log as oslo_logging
from cinder import rpc
from cinder import service
from cinder.tests import conf_fixture
CONF = cfg.CONF
CONF.register_opts(test_opts)
-LOG = oslo_logging.getLogger(__name__)
+LOG = log.getLogger(__name__)
_DB_CACHE = None
from xml.dom import minidom
import mock
+from oslo_log import log as logging
from oslo_utils import timeutils
import webob
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.api import fakes
from cinder.tests import utils
from xml.dom import minidom
import mock
+from oslo_log import log as logging
import webob
from cinder.consistencygroup import api as consistencygroupAPI
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.api import fakes
from cinder.tests import utils
import datetime
from lxml import etree
+from oslo_log import log as logging
from oslo_utils import timeutils
import webob.exc
from cinder.api.contrib import hosts as os_hosts
from cinder import context
from cinder import db
-from cinder.openstack.common import log as logging
from cinder import test
import json
from xml.dom import minidom
+from oslo_log import log as logging
import webob
from cinder.api.contrib import volume_transfer
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.api import fakes
from cinder import transfer
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from cinder.api.openstack import wsgi
from cinder.api.v1 import router
from cinder.api.v1 import snapshots
from cinder.api.v1 import volumes
from cinder.api import versions
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.api import fakes
from lxml import etree
import mock
+from oslo_log import log as logging
import webob
from cinder.api.v1 import snapshots
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.api import fakes
from cinder.tests.api.v1 import stubs
from lxml import etree
import mock
+from oslo_log import log as logging
import webob
from cinder.api.v2 import snapshots
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.api import fakes
from cinder.tests.api.v2 import stubs
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.backup.drivers import nfs
from cinder.brick.remotefs import remotefs as remotefs_brick
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.backup import driver
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.backup import driver
-from cinder.openstack.common import log as logging
from cinder.tests.backup import fake_service
LOG = logging.getLogger(__name__)
import socket
import zlib
+from oslo_log import log as logging
from swiftclient import client as swift
-from cinder.openstack.common import log as logging
-
LOG = logging.getLogger(__name__)
import socket
import tempfile
+from oslo_log import log as logging
from swiftclient import client as swift
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
LOG = logging.getLogger(__name__)
import mock
from oslo_concurrency import processutils as putils
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.brick import exception
from cinder.brick.initiator import connector
from cinder.brick.initiator import host_driver
from cinder.brick.initiator import linuxfc
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import test
import os.path
import string
+from oslo_log import log as logging
+
from cinder.brick.initiator import linuxfc
-from cinder.openstack.common import log as logging
from cinder import test
LOG = logging.getLogger(__name__)
import os.path
import string
+from oslo_log import log as logging
+
from cinder.brick.initiator import linuxscsi
-from cinder.openstack.common import log as logging
from cinder import test
LOG = logging.getLogger(__name__)
import mox
from oslo_concurrency import processutils
+from oslo_log import log as logging
from cinder.brick import exception
from cinder.brick.local_dev import lvm as brick
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
import mock
import mox
+from oslo_log import log as logging
from cinder.brick import exception
from cinder.brick.remotefs import remotefs
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
LOG = logging.getLogger(__name__)
import datetime
import uuid
+from oslo_log import log as logging
+
from cinder import context
from cinder import db
from cinder.db.sqlalchemy import api as db_api
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from oslo_db.sqlalchemy import utils as sqlalchemyutils
import time
+from oslo_log import log as logging
+
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import volume_types
"""Tests for transfers table."""
+from oslo_log import log as logging
+
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
from cinder.tests.brick import fake_lvm
from cinder.volume import driver
from cinder.volume.drivers import lvm
from eventlet import greenthread
from oslo_concurrency import processutils
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder import utils
LOG = logging.getLogger(__name__)
import datetime
import uuid
+from oslo_log import log as logging
+
from cinder import exception
import cinder.image.glance
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import netutils
import requests
import six.moves.urllib.parse as urlparse
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import uuid
import fixtures
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder import service
from cinder import test # For the flags
from cinder.tests.integrated.api import client
from oslo_config import cfg
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder.tests.integrated import integrated_helpers
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder.tests.integrated import integrated_helpers
import time
+from oslo_log import log as logging
import testtools
-from cinder.openstack.common import log as logging
from cinder import service
from cinder.tests import fake_driver
from cinder.tests.integrated.api import client
# under the License.
from lxml import etree
+from oslo_log import log as logging
from cinder.api import common
-from cinder.openstack.common import log as logging
from cinder.tests.integrated import integrated_helpers
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import context
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.scheduler import driver
from cinder.scheduler import filter_scheduler
from cinder.scheduler import manager
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import timeutils
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.backup import fake_service_with_verify as fake_service
import mock
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_serialization import jsonutils
import six
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers import rbd as rbddriver
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from swiftclient import client as swift
from cinder.backup.drivers import swift as swift_dr
from cinder import db
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.backup import fake_swift_client
from cinder.tests.backup import fake_swift_client2
import posix
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from cinder.backup.drivers import tsm
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
@mock.patch('cinder.service.process_launcher')
@mock.patch('cinder.rpc.init')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.setup')
def test_main(self, log_setup, monkey_patch, rpc_init, process_launcher,
wsgi_service):
launcher = process_launcher.return_value
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
monkey_patch.assert_called_once_with()
rpc_init.assert_called_once_with(CONF)
process_launcher.assert_called_once_with()
@mock.patch('cinder.service.serve')
@mock.patch('cinder.service.Service.create')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.setup')
def test_main(self, log_setup, monkey_patch, service_create, service_serve,
service_wait):
server = service_create.return_value
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
monkey_patch.assert_called_once_with()
service_create.assert_called_once_with(binary='cinder-backup')
service_serve.assert_called_once_with(server)
@mock.patch('cinder.service.WSGIService')
@mock.patch('cinder.service.process_launcher')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
def test_main(self, log_setup, get_logger, monkey_patch, process_launcher,
wsgi_service, service_create):
launcher = process_launcher.return_value
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder.all')
monkey_patch.assert_called_once_with()
process_launcher.assert_called_once_with()
@mock.patch('cinder.service.WSGIService')
@mock.patch('cinder.service.process_launcher')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
def test_main_load_osapi_volume_exception(self, log_setup, get_logger,
monkey_patch, process_launcher,
wsgi_service, service_create):
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder.all')
monkey_patch.assert_called_once_with()
process_launcher.assert_called_once_with()
@mock.patch('cinder.service.WSGIService')
@mock.patch('cinder.service.process_launcher')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
def test_main_load_binary_exception(self, log_setup, get_logger,
monkey_patch, process_launcher,
wsgi_service, service_create):
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder.all')
monkey_patch.assert_called_once_with()
process_launcher.assert_called_once_with()
@mock.patch('cinder.service.serve')
@mock.patch('cinder.service.Service.create')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.setup')
def test_main(self, log_setup, monkey_patch, service_create,
service_serve, service_wait):
server = service_create.return_value
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
monkey_patch.assert_called_once_with()
service_create.assert_called_once_with(binary='cinder-scheduler')
service_serve.assert_called_once_with(server)
@mock.patch('cinder.service.get_launcher')
@mock.patch('cinder.service.Service.create')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.setup')
def test_main(self, log_setup, monkey_patch, service_create,
get_launcher):
CONF.set_override('enabled_backends', None)
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
monkey_patch.assert_called_once_with()
get_launcher.assert_called_once_with()
service_create.assert_called_once_with(binary='cinder-volume')
@mock.patch('cinder.service.get_launcher')
@mock.patch('cinder.service.Service.create')
@mock.patch('cinder.utils.monkey_patch')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.setup')
def test_main_with_backends(self, log_setup, monkey_patch, service_create,
get_launcher):
backends = ['backend1', 'backend2']
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
monkey_patch.assert_called_once_with()
get_launcher.assert_called_once_with()
self.assertEqual(len(backends), service_create.call_count)
self.assertEqual(exit.code, 2)
@mock.patch('oslo_config.cfg.ConfigOpts.__call__')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.setup')
@mock.patch('oslo_config.cfg.ConfigOpts.register_cli_opt')
def test_main_sudo_failed(self, register_cli_opt, log_setup,
config_opts_call):
@mock.patch('cinder.utils.last_completed_audit_period')
@mock.patch('cinder.rpc.init')
@mock.patch('cinder.version.version_string')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
@mock.patch('cinder.context.get_admin_context')
def test_main_time_error(self, get_admin_context, log_setup, get_logger,
version_string, rpc_init,
get_admin_context.assert_called_once_with()
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder')
self.assertEqual(exit.code, -1)
rpc_init.assert_called_once_with(CONF)
@mock.patch('cinder.utils.last_completed_audit_period')
@mock.patch('cinder.rpc.init')
@mock.patch('cinder.version.version_string')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
@mock.patch('cinder.context.get_admin_context')
def test_main_send_create_volume_error(self, get_admin_context, log_setup,
get_logger, version_string,
get_admin_context.assert_called_once_with()
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder')
rpc_init.assert_called_once_with(CONF)
last_completed_audit_period.assert_called_once_with()
@mock.patch('cinder.utils.last_completed_audit_period')
@mock.patch('cinder.rpc.init')
@mock.patch('cinder.version.version_string')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
@mock.patch('cinder.context.get_admin_context')
def test_main_send_delete_volume_error(self, get_admin_context, log_setup,
get_logger, version_string,
get_admin_context.assert_called_once_with()
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder')
rpc_init.assert_called_once_with(CONF)
last_completed_audit_period.assert_called_once_with()
@mock.patch('cinder.utils.last_completed_audit_period')
@mock.patch('cinder.rpc.init')
@mock.patch('cinder.version.version_string')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
@mock.patch('cinder.context.get_admin_context')
def test_main_send_snapshot_error(self, get_admin_context,
log_setup, get_logger,
get_admin_context.assert_called_once_with()
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder')
rpc_init.assert_called_once_with(CONF)
last_completed_audit_period.assert_called_once_with()
@mock.patch('cinder.utils.last_completed_audit_period')
@mock.patch('cinder.rpc.init')
@mock.patch('cinder.version.version_string')
- @mock.patch('cinder.openstack.common.log.getLogger')
- @mock.patch('cinder.openstack.common.log.setup')
+ @mock.patch('oslo_log.log.getLogger')
+ @mock.patch('oslo_log.log.setup')
@mock.patch('cinder.context.get_admin_context')
def test_main(self, get_admin_context, log_setup, get_logger,
version_string, rpc_init, last_completed_audit_period,
get_admin_context.assert_called_once_with()
self.assertEqual(CONF.project, 'cinder')
self.assertEqual(CONF.version, version.version_string())
- log_setup.assert_called_once_with("cinder")
+ log_setup.assert_called_once_with(CONF, "cinder")
get_logger.assert_called_once_with('cinder')
rpc_init.assert_called_once_with(CONF)
last_completed_audit_period.assert_called_once_with()
import mock
import mox
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import units
from cinder.brick.initiator import connector
from cinder import exception
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
from cinder.volume import configuration as conf
# under the License.
import mock
+from oslo_log import log as logging
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers.dell import dell_storagecenter_api
from cinder.volume.drivers.dell import dell_storagecenter_fc
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers.dell import dell_storagecenter_api
from cinder.volume.drivers.dell import dell_storagecenter_iscsi
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
+
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers.dell import dell_storagecenter_api
import collections
import mock
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import timeutils
from cinder import context
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from xml.dom import minidom
import mock
+from oslo_log import log as logging
import six
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import test
from cinder.volume.drivers.emc import emc_vmax_common
import mock
+from oslo_log import log as logging
import six
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers.emc import xtremio
import mock
import mox
from oslo_concurrency import processutils
+from oslo_log import log as logging
import paramiko
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import test
from cinder import utils
import tempfile
import mock
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
from cinder import test
import cinder.volume.drivers.fujitsu.eternus_dx_common as eternus_dx_common
import cinder.volume.drivers.fujitsu.eternus_dx_fc as eternus_dx_fc
import json
import mock
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
import requests
from cinder import context
from cinder.db.sqlalchemy import models
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.fusionio import ioControl
import mock
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
from cinder.volume import configuration as conf
import mock
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
from cinder.volume.drivers.hds import hnas_backend
import tempfile
import mock
+from oslo_log import log as logging
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.hds import iscsi
import tempfile
import mock
+from oslo_log import log as logging
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.hds import nfs
import ast
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import fake_hp_3par_client as hp3parclient
from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
# under the License.
#
"""Unit tests for OpenStack Cinder volume drivers."""
+
import mock
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import fake_hp_lefthand_client as hplefthandclient
from cinder.volume.drivers.san.hp import hp_lefthand_iscsi
from xml.dom import minidom
import mock
+from oslo_log import log as logging
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.huawei import huawei_18000
import mock
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
from cinder.volume import configuration as conf
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.ibm import ibmnas
from lxml import etree
import mock
+from oslo_log import log as logging
import six
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.netapp import common
import re
import mock
+from oslo_log import log as logging
import requests
import six.moves.urllib.parse as urlparse
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers.netapp import common
from lxml import etree
import mock
import mox as mox_lib
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils as cinder_utils
from cinder.volume import configuration as conf
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers import nimble
import time
from oslo_db import exception as db_exc
+from oslo_log import log as logging
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import qos_specs
from cinder.volume import volume_types
import tempfile
import mock
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
from cinder import exception
from cinder.i18n import _
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.image import fake as fake_image
from cinder.tests import test_volume
import mock
import mox
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers import solidfire
import mock
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests.brick import test_brick_lvm
from cinder.volume import configuration as conf
import mock
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import importutils
from oslo_utils import units
from cinder import context
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import utils as testutils
from cinder import utils
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers import symantec_cnfs as cnfs
import mox
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import importutils
from oslo_utils import timeutils
from cinder import keymgr
from cinder import objects
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
import cinder.policy
from cinder import quota
from cinder import test
from oslo_config import cfg
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration
import datetime
+from oslo_log import log as logging
+
from cinder import context
from cinder import db
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import utils
from cinder.transfer import api as transfer_api
import time
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import context
from cinder import db
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import conf_fixture
from cinder.volume import qos_specs
import mock
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder import utils
from cinder.volume import throttling
# under the License.
import mock
+from oslo_log import log as logging
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume.drivers import xio
from cinder.volume import qos_specs
import copy
import httplib
+from oslo_log import log as logging
+
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers import zadara
import json
import mock
+from oslo_log import log as logging
from oslo_utils import units
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.tests import fake_utils
from cinder.volume import configuration as conf
# under the License.
import mock
+from oslo_log import log as logging
from cinder import context
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.volume.drivers import datera
import mock
from oslo_config import cfg
+from oslo_log import log as logging
import paramiko
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
import cinder.zonemanager.drivers.brocade.brcd_fc_san_lookup_service \
import mock
from oslo_concurrency import processutils
+from oslo_log import log as logging
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.zonemanager.drivers.brocade \
import brcd_fc_zone_client_cli as client_cli
import mock
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
import paramiko
from cinder import exception
from cinder.i18n import _LI
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.zonemanager.drivers.brocade import brcd_fc_zone_driver as driver
"""Unit tests for fc san lookup service."""
+from oslo_log import log as logging
+
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder import test
from cinder.volume import configuration as conf
from cinder.zonemanager import fc_san_lookup_service as san_service
import os
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder.db import base
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import quota
from cinder.volume import api as volume_api
from oslo_concurrency import lockutils
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import timeutils
import retrying
from cinder.brick.initiator import connector
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
CONF = cfg.CONF
import functools
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import timeutils
from oslo_utils import uuidutils
from cinder import keymgr
from cinder import objects
from cinder.objects import base as objects_base
-from cinder.openstack.common import log as logging
import cinder.policy
from cinder import quota
from cinder import quota_utils
from oslo_config import cfg
-
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
CONF = cfg.CONF
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
import six
from cinder.i18n import _, _LE, _LW
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import rpcapi as volume_rpcapi
from cinder.volume import throttling
import os
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from cinder import context
from cinder import exception
from cinder.i18n import _, _LI
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume import utils as volutils
import time
import urllib
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume.drivers.cloudbyte import options
from cinder.volume.drivers.san import san
from oslo_concurrency import lockutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import units
import six.moves.urllib.parse as urlparse
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume import volume_types
import json
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import requests
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import versionutils
from cinder.volume.drivers.san import san
import json
import os.path
+from oslo_log import log as logging
import requests
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
# under the License.
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.dell import dell_storagecenter_api
from cinder.volume.drivers.san import san
'''Volume driver for Dell Storage Center.'''
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.dell import dell_storagecenter_common
from cinder.zonemanager import utils as fczm_utils
'''Volume driver for Dell Storage Center.'''
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.dell import dell_storagecenter_common
from cinder.volume.drivers import san
import uuid
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
try:
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume import driver
from cinder.volume.drivers.emc import emc_vnx_cli
from cinder.zonemanager import utils as zm_utils
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume import driver
from cinder.volume.drivers.emc import emc_vnx_cli
import os.path
from oslo_config import cfg
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.emc import emc_vmax_fast
from cinder.volume.drivers.emc import emc_vmax_https
from cinder.volume.drivers.emc import emc_vmax_masking
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.emc import emc_vmax_provision
from cinder.volume.drivers.emc import emc_vmax_utils
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+
+from oslo_log import log as logging
import six
from cinder import context
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.emc import emc_vmax_common
from cinder.zonemanager import utils as fczm_utils
from eventlet import patcher
import OpenSSL
+from oslo_log import log as logging
import six
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
# Handle case where we are running in a monkey patched environment
if patcher.is_monkey_patched('socket'):
"""
import os
+from oslo_log import log as logging
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.emc import emc_vmax_common
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.emc import emc_vmax_fast
from cinder.volume.drivers.emc import emc_vmax_provision
from cinder.volume.drivers.emc import emc_vmax_provision_v3
# under the License.
import time
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.emc import emc_vmax_utils
import time
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.emc import emc_vmax_utils
LOG = logging.getLogger(__name__)
import re
from xml.dom import minidom
+from oslo_log import log as logging
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume import volume_types
from oslo_concurrency import lockutils
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_serialization import jsonutils as json
from oslo_utils import excutils
from oslo_utils import timeutils
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
from cinder.volume import configuration as config
from cinder.volume import volume_types
CONF = cfg.CONF
+
+logging.register_options(CONF)
LOG = logging.getLogger(__name__)
+
INTERVAL_5_SEC = 5
INTERVAL_20_SEC = 20
INTERVAL_30_SEC = 30
import urllib2
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.san import san
from cinder.zonemanager import utils as fczm_utils
import greenlet
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE, _LW, _LI
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
from cinder.volume.drivers import san
from xml.dom import minidom
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume import volume_types
"""
from oslo_concurrency import lockutils
+from oslo_log import log as logging
import six
from cinder import context
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.fujitsu import eternus_dx_common
from cinder.zonemanager import utils as fczm_utils
"""
from oslo_concurrency import lockutils
+from oslo_log import log as logging
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.fujitsu import eternus_dx_common
import uuid
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
import requests
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume.drivers.san import san
from cinder.volume import qos_specs
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder.brick.remotefs import remotefs as remotefs_brick
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers import remotefs as remotefs_drv
from xml.etree import ElementTree as ETree
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from cinder.volume.drivers.hds import hus_backend
import re
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder.i18n import _LE, _LW, _LI
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
Hitachi Unified Storage (HUS) platform. Backend operations.
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder import utils
LOG = logging.getLogger("cinder.volume.driver")
from xml.etree import ElementTree as ETree
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.hds import hnas_backend
from cinder.volume import utils
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE, _LI
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.hds import hnas_backend
from cinder.volume.drivers import nfs
from cinder.volume import utils
from oslo_concurrency import lockutils
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from oslo_utils import excutils
import six
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder import utils
SMPL = 1
import threading
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
import six
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder.i18n import _LE, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers.hitachi import hbsd_basiclib as basic_lib
from cinder.volume.drivers.hitachi import hbsd_horcm as horcm
import threading
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
import six
from cinder import exception
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
from cinder import utils
import cinder.volume.driver
from cinder.volume.drivers.hitachi import hbsd_basiclib as basic_lib
from oslo_concurrency import processutils as putils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
from cinder.volume.drivers.hitachi import hbsd_basiclib as basic_lib
import threading
from oslo_config import cfg
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
from cinder import utils
import cinder.volume.driver
from cinder.volume.drivers.hitachi import hbsd_basiclib as basic_lib
import threading
import time
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
from cinder.volume.drivers.hitachi import hbsd_basiclib as basic_lib
"""
from oslo_config import cfg
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.huawei import huawei_18000
from cinder.volume.drivers.huawei import huawei_dorado
from cinder.volume.drivers.huawei import huawei_t
import re
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume.drivers.huawei import huawei_t
from cinder.volume.drivers.huawei import ssh_common
import re
import time
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.huawei import huawei_utils
from cinder.volume.drivers.huawei import ssh_common
from xml.etree import ElementTree as ET
+from oslo_log import log as logging
+
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import uuid
from xml.etree import ElementTree as ET
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
from cinder.volume import qos_specs
import time
from xml.etree import ElementTree as ET
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
from cinder.volume.drivers.huawei import huawei_utils
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.openstack.common import strutils
from cinder import utils
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder.i18n import _, _LE, _LI
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers import nfs
from cinder.volume.drivers import remotefs
import time
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
from cinder.volume.drivers.ibm.storwize_svc import helpers as storwize_helpers
from eventlet import greenthread
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import strutils
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume.drivers.ibm.storwize_svc import ssh as storwize_ssh
from cinder.volume import qos_specs
# under the License.
#
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.volume import volume_types
LOG = logging.getLogger(__name__)
import re
from oslo_concurrency import processutils
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
"""
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from cinder import exception
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.san import san
xiv_ds8k_opts = [
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import units
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from cinder.volume import utils as volutils
Supports multiple storage systems of different families and protocols.
"""
+from oslo_log import log as logging
from oslo_utils import importutils
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.netapp import options
from cinder.volume.drivers.netapp import utils as na_utils
Volume driver library for NetApp 7-mode block storage systems.
"""
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import configuration
from cinder.volume.drivers.netapp.dataontap import block_base
from cinder.volume.drivers.netapp.dataontap.client import client_7mode
import sys
import uuid
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.netapp.dataontap.client import api as na_api
from cinder.volume.drivers.netapp import options as na_opts
from cinder.volume.drivers.netapp import utils as na_utils
import copy
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers.netapp.dataontap import block_base
from cinder.volume.drivers.netapp.dataontap.client import api as netapp_api
import urllib2
from lxml import etree
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import math
import time
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.netapp.dataontap.client import api as netapp_api
from cinder.volume.drivers.netapp.dataontap.client import client_base
import socket
import sys
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import timeutils
import six
from cinder.i18n import _LE, _LW, _LI
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.netapp.dataontap.client import api as netapp_api
import copy
import math
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.netapp.dataontap.client import api as netapp_api
from cinder.volume.drivers.netapp.dataontap.client import client_base
from cinder.volume.drivers.netapp import utils as na_utils
Volume driver for NetApp Data ONTAP (7-mode) FibreChannel storage systems.
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume import driver
from cinder.volume.drivers.netapp.dataontap import block_7mode
from cinder.zonemanager import utils as fczm_utils
Volume driver for NetApp Data ONTAP (C-mode) FibreChannel storage systems.
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume import driver
from cinder.volume.drivers.netapp.dataontap import block_cmode
from cinder.zonemanager import utils as fczm_utils
Volume driver for NetApp Data ONTAP (7-mode) iSCSI storage systems.
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume import driver
from cinder.volume.drivers.netapp.dataontap import block_7mode
Volume driver for NetApp Data ONTAP (C-mode) iSCSI storage systems.
"""
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder.volume import driver
from cinder.volume.drivers.netapp.dataontap import block_cmode
Volume driver for NetApp NFS storage.
"""
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.netapp.dataontap.client import client_7mode
from cinder.volume.drivers.netapp.dataontap import nfs_base
from cinder.volume.drivers.netapp import options as na_opts
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six.moves.urllib.parse as urlparse
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers.netapp import options as na_opts
from cinder.volume.drivers.netapp import utils as na_utils
import os
import uuid
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers.netapp.dataontap.client import api as na_api
from cinder.volume.drivers.netapp.dataontap.client import client_cmode
import copy
import threading
+from oslo_log import log as logging
from oslo_utils import timeutils
import six
from cinder import exception
from cinder.i18n import _, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers.netapp.dataontap.client import api as netapp_api
from cinder.volume.drivers.netapp import utils as na_utils
import copy
import json
+from oslo_log import log as logging
import requests
import six.moves.urllib.parse as urlparse
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import uuid
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils as cinder_utils
from cinder.volume import driver
import binascii
import uuid
+from oslo_log import log as logging
import six
-from cinder.openstack.common import log as logging
-
LOG = logging.getLogger(__name__)
import socket
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
import six
from cinder import context
from cinder import exception
from cinder.i18n import _, _LW, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder import version
from cinder.volume import volume_types
.. moduleauthor:: Yuriy Taraday <yorik.sar@gmail.com>
"""
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers import nexenta
from cinder.volume.drivers.nexenta import jsonrpc
import urllib2
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume.drivers import nexenta
LOG = logging.getLogger(__name__)
import os
import re
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder import db
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers import nexenta
from cinder.volume.drivers.nexenta import jsonrpc
from cinder.volume.drivers.nexenta import options
from oslo_concurrency import processutils as putils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers import remotefs
import urllib2
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from suds import client
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.san import san
vdisklib = None
from oslo_config import cfg
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
import errno
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.prophetstor import dplcommon
from cinder.zonemanager import utils as fczm_utils
import errno
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LI, _LW
-from cinder.openstack.common import log as logging
import cinder.volume.driver
from cinder.volume.drivers.prophetstor import dplcommon
import random
import time
+from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LI, _LW, _LE
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume import driver
from cinder.volume.drivers.prophetstor import options
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers.san import san
from cinder.volume import utils as volume_utils
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import compute
from cinder import exception
from cinder.i18n import _, _LI, _LW
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers import remotefs as remotefs_drv
import urllib
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import encodeutils
from oslo_utils import units
import six
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
try:
from oslo_concurrency import processutils as putils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import compute
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
LOG = logging.getLogger(__name__)
from hp3parclient import exceptions as hpexceptions
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
from cinder import exception
from cinder import flow_utils
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume import qos_specs
from cinder.volume import utils as volume_utils
except ImportError:
hpexceptions = None
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
import cinder.volume.driver
from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
from cinder.volume.drivers.san import san
except ImportError:
hpexceptions = None
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
import cinder.volume.driver
from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
from cinder.volume.drivers.san import san
from lxml import etree
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.san import san
hplefthand_password for credentials to talk to the REST service on the
LeftHand array.
"""
+
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.san.hp import hp_lefthand_cliq_proxy as cliq_proxy
from cinder.volume.drivers.san.hp import hp_lefthand_rest_proxy as rest_proxy
"""HP LeftHand SAN ISCSI REST Proxy."""
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import importutils
from oslo_utils import units
from cinder import context
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume import utils
from cinder.volume import volume_types
import uuid
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.san.hp import hp_msa_client as msa
LOG = logging.getLogger(__name__)
# under the License.
#
-from cinder.openstack.common import log as logging
+from oslo_log import log as logging
+
from cinder import utils
import cinder.volume.driver
from cinder.volume.drivers.san.hp import hp_msa_common as hpcommon
from eventlet import greenthread
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
from cinder.volume import driver
from oslo_concurrency import lockutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
import six.moves.urllib.parse as urlparse
from cinder.i18n import _, _LI
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from oslo_concurrency import processutils as putils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder.brick.remotefs import remotefs
from cinder import exception
from cinder.i18n import _, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers import remotefs as remotefs_drv
import time
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
import requests
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.san import san
from cinder.volume import qos_specs
from cinder.volume import volume_types
from oslo_concurrency import lockutils
from oslo_concurrency import processutils as putils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LI, _LE, _LW
from cinder.image import image_utils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from cinder.volume import utils as volutils
from __future__ import absolute_import
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from oslo_utils import units
import six
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume import volume_types
import os
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers import nfs
LOG = logging.getLogger(__name__)
import time
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from cinder import exception
from cinder.i18n import _, _LE, _LW, _LI
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
driver documentation for more information.
"""
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume import driver
from cinder.volume.drivers.san import san
import random
+from oslo_log import log as logging
from oslo_utils import units
from cinder import context
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder import utils
from cinder.volume import driver
Classes and utility methods for datastore selection.
"""
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_vmware import exceptions
from oslo_vmware import pbm
from cinder.i18n import _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.vmware import exceptions as vmdk_exceptions
import tempfile
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import units
from oslo_utils import uuidutils
from cinder import exception
from cinder.i18n import _, _LE, _LI, _LW
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.vmware import datastore as hub
from cinder.volume.drivers.vmware import volumeops
import urllib
+from oslo_log import log as logging
from oslo_utils import units
from oslo_vmware import exceptions
from oslo_vmware import vim_util
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.vmware import exceptions as vmdk_exceptions
if sys.platform == 'win32':
import wmi
+from oslo_log import log as logging
+
from cinder.brick.remotefs import remotefs
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
import sys
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import units
from cinder import exception
from cinder.i18n import _
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.drivers import smbfs
from cinder.volume.drivers.windows import remotefs
kernel32 = ctypes.windll.kernel32
virtdisk = ctypes.windll.virtdisk
+from oslo_log import log as logging
+
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.windows import constants
LOG = logging.getLogger(__name__)
import os
from oslo_config import cfg
+from oslo_log import log as logging
from cinder.image import image_utils
from cinder.openstack.common import fileutils
-from cinder.openstack.common import log as logging
from cinder.volume import driver
from cinder.volume.drivers.windows import constants
from cinder.volume.drivers.windows import vhdutils
import os
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder.volume.drivers.windows import constants
# Check needed for unit testing on Unix
from lxml import etree
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import context
from cinder import exception
from cinder.i18n import _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import loopingcall
from cinder.volume import driver
from cinder.volume.drivers.san import san
from lxml import etree
from oslo_config import cfg
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import driver
LOG = logging.getLogger(__name__)
import time
import urllib2
+from oslo_log import log
+
from cinder.i18n import _LE, _LI
-from cinder.openstack.common import log
LOG = log.getLogger(__name__)
import time
import urllib2
+from oslo_log import log
+
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log
LOG = log.getLogger(__name__)
import base64
from oslo_config import cfg
+from oslo_log import log
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log
from cinder.volume import driver
from cinder.volume.drivers.san import san
from cinder.volume.drivers.zfssa import zfssarest
import errno
from oslo_config import cfg
+from oslo_log import log
from oslo_utils import excutils
from oslo_utils import units
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log
from cinder.volume.drivers import nfs
from cinder.volume.drivers.san import san
from cinder.volume.drivers.zfssa import zfssarest
"""
import json
+from oslo_log import log
+
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log
from cinder.volume.drivers.zfssa import restclient
from cinder.volume.drivers.zfssa import webdavclient
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_utils import units
import taskflow.engines
from cinder import exception
from cinder import flow_utils
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import policy
from cinder import quota
from cinder import utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import six
from cinder import exception
from cinder.i18n import _LE
-from cinder.openstack.common import log as logging
LOG = logging.getLogger(__name__)
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import timeutils
import taskflow.engines
from taskflow.patterns import linear_flow
from cinder.i18n import _, _LE, _LI
from cinder.image import glance
from cinder import objects
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.flows import common
from cinder.volume import utils as volume_utils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
import taskflow.engines
from taskflow.patterns import linear_flow
from cinder import exception
from cinder import flow_utils
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume.flows.api import create_volume as create_api
from cinder.volume.flows import common as flow_common
from cinder.volume.flows.manager import create_volume as create_mgr
import time
from oslo_config import cfg
+from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_serialization import jsonutils
from oslo_utils import excutils
from cinder.i18n import _, _LE, _LI, _LW
from cinder.image import glance
from cinder import manager
-from cinder.openstack.common import log as logging
from cinder.openstack.common import periodic_task
from cinder import quota
from cinder import utils
from oslo_config import cfg
from oslo_db import exception as db_exc
+from oslo_log import log as logging
from cinder import context
from cinder import db
from cinder import exception
from cinder.i18n import _, _LE, _LW
-from cinder.openstack.common import log as logging
from cinder.volume import volume_types
import re
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from oslo_utils import netutils
from cinder import exception
from cinder.openstack.common import fileutils
from cinder.i18n import _LI, _LW, _LE
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.targets import iscsi
import abc
from oslo_concurrency import processutils
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LI, _LW, _LE
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.targets import driver
from cinder.volume import utils as vutils
# License for the specific language governing permissions and limitations
# under the License.
+from oslo_log import log as logging
from cinder.i18n import _LW
-from cinder.openstack.common import log as logging
from cinder.volume.targets import tgt
# under the License.
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.targets import iscsi
# under the License.
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from cinder import exception
from cinder import utils
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder.volume.targets import iscsi
from cinder.volume import utils as vutils
import time
from oslo_concurrency import processutils as putils
+from oslo_log import log as logging
from cinder import exception
from cinder.openstack.common import fileutils
from cinder.i18n import _LI, _LW, _LE
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.volume.targets import iscsi
import contextlib
from oslo_concurrency import processutils
+from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _LW, _LE
-from cinder.openstack.common import log as logging
from cinder import utils
from Crypto.Random import random
from oslo_concurrency import processutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import strutils
from oslo_utils import timeutils
from oslo_utils import units
from cinder.brick.local_dev import lvm as brick_lvm
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import utils
from cinder.volume import throttling
from oslo_config import cfg
from oslo_db import exception as db_exc
+from oslo_log import log as logging
import six
from cinder import context
from cinder import db
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
CONF = cfg.CONF
import eventlet.wsgi
import greenlet
from oslo_config import cfg
+from oslo_log import log as logging
+from oslo_log import loggers
from oslo_utils import excutils
from oslo_utils import netutils
from paste import deploy
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import utils
self.pool_size = pool_size or self.default_pool_size
self._pool = eventlet.GreenPool(self.pool_size)
self._logger = logging.getLogger("eventlet.wsgi.server")
- self._wsgi_logger = logging.WritableLogger(self._logger)
+ self._wsgi_logger = loggers.WritableLogger(self._logger)
if backlog < 1:
raise exception.InvalidInput(
# under the License.
#
from oslo_config import cfg
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder.volume import configuration
brcd_zone_opts = [
# under the License.
#
-
+from oslo_log import log as logging
from oslo_utils import excutils
import paramiko
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import utils
from cinder.zonemanager.drivers.brocade import brcd_fabric_opts as fabric_opts
import cinder.zonemanager.drivers.brocade.fc_zone_constants as zone_constant
from eventlet import greenthread
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import excutils
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
import cinder.zonemanager.drivers.brocade.fc_zone_constants as ZoneConstant
from oslo_concurrency import lockutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import importutils
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.zonemanager.drivers.brocade import brcd_fabric_opts as fabric_opts
from cinder.zonemanager.drivers import fc_zone_driver
from eventlet import greenthread
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import excutils
import six
from cinder import exception
from cinder.i18n import _, _LE
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
from cinder.zonemanager.drivers.cisco import cisco_fabric_opts as fabric_opts
from eventlet import greenthread
from oslo_concurrency import processutils
+from oslo_log import log as logging
from oslo_utils import excutils
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder import ssh_utils
from cinder import utils
import cinder.zonemanager.drivers.cisco.fc_zone_constants as ZoneConstant
from oslo_concurrency import lockutils
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import importutils
import six
from cinder import exception
from cinder.i18n import _, _LE, _LI
-from cinder.openstack.common import log as logging
from cinder.zonemanager.drivers.cisco import cisco_fabric_opts as fabric_opts
from cinder.zonemanager.drivers import fc_zone_driver
from cinder.zonemanager import utils as zm_utils
"""
+from oslo_log import log as logging
-from cinder.openstack.common import log as logging
from cinder.zonemanager import fc_common
LOG = logging.getLogger(__name__)
"""
+from oslo_log import log as logging
from oslo_utils import importutils
from cinder import exception
from cinder.i18n import _
-from cinder.openstack.common import log as logging
from cinder.volume import configuration as config
from cinder.zonemanager import fc_common
from cinder.zonemanager import fc_zone_manager
"""
from oslo_config import cfg
+from oslo_log import log as logging
from oslo_utils import importutils
from cinder import exception
from cinder.i18n import _, _LI
-from cinder.openstack.common import log as logging
from cinder.volume import configuration as config
from cinder.zonemanager import fc_common
"""
import logging
+from oslo_log import log
+
from cinder.i18n import _LI, _LW
-from cinder.openstack.common import log
from cinder.volume import configuration
from cinder.volume import manager
from cinder.zonemanager import fc_san_lookup_service
module=imageutils
module=install_venv_common
module=local
-module=log
-module=log_handler
module=loopingcall
module=middleware
module=periodic_task
oslo.concurrency>=1.4.1 # Apache-2.0
oslo.context>=0.1.0
oslo.db>=1.4.1 # Apache-2.0
+oslo.log>=0.4.0 # Apache-2.0
oslo.messaging>=1.6.0 # Apache-2.0
oslo.rootwrap>=1.5.0 # Apache-2.0
oslo.serialization>=1.2.0 # Apache-2.0