heat.engine.watchrule
Module¶heat.engine.watchrule.
WatchRule
(context, watch_name, rule, stack_id=None, state='NODATA', wid=None, watch_data=None, last_evaluated=datetime.datetime(2019, 11, 27, 20, 57, 34, 379109))[source]¶Bases: object
ACTION_MAP
= {'ALARM': 'AlarmActions', 'NODATA': 'InsufficientDataActions', 'NORMAL': 'OKActions'}¶ALARM
= 'ALARM'¶CEILOMETER_CONTROLLED
= 'CEILOMETER_CONTROLLED'¶NODATA
= 'NODATA'¶NORMAL
= 'NORMAL'¶SUSPENDED
= 'SUSPENDED'¶WATCH_STATES
= ('ALARM', 'NORMAL', 'NODATA', 'SUSPENDED', 'CEILOMETER_CONTROLLED')¶created_at
= None¶load
(context, watch_name=None, watch=None)[source]¶Load the watchrule object.
The object can be loaded either from the DB by name or from an existing DB object.
set_watch_state
(state)[source]¶Temporarily set the watch state.
Returns: | list of functions to be scheduled in the stack ThreadGroup for the specified state. |
---|
store
()[source]¶Store the watchrule in the database and return its ID.
If self.id is set, we update the existing rule.
updated_at
= None¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.