diff --git a/watcher/applier/actions/factory.py b/watcher/applier/actions/factory.py index 23dd8f158..037e0db42 100644 --- a/watcher/applier/actions/factory.py +++ b/watcher/applier/actions/factory.py @@ -19,7 +19,7 @@ from __future__ import unicode_literals from oslo_log import log -from watcher.applier.actions.loading import default +from watcher.applier.loading import default LOG = log.getLogger(__name__) diff --git a/watcher/applier/actions/loading/default.py b/watcher/applier/actions/loading/default.py deleted file mode 100644 index 0ec2f933c..000000000 --- a/watcher/applier/actions/loading/default.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- encoding: utf-8 -*- -# Copyright (c) 2015 b<>com -# -# 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. -# - -from __future__ import unicode_literals - -from watcher.common.loader import default - - -class DefaultActionLoader(default.DefaultLoader): - def __init__(self): - super(DefaultActionLoader, self).__init__(namespace='watcher_actions') diff --git a/watcher/applier/default.py b/watcher/applier/default.py index 1374623c7..6aec92286 100644 --- a/watcher/applier/default.py +++ b/watcher/applier/default.py @@ -20,7 +20,7 @@ from oslo_config import cfg from oslo_log import log from watcher.applier import base -from watcher.applier.workflow_engine.loading import default +from watcher.applier.loading import default from watcher import objects LOG = log.getLogger(__name__) diff --git a/watcher/applier/actions/loading/__init__.py b/watcher/applier/loading/__init__.py similarity index 100% rename from watcher/applier/actions/loading/__init__.py rename to watcher/applier/loading/__init__.py diff --git a/watcher/applier/workflow_engine/loading/default.py b/watcher/applier/loading/default.py similarity index 82% rename from watcher/applier/workflow_engine/loading/default.py rename to watcher/applier/loading/default.py index 5eba40475..c4d58d9e2 100644 --- a/watcher/applier/workflow_engine/loading/default.py +++ b/watcher/applier/loading/default.py @@ -1,6 +1,3 @@ -# -*- encoding: utf-8 -*- -# Copyright (c) 2015 b<>com -# # 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 @@ -13,10 +10,10 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. -# from __future__ import unicode_literals + from watcher.common.loader import default @@ -24,3 +21,9 @@ class DefaultWorkFlowEngineLoader(default.DefaultLoader): def __init__(self): super(DefaultWorkFlowEngineLoader, self).__init__( namespace='watcher_workflow_engines') + + +class DefaultActionLoader(default.DefaultLoader): + def __init__(self): + super(DefaultActionLoader, self).__init__( + namespace='watcher_actions') diff --git a/watcher/applier/workflow_engine/loading/__init__.py b/watcher/applier/workflow_engine/loading/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/watcher/opts.py b/watcher/opts.py index f747cea22..5233e61fb 100644 --- a/watcher/opts.py +++ b/watcher/opts.py @@ -19,10 +19,8 @@ from keystoneauth1 import loading as ka_loading import prettytable as ptable import watcher.api.app -from watcher.applier.actions.loading import default as action_loader +from watcher.applier.loading import default as applier_loader from watcher.applier import manager as applier_manager -from watcher.applier.workflow_engine.loading import default as \ - workflow_engine_loader from watcher.common import clients from watcher.common import utils from watcher.decision_engine.loading import default as decision_engine_loader @@ -31,10 +29,10 @@ from watcher.decision_engine.planner import manager as planner_manager PLUGIN_LOADERS = ( - action_loader.DefaultActionLoader, + applier_loader.DefaultActionLoader, decision_engine_loader.DefaultPlannerLoader, decision_engine_loader.DefaultStrategyLoader, - workflow_engine_loader.DefaultWorkFlowEngineLoader, + applier_loader.DefaultWorkFlowEngineLoader, ) diff --git a/watcher/tests/applier/actions/loading/test_default_actions_loader.py b/watcher/tests/applier/actions/loading/test_default_actions_loader.py index 57716e536..1e56d16cf 100644 --- a/watcher/tests/applier/actions/loading/test_default_actions_loader.py +++ b/watcher/tests/applier/actions/loading/test_default_actions_loader.py @@ -16,7 +16,7 @@ from __future__ import unicode_literals from watcher.applier.actions import base as abase -from watcher.applier.actions.loading import default +from watcher.applier.loading import default from watcher.tests import base diff --git a/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py b/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py index d9ee39a29..49d27ca7e 100644 --- a/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py +++ b/watcher/tests/applier/workflow_engine/loading/test_default_engine_loader.py @@ -15,8 +15,8 @@ # limitations under the License. from __future__ import unicode_literals +from watcher.applier.loading import default from watcher.applier.workflow_engine import base as wbase -from watcher.applier.workflow_engine.loading import default from watcher.tests import base diff --git a/watcher/tests/decision_engine/strategy/strategies/test_basic_consolidation.py b/watcher/tests/decision_engine/strategy/strategies/test_basic_consolidation.py index a028dd1af..bb732ec53 100644 --- a/watcher/tests/decision_engine/strategy/strategies/test_basic_consolidation.py +++ b/watcher/tests/decision_engine/strategy/strategies/test_basic_consolidation.py @@ -19,7 +19,7 @@ import collections import mock -from watcher.applier.actions.loading import default +from watcher.applier.loading import default from watcher.common import exception from watcher.decision_engine.model import model_root from watcher.decision_engine.strategy import strategies diff --git a/watcher/tests/decision_engine/strategy/strategies/test_dummy_strategy.py b/watcher/tests/decision_engine/strategy/strategies/test_dummy_strategy.py index a4ecd5345..72a1d9a98 100644 --- a/watcher/tests/decision_engine/strategy/strategies/test_dummy_strategy.py +++ b/watcher/tests/decision_engine/strategy/strategies/test_dummy_strategy.py @@ -16,7 +16,7 @@ import mock -from watcher.applier.actions.loading import default +from watcher.applier.loading import default from watcher.decision_engine.model import model_root from watcher.decision_engine.strategy import strategies from watcher.tests import base diff --git a/watcher/tests/decision_engine/strategy/strategies/test_outlet_temp_control.py b/watcher/tests/decision_engine/strategy/strategies/test_outlet_temp_control.py index c6796467d..82e9c1195 100644 --- a/watcher/tests/decision_engine/strategy/strategies/test_outlet_temp_control.py +++ b/watcher/tests/decision_engine/strategy/strategies/test_outlet_temp_control.py @@ -19,7 +19,7 @@ import collections import mock -from watcher.applier.actions.loading import default +from watcher.applier.loading import default from watcher.common import exception from watcher.decision_engine.model import model_root from watcher.decision_engine.model import resource diff --git a/watcher/tests/decision_engine/strategy/strategies/test_workload_balance.py b/watcher/tests/decision_engine/strategy/strategies/test_workload_balance.py index 4a9e5724b..3521ee964 100644 --- a/watcher/tests/decision_engine/strategy/strategies/test_workload_balance.py +++ b/watcher/tests/decision_engine/strategy/strategies/test_workload_balance.py @@ -19,7 +19,7 @@ import collections import mock -from watcher.applier.actions.loading import default +from watcher.applier.loading import default from watcher.common import exception from watcher.decision_engine.model import model_root from watcher.decision_engine.model import resource