In the Watcher system, an Audit is a request for
optimizing a Cluster.
The optimization is done in order to satisfy one Goal
on a given Cluster.
For each Audit, the Watcher system generates an
Action Plan.
To see the life-cycle and description of an Audit
states, visit the Audit State machine.
-
class watcher.api.controllers.v1.audit.Audit(**kwargs)[source]
Bases: watcher.api.controllers.base.APIBase
API representation of a audit.
This class enforces type checking and value constraints, and converts
between the internal object model and the API representation of a audit.
-
classmethod convert_with_links(rpc_audit, expand=True)[source]
-
classmethod sample(expand=True)[source]
-
class watcher.api.controllers.v1.audit.AuditCollection(**kwargs)[source]
Bases: watcher.api.controllers.v1.collection.Collection
API representation of a collection of audits.
-
static convert_with_links(rpc_audits, limit, url=None, expand=False, **kwargs)[source]
-
classmethod sample()[source]
-
class watcher.api.controllers.v1.audit.AuditPatchType(**kw)[source]
Bases: watcher.api.controllers.v1.types.JsonPatchType
-
static mandatory_attrs()[source]
-
static validate(patch)[source]
-
class watcher.api.controllers.v1.audit.AuditPostType(**kw)[source]
Bases: wsme.types.Base
-
as_audit(context)[source]
-
class watcher.api.controllers.v1.audit.AuditsController[source]
Bases: pecan.rest.RestController
REST controller for Audits.
-
delete(*args, **kwargs)[source]
Delete a audit.
Parameters: | audit_uuid – UUID of a audit. |
-
detail(*args, **kwargs)[source]
Retrieve a list of audits 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 audits.
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.
id.
- goal – goal UUID or name to filter by
- strategy – strategy UUID or name to filter by
- host_aggregate – Optional host_aggregate
|
-
get_one(*args, **kwargs)[source]
Retrieve information about the given audit.
Parameters: | audit_uuid – UUID of a audit. |
-
patch(*args, **kwargs)[source]
Update an existing audit.
Parameters: |
- audit_uuid – UUID of a audit.
- patch – a json PATCH document to apply to this audit.
|
-
post(*args, **kwargs)[source]
Create a new audit.
Parameters: | audit_p – a audit within the request body. |