From 095249058f238a609a0f43515d8576731ff49b64 Mon Sep 17 00:00:00 2001 From: Tetiana Lashchova Date: Tue, 25 Nov 2014 18:44:27 +0200 Subject: [PATCH] Add 'required' attribute to OS::Heat::CWLiteAlarm properties Add 'required=True' relying on http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html Change-Id: I524729c084db9976fcefca8d7ebc16abd0c92ffe Closes-Bug: #1395711 --- heat/engine/resources/cloud_watch.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/heat/engine/resources/cloud_watch.py b/heat/engine/resources/cloud_watch.py index ffeeef27bb..834ab697c1 100644 --- a/heat/engine/resources/cloud_watch.py +++ b/heat/engine/resources/cloud_watch.py @@ -46,6 +46,7 @@ class CloudWatchAlarm(resource.Resource): 'LessThanThreshold', 'LessThanOrEqualToThreshold']), ], + required=True, update_allowed=True ), ALARM_DESCRIPTION: properties.Schema( @@ -56,19 +57,23 @@ class CloudWatchAlarm(resource.Resource): EVALUATION_PERIODS: properties.Schema( properties.Schema.STRING, _('Number of periods to evaluate over.'), + required=True, update_allowed=True ), METRIC_NAME: properties.Schema( properties.Schema.STRING, - _('Metric name watched by the alarm.') + _('Metric name watched by the alarm.'), + required=True ), NAMESPACE: properties.Schema( properties.Schema.STRING, - _('Namespace for the metric.') + _('Namespace for the metric.'), + required=True ), PERIOD: properties.Schema( properties.Schema.STRING, _('Period (seconds) to evaluate over.'), + required=True, update_allowed=True ), STATISTIC: properties.Schema( @@ -78,6 +83,7 @@ class CloudWatchAlarm(resource.Resource): constraints.AllowedValues(['SampleCount', 'Average', 'Sum', 'Minimum', 'Maximum']), ], + required=True, update_allowed=True ), ALARM_ACTIONS: properties.Schema( @@ -104,6 +110,7 @@ class CloudWatchAlarm(resource.Resource): THRESHOLD: properties.Schema( properties.Schema.STRING, _('Threshold to evaluate against.'), + required=True, update_allowed=True ), UNITS: properties.Schema(