watcher.api.controllers.v1.action module

watcher.api.controllers.v1.action module

An Action is what enables Watcher to transform the current state of a Cluster after an Audit.

An Action is an atomic task which changes the current state of a target Managed resource of the OpenStack Cluster such as:

  • Live migration of an instance from one compute node to another compute node with Nova
  • Changing the power level of a compute node (ACPI level, …)
  • Changing the current state of a compute node (enable or disable) with Nova

In most cases, an Action triggers some concrete commands on an existing OpenStack module (Nova, Neutron, Cinder, Ironic, etc.).

An Action has a life-cycle and its current state may be one of the following:

Some default implementations are provided, but it is possible to develop new implementations which are dynamically loaded by Watcher at launch time.

service None

Bases: watcher.api.controllers.base.APIBase

API representation of a action.

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

classmethod Action.sample(expand=True)
service None

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

API representation of a collection of actions.

classmethod ActionCollection.sample()
service None

Bases: watcher.api.controllers.v1.types.JsonPatchType

static ActionPatchType.mandatory_attrs()

Returns a list of mandatory attributes.

Mandatory attributes can’t be removed from the document. This method should be overwritten by derived class.

service None

Bases: pecan.rest.RestController

REST controller for Actions.

ActionsController.delete(action_uuid)[source]

Delete a action(forbidden).

Parameters:action_uuid – UUID of a action.
ActionsController.detail(marker=None, limit=None, sort_key='id', sort_dir='asc', action_plan_uuid=None, audit_uuid=None)[source]

Retrieve a list of actions with detail.

Parameters:
  • 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.
  • action_plan_uuid – Optional UUID of an action plan, to get only actions for that action plan.
  • audit_uuid – Optional UUID of an audit, to get only actions for that audit.
ActionsController.get_all(marker=None, limit=None, sort_key='id', sort_dir='asc', action_plan_uuid=None, audit_uuid=None)[source]

Retrieve a list of actions.

Parameters:
  • 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.
  • action_plan_uuid – Optional UUID of an action plan, to get only actions for that action plan.
  • audit_uuid – Optional UUID of an audit, to get only actions for that audit.
ActionsController.get_one(action_uuid)[source]

Retrieve information about the given action.

Parameters:action_uuid – UUID of a action.
ActionsController.patch(action_uuid, patch)[source]

Update an existing action(forbidden).

Parameters:
  • action_uuid – UUID of a action.
  • patch – a json PATCH document to apply to this action.
ActionsController.post(action)[source]

Create a new action(forbidden).

Parameters:action – a action within the request body.
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.