From bea7e3faadc8123f1993f69ce979a96ec17f3d66 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Wed, 29 Aug 2012 15:11:06 +0100 Subject: [PATCH] heat engine : Expose valid watch states via engine.api Expose valid watch states via engine.api Change-Id: I26a1d8939ce75a0be88e646858f3f3b4feb5e8d0 Signed-off-by: Steven Hardy --- heat/engine/api.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 = { -- 2.45.2