The watcher.objects.action Module

class watcher.objects.action.Action(context=None, **kwargs)[source]

Bases: watcher.objects.base.WatcherPersistentObject, watcher.objects.base.WatcherObject, watcher.objects.base.WatcherObjectDictCompat

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

Create an Action record in the DB.

Returns:An Action object.
destroy()[source]

Delete the Action from the DB

classmethod get(context, *args, **kwargs)[source]

Find a action based on its id or uuid and return a Action object.

Parameters:
  • action_id – the id or uuid of a action.
  • eager – Load object fields if True (Default: False)
Returns:

a Action object.

classmethod get_by_id(context, *args, **kwargs)[source]

Find a action based on its integer id and return a Action object.

Parameters:
  • action_id – the id of a action.
  • eager – Load object fields if True (Default: False)
Returns:

a Action object.

classmethod get_by_uuid(context, *args, **kwargs)[source]

Find a action based on uuid and return a Action object.

Parameters:
  • uuid – the uuid of a action.
  • context – Security context
  • eager – Load object fields if True (Default: False)
Returns:

a Action object.

classmethod list(context, *args, **kwargs)[source]

Return a list of Action objects.

Parameters:
  • context – Security context.
  • limit – maximum number of resources to return in a single result.
  • marker – pagination marker for large data sets.
  • filters – Filters to apply. Defaults to None.
  • sort_key – column to sort results by.
  • sort_dir – direction to sort. “asc” or “desc”.
  • eager – Load object fields if True (Default: False)
Returns:

a list of Action object.

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

Loads updates for this Action.

Loads a action with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded action column by column, if there are any updates. :param eager: Load object fields if True (Default: False)

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

Save updates to this Action.

Updates will be made column by column based on the result of self.what_changed().

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

Soft Delete the Audit from the DB

class watcher.objects.action.State[source]

Bases: object