watcher.decision_engine.strategy.strategies.base
Module¶A Strategy is an algorithm implementation which is able to find a Solution for a given Goal.
There may be several potential strategies which are able to achieve the same Goal. This is why it is possible to configure which specific Strategy should be used for each Goal.
Some strategies may provide better optimization results but may take more time to find an optimal Solution.
When a new Goal is added to the Watcher configuration, at least one default associated Strategy should be provided as well.
Some default implementations are provided, but it is possible to develop new implementations which are dynamically loaded by Watcher at launch time.
watcher.decision_engine.strategy.strategies.base.
BaseStrategy
(config, osc=None)[source]¶Bases: watcher.common.loader.loadable.Loadable
A base class for all the strategies
A Strategy is an algorithm implementation which is able to find a Solution for a given Goal.
do_execute
()[source]¶Strategy execution phase
This phase is where you should put the main logic of your strategy.
execute
()[source]¶Execute a strategy
Returns: | A computed solution (via a placement algorithm) |
---|---|
Return type: | BaseSolution instance |
get_config_opts
()[source]¶Defines the configuration options to be associated to this loadable
Returns: | A list of configuration options relative to this Loadable |
---|---|
Return type: | list of oslo_config.cfg.Opt instances |
watcher.decision_engine.strategy.strategies.base.
DummyBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
HostMaintenanceBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
NoisyNeighborBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
SavingEnergyBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
ServerConsolidationBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
StrategyEndpoint
(messaging)[source]¶Bases: object
watcher.decision_engine.strategy.strategies.base.
ThermalOptimizationBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
UnclassifiedStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
This base class is used to ease the development of new strategies
The goal defined within this strategy can be used to simplify the documentation explaining how to implement a new strategy plugin by omitting the need for the strategy developer to define a goal straight away.
watcher.decision_engine.strategy.strategies.base.
WorkloadStabilizationBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
watcher.decision_engine.strategy.strategies.base.
ZoneMigrationBaseStrategy
(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.BaseStrategy
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.