Merge "Fix the Alarm documentation of Web API V2"

This commit is contained in:
Jenkins
2014-01-24 10:28:32 +00:00
committed by Gerrit Code Review

View File

@@ -1191,7 +1191,9 @@ class Alarm(_Base):
"""Representation of an alarm.
.. note::
combination_rule and threshold_rule are mutually exclusive.
combination_rule and threshold_rule are mutually exclusive. The *type*
of the alarm should be set to *threshold* or *combination* and the
appropriate rule should be filled.
"""
alarm_id = wtypes.text
@@ -1305,9 +1307,9 @@ class Alarm(_Base):
return cls(alarm_id=None,
name="SwiftObjectAlarm",
description="An alarm",
type='threshold',
type='combination',
threshold_rule=None,
combination_rule=None,
combination_rule=AlarmCombinationRule.sample(),
user_id="c96c887c216949acbdfbd8b494863567",
project_id="c96c887c216949acbdfbd8b494863567",
enabled=True,