From deb5cb3fc206a3468ca3c3cadec93b72adeb0355 Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Mon, 29 Aug 2016 12:57:11 +0700 Subject: [PATCH] TrivialFix: Remove cfg import unused This patch removes cfg import unused in watcher/api/controllers/v1/goal.py watcher/api/controllers/v1/strategy.py watcher/decision_engine/cluster/history/ceilometer.py watcher/decision_engine/model/collector/manager.py watcher/decision_engine/strategy/selection/default.py watcher/tests/common/test_ceilometer_helper.py watcher/tests/decision_engine/fake_strategies.py watcher/tests/decision_engine/strategy/selector/test_strategy_selector.py Change-Id: I0f30a056c3efa49faed857b6d1001a2367d384ac --- watcher/api/controllers/v1/goal.py | 4 ---- watcher/api/controllers/v1/strategy.py | 4 ---- watcher/decision_engine/cluster/history/ceilometer.py | 4 ---- watcher/decision_engine/model/collector/manager.py | 5 ----- watcher/decision_engine/strategy/selection/default.py | 2 -- watcher/tests/common/test_ceilometer_helper.py | 3 --- watcher/tests/decision_engine/fake_strategies.py | 2 -- .../strategy/selector/test_strategy_selector.py | 3 --- 8 files changed, 27 deletions(-) diff --git a/watcher/api/controllers/v1/goal.py b/watcher/api/controllers/v1/goal.py index 90271bd3b..a7dd28b16 100644 --- a/watcher/api/controllers/v1/goal.py +++ b/watcher/api/controllers/v1/goal.py @@ -32,8 +32,6 @@ Here are some examples of :ref:`Goals `: modification, ... """ -from oslo_config import cfg - import pecan from pecan import rest import wsme @@ -49,8 +47,6 @@ from watcher.common import exception from watcher.common import policy from watcher import objects -CONF = cfg.CONF - class Goal(base.APIBase): """API representation of a goal. diff --git a/watcher/api/controllers/v1/strategy.py b/watcher/api/controllers/v1/strategy.py index 6803a1ca6..a8822057a 100644 --- a/watcher/api/controllers/v1/strategy.py +++ b/watcher/api/controllers/v1/strategy.py @@ -27,8 +27,6 @@ Some strategies may provide better optimization results but may take more time to find an optimal :ref:`Solution `. """ -from oslo_config import cfg - import pecan from pecan import rest import wsme @@ -45,8 +43,6 @@ from watcher.common import policy from watcher.common import utils as common_utils from watcher import objects -CONF = cfg.CONF - class Strategy(base.APIBase): """API representation of a strategy. diff --git a/watcher/decision_engine/cluster/history/ceilometer.py b/watcher/decision_engine/cluster/history/ceilometer.py index 5d7a9a803..fef4bd186 100644 --- a/watcher/decision_engine/cluster/history/ceilometer.py +++ b/watcher/decision_engine/cluster/history/ceilometer.py @@ -17,14 +17,10 @@ # limitations under the License. # - -from oslo_config import cfg from watcher.common import ceilometer_helper from watcher.decision_engine.cluster.history import base -CONF = cfg.CONF - class CeilometerClusterHistory(base.BaseClusterHistory): def __init__(self, osc=None): diff --git a/watcher/decision_engine/model/collector/manager.py b/watcher/decision_engine/model/collector/manager.py index cfa75ae09..1191036fd 100644 --- a/watcher/decision_engine/model/collector/manager.py +++ b/watcher/decision_engine/model/collector/manager.py @@ -17,15 +17,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from oslo_config import cfg - from watcher.common import utils from watcher.decision_engine.loading import default -CONF = cfg.CONF - - class CollectorManager(object): def __init__(self): diff --git a/watcher/decision_engine/strategy/selection/default.py b/watcher/decision_engine/strategy/selection/default.py index 505347879..ac73447d7 100644 --- a/watcher/decision_engine/strategy/selection/default.py +++ b/watcher/decision_engine/strategy/selection/default.py @@ -14,7 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from oslo_config import cfg from oslo_log import log from watcher._i18n import _ @@ -23,7 +22,6 @@ from watcher.decision_engine.loading import default from watcher.decision_engine.strategy.selection import base LOG = log.getLogger(__name__) -CONF = cfg.CONF class DefaultStrategySelector(base.BaseSelector): diff --git a/watcher/tests/common/test_ceilometer_helper.py b/watcher/tests/common/test_ceilometer_helper.py index ed3d2f080..ea57cc818 100644 --- a/watcher/tests/common/test_ceilometer_helper.py +++ b/watcher/tests/common/test_ceilometer_helper.py @@ -18,14 +18,11 @@ from __future__ import absolute_import from __future__ import unicode_literals import mock -from oslo_config import cfg from watcher.common import ceilometer_helper from watcher.common import clients from watcher.tests import base -CONF = cfg.CONF - @mock.patch.object(clients.OpenStackClients, 'ceilometer') class TestCeilometerHelper(base.BaseTestCase): diff --git a/watcher/tests/decision_engine/fake_strategies.py b/watcher/tests/decision_engine/fake_strategies.py index 7d78a2507..002290bcf 100644 --- a/watcher/tests/decision_engine/fake_strategies.py +++ b/watcher/tests/decision_engine/fake_strategies.py @@ -18,8 +18,6 @@ from oslo_config import cfg from watcher.decision_engine.strategy.strategies import base as base_strategy -CONF = cfg.CONF - class FakeStrategy(base_strategy.BaseStrategy): diff --git a/watcher/tests/decision_engine/strategy/selector/test_strategy_selector.py b/watcher/tests/decision_engine/strategy/selector/test_strategy_selector.py index a1ada2899..d793cc6a6 100644 --- a/watcher/tests/decision_engine/strategy/selector/test_strategy_selector.py +++ b/watcher/tests/decision_engine/strategy/selector/test_strategy_selector.py @@ -15,7 +15,6 @@ # limitations under the License. import mock -from oslo_config import cfg from watcher.common import exception from watcher.decision_engine.loading import default as default_loader @@ -24,8 +23,6 @@ from watcher.decision_engine.strategy.selection import ( from watcher.decision_engine.strategy import strategies from watcher.tests import base -CONF = cfg.CONF - class TestStrategySelector(base.TestCase):