From ffc430d572f09872c1846494117b5fc6a0c53f8d Mon Sep 17 00:00:00 2001 From: Vitaly Gridnev Date: Wed, 21 Jan 2015 12:50:45 +0300 Subject: [PATCH] Migrate to oslo.log oslo.log was added to global requirements, so we can migrate to this module. Also we need this migration to be ensure that it works correctly with log-improvements. Since openstack.common.log is not dropped in oslo-incubator, we shouldn't remove it. Change-Id: I90468e4db812ae0b5d8a43a37206b236f8904661 Closes-bug: #1412673 --- requirements.txt | 1 + sahara/plugins/mapr/util/config.py | 2 +- sahara/plugins/mapr/util/plugin_spec.py | 2 +- sahara/plugins/mapr/util/run_scripts.py | 3 ++- sahara/plugins/mapr/util/scaling.py | 3 ++- sahara/plugins/mapr/util/start_helper.py | 3 ++- sahara/plugins/mapr/versions/base_cluster_configurer.py | 2 +- sahara/plugins/mapr/versions/v4_0_1_mrv1/cluster_configurer.py | 3 ++- 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0a92ada..b8cf723 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,6 +16,7 @@ oslo.concurrency>=1.4.1 # Apache-2.0 oslo.context>=0.1.0 # Apache-2.0 oslo.db>=1.4.1 # Apache-2.0 oslo.i18n>=1.3.0 # Apache-2.0 +oslo.log>=0.1.0 # Apache-2.0 oslo.messaging>=1.4.0,!=1.5.0 oslo.middleware>=0.3.0 # Apache-2.0 oslo.rootwrap>=1.3.0 diff --git a/sahara/plugins/mapr/util/config.py b/sahara/plugins/mapr/util/config.py index eebb19a..04b0d42 100644 --- a/sahara/plugins/mapr/util/config.py +++ b/sahara/plugins/mapr/util/config.py @@ -13,11 +13,11 @@ # under the License. from oslo.config import cfg +from oslo_log import log as logging from sahara import exceptions as ex from sahara.i18n import _ from sahara.i18n import _LI -from sahara.openstack.common import log as logging import sahara.plugins.mapr.util.config_file_utils as cfu import sahara.plugins.mapr.versions.version_handler_factory as vhf from sahara.plugins import provisioning as p diff --git a/sahara/plugins/mapr/util/plugin_spec.py b/sahara/plugins/mapr/util/plugin_spec.py index 4bdfce7..c381eb4 100644 --- a/sahara/plugins/mapr/util/plugin_spec.py +++ b/sahara/plugins/mapr/util/plugin_spec.py @@ -15,9 +15,9 @@ import json import os.path +from oslo_log import log as logging import six -import sahara.openstack.common.log as logging import sahara.plugins.mapr.util.config_file_utils as cfu import sahara.plugins.mapr.util.dict_utils as du import sahara.plugins.mapr.util.func_utils as fu diff --git a/sahara/plugins/mapr/util/run_scripts.py b/sahara/plugins/mapr/util/run_scripts.py index 13ed8ed..82db86f 100644 --- a/sahara/plugins/mapr/util/run_scripts.py +++ b/sahara/plugins/mapr/util/run_scripts.py @@ -12,8 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +from oslo_log import log as logging + from sahara.i18n import _LI -from sahara.openstack.common import log as logging LOG = logging.getLogger(__name__) diff --git a/sahara/plugins/mapr/util/scaling.py b/sahara/plugins/mapr/util/scaling.py index b9eddb5..ad46ece 100644 --- a/sahara/plugins/mapr/util/scaling.py +++ b/sahara/plugins/mapr/util/scaling.py @@ -12,9 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. +from oslo_log import log as logging + from sahara import context from sahara.i18n import _LI -from sahara.openstack.common import log as logging from sahara.plugins.mapr.util import config from sahara.plugins.mapr.util import names from sahara.plugins.mapr.util import run_scripts diff --git a/sahara/plugins/mapr/util/start_helper.py b/sahara/plugins/mapr/util/start_helper.py index fdbe25d..e85c043 100644 --- a/sahara/plugins/mapr/util/start_helper.py +++ b/sahara/plugins/mapr/util/start_helper.py @@ -12,9 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. +from oslo_log import log as logging + from sahara import context from sahara.i18n import _LI -from sahara.openstack.common import log as logging from sahara.plugins.mapr.util import names from sahara.plugins.mapr.util import run_scripts import sahara.plugins.mapr.versions.version_handler_factory as vhf diff --git a/sahara/plugins/mapr/versions/base_cluster_configurer.py b/sahara/plugins/mapr/versions/base_cluster_configurer.py index 87e35ab..d0588d0 100644 --- a/sahara/plugins/mapr/versions/base_cluster_configurer.py +++ b/sahara/plugins/mapr/versions/base_cluster_configurer.py @@ -16,10 +16,10 @@ import abc import collections as c import os +from oslo_log import log as logging import six from sahara.i18n import _LI -from sahara.openstack.common import log as logging import sahara.plugins.mapr.util.cluster_helper as ch import sahara.plugins.mapr.util.cluster_info as ci from sahara.plugins.mapr.util import config diff --git a/sahara/plugins/mapr/versions/v4_0_1_mrv1/cluster_configurer.py b/sahara/plugins/mapr/versions/v4_0_1_mrv1/cluster_configurer.py index 7b01907..b93bdf4 100644 --- a/sahara/plugins/mapr/versions/v4_0_1_mrv1/cluster_configurer.py +++ b/sahara/plugins/mapr/versions/v4_0_1_mrv1/cluster_configurer.py @@ -12,8 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +from oslo_log import log as logging + from sahara.i18n import _LI -from sahara.openstack.common import log as logging import sahara.plugins.mapr.versions.base_cluster_configurer as bcc import sahara.plugins.utils as u from sahara.utils import files as f