add python compatibility module
[ccsdk/apps.git] / sdnr / model / yang / onf-core-model-conditional-packages@2017-04-02.yang
1 module onf-core-model-conditional-packages {
2     namespace "urn:onf:params:xml:ns:yang:onf-core-model-conditional-packages";
3     prefix onf-core-model-conditional-packages;
4     import core-model {
5         prefix core-model;
6     }
7     import microwave-model {
8         prefix microwave-model;
9     }
10     organization "ONF (Open Networking Foundation) Open Transport Working Group - Wireless Transport Project";
11     contact "WG Web: <https://www.opennetworking.org/technical-communities/areas/specification/1931-optical-transport>
12              WG List:  <mailto:wireless-transport@login.opennetworking.org>
13              WG Chair: Lyndon Ong
14                        <mailto:lyong@ciena.com>
15              WG Chair: Giorgio Cazzaniga
16                        <mailto:giorgio.cazzaniga@sm-optics.com>
17              Editors:  Thorsten Heinze
18                        <mailto:thorsten.heinze@telefonica.com>
19                        Martin Skorupski
20                        <mailto:martin.skorupski@highstreet-technologies.com>";
21     description "This model adds conditional packages to the ONF CoreModel in order to support fault management for object classes NetworkElement, Equipment and Holder.";
22     revision 2017-04-02 {
23         description "Initial version";
24         reference "ONF TR 532: A YANG Data Model for Wireless Networks.";
25     }
26     /***********************
27     * package type-definitions
28     **********************/ 
29         grouping current-problem-type-g {
30             leaf problem-name {
31                 type string;
32                 default "not-specified";
33                 config false;
34                 description "Name of the alarm according capability::supportedAlarms.";
35             }
36             uses microwave-model:mw-current-problem-g;
37             description "none";
38         }
39         grouping network-element-current-problem-type-g {
40             leaf problem-name {
41                 type string;
42                 default "not-specified";
43                 config false;
44                 description "Name of the alarm according capability::supportedAlarms.";
45             }
46             leaf object-reference {
47                 type string;
48                 config false;
49                 description "An explaining string of the related object class. This is necesseary, because the current problem list of the NetworkElement object class acts as a container for all alarms, where its object classes are not modeled.";
50             }
51             uses microwave-model:mw-current-problem-g;
52             description "none";
53         }
54         grouping problem-severity-type-g {
55             leaf problem-type-name {
56                 type string;
57                 description "Name of the alarm according to Capability::supportedAlarms";
58             }
59             leaf problem-type-severity {
60                 type microwave-model:severity-type;
61                 description "Severity of this type of alarm.";
62             }
63             description "none";
64         }
65         typedef processing-type {
66             type enumeration {
67                 enum done {
68                     description "none";
69                 }
70                 enum processing {
71                     description "none";
72                 }
73             }
74             description "none";
75         }
76
77     /***********************
78     * package object-classes
79     **********************/ 
80         /***********************
81         * package network-element
82         **********************/ 
83             container network-element-pac {
84                 leaf network-element {
85                     type leafref {
86                         path '/core-model:network-element/core-model:uuid';
87                     }
88                     description "none";
89                 }
90                 container network-element-capability {
91                     config false;
92                     uses network-element-capability-g;
93                     description "none";
94                 }
95                 container network-element-configuration {
96                     uses network-element-configuration-g;
97                     description "none";
98                 }
99                 container network-element-status {
100                     config false;
101                     uses network-element-status-g;
102                     description "none";
103                 }
104                 container network-element-current-problems {
105                     config false;
106                     uses network-element-current-problems-g;
107                     description "none";
108                 }
109                 description "none";
110             }
111             grouping network-element-capability-g {
112                 leaf-list supported-alarms {
113                     type string;
114                     config false;
115                     description "none";
116                 }
117                 description "none";
118             }
119             grouping network-element-configuration-g {
120                 list problem-type-severity-list {
121                     key 'problem-type-name';
122                     uses problem-severity-type-g;
123                     description "Severity of the problem to be configured.";
124                 }
125                 leaf trigger-refresh {
126                     type boolean;
127                     description "A trigger to instruct the netconf server to refresh its internal database/cache. 
128                                  It is primary used for alarms status, but could be used for anything else too. 
129                                  It is assumed that the refresh mechanism takes some time. 
130                                  In order to indicate the process to the controller a refreshStatus attribute is used.";
131                 }
132                 description "none";
133             }
134             grouping network-element-status-g {
135                 leaf refresh-status {
136                     type processing-type;
137                     config false;
138                     description "none";
139                 }
140                 description "none";
141             }
142             grouping network-element-current-problems-g {
143                 list current-problem-list {
144                     key 'sequence-number';
145                     config false;
146                     uses network-element-current-problem-type-g;
147                     description "none";
148                 }
149                 description "none";
150             }
151
152         /***********************
153         * package equipment
154         **********************/ 
155             list equipment-pac {
156                 key 'equipment';
157                 leaf equipment {
158                     type leafref {
159                         path '/core-model:equipment/core-model:uuid';
160                     }
161                     description "none";
162                 }
163                 container equipment-capability {
164                     config false;
165                     uses equipment-capability-g;
166                     description "none";
167                 }
168                 container equipment-configuration {
169                     uses equipment-configuration-g;
170                     description "none";
171                 }
172                 container equipment-status {
173                     config false;
174                     uses equipment-status-g;
175                     description "none";
176                 }
177                 container equipment-current-problems {
178                     config false;
179                     uses equipment-current-problems-g;
180                     description "none";
181                 }
182                 description "none";
183             }
184             grouping equipment-capability-g {
185                 leaf-list supported-alarms {
186                     type string;
187                     config false;
188                     description "Available alarms to be listed. Names are to be separated by commas.";
189                 }
190                 description "none";
191             }
192             grouping equipment-configuration-g {
193                 list problem-type-severity-list {
194                     key 'problem-type-name';
195                     uses problem-severity-type-g;
196                     description "Severity of the problem to be configured.";
197                 }
198                 description "none";
199             }
200             grouping equipment-status-g {
201                 description "none";
202             }
203             grouping equipment-current-problems-g {
204                 list current-problem-list {
205                     key 'sequence-number';
206                     config false;
207                     uses current-problem-type-g;
208                     description "none";
209                 }
210                 description "none";
211             }
212
213         /***********************
214         * package holder
215         **********************/ 
216             list holder-pac {
217                 key 'holder';
218                 leaf holder {
219                     type leafref {
220                         path '/core-model:equipment/core-model:contained-holder/core-model:uuid';
221                     }
222                     description "none";
223                 }
224                 container holder-capability {
225                     config false;
226                     uses holder-capability-g;
227                     description "none";
228                 }
229                 container holder-configuration {
230                     uses holder-configuration-g;
231                     description "none";
232                 }
233                 container holder-status {
234                     config false;
235                     uses holder-status-g;
236                     description "none";
237                 }
238                 container holder-current-problems {
239                     config false;
240                     uses holder-current-problems-g;
241                     description "none";
242                 }
243                 description "none";
244             }
245             grouping holder-capability-g {
246                 leaf-list supported-alarms {
247                     type string;
248                     config false;
249                     description "Available alarms to be listed. Names are to be separated by commas.";
250                 }
251                 description "none";
252             }
253             grouping holder-configuration-g {
254                 list problem-type-severity-list {
255                     key 'problem-type-name';
256                     uses problem-severity-type-g;
257                     description "Severity of the problem to be configured.";
258                 }
259                 description "none";
260             }
261             grouping holder-status-g {
262                 description "none";
263             }
264             grouping holder-current-problems-g {
265                 list current-problem-list {
266                     key 'sequence-number';
267                     config false;
268                     uses current-problem-type-g;
269                     description "none";
270                 }
271                 description "none";
272             }
273
274         /***********************
275         * package connector
276         **********************/ 
277             list connector-pac {
278                 key 'connector';
279                 leaf connector {
280                     type leafref {
281                         path '/core-model:equipment/core-model:exposed-cable/core-model:connector/core-model:uuid';
282                     }
283                     description "none";
284                 }
285                 container connector-capability {
286                     config false;
287                     uses connector-capability-g;
288                     description "none";
289                 }
290                 container connector-configuration {
291                     uses connector-configuration-g;
292                     description "none";
293                 }
294                 container connector-status {
295                     config false;
296                     uses connector-status-g;
297                     description "none";
298                 }
299                 container connector-current-problems {
300                     config false;
301                     uses connector-current-problems-g;
302                     description "none";
303                 }
304                 description "none";
305             }
306             grouping connector-capability-g {
307                 leaf-list supported-alarms {
308                     type string;
309                     config false;
310                     description "Available alarms to be listed. Names are to be separated by commas.";
311                 }
312                 description "none";
313             }
314             grouping connector-configuration-g {
315                 list problem-type-severity-list {
316                     key 'problem-type-name';
317                     uses problem-severity-type-g;
318                     description "Severity of the problem to be configured.";
319                 }
320                 leaf remote-end-point {
321                     type string;
322                     description "A network wide identifier of the remote connector. The value is used for topology discovery. 
323 Please see also ConnectorStatus::localEndPoint.";
324                 }
325                 description "none";
326             }
327             grouping connector-status-g {
328                 leaf local-end-point {
329                     type string;
330                     description "A network wide global identifier of the this connector, which can be used to discover the physical connectivitiy.
331 The value should contain the network element name, because the network element software can assume that the network element name is unique in the network. 
332 The value should be formated:
333 <connector:uuid>@<network-element-name>
334
335 Please see also ConnectorConfiguration::remoteEndPoint";
336                 }
337                 description "none";
338             }
339             grouping connector-current-problems-g {
340                 list current-problem-list {
341                     key 'sequence-number';
342                     config false;
343                     uses current-problem-type-g;
344                     description "none";
345                 }
346                 description "none";
347             }
348
349
350 }