From: Tomás Villaseca Date: Tue, 18 Feb 2020 18:04:02 +0000 (-0300) Subject: Add alarms augment X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FIM.git;a=commitdiff_plain;h=f8821fc326f0f4041d325f117ccd36f4c5e68780 Add alarms augment Change-Id: Id75e0632858bc433620dea87a3b996fd725fd37f Signed-off-by: Tomás Villaseca --- diff --git a/augments/alarm.yang b/augments/alarm.yang new file mode 100644 index 0000000..7b6db1f --- /dev/null +++ b/augments/alarm.yang @@ -0,0 +1,70 @@ +/* + Copyright 2020 Whitestack LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +module alarm { + yang-version 1.1; + namespace "urn:etsi:osm:yang:augments:alarm"; + prefix "alarm"; + + import etsi-nfv-vnfd { + prefix vnfd; + } + + import common-augments { + prefix common; + } + + grouping extended-alarm { + list alarm { + key "alarm-id"; + + leaf alarm-id { + description + "This field is reserved for the identifier assigned by the VIM provider"; + + type string; + } + + + leaf vnf-monitoring-param-ref { + description + "Reference to the VNF level monitoring parameter + that is aggregated"; + type leafref { + path "/vnfd:vnfd/vnfd:df/vnfd:monitoring-parameter/vnfd:id"; + } + } + + uses common:alarm-properties; + } + + } + + augment "/vnfd:vnfd/vnfd:vdu" { + uses extended-alarm; + } +} + + + + + + + + + + diff --git a/augments/common-augments.yang b/augments/common-augments.yang index 3b2b51f..50a16d0 100644 --- a/augments/common-augments.yang +++ b/augments/common-augments.yang @@ -152,7 +152,7 @@ module common-augments { type string; } } - } + } grouping configuration-method { choice config-method { @@ -315,4 +315,147 @@ module common-augments { } uses common:vnfc-metrics; } + + 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; + } + } }