Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / o-ran-sc / o-ran-ru / o-ran-sc-alarms-v1.yang
1 module o-ran-sc-alarms-v1 {
2   yang-version 1.1;
3   namespace "urn:o-ran:sc:alarms:1.0";
4   prefix oal;
5
6   import o-ran-sc-root-v1 {
7     prefix root;
8   }
9   import ietf-alarms {
10     prefix al;
11     reference
12       "RFC 8632: A YANG Data Model for Alarm Management";
13   }
14
15   organization
16     "O-RAN Software Community";
17   contact
18     "www.o-ran-sc.org";
19   description
20     "This module augements the  o-ran-sc-controlled-element and  
21      o-ran-sc-controlled-function object by adding ietf-alarms.
22
23      Copyright 2020 the O-RAN Alliance.
24
25      Licensed under the Apache License, Version 2.0 (the 'License');
26      you may not use this file except in compliance with the License.
27      You may obtain a copy of the License at
28
29      http://www.apache.org/licenses/LICENSE-2.0
30
31      Unless required by applicable law or agreed to in writing, software
32      distributed under the License is distributed on an 'AS IS' BASIS,
33      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34      See the License for the specific language governing permissions and
35      limitations under the License.";
36
37   revision 2020-03-09 {
38     description
39       "initial revision";
40     reference
41       "O-RAN-OAM-Interface-Specification (O1)";
42   }
43
44   grouping alarms-grp {
45     list alarm-reference {
46       key "resource alarm-type-id alarm-type-qualifier";
47       config false;
48       description
49         "References to related alarms. Note that the related alarm
50          might have been purged from the alarm list.";
51       leaf resource {
52         type leafref {
53           path "/al:alarms/al:alarm-list/al:alarm/al:resource";
54           require-instance false;
55         }
56         description
57           "The alarming resource for the related alarm.";
58       }
59       leaf alarm-type-id {
60         type leafref {
61           path "/al:alarms/al:alarm-list/al:alarm"
62              + "[al:resource=current()/../resource]"
63              + "/al:alarm-type-id";
64           require-instance false;
65         }
66         description
67           "The alarm type identifier for the related alarm.";
68       }
69       leaf alarm-type-qualifier {
70         type leafref {
71           path "/al:alarms/al:alarm-list/al:alarm"
72              + "[al:resource=current()/../resource]"
73              + "[al:alarm-type-id=current()/../alarm-type-id]"
74              + "/al:alarm-type-qualifier";
75           require-instance false;
76         }
77         description
78           "The alarm qualifier for the related alarm.";
79       }
80     }
81     description 
82       "A group adding ietf-alarm references.";
83   }
84
85   augment "/root:controlled-element" {
86     uses alarms-grp;
87     description
88       "An augmentation, which adds ietf-alarms 
89        to root:controlled-element.";
90   }
91
92   augment "/root:controlled-element/root:controlled-function" {
93     uses alarms-grp;
94     description
95       "An augmentation, which adds ietf-alarms 
96        to root:controlled-function.";
97   }
98 }