Upgrade Network model from 2.1 to 4.1
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-tca@2018-10-19.yang
1 module org-openroadm-tca {
2   namespace "http://org/openroadm/tca";
3   prefix org-openroadm-tca;
4
5   import ietf-yang-types {
6     prefix yang;
7     revision-date 2013-07-15;
8   }
9   import org-openroadm-common-types {
10     prefix org-openroadm-common-types;
11     revision-date 2018-10-19;
12   }
13   import org-openroadm-pm-types {
14     prefix org-openroadm-pm-types;
15     revision-date 2017-12-15;
16   }
17   import org-openroadm-resource {
18     prefix org-openroadm-resource;
19     revision-date 2018-10-19;
20   }
21
22   organization
23     "Open ROADM MSA";
24   contact
25     "OpenROADM.org";
26   description
27     "YANG definitions of Threshold Crossing Alert types.
28
29       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
30       AT&T Intellectual Property.  All other rights reserved.
31
32       Redistribution and use in source and binary forms, with or without modification,
33       are permitted provided that the following conditions are met:
34
35       * Redistributions of source code must retain the above copyright notice, this
36         list of conditions and the following disclaimer.
37       * Redistributions in binary form must reproduce the above copyright notice,
38         this list of conditions and the following disclaimer in the documentation and/or
39         other materials provided with the distribution.
40       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
41         contributors may be used to endorse or promote products derived from this software
42         without specific prior written permission.
43
44       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
45       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
48       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
50       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
53       POSSIBILITY OF SUCH DAMAGE";
54
55   revision 2018-10-19 {
56     description
57       "Version 2.2.1";
58   }
59   revision 2017-12-15 {
60     description
61       "Version 2.2";
62   }
63   revision 2017-09-29 {
64     description
65       "Version 2.1";
66   }
67   revision 2017-08-28 {
68     description
69       "Version 2.0.2 - added back the missing pmParameterName container";
70   }
71   revision 2017-07-28 {
72     description
73       "Version 2.0.1 - added revision-date to imports";
74   }
75   revision 2017-06-26 {
76     description
77       "Version 2.0";
78   }
79   revision 2016-10-14 {
80     description
81       "Version 1.2";
82   }
83
84   grouping tca {
85     leaf id {
86       type string;
87       mandatory true;
88     }
89     container resource {
90       uses org-openroadm-resource:resource;
91     }
92     container pmParameterName {
93       uses org-openroadm-pm-types:pm-names;
94     }
95     leaf granularity {
96       type org-openroadm-pm-types:pm-granularity;
97       mandatory true;
98     }
99     leaf location {
100       type org-openroadm-common-types:location;
101       mandatory true;
102     }
103     leaf direction {
104       type org-openroadm-common-types:direction;
105       mandatory true;
106     }
107   }
108
109   grouping potential-tca {
110     uses tca;
111     leaf lowThresholdValue {
112       type org-openroadm-pm-types:pm-data-type;
113     }
114     leaf highThresholdValue {
115       type org-openroadm-pm-types:pm-data-type;
116     }
117   }
118
119   notification tca-notification {
120     uses tca;
121     leaf thresholdValue {
122       type org-openroadm-pm-types:pm-data-type;
123       mandatory true;
124     }
125     leaf thresholdType {
126       type enumeration {
127         enum "high" {
128           value 1;
129         }
130         enum "low" {
131           value 2;
132         }
133       }
134       mandatory true;
135       description
136         "Threshold Crossed";
137     }
138     leaf pmParameterValue {
139       type org-openroadm-pm-types:pm-data-type;
140       mandatory true;
141     }
142     leaf raiseTime {
143       type yang:date-and-time;
144       mandatory true;
145     }
146   }
147   container potential-tca-list {
148     description
149       "This is the set of threshold crossing alerts monitored on the device. Alerts are
150        enabled/disabled by adding/deleting the high/low threshold values from the list.";
151     list tca {
152       key "id";
153       uses potential-tca;
154     }
155   }
156 }