Merge "Code refactoring - Watcher Applier package"
This commit is contained in:
@@ -28,7 +28,7 @@ from watcher.api.controllers import link
|
|||||||
from watcher.api.controllers.v1 import collection
|
from watcher.api.controllers.v1 import collection
|
||||||
from watcher.api.controllers.v1 import types
|
from watcher.api.controllers.v1 import types
|
||||||
from watcher.api.controllers.v1 import utils as api_utils
|
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.common import exception
|
||||||
from watcher import objects
|
from watcher import objects
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from watcher.applier.api.applier import Applier
|
from watcher.applier.base import Applier
|
||||||
from watcher.applier.framework.command_executor import CommandExecutor
|
from watcher.applier.execution.executor import CommandExecutor
|
||||||
from watcher.objects import Action
|
from watcher.objects import Action
|
||||||
from watcher.objects import ActionPlan
|
from watcher.objects import ActionPlan
|
||||||
|
|
||||||
@@ -18,11 +18,10 @@
|
|||||||
#
|
#
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.applier.framework.default_command_mapper import \
|
from watcher.applier.mapper.default import DefaultCommandMapper
|
||||||
DefaultCommandMapper
|
|
||||||
|
|
||||||
from watcher.applier.framework.deploy_phase import DeployPhase
|
from watcher.applier.execution.deploy_phase import DeployPhase
|
||||||
from watcher.applier.framework.messaging.events import Events
|
from watcher.applier.messaging.events import Events
|
||||||
from watcher.common.messaging.events.event import Event
|
from watcher.common.messaging.events.event import Event
|
||||||
from watcher.objects import Action
|
from watcher.objects import Action
|
||||||
from watcher.objects.action_plan import Status
|
from watcher.objects.action_plan import Status
|
||||||
@@ -21,8 +21,7 @@ from concurrent.futures import ThreadPoolExecutor
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.applier.framework.messaging.trigger_action_plan import \
|
from watcher.applier.messaging.trigger import TriggerActionPlan
|
||||||
TriggerActionPlan
|
|
||||||
from watcher.common.messaging.messaging_core import MessagingCore
|
from watcher.common.messaging.messaging_core import MessagingCore
|
||||||
from watcher.common.messaging.notification_handler import NotificationHandler
|
from watcher.common.messaging.notification_handler import NotificationHandler
|
||||||
from watcher.decision_engine.messaging.events import Events
|
from watcher.decision_engine.messaging.events import Events
|
||||||
@@ -18,13 +18,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
from watcher.applier.api.command_mapper import CommandMapper
|
from watcher.applier.mapper.base import CommandMapper
|
||||||
from watcher.applier.framework.command.hypervisor_state_command import \
|
from watcher.applier.primitive.hypervisor_state import HypervisorStateCommand
|
||||||
HypervisorStateCommand
|
from watcher.applier.primitive.migration import MigrateCommand
|
||||||
from watcher.applier.framework.command.migrate_command import MigrateCommand
|
from watcher.applier.primitive.nop import NopCommand
|
||||||
from watcher.applier.framework.command.nop_command import NopCommand
|
from watcher.applier.primitive.power_state import PowerStateCommand
|
||||||
from watcher.applier.framework.command.power_state_command import \
|
|
||||||
PowerStateCommand
|
|
||||||
from watcher.common.exception import ActionNotFound
|
from watcher.common.exception import ActionNotFound
|
||||||
from watcher.decision_engine.planner.default import Primitives
|
from watcher.decision_engine.planner.default import Primitives
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@
|
|||||||
#
|
#
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.applier.api.messaging.applier_command import ApplierCommand
|
from watcher.applier.default import DefaultApplier
|
||||||
from watcher.applier.framework.default_applier import DefaultApplier
|
from watcher.applier.messaging.applier_command import ApplierCommand
|
||||||
from watcher.applier.framework.messaging.events import Events
|
from watcher.applier.messaging.events import Events
|
||||||
from watcher.common.messaging.events.event import Event
|
from watcher.common.messaging.events.event import Event
|
||||||
from watcher.objects.action_plan import ActionPlan
|
from watcher.objects.action_plan import ActionPlan
|
||||||
from watcher.objects.action_plan import Status
|
from watcher.objects.action_plan import Status
|
||||||
@@ -18,8 +18,7 @@
|
|||||||
#
|
#
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.applier.framework.messaging.launch_action_plan import \
|
from watcher.applier.messaging.launcher import LaunchActionPlanCommand
|
||||||
LaunchActionPlanCommand
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
import abc
|
import abc
|
||||||
import six
|
import six
|
||||||
from watcher.applier.api.promise import Promise
|
from watcher.applier.promise import Promise
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from watcher.applier.api.primitive_command import PrimitiveCommand
|
from watcher.applier.primitive.base import PrimitiveCommand
|
||||||
from watcher.applier.api.promise import Promise
|
from watcher.applier.primitive.wrapper.nova_wrapper import NovaWrapper
|
||||||
from watcher.applier.framework.command.wrapper.nova_wrapper import NovaWrapper
|
from watcher.applier.promise import Promise
|
||||||
|
|
||||||
from watcher.common.keystone import KeystoneClient
|
from watcher.common.keystone import KeystoneClient
|
||||||
from watcher.decision_engine.model.hypervisor_state import HypervisorState
|
from watcher.decision_engine.model.hypervisor_state import HypervisorState
|
||||||
@@ -21,10 +21,9 @@ from keystoneclient.auth.identity import v3
|
|||||||
from keystoneclient import session
|
from keystoneclient import session
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from watcher.applier.api.primitive_command import PrimitiveCommand
|
from watcher.applier.primitive.base import PrimitiveCommand
|
||||||
from watcher.applier.api.promise import Promise
|
from watcher.applier.primitive.wrapper.nova_wrapper import NovaWrapper
|
||||||
from watcher.applier.framework.command.wrapper.nova_wrapper import NovaWrapper
|
from watcher.applier.promise import Promise
|
||||||
|
|
||||||
from watcher.common.keystone import KeystoneClient
|
from watcher.common.keystone import KeystoneClient
|
||||||
from watcher.decision_engine.planner.default import Primitives
|
from watcher.decision_engine.planner.default import Primitives
|
||||||
|
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher.applier.api.primitive_command import PrimitiveCommand
|
from watcher.applier.primitive.base import PrimitiveCommand
|
||||||
from watcher.applier.api.promise import Promise
|
from watcher.applier.promise import Promise
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from watcher.applier.api.primitive_command import PrimitiveCommand
|
from watcher.applier.primitive.base import PrimitiveCommand
|
||||||
from watcher.applier.api.promise import Promise
|
from watcher.applier.promise import Promise
|
||||||
|
|
||||||
|
|
||||||
class PowerStateCommand(PrimitiveCommand):
|
class PowerStateCommand(PrimitiveCommand):
|
||||||
@@ -21,8 +21,8 @@ from oslo_log import log
|
|||||||
import oslo_messaging as om
|
import oslo_messaging as om
|
||||||
|
|
||||||
|
|
||||||
from watcher.applier.framework.manager_applier import APPLIER_MANAGER_OPTS
|
from watcher.applier.manager import APPLIER_MANAGER_OPTS
|
||||||
from watcher.applier.framework.manager_applier import opt_group
|
from watcher.applier.manager import opt_group
|
||||||
from watcher.common import exception
|
from watcher.common import exception
|
||||||
from watcher.common.messaging.messaging_core import MessagingCore
|
from watcher.common.messaging.messaging_core import MessagingCore
|
||||||
from watcher.common.messaging.notification_handler import NotificationHandler
|
from watcher.common.messaging.notification_handler import NotificationHandler
|
||||||
@@ -24,7 +24,7 @@ import sys
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
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.common import service
|
||||||
from watcher import i18n
|
from watcher import i18n
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
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.common.keystone import KeystoneClient
|
||||||
from watcher.metrics_engine.cluster_model_collector.nova import \
|
from watcher.metrics_engine.cluster_model_collector.nova import \
|
||||||
NovaClusterModelCollector
|
NovaClusterModelCollector
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import watcher.api.app
|
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 import manager
|
||||||
from watcher.decision_engine.strategy.selector import default \
|
from watcher.decision_engine.strategy.selector import default \
|
||||||
as strategy_selector
|
as strategy_selector
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from oslo_utils import timeutils
|
|||||||
from wsme import types as wtypes
|
from wsme import types as wtypes
|
||||||
|
|
||||||
from watcher.api.controllers.v1 import action_plan as api_action_plan
|
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.common import utils
|
||||||
from watcher.db import api as db_api
|
from watcher.db import api as db_api
|
||||||
from watcher import objects
|
from watcher import objects
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from watcher.applier.framework.command_executor import CommandExecutor
|
from watcher.applier.execution.executor import CommandExecutor
|
||||||
from watcher import objects
|
from watcher import objects
|
||||||
|
|
||||||
from watcher.common import utils
|
from watcher.common import utils
|
||||||
@@ -17,8 +17,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
import mock
|
import mock
|
||||||
from watcher.applier.framework.default_command_mapper import \
|
from watcher.applier.mapper.default import DefaultCommandMapper
|
||||||
DefaultCommandMapper
|
|
||||||
from watcher.decision_engine.planner.default import Primitives
|
from watcher.decision_engine.planner.default import Primitives
|
||||||
from watcher.tests import base
|
from watcher.tests import base
|
||||||
|
|
||||||
@@ -20,9 +20,8 @@ from mock import call
|
|||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
|
|
||||||
|
|
||||||
from watcher.applier.framework.messaging.events import Events
|
from watcher.applier.messaging.events import Events
|
||||||
from watcher.applier.framework.messaging.launch_action_plan import \
|
from watcher.applier.messaging.launcher import LaunchActionPlanCommand
|
||||||
LaunchActionPlanCommand
|
|
||||||
|
|
||||||
from watcher.objects.action_plan import Status
|
from watcher.objects.action_plan import Status
|
||||||
from watcher.objects import ActionPlan
|
from watcher.objects import ActionPlan
|
||||||
@@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
from watcher.applier.framework.messaging.trigger_action_plan import \
|
from watcher.applier.messaging.trigger import TriggerActionPlan
|
||||||
TriggerActionPlan
|
|
||||||
from watcher.common import utils
|
from watcher.common import utils
|
||||||
from watcher.tests import base
|
from watcher.tests import base
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
import mock
|
import mock
|
||||||
import time
|
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.common import utils
|
||||||
from watcher.tests import base
|
from watcher.tests import base
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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.common.messaging.events.event import Event
|
||||||
from watcher.tests import base
|
from watcher.tests import base
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
import oslo_messaging as om
|
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 exception
|
||||||
from watcher.common import utils
|
from watcher.common import utils
|
||||||
@@ -21,7 +21,7 @@ import types
|
|||||||
|
|
||||||
from mock import patch
|
from mock import patch
|
||||||
from oslo_config import cfg
|
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.cmd import applier
|
||||||
from watcher.tests.base import BaseTestCase
|
from watcher.tests.base import BaseTestCase
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user