+
+ typedef alarm-severity-type {
+ description
+ "An indication of the importance or urgency of the alarm";
+ type enumeration {
+ enum LOW;
+ enum MODERATE;
+ enum CRITICAL;
+ }
+ }
+
+ typedef alarm-statistic-type {
+ description
+ "Statistic type to use to determine threshold crossing
+ for an alarm.";
+ type enumeration {
+ enum AVERAGE;
+ enum MINIMUM;
+ enum MAXIMUM;
+ enum COUNT;
+ enum SUM;
+ }
+ }
+
+ typedef relational-operation-type {
+ description
+ "The relational operator used to define whether an alarm,
+ scaling event, etc. should be triggered in certain scenarios,
+ such as if the metric statistic goes above or below a specified
+ value.";
+ type enumeration {
+ enum GE; // greater than or equal
+ enum LE; // less than or equal
+ enum GT; // greater than
+ enum LT; // less than
+ enum EQ; // equal
+ }
+ }
+
+ grouping alarm-properties {
+ leaf name {
+ description
+ "A human readable string to identify the alarm";
+ type string;
+ }
+
+ leaf description {
+ description
+ "A description of this alarm";
+ type string;
+ }
+
+ leaf vdur-id {
+ description
+ "The identifier of the VDUR that the alarm is associated with";
+ type string;
+ }
+
+ container actions {
+ list ok {
+ key "url";
+ leaf url {
+ type string;
+ }
+ }
+
+ list insufficient-data {
+ key "url";
+ leaf url {
+ type string;
+ }
+ }
+
+ list alarm {
+ key "url";
+ leaf url {
+ type string;
+ }
+ }
+ }
+
+ leaf repeat {
+ description
+ "This flag indicates whether the alarm should be repeatedly emitted
+ while the associated threshold has been crossed.";
+
+ type boolean;
+ default true;
+ }
+
+ leaf enabled {
+ description
+ "This flag indicates whether the alarm has been enabled or
+ disabled.";
+
+ type boolean;
+ default true;
+ }
+
+ leaf severity {
+ description
+ "A measure of the importance or urgency of the alarm";
+ type alarm-severity-type;
+ }
+
+ leaf statistic {
+ description
+ "The type of metric statistic that is tracked by this alarm";
+ type alarm-statistic-type;
+ }
+
+ leaf operation {
+ description
+ "The relational operator used to define whether an alarm should be
+ triggered in certain scenarios, such as if the metric statistic
+ goes above or below a specified value.";
+ type relational-operation-type;
+ }
+
+ leaf value {
+ description
+ "This value defines the threshold that, if crossed, will trigger
+ the alarm.";
+ type decimal64 {
+ fraction-digits 4;
+ }
+ }
+
+ leaf period {
+ description
+ "The period defines the length of time (seconds) that the metric
+ data are collected over in oreder to evaluate the chosen
+ statistic.";
+ type uint32;
+ }
+
+ leaf evaluations {
+ description
+ "Defines the length of time (seconds) in which metric data are
+ collected in order to evaluate the chosen statistic.";
+ type uint32;
+ }
+ }