add python compatibility module
[ccsdk/apps.git] / sdnr / model / yang / onf-core-model-conditional-packages@2018-04-08.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
5   import core-model {
6     prefix core-model;
7   }
8   import microwave-model {
9     prefix microwave-model;
10   }
11   import ietf-inet-types {
12     prefix inet;
13   }
14
15   organization
16     "ONF (Open Networking Foundation) Open Transport Working Group - Wireless Transport Project";
17   contact
18     "WG Web: <https://www.opennetworking.org/technical-communities/areas/specification/1931-optical-transport>
19      WG List:  <mailto:wireless-transport@login.opennetworking.org>
20      WG Chair: Lyndon Ong
21                <mailto:lyong@ciena.com>
22      WG Chair: Giorgio Cazzaniga
23                <mailto:giorgio.cazzaniga@sm-optics.com>
24      Editors:  Thorsten Heinze
25                <mailto:thorsten.heinze@telefonica.com>
26                Martin Skorupski
27                <mailto:martin.skorupski@highstreet-technologies.com>";
28   description
29     "This model adds conditional packages to the ONF CoreModel in order to support fault management for object classes NetworkElement, Equipment and Holder.";
30
31   revision 2018-04-08 {
32     description
33       "Initial version, used only ONAP PoC 2018-06-25";
34     reference "ONF TR 532: A YANG Data Model for Wireless Networks.";
35   }
36
37   grouping current-problem-type-g {
38     leaf problem-name {
39       type string;
40       default "not-specified";
41       config false;
42       description
43         "Name of the alarm according capability::supportedAlarms.";
44     }
45     uses microwave-model:mw-current-problem-g;
46     description
47       "none";
48   }
49
50   grouping network-element-current-problem-type-g {
51     leaf problem-name {
52       type string;
53       default "not-specified";
54       config false;
55       description
56         "Name of the alarm according capability::supportedAlarms.";
57     }
58     leaf object-reference {
59       type string;
60       config false;
61       description
62         "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.";
63     }
64     uses microwave-model:mw-current-problem-g;
65     description
66       "none";
67   }
68
69   grouping problem-severity-type-g {
70     leaf problem-type-name {
71       type string;
72       description
73         "Name of the alarm according to Capability::supportedAlarms";
74     }
75     leaf problem-type-severity {
76       type microwave-model:severity-type;
77       description
78         "Severity of this type of alarm.";
79     }
80     description
81       "none";
82   }
83
84   typedef processing-type {
85     type enumeration {
86       enum "done" {
87         description
88           "none";
89       }
90       enum "processing" {
91         description
92           "none";
93       }
94     }
95     description
96       "none";
97   }
98
99   container network-element-pac {
100     leaf network-element {
101       type leafref {
102         path "/core-model:network-element/core-model:uuid";
103       }
104       description
105         "none";
106     }
107     container network-element-capability {
108       config false;
109       uses network-element-capability-g;
110       description
111         "none";
112     }
113     container network-element-configuration {
114       uses network-element-configuration-g;
115       description
116         "none";
117     }
118     container network-element-status {
119       config false;
120       uses network-element-status-g;
121       description
122         "none";
123     }
124     container network-element-current-problems {
125       config false;
126       uses network-element-current-problems-g;
127       description
128         "none";
129     }
130     description
131       "none";
132   }
133
134   grouping network-element-capability-g {
135     leaf-list supported-alarms {
136       type string;
137       config false;
138       description
139         "none";
140     }
141     description
142       "none";
143   }
144
145   grouping network-element-configuration-g {
146     list problem-type-severity-list {
147       key "problem-type-name";
148       uses problem-severity-type-g;
149       description
150         "Severity of the problem to be configured.";
151     }
152     leaf trigger-refresh {
153       type boolean;
154       description
155         "A trigger to instruct the netconf server to refresh its internal database/cache. 
156          It is primary used for alarms status, but could be used for anything else too. 
157          It is assumed that the refresh mechanism takes some time. 
158          In order to indicate the process to the controller a refreshStatus attribute is used.";
159     }
160     leaf connection-request-username {
161       type string {
162         length "1..256";
163       }
164       description
165         "none";
166     }
167     leaf connection-request-password {
168       type string {
169         length "8..256";
170       }
171       description
172         "none";
173     }
174     description
175       "none";
176   }
177
178   grouping network-element-status-g {
179     leaf refresh-status {
180       type processing-type;
181       config false;
182       description
183         "none";
184     }
185     leaf connection-request-url {
186       type inet:domain-name;
187       config false;
188       description
189         "none";
190     }
191     description
192       "none";
193   }
194
195   grouping network-element-current-problems-g {
196     list current-problem-list {
197       key "sequence-number";
198       config false;
199       uses network-element-current-problem-type-g;
200       description
201         "none";
202     }
203     description
204       "none";
205   }
206
207   list equipment-pac {
208     key "equipment";
209     leaf equipment {
210       type leafref {
211         path "/core-model:equipment/core-model:uuid";
212       }
213       description
214         "none";
215     }
216     container equipment-capability {
217       config false;
218       uses equipment-capability-g;
219       description
220         "none";
221     }
222     container equipment-configuration {
223       uses equipment-configuration-g;
224       description
225         "none";
226     }
227     container equipment-status {
228       config false;
229       uses equipment-status-g;
230       description
231         "none";
232     }
233     container equipment-current-problems {
234       config false;
235       uses equipment-current-problems-g;
236       description
237         "none";
238     }
239     description
240       "none";
241   }
242
243   grouping equipment-capability-g {
244     leaf-list supported-alarms {
245       type string;
246       config false;
247       description
248         "Available alarms to be listed. Names are to be separated by commas.";
249     }
250     description
251       "none";
252   }
253
254   grouping equipment-configuration-g {
255     list problem-type-severity-list {
256       key "problem-type-name";
257       uses problem-severity-type-g;
258       description
259         "Severity of the problem to be configured.";
260     }
261     description
262       "none";
263   }
264
265   grouping equipment-status-g {
266     leaf software-version {
267         type string;
268         config false;
269         description
270             "Indicates the current running software version of the equipment.";
271     }
272     leaf additional-software-version {
273         type string;
274         config false;
275         description
276             "Indicates the current running software version of the equipment.";
277     }
278     leaf up-time {
279         type uint64;
280         config false;
281         units "s";
282         description
283             "Seconds since the last reboot.";
284     }
285     leaf local-time-zone {
286         type string;
287         config false;
288         description
289             "??? Which format ??? - +00:00 proposed";
290     }
291     description
292       "none";
293   }
294
295   grouping equipment-current-problems-g {
296     list current-problem-list {
297       key "sequence-number";
298       config false;
299       uses current-problem-type-g;
300       description
301         "none";
302     }
303     description
304       "none";
305   }
306
307   list holder-pac {
308     key "holder";
309     leaf holder {
310       type leafref {
311         path "/core-model:equipment/core-model:contained-holder/core-model:uuid";
312       }
313       description
314         "none";
315     }
316     container holder-capability {
317       config false;
318       uses holder-capability-g;
319       description
320         "none";
321     }
322     container holder-configuration {
323       uses holder-configuration-g;
324       description
325         "none";
326     }
327     container holder-status {
328       config false;
329       uses holder-status-g;
330       description
331         "none";
332     }
333     container holder-current-problems {
334       config false;
335       uses holder-current-problems-g;
336       description
337         "none";
338     }
339     description
340       "none";
341   }
342
343   grouping holder-capability-g {
344     leaf-list supported-alarms {
345       type string;
346       config false;
347       description
348         "Available alarms to be listed. Names are to be separated by commas.";
349     }
350     description
351       "none";
352   }
353
354   grouping holder-configuration-g {
355     list problem-type-severity-list {
356       key "problem-type-name";
357       uses problem-severity-type-g;
358       description
359         "Severity of the problem to be configured.";
360     }
361     description
362       "none";
363   }
364
365   grouping holder-status-g {
366     description
367       "none";
368   }
369
370   grouping holder-current-problems-g {
371     list current-problem-list {
372       key "sequence-number";
373       config false;
374       uses current-problem-type-g;
375       description
376         "none";
377     }
378     description
379       "none";
380   }
381
382   list connector-pac {
383     key "connector";
384     leaf connector {
385       type leafref {
386         path "/core-model:equipment/core-model:exposed-cable/core-model:connector/core-model:uuid";
387       }
388       description
389         "none";
390     }
391     container connector-capability {
392       config false;
393       uses connector-capability-g;
394       description
395         "none";
396     }
397     container connector-configuration {
398       uses connector-configuration-g;
399       description
400         "none";
401     }
402     container connector-status {
403       config false;
404       uses connector-status-g;
405       description
406         "none";
407     }
408     container connector-current-problems {
409       config false;
410       uses connector-current-problems-g;
411       description
412         "none";
413     }
414     description
415       "none";
416   }
417
418   grouping connector-capability-g {
419     leaf-list supported-alarms {
420       type string;
421       config false;
422       description
423         "Available alarms to be listed. Names are to be separated by commas.";
424     }
425     description
426       "none";
427   }
428
429   grouping connector-configuration-g {
430     list problem-type-severity-list {
431       key "problem-type-name";
432       uses problem-severity-type-g;
433       description
434         "Severity of the problem to be configured.";
435     }
436     leaf remote-end-point {
437       type string;
438       description
439         "A network wide identifier of the remote connector. The value is used for topology discovery. 
440          Please see also ConnectorStatus::localEndPoint.";
441     }
442     description
443       "none";
444   }
445
446   grouping connector-status-g {
447     leaf local-end-point {
448       type string;
449       description
450         "A network wide global identifier of the this connector, which can be used to discover the physical connectivitiy.
451          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. 
452          The value should be formated:
453          <connector:uuid>@<network-element-name>
454
455          Please see also ConnectorConfiguration::remoteEndPoint";
456     }
457     description
458       "none";
459   }
460
461   grouping connector-current-problems-g {
462     list current-problem-list {
463       key "sequence-number";
464       config false;
465       uses current-problem-type-g;
466       description
467         "none";
468     }
469     description
470       "none";
471   }
472 }