The watcher.decision_engine.strategy.strategies.dummy_with_scorer Module

The watcher.decision_engine.strategy.strategies.dummy_with_scorer Module

class watcher.decision_engine.strategy.strategies.dummy_with_scorer.DummyWithScorer(config, osc=None)[source]

Bases: watcher.decision_engine.strategy.strategies.base.DummyBaseStrategy

A dummy strategy using dummy scoring engines.

This is a dummy strategy demonstrating how to work with scoring engines. One scoring engine is predicting the workload type of a machine based on the telemetry data, the other one is simply calculating the average value for given elements in a list. Results are then passed to the NOP action.

The strategy is presenting the whole workflow: - Get a reference to a scoring engine - Prepare input data (features) for score calculation - Perform score calculation - Use scorer’s metadata for results interpretation

do_execute()[source]

Strategy execution phase

This phase is where you should put the main logic of your strategy.

classmethod get_display_name()[source]

The goal display name for the strategy

classmethod get_name()[source]

The name of the strategy

classmethod get_schema()[source]

Defines a Schema that the input parameters shall comply to

Returns:A jsonschema format (mandatory default setting)
Return type:dict
classmethod get_translatable_display_name()[source]

The translatable msgid of the strategy

post_execute()[source]

Post-execution phase

This can be used to compute the global efficacy

pre_execute()[source]

Pre-execution phase

This can be used to fetch some pre-requisites or data.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.