From c8a06f808deea4d32349239c34060b081439bb45 Mon Sep 17 00:00:00 2001 From: Julia Varlamova Date: Tue, 21 Apr 2015 11:39:20 +0300 Subject: [PATCH] Use oslo_log instead of oslo-incubator code Code from manila/openstack/common/log.py duplicates code from oslo_log, so we use oslo_log instead of oslo-incubator log.py module. Change-Id: I0e4c5833d20ce76a9cf7f2ed2293007d6048ff08 --- .../38e632621e5a_change_volume_type_to_share_type.py | 9 ++++----- manila/network/standalone_network_plugin.py | 4 ++-- manila/share/drivers/hdfs/hdfs_native.py | 4 ++-- manila/share/drivers/hp/hp_3par_driver.py | 2 +- manila/share/drivers/hp/hp_3par_mediator.py | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/manila/db/migrations/alembic/versions/38e632621e5a_change_volume_type_to_share_type.py b/manila/db/migrations/alembic/versions/38e632621e5a_change_volume_type_to_share_type.py index 0d0c8fb5..280247c8 100644 --- a/manila/db/migrations/alembic/versions/38e632621e5a_change_volume_type_to_share_type.py +++ b/manila/db/migrations/alembic/versions/38e632621e5a_change_volume_type_to_share_type.py @@ -25,15 +25,14 @@ revision = '38e632621e5a' down_revision = '211836bf835c' from alembic import op - -from manila.i18n import _LI -from manila.openstack.common import log as logging - +from oslo_log import log from oslo_utils import strutils import sqlalchemy as sa from sqlalchemy.sql import table -LOG = logging.getLogger(__name__) +from manila.i18n import _LI + +LOG = log.getLogger(__name__) def upgrade(): diff --git a/manila/network/standalone_network_plugin.py b/manila/network/standalone_network_plugin.py index b7d501d4..7418cff6 100644 --- a/manila/network/standalone_network_plugin.py +++ b/manila/network/standalone_network_plugin.py @@ -15,13 +15,13 @@ import netaddr from oslo_config import cfg +from oslo_log import log import six from manila.common import constants from manila import exception from manila.i18n import _ from manila import network -from manila.openstack.common import log as logging from manila import utils standalone_network_plugin_opts = [ @@ -59,7 +59,7 @@ standalone_network_plugin_opts = [ ] CONF = cfg.CONF -LOG = logging.getLogger(__name__) +LOG = log.getLogger(__name__) class StandaloneNetworkPlugin(network.NetworkBaseAPI): diff --git a/manila/share/drivers/hdfs/hdfs_native.py b/manila/share/drivers/hdfs/hdfs_native.py index e5bed821..532a2e03 100644 --- a/manila/share/drivers/hdfs/hdfs_native.py +++ b/manila/share/drivers/hdfs/hdfs_native.py @@ -32,16 +32,16 @@ import socket from oslo_concurrency import processutils from oslo_config import cfg +from oslo_log import log from oslo_utils import units import six from manila import exception from manila.i18n import _ -from manila.openstack.common import log as logging from manila.share import driver from manila import utils -LOG = logging.getLogger(__name__) +LOG = log.getLogger(__name__) hdfs_native_share_opts = [ cfg.StrOpt('hdfs_namenode_ip', diff --git a/manila/share/drivers/hp/hp_3par_driver.py b/manila/share/drivers/hp/hp_3par_driver.py index 49b774bd..cd6211b9 100644 --- a/manila/share/drivers/hp/hp_3par_driver.py +++ b/manila/share/drivers/hp/hp_3par_driver.py @@ -20,12 +20,12 @@ import logging import os from oslo_config import cfg +from oslo_log import log import six from manila import exception from manila.i18n import _ from manila.i18n import _LI -from manila.openstack.common import log from manila.share import driver from manila.share.drivers.hp import hp_3par_mediator diff --git a/manila/share/drivers/hp/hp_3par_mediator.py b/manila/share/drivers/hp/hp_3par_mediator.py index f05c2c82..1093830b 100644 --- a/manila/share/drivers/hp/hp_3par_mediator.py +++ b/manila/share/drivers/hp/hp_3par_mediator.py @@ -18,20 +18,20 @@ This 'mediator' de-couples the 3PAR focused client from the OpenStack focused driver. """ +from oslo_log import log from oslo_utils import importutils from oslo_utils import units import six from manila import exception from manila.i18n import _ -from manila.openstack.common import log as logging hp3parclient = importutils.try_import("hp3parclient") if hp3parclient: from hp3parclient import file_client -LOG = logging.getLogger(__name__) +LOG = log.getLogger(__name__) DENY = '-' ALLOW = '+' OPEN_STACK_MANILA_FSHARE = 'OpenStack Manila fshare'