From 289c79e52f3c256a2d5968ea657f0d943cffc018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Fran=C3=A7oise?= Date: Fri, 27 Nov 2015 10:32:12 +0100 Subject: [PATCH] Code refactoring - Watcher Applier package This patchset is there to change the code structure. The objective is to flatten the project file tree by merging 'api/' and 'framework/' into a single package. This also contains some tidy ups in package naming (like using only singular nouns). This should only affect file/folder names and their subsequent import paths wherever they were used. Change-Id: Id7b37667c613086d8ef3cd1f367c4219bf026fc7 --- watcher/api/controllers/v1/action_plan.py | 2 +- watcher/applier/{api/applier.py => base.py} | 0 .../{framework/default_applier.py => default.py} | 4 ++-- watcher/applier/{api => execution}/__init__.py | 0 .../applier/{framework => execution}/deploy_phase.py | 0 .../command_executor.py => execution/executor.py} | 7 +++---- .../{framework/manager_applier.py => manager.py} | 3 +-- .../applier/{api/messaging => mapper}/__init__.py | 0 .../{api/command_mapper.py => mapper/base.py} | 0 .../default_command_mapper.py => mapper/default.py} | 12 +++++------- watcher/applier/{framework => messaging}/__init__.py | 0 .../applier/{api => }/messaging/applier_command.py | 0 watcher/applier/{framework => }/messaging/events.py | 0 .../launch_action_plan.py => messaging/launcher.py} | 6 +++--- .../trigger_action_plan.py => messaging/trigger.py} | 3 +-- .../{framework/command => primitive}/__init__.py | 0 .../{api/primitive_command.py => primitive/base.py} | 2 +- .../hypervisor_state.py} | 6 +++--- .../migrate_command.py => primitive/migration.py} | 7 +++---- .../command/nop_command.py => primitive/nop.py} | 4 ++-- .../power_state.py} | 4 ++-- .../command => primitive}/wrapper/__init__.py | 0 .../command => primitive}/wrapper/nova_wrapper.py | 0 watcher/applier/{api => }/promise.py | 0 watcher/applier/{framework => }/rpcapi.py | 4 ++-- watcher/cmd/applier.py | 2 +- .../cluster_model_collector/manager.py | 2 +- watcher/opts.py | 2 +- watcher/tests/api/v1/test_actions_plans.py | 2 +- .../applier/execution}/__init__.py | 0 .../test_command_executor.py | 2 +- .../tests/applier/{framework => mapper}/__init__.py | 0 .../{framework => mapper}/test_command_mapper.py | 3 +-- .../{framework/command => messaging}/__init__.py | 0 .../test_launch_action_plan_command.py | 5 ++--- .../messaging/test_launch_action_plan_endpoint.py | 3 +-- .../command/wrapper => primitive}/__init__.py | 0 .../messaging => primitive/wrapper}/__init__.py | 0 .../wrapper/test_nova_wrapper.py | 2 +- .../applier/{framework => }/test_applier_manager.py | 2 +- watcher/tests/applier/{framework => }/test_rpcapi.py | 2 +- watcher/tests/cmd/test_applier.py | 2 +- 42 files changed, 42 insertions(+), 51 deletions(-) rename watcher/applier/{api/applier.py => base.py} (100%) rename watcher/applier/{framework/default_applier.py => default.py} (92%) rename watcher/applier/{api => execution}/__init__.py (100%) rename watcher/applier/{framework => execution}/deploy_phase.py (100%) rename watcher/applier/{framework/command_executor.py => execution/executor.py} (92%) rename watcher/applier/{framework/manager_applier.py => manager.py} (97%) rename watcher/applier/{api/messaging => mapper}/__init__.py (100%) rename watcher/applier/{api/command_mapper.py => mapper/base.py} (100%) rename watcher/applier/{framework/default_command_mapper.py => mapper/default.py} (81%) rename watcher/applier/{framework => messaging}/__init__.py (100%) rename watcher/applier/{api => }/messaging/applier_command.py (100%) rename watcher/applier/{framework => }/messaging/events.py (100%) rename watcher/applier/{framework/messaging/launch_action_plan.py => messaging/launcher.py} (92%) rename watcher/applier/{framework/messaging/trigger_action_plan.py => messaging/trigger.py} (94%) rename watcher/applier/{framework/command => primitive}/__init__.py (100%) rename watcher/applier/{api/primitive_command.py => primitive/base.py} (95%) rename watcher/applier/{framework/command/hypervisor_state_command.py => primitive/hypervisor_state.py} (90%) rename watcher/applier/{framework/command/migrate_command.py => primitive/migration.py} (94%) rename watcher/applier/{framework/command/nop_command.py => primitive/nop.py} (89%) rename watcher/applier/{framework/command/power_state_command.py => primitive/power_state.py} (89%) rename watcher/applier/{framework/command => primitive}/wrapper/__init__.py (100%) rename watcher/applier/{framework/command => primitive}/wrapper/nova_wrapper.py (100%) rename watcher/applier/{api => }/promise.py (100%) rename watcher/applier/{framework => }/rpcapi.py (94%) rename watcher/{applier/framework/messaging => tests/applier/execution}/__init__.py (100%) rename watcher/tests/applier/{framework => execution}/test_command_executor.py (96%) rename watcher/tests/applier/{framework => mapper}/__init__.py (100%) rename watcher/tests/applier/{framework => mapper}/test_command_mapper.py (95%) rename watcher/tests/applier/{framework/command => messaging}/__init__.py (100%) rename watcher/tests/applier/{framework/command => messaging}/test_launch_action_plan_command.py (94%) rename watcher/tests/applier/{framework => }/messaging/test_launch_action_plan_endpoint.py (93%) rename watcher/tests/applier/{framework/command/wrapper => primitive}/__init__.py (100%) rename watcher/tests/applier/{framework/messaging => primitive/wrapper}/__init__.py (100%) rename watcher/tests/applier/{framework/command => primitive}/wrapper/test_nova_wrapper.py (96%) rename watcher/tests/applier/{framework => }/test_applier_manager.py (93%) rename watcher/tests/applier/{framework => }/test_rpcapi.py (97%) diff --git a/watcher/api/controllers/v1/action_plan.py b/watcher/api/controllers/v1/action_plan.py index 857e24f3c..53f34c62e 100644 --- a/watcher/api/controllers/v1/action_plan.py +++ b/watcher/api/controllers/v1/action_plan.py @@ -28,7 +28,7 @@ from watcher.api.controllers import link from watcher.api.controllers.v1 import collection from watcher.api.controllers.v1 import types from watcher.api.controllers.v1 import utils as api_utils -from watcher.applier.framework.rpcapi import ApplierAPI +from watcher.applier.rpcapi import ApplierAPI from watcher.common import exception from watcher import objects diff --git a/watcher/applier/api/applier.py b/watcher/applier/base.py similarity index 100% rename from watcher/applier/api/applier.py rename to watcher/applier/base.py diff --git a/watcher/applier/framework/default_applier.py b/watcher/applier/default.py similarity index 92% rename from watcher/applier/framework/default_applier.py rename to watcher/applier/default.py index 2421c0454..1dde22904 100644 --- a/watcher/applier/framework/default_applier.py +++ b/watcher/applier/default.py @@ -16,8 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from watcher.applier.api.applier import Applier -from watcher.applier.framework.command_executor import CommandExecutor +from watcher.applier.base import Applier +from watcher.applier.execution.executor import CommandExecutor from watcher.objects import Action from watcher.objects import ActionPlan diff --git a/watcher/applier/api/__init__.py b/watcher/applier/execution/__init__.py similarity index 100% rename from watcher/applier/api/__init__.py rename to watcher/applier/execution/__init__.py diff --git a/watcher/applier/framework/deploy_phase.py b/watcher/applier/execution/deploy_phase.py similarity index 100% rename from watcher/applier/framework/deploy_phase.py rename to watcher/applier/execution/deploy_phase.py diff --git a/watcher/applier/framework/command_executor.py b/watcher/applier/execution/executor.py similarity index 92% rename from watcher/applier/framework/command_executor.py rename to watcher/applier/execution/executor.py index 51ee995ee..ff0650b16 100644 --- a/watcher/applier/framework/command_executor.py +++ b/watcher/applier/execution/executor.py @@ -18,11 +18,10 @@ # from oslo_log import log -from watcher.applier.framework.default_command_mapper import \ - DefaultCommandMapper +from watcher.applier.mapper.default import DefaultCommandMapper -from watcher.applier.framework.deploy_phase import DeployPhase -from watcher.applier.framework.messaging.events import Events +from watcher.applier.execution.deploy_phase import DeployPhase +from watcher.applier.messaging.events import Events from watcher.common.messaging.events.event import Event from watcher.objects import Action from watcher.objects.action_plan import Status diff --git a/watcher/applier/framework/manager_applier.py b/watcher/applier/manager.py similarity index 97% rename from watcher/applier/framework/manager_applier.py rename to watcher/applier/manager.py index 883732b27..f3b7c0803 100644 --- a/watcher/applier/framework/manager_applier.py +++ b/watcher/applier/manager.py @@ -21,8 +21,7 @@ from concurrent.futures import ThreadPoolExecutor from oslo_config import cfg from oslo_log import log -from watcher.applier.framework.messaging.trigger_action_plan import \ - TriggerActionPlan +from watcher.applier.messaging.trigger import TriggerActionPlan from watcher.common.messaging.messaging_core import MessagingCore from watcher.common.messaging.notification_handler import NotificationHandler from watcher.decision_engine.messaging.events import Events diff --git a/watcher/applier/api/messaging/__init__.py b/watcher/applier/mapper/__init__.py similarity index 100% rename from watcher/applier/api/messaging/__init__.py rename to watcher/applier/mapper/__init__.py diff --git a/watcher/applier/api/command_mapper.py b/watcher/applier/mapper/base.py similarity index 100% rename from watcher/applier/api/command_mapper.py rename to watcher/applier/mapper/base.py diff --git a/watcher/applier/framework/default_command_mapper.py b/watcher/applier/mapper/default.py similarity index 81% rename from watcher/applier/framework/default_command_mapper.py rename to watcher/applier/mapper/default.py index f26626627..f70bf17b5 100644 --- a/watcher/applier/framework/default_command_mapper.py +++ b/watcher/applier/mapper/default.py @@ -18,13 +18,11 @@ # -from watcher.applier.api.command_mapper import CommandMapper -from watcher.applier.framework.command.hypervisor_state_command import \ - HypervisorStateCommand -from watcher.applier.framework.command.migrate_command import MigrateCommand -from watcher.applier.framework.command.nop_command import NopCommand -from watcher.applier.framework.command.power_state_command import \ - PowerStateCommand +from watcher.applier.mapper.base import CommandMapper +from watcher.applier.primitive.hypervisor_state import HypervisorStateCommand +from watcher.applier.primitive.migration import MigrateCommand +from watcher.applier.primitive.nop import NopCommand +from watcher.applier.primitive.power_state import PowerStateCommand from watcher.common.exception import ActionNotFound from watcher.decision_engine.planner.default import Primitives diff --git a/watcher/applier/framework/__init__.py b/watcher/applier/messaging/__init__.py similarity index 100% rename from watcher/applier/framework/__init__.py rename to watcher/applier/messaging/__init__.py diff --git a/watcher/applier/api/messaging/applier_command.py b/watcher/applier/messaging/applier_command.py similarity index 100% rename from watcher/applier/api/messaging/applier_command.py rename to watcher/applier/messaging/applier_command.py diff --git a/watcher/applier/framework/messaging/events.py b/watcher/applier/messaging/events.py similarity index 100% rename from watcher/applier/framework/messaging/events.py rename to watcher/applier/messaging/events.py diff --git a/watcher/applier/framework/messaging/launch_action_plan.py b/watcher/applier/messaging/launcher.py similarity index 92% rename from watcher/applier/framework/messaging/launch_action_plan.py rename to watcher/applier/messaging/launcher.py index 43cb885a1..1da7e0e16 100644 --- a/watcher/applier/framework/messaging/launch_action_plan.py +++ b/watcher/applier/messaging/launcher.py @@ -18,9 +18,9 @@ # from oslo_log import log -from watcher.applier.api.messaging.applier_command import ApplierCommand -from watcher.applier.framework.default_applier import DefaultApplier -from watcher.applier.framework.messaging.events import Events +from watcher.applier.default import DefaultApplier +from watcher.applier.messaging.applier_command import ApplierCommand +from watcher.applier.messaging.events import Events from watcher.common.messaging.events.event import Event from watcher.objects.action_plan import ActionPlan from watcher.objects.action_plan import Status diff --git a/watcher/applier/framework/messaging/trigger_action_plan.py b/watcher/applier/messaging/trigger.py similarity index 94% rename from watcher/applier/framework/messaging/trigger_action_plan.py rename to watcher/applier/messaging/trigger.py index 3a5925094..dd07198ad 100644 --- a/watcher/applier/framework/messaging/trigger_action_plan.py +++ b/watcher/applier/messaging/trigger.py @@ -18,8 +18,7 @@ # from oslo_log import log -from watcher.applier.framework.messaging.launch_action_plan import \ - LaunchActionPlanCommand +from watcher.applier.messaging.launcher import LaunchActionPlanCommand LOG = log.getLogger(__name__) diff --git a/watcher/applier/framework/command/__init__.py b/watcher/applier/primitive/__init__.py similarity index 100% rename from watcher/applier/framework/command/__init__.py rename to watcher/applier/primitive/__init__.py diff --git a/watcher/applier/api/primitive_command.py b/watcher/applier/primitive/base.py similarity index 95% rename from watcher/applier/api/primitive_command.py rename to watcher/applier/primitive/base.py index 48f023fa8..2e9b86efd 100644 --- a/watcher/applier/api/primitive_command.py +++ b/watcher/applier/primitive/base.py @@ -18,7 +18,7 @@ # import abc import six -from watcher.applier.api.promise import Promise +from watcher.applier.promise import Promise @six.add_metaclass(abc.ABCMeta) diff --git a/watcher/applier/framework/command/hypervisor_state_command.py b/watcher/applier/primitive/hypervisor_state.py similarity index 90% rename from watcher/applier/framework/command/hypervisor_state_command.py rename to watcher/applier/primitive/hypervisor_state.py index 95d8b9f42..a8a4be417 100644 --- a/watcher/applier/framework/command/hypervisor_state_command.py +++ b/watcher/applier/primitive/hypervisor_state.py @@ -20,9 +20,9 @@ from oslo_config import cfg -from watcher.applier.api.primitive_command import PrimitiveCommand -from watcher.applier.api.promise import Promise -from watcher.applier.framework.command.wrapper.nova_wrapper import NovaWrapper +from watcher.applier.primitive.base import PrimitiveCommand +from watcher.applier.primitive.wrapper.nova_wrapper import NovaWrapper +from watcher.applier.promise import Promise from watcher.common.keystone import KeystoneClient from watcher.decision_engine.model.hypervisor_state import HypervisorState diff --git a/watcher/applier/framework/command/migrate_command.py b/watcher/applier/primitive/migration.py similarity index 94% rename from watcher/applier/framework/command/migrate_command.py rename to watcher/applier/primitive/migration.py index 8eb05ae2e..2e370b68b 100644 --- a/watcher/applier/framework/command/migrate_command.py +++ b/watcher/applier/primitive/migration.py @@ -21,10 +21,9 @@ from keystoneclient.auth.identity import v3 from keystoneclient import session from oslo_config import cfg -from watcher.applier.api.primitive_command import PrimitiveCommand -from watcher.applier.api.promise import Promise -from watcher.applier.framework.command.wrapper.nova_wrapper import NovaWrapper - +from watcher.applier.primitive.base import PrimitiveCommand +from watcher.applier.primitive.wrapper.nova_wrapper import NovaWrapper +from watcher.applier.promise import Promise from watcher.common.keystone import KeystoneClient from watcher.decision_engine.planner.default import Primitives diff --git a/watcher/applier/framework/command/nop_command.py b/watcher/applier/primitive/nop.py similarity index 89% rename from watcher/applier/framework/command/nop_command.py rename to watcher/applier/primitive/nop.py index d781b4baf..fc78f2de2 100644 --- a/watcher/applier/framework/command/nop_command.py +++ b/watcher/applier/primitive/nop.py @@ -19,8 +19,8 @@ from oslo_log import log -from watcher.applier.api.primitive_command import PrimitiveCommand -from watcher.applier.api.promise import Promise +from watcher.applier.primitive.base import PrimitiveCommand +from watcher.applier.promise import Promise LOG = log.getLogger(__name__) diff --git a/watcher/applier/framework/command/power_state_command.py b/watcher/applier/primitive/power_state.py similarity index 89% rename from watcher/applier/framework/command/power_state_command.py rename to watcher/applier/primitive/power_state.py index d88b75621..10f0e421a 100644 --- a/watcher/applier/framework/command/power_state_command.py +++ b/watcher/applier/primitive/power_state.py @@ -16,8 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from watcher.applier.api.primitive_command import PrimitiveCommand -from watcher.applier.api.promise import Promise +from watcher.applier.primitive.base import PrimitiveCommand +from watcher.applier.promise import Promise class PowerStateCommand(PrimitiveCommand): diff --git a/watcher/applier/framework/command/wrapper/__init__.py b/watcher/applier/primitive/wrapper/__init__.py similarity index 100% rename from watcher/applier/framework/command/wrapper/__init__.py rename to watcher/applier/primitive/wrapper/__init__.py diff --git a/watcher/applier/framework/command/wrapper/nova_wrapper.py b/watcher/applier/primitive/wrapper/nova_wrapper.py similarity index 100% rename from watcher/applier/framework/command/wrapper/nova_wrapper.py rename to watcher/applier/primitive/wrapper/nova_wrapper.py diff --git a/watcher/applier/api/promise.py b/watcher/applier/promise.py similarity index 100% rename from watcher/applier/api/promise.py rename to watcher/applier/promise.py diff --git a/watcher/applier/framework/rpcapi.py b/watcher/applier/rpcapi.py similarity index 94% rename from watcher/applier/framework/rpcapi.py rename to watcher/applier/rpcapi.py index 89485a1ce..016a78a6d 100644 --- a/watcher/applier/framework/rpcapi.py +++ b/watcher/applier/rpcapi.py @@ -21,8 +21,8 @@ from oslo_log import log import oslo_messaging as om -from watcher.applier.framework.manager_applier import APPLIER_MANAGER_OPTS -from watcher.applier.framework.manager_applier import opt_group +from watcher.applier.manager import APPLIER_MANAGER_OPTS +from watcher.applier.manager import opt_group from watcher.common import exception from watcher.common.messaging.messaging_core import MessagingCore from watcher.common.messaging.notification_handler import NotificationHandler diff --git a/watcher/cmd/applier.py b/watcher/cmd/applier.py index 3e005d94d..7518136df 100644 --- a/watcher/cmd/applier.py +++ b/watcher/cmd/applier.py @@ -24,7 +24,7 @@ import sys from oslo_config import cfg from oslo_log import log as logging -from watcher.applier.framework.manager_applier import ApplierManager +from watcher.applier.manager import ApplierManager from watcher.common import service from watcher import i18n diff --git a/watcher/metrics_engine/cluster_model_collector/manager.py b/watcher/metrics_engine/cluster_model_collector/manager.py index b4e215d99..f3777477b 100644 --- a/watcher/metrics_engine/cluster_model_collector/manager.py +++ b/watcher/metrics_engine/cluster_model_collector/manager.py @@ -20,7 +20,7 @@ from oslo_config import cfg from oslo_log import log -from watcher.applier.framework.command.wrapper.nova_wrapper import NovaWrapper +from watcher.applier.primitive.wrapper.nova_wrapper import NovaWrapper from watcher.common.keystone import KeystoneClient from watcher.metrics_engine.cluster_model_collector.nova import \ NovaClusterModelCollector diff --git a/watcher/opts.py b/watcher/opts.py index 57d135017..ff7128059 100644 --- a/watcher/opts.py +++ b/watcher/opts.py @@ -16,7 +16,7 @@ # limitations under the License. import watcher.api.app -from watcher.applier.framework import manager_applier +from watcher.applier import manager_applier from watcher.decision_engine import manager from watcher.decision_engine.strategy.selector import default \ as strategy_selector diff --git a/watcher/tests/api/v1/test_actions_plans.py b/watcher/tests/api/v1/test_actions_plans.py index 3d3223cbe..ae1b876e1 100644 --- a/watcher/tests/api/v1/test_actions_plans.py +++ b/watcher/tests/api/v1/test_actions_plans.py @@ -17,7 +17,7 @@ from oslo_utils import timeutils from wsme import types as wtypes from watcher.api.controllers.v1 import action_plan as api_action_plan -from watcher.applier.framework import rpcapi as aapi +from watcher.applier import rpcapi as aapi from watcher.common import utils from watcher.db import api as db_api from watcher import objects diff --git a/watcher/applier/framework/messaging/__init__.py b/watcher/tests/applier/execution/__init__.py similarity index 100% rename from watcher/applier/framework/messaging/__init__.py rename to watcher/tests/applier/execution/__init__.py diff --git a/watcher/tests/applier/framework/test_command_executor.py b/watcher/tests/applier/execution/test_command_executor.py similarity index 96% rename from watcher/tests/applier/framework/test_command_executor.py rename to watcher/tests/applier/execution/test_command_executor.py index b5a26f417..162c87cb4 100644 --- a/watcher/tests/applier/framework/test_command_executor.py +++ b/watcher/tests/applier/execution/test_command_executor.py @@ -18,7 +18,7 @@ # import mock -from watcher.applier.framework.command_executor import CommandExecutor +from watcher.applier.execution.executor import CommandExecutor from watcher import objects from watcher.common import utils diff --git a/watcher/tests/applier/framework/__init__.py b/watcher/tests/applier/mapper/__init__.py similarity index 100% rename from watcher/tests/applier/framework/__init__.py rename to watcher/tests/applier/mapper/__init__.py diff --git a/watcher/tests/applier/framework/test_command_mapper.py b/watcher/tests/applier/mapper/test_command_mapper.py similarity index 95% rename from watcher/tests/applier/framework/test_command_mapper.py rename to watcher/tests/applier/mapper/test_command_mapper.py index 69a1116b3..8d3e9f328 100644 --- a/watcher/tests/applier/framework/test_command_mapper.py +++ b/watcher/tests/applier/mapper/test_command_mapper.py @@ -17,8 +17,7 @@ # limitations under the License. # import mock -from watcher.applier.framework.default_command_mapper import \ - DefaultCommandMapper +from watcher.applier.mapper.default import DefaultCommandMapper from watcher.decision_engine.planner.default import Primitives from watcher.tests import base diff --git a/watcher/tests/applier/framework/command/__init__.py b/watcher/tests/applier/messaging/__init__.py similarity index 100% rename from watcher/tests/applier/framework/command/__init__.py rename to watcher/tests/applier/messaging/__init__.py diff --git a/watcher/tests/applier/framework/command/test_launch_action_plan_command.py b/watcher/tests/applier/messaging/test_launch_action_plan_command.py similarity index 94% rename from watcher/tests/applier/framework/command/test_launch_action_plan_command.py rename to watcher/tests/applier/messaging/test_launch_action_plan_command.py index 878a05e54..815a1b51c 100644 --- a/watcher/tests/applier/framework/command/test_launch_action_plan_command.py +++ b/watcher/tests/applier/messaging/test_launch_action_plan_command.py @@ -20,9 +20,8 @@ from mock import call from mock import MagicMock -from watcher.applier.framework.messaging.events import Events -from watcher.applier.framework.messaging.launch_action_plan import \ - LaunchActionPlanCommand +from watcher.applier.messaging.events import Events +from watcher.applier.messaging.launcher import LaunchActionPlanCommand from watcher.objects.action_plan import Status from watcher.objects import ActionPlan diff --git a/watcher/tests/applier/framework/messaging/test_launch_action_plan_endpoint.py b/watcher/tests/applier/messaging/test_launch_action_plan_endpoint.py similarity index 93% rename from watcher/tests/applier/framework/messaging/test_launch_action_plan_endpoint.py rename to watcher/tests/applier/messaging/test_launch_action_plan_endpoint.py index ff4feda59..2ce121bb5 100644 --- a/watcher/tests/applier/framework/messaging/test_launch_action_plan_endpoint.py +++ b/watcher/tests/applier/messaging/test_launch_action_plan_endpoint.py @@ -19,8 +19,7 @@ from mock import MagicMock -from watcher.applier.framework.messaging.trigger_action_plan import \ - TriggerActionPlan +from watcher.applier.messaging.trigger import TriggerActionPlan from watcher.common import utils from watcher.tests import base diff --git a/watcher/tests/applier/framework/command/wrapper/__init__.py b/watcher/tests/applier/primitive/__init__.py similarity index 100% rename from watcher/tests/applier/framework/command/wrapper/__init__.py rename to watcher/tests/applier/primitive/__init__.py diff --git a/watcher/tests/applier/framework/messaging/__init__.py b/watcher/tests/applier/primitive/wrapper/__init__.py similarity index 100% rename from watcher/tests/applier/framework/messaging/__init__.py rename to watcher/tests/applier/primitive/wrapper/__init__.py diff --git a/watcher/tests/applier/framework/command/wrapper/test_nova_wrapper.py b/watcher/tests/applier/primitive/wrapper/test_nova_wrapper.py similarity index 96% rename from watcher/tests/applier/framework/command/wrapper/test_nova_wrapper.py rename to watcher/tests/applier/primitive/wrapper/test_nova_wrapper.py index 06fe39517..79d36ea43 100644 --- a/watcher/tests/applier/framework/command/wrapper/test_nova_wrapper.py +++ b/watcher/tests/applier/primitive/wrapper/test_nova_wrapper.py @@ -18,7 +18,7 @@ # import mock import time -from watcher.applier.framework.command.wrapper.nova_wrapper import NovaWrapper +from watcher.applier.primitive.wrapper.nova_wrapper import NovaWrapper from watcher.common import utils from watcher.tests import base diff --git a/watcher/tests/applier/framework/test_applier_manager.py b/watcher/tests/applier/test_applier_manager.py similarity index 93% rename from watcher/tests/applier/framework/test_applier_manager.py rename to watcher/tests/applier/test_applier_manager.py index 20da715de..a707df1dd 100644 --- a/watcher/tests/applier/framework/test_applier_manager.py +++ b/watcher/tests/applier/test_applier_manager.py @@ -16,7 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from watcher.applier.framework.manager_applier import ApplierManager +from watcher.applier.manager import ApplierManager from watcher.common.messaging.events.event import Event from watcher.tests import base diff --git a/watcher/tests/applier/framework/test_rpcapi.py b/watcher/tests/applier/test_rpcapi.py similarity index 97% rename from watcher/tests/applier/framework/test_rpcapi.py rename to watcher/tests/applier/test_rpcapi.py index e1671cbe3..316aa8018 100644 --- a/watcher/tests/applier/framework/test_rpcapi.py +++ b/watcher/tests/applier/test_rpcapi.py @@ -19,7 +19,7 @@ import mock import oslo_messaging as om -from watcher.applier.framework.rpcapi import ApplierAPI +from watcher.applier.rpcapi import ApplierAPI from watcher.common import exception from watcher.common import utils diff --git a/watcher/tests/cmd/test_applier.py b/watcher/tests/cmd/test_applier.py index 6155ae86c..84f60ac68 100644 --- a/watcher/tests/cmd/test_applier.py +++ b/watcher/tests/cmd/test_applier.py @@ -21,7 +21,7 @@ import types from mock import patch from oslo_config import cfg -from watcher.applier.framework.manager_applier import ApplierManager +from watcher.applier.manager import ApplierManager from watcher.cmd import applier from watcher.tests.base import BaseTestCase