watcher.api.controllers.v1.strategy module

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.

service None

Bases: pecan.rest.RestController

REST controller for Strategies.

StrategiesController.detail(goal=None, marker=None, limit=None, sort_key='id', sort_dir='asc')

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.
StrategiesController.get_all(goal=None, marker=None, limit=None, sort_key='id', sort_dir='asc')

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.
StrategiesController.get_one(strategy)

Retrieve information about the given strategy.

Parameters:strategy – UUID or name of the strategy.
StrategiesController.state(strategy)

Retrieve an information about strategy requirements.

Parameters:strategy – name of the strategy.
service None

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 Strategy.sample(expand=True)
service None

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

API representation of a collection of strategies.

classmethod StrategyCollection.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.