The watcher.api.controllers.v1.strategy Module

The watcher.api.controllers.v1.strategy 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.

class watcher.api.controllers.v1.strategy.StrategiesController[source]

Bases: pecan.rest.RestController

REST controller for Strategies.

detail(*args, **kwargs)[source]

Retrieve a list of strategies with detail.

Parameters:
  • goal – goal UUID or name to filter by.
  • marker – pagination marker for large data sets.
  • limit – maximum number of resources to return in a single result.
  • sort_key – column to sort results by. Default: id.
  • sort_dir – direction to sort. “asc” or “desc”. Default: asc.
get_all(*args, **kwargs)[source]

Retrieve a list of strategies.

Parameters:
  • goal – goal UUID or name to filter by.
  • marker – pagination marker for large data sets.
  • limit – maximum number of resources to return in a single result.
  • sort_key – column to sort results by. Default: id.
  • sort_dir – direction to sort. “asc” or “desc”. Default: asc.
get_one(*args, **kwargs)[source]

Retrieve information about the given strategy.

Parameters:strategy – UUID or name of the strategy.
state(*args, **kwargs)[source]

Retrieve an information about strategy requirements.

Parameters:strategy – name of the strategy.
class watcher.api.controllers.v1.strategy.Strategy(**kwargs)[source]

Bases: watcher.api.controllers.base.APIBase

API representation of a strategy.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a strategy.

classmethod sample(expand=True)[source]
class watcher.api.controllers.v1.strategy.StrategyCollection(**kwargs)[source]

Bases: watcher.api.controllers.v1.collection.Collection

API representation of a collection of strategies.

classmethod sample()[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.