The heat.engine.watchrule ModuleΒΆ

class heat.engine.watchrule.WatchRule(context, watch_name, rule, stack_id=None, state='NODATA', wid=None, watch_data=None, last_evaluated=datetime.datetime(2016, 4, 14, 16, 7, 48, 352713))[source]

Bases: object

WatchRule.ACTION_MAP = {'ALARM': 'AlarmActions', 'NODATA': 'InsufficientDataActions', 'NORMAL': 'OKActions'}
WatchRule.ALARM = 'ALARM'
WatchRule.CEILOMETER_CONTROLLED = 'CEILOMETER_CONTROLLED'
WatchRule.NODATA = 'NODATA'
WatchRule.NORMAL = 'NORMAL'
WatchRule.SUSPENDED = 'SUSPENDED'
WatchRule.WATCH_STATES = ('ALARM', 'NORMAL', 'NODATA', 'SUSPENDED', 'CEILOMETER_CONTROLLED')
WatchRule.create_watch_data(data)[source]
WatchRule.created_at = None
WatchRule.destroy()[source]

Delete the watchrule from the database.

WatchRule.do_Average()[source]
WatchRule.do_Maximum()[source]
WatchRule.do_Minimum()[source]
WatchRule.do_SampleCount()[source]

count all samples within the specified period

WatchRule.do_Sum()[source]
WatchRule.do_data_cmp(data, threshold)[source]
WatchRule.evaluate()[source]
WatchRule.get_alarm_state()[source]
WatchRule.get_details()[source]
classmethod WatchRule.load(context, watch_name=None, watch=None)[source]

Load the watchrule object, either by name or via an existing DB object

WatchRule.rule_actions(new_state)[source]
WatchRule.run_rule()[source]
WatchRule.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

WatchRule.state_set(state)[source]

Persistently store the watch state

WatchRule.store()[source]

Store the watchrule in the database and return its ID If self.id is set, we update the existing rule

WatchRule.updated_at = None
heat.engine.watchrule.rule_can_use_sample(wr, stats_data)[source]

Previous topic

The heat.engine.scheduler Module

Next topic

The heat.engine.stack_user Module

This Page