The watcher.decision_engine.scoring.dummy_scoring_container Module

The watcher.decision_engine.scoring.dummy_scoring_container Module

class watcher.decision_engine.scoring.dummy_scoring_container.DummyScoringContainer(config)[source]

Bases: watcher.decision_engine.scoring.base.ScoringEngineContainer

Sample Scoring Engine container returning a list of scoring engines.

Please note that it can be used in dynamic scenarios and the returned list might return instances based on some external configuration (e.g. in database). In order for these scoring engines to become discoverable in Watcher API and Watcher CLI, a database re-sync is required. It can be executed using watcher-sync tool for example.

classmethod get_scoring_engine_list()[source]
class watcher.decision_engine.scoring.dummy_scoring_container.SimpleFunctionScorer(name, description, aggregate_function)[source]

Bases: watcher.decision_engine.scoring.base.ScoringEngine

A simple generic scoring engine for demonstration purposes only.

A generic scoring engine implementation, which is expecting a JSON formatted array of numbers to be passed as an input for score calculation. It then executes the aggregate function on this array and returns an array with a single aggregated number (also JSON formatted).

calculate_score(features)[source]
get_description()[source]
get_metainfo()[source]
get_name()[source]
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.