The aodh.api.controllers.v2.alarms Module

The aodh.api.controllers.v2.alarms Module

class aodh.api.controllers.v2.alarms.Alarm(rule=None, time_constraints=None, **kwargs)[source]

Bases: aodh.api.controllers.v2.base.Base

Representation of an alarm.

as_dict(db_model)[source]
static check_alarm_actions(alarm)[source]
static check_rule(alarm)[source]
delete_actions()[source]
get_description()[source]
classmethod sample()[source]
set_description(value)[source]
update_actions(old_alarm=None)[source]
static validate(alarm)[source]
class aodh.api.controllers.v2.alarms.AlarmChange(**kw)[source]

Bases: aodh.api.controllers.v2.base.Base

Representation of an event in an alarm’s history.

classmethod sample()[source]
class aodh.api.controllers.v2.alarms.AlarmController(alarm_id)[source]

Bases: pecan.rest.RestController

Manages operations on a single alarm.

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

Delete this alarm.

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

Return this alarm.

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

Get the state of this alarm.

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

Assembles the alarm history requested.

Parameters:
  • q – Filter rules for the changes to be described.
  • sort – A list of pairs of sort key and sort dir.
  • limit – The maximum number of items to be return.
  • marker – The pagination query marker.
put(*args, **kwargs)[source]

Modify this alarm.

Parameters:data – an alarm within the request body.
put_state(*args, **kwargs)[source]

Set the state of this alarm.

Parameters:state – an alarm state within the request body.
class aodh.api.controllers.v2.alarms.AlarmTimeConstraint(**kw)[source]

Bases: aodh.api.controllers.v2.base.Base

Representation of a time constraint on an alarm.

as_dict()[source]
get_description()[source]
classmethod sample()[source]
set_description(value)[source]
static validate(tc)[source]
class aodh.api.controllers.v2.alarms.AlarmsController[source]

Bases: pecan.rest.RestController

Manages operations on the alarms collection.

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

Return all alarms, based on the query provided.

Parameters:
  • q – Filter rules for the alarms to be returned.
  • sort – A list of pairs of sort key and sort dir.
  • limit – The maximum number of items to be return.
  • marker – The pagination query marker.
post(*args, **kwargs)[source]

Create a new alarm.

Parameters:data – an alarm within the request body.
class aodh.api.controllers.v2.alarms.CronType[source]

Bases: wsme.types.UserType

A user type that represents a cron format.

static validate(value)[source]
exception aodh.api.controllers.v2.alarms.OverQuota(data)[source]

Bases: aodh.api.controllers.v2.base.ClientSideError

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.