Added /strategies endpoint in Watcher API
In this changeset, I added the /strategies endpoint to the Watcher API service. This also includes the related Tempest tests. Partially Implements: blueprint get-goal-from-strategy Change-Id: I1b70836e0df2082ab0016ecc207e89fdcb0fc8b9
This commit is contained in:
@@ -259,3 +259,24 @@ class InfraOptimClientJSON(base.BaseInfraOptimClient):
|
||||
:return: Serialized action as a dictionary
|
||||
"""
|
||||
return self._show_request('/actions', action_uuid)
|
||||
|
||||
# ### STRATEGIES ### #
|
||||
|
||||
@base.handle_errors
|
||||
def list_strategies(self, **kwargs):
|
||||
"""List all existing strategies"""
|
||||
return self._list_request('/strategies', **kwargs)
|
||||
|
||||
@base.handle_errors
|
||||
def list_strategies_detail(self, **kwargs):
|
||||
"""Lists details of all existing strategies"""
|
||||
return self._list_request('/strategies/detail', **kwargs)
|
||||
|
||||
@base.handle_errors
|
||||
def show_strategy(self, strategy):
|
||||
"""Gets a specific strategy
|
||||
|
||||
:param strategy_id: Name of the strategy
|
||||
:return: Serialized strategy as a dictionary
|
||||
"""
|
||||
return self._show_request('/strategies', strategy)
|
||||
|
||||
Reference in New Issue
Block a user