watcher.decision_engine.planner.base

updated: 2018-12-11 07:55

Source code for watcher.decision_engine.planner.base

# -*- encoding: utf-8 -*-# Copyright (c) 2015 b<>com## Authors: Jean-Emile DARTOIS <jean-emile.dartois@b-com.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.#"""The :ref:`Watcher Planner <watcher_planner_definition>` is part of the:ref:`Watcher Decision Engine <watcher_decision_engine_definition>`.This module takes the set of :ref:`Actions <action_definition>` generated by a:ref:`Strategy <strategy_definition>` and builds the design of a workflow whichdefines how-to schedule in time those different:ref:`Actions <action_definition>` and for each:ref:`Action <action_definition>` what are the prerequisite conditions.It is important to schedule :ref:`Actions <action_definition>` in time in orderto prevent overload of the :ref:`Cluster <cluster_definition>` while applyingthe :ref:`Action Plan <action_plan_definition>`. For example, it is importantnot to migrate too many instances at the same time in order to avoid a networkcongestion which may decrease the :ref:`SLA <sla_definition>` for:ref:`Customers <customer_definition>`.It is also important to schedule :ref:`Actions <action_definition>` in order toavoid security issues such as denial of service on core OpenStack services.:ref:`Some default implementations are provided <watcher_planners>`, but it ispossible to :ref:`develop new implementations <implement_planner_plugin>`which are dynamically loaded by Watcher at launch time.See :doc:`../architecture` for more details on this component."""importabcimportsixfromwatcher.common.loaderimportloadable

[docs]@classmethoddefget_config_opts(cls):"""Defines the configuration options to be associated to this loadable :return: A list of configuration options relative to this Loadable :rtype: list of :class:`oslo_config.cfg.Opt` instances """return[]