From: Steven Hardy Date: Wed, 29 Aug 2012 14:11:06 +0000 (+0100) Subject: heat engine : Expose valid watch states via engine.api X-Git-Tag: 2014.1~1496 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=bea7e3faadc8123f1993f69ce979a96ec17f3d66;p=openstack-build%2Fheat-build.git heat engine : Expose valid watch states via engine.api Expose valid watch states via engine.api Change-Id: I26a1d8939ce75a0be88e646858f3f3b4feb5e8d0 Signed-off-by: Steven Hardy --- diff --git a/heat/engine/api.py b/heat/engine/api.py index 95f34677..05c3aaab 100644 --- a/heat/engine/api.py +++ b/heat/engine/api.py @@ -15,6 +15,7 @@ import re from heat.common import utils as heat_utils from heat.engine import parser +from heat.engine import watchrule from heat.openstack.common import log as logging @@ -223,6 +224,12 @@ WATCH_RULE_KEYS = ( 'Statistic', 'Threshold', 'Unit', 'StackName') +WATCH_STATES = (WATCH_STATE_OK, WATCH_STATE_ALARM, WATCH_STATE_NODATA + ) = (watchrule.WatchRule.NORMAL, + watchrule.WatchRule.ALARM, + watchrule.WatchRule.NODATA) + + def format_watch(watch): result = {