migrate sdnr features to phosphorus
[ccsdk/features.git] / sdnr / wt / devicemanager-onap / onf14 / provider / src / test / resources / mac-fc-1-0.yang
1 module mac-fc-1-0 {\r
2   yang-version 1.1;\r
3   namespace "urn:onf:yang:mac-fc-1-0";\r
4   prefix mac-fc;\r
5 \r
6   import ietf-yang-types {\r
7     prefix yang;\r
8   }\r
9   import core-model-1-4 {\r
10     prefix core-model;\r
11   }\r
12 \r
13   organization\r
14     "openBackhaul.com proposal to Open Networking Foundation (ONF)";\r
15   contact\r
16     "WG Web : https://github.com/openBackhaul/Overview\r
17      WG List: MacFc@openBackhaul.com\r
18      Editor : Thorsten Heinze\r
19      Email  : Thorsten.Heinze@openBackhaul.com";\r
20   description\r
21     "Technology specific amendment to the ForwardingConstruct class for documenting entries in the MAC forwarding table according to IEEE 802.1 .\r
22 \r
23      Copyright 2019 openBackhaul.com\r
24 \r
25      Licensed under the Apache License, Version 2.0 (the 'License');\r
26      you may not use this file except in compliance with the License.\r
27      You may obtain a copy of the License at\r
28      http://www.apache.org/licenses/LICENSE-2.0\r
29      Unless required by applicable law or agreed to in writing, software\r
30      distributed under the License is distributed on an 'AS IS' BASIS,\r
31      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
32      See the License for the specific language governing permissions and\r
33      limitations under the License.";\r
34 \r
35   revision 2020-08-26 {\r
36     description\r
37       "Model for the Transport SDN Pilot at Telefonica Germany\r
38        Please view https://github.com/openBackhaul/macFc/issues for changes.";\r
39     reference\r
40       "https://github.com/openBackhaul/macFc/tree/tsp: Model definition\r
41        https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";\r
42   }\r
43 \r
44   identity LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER {\r
45     base core-model:LAYER_PROTOCOL_NAME_TYPE;\r
46     description\r
47       "none";\r
48   }\r
49 \r
50   augment "/core-model:control-construct/core-model:forwarding-domain/core-model:fc" {\r
51     when "derived-from-or-self(./core-model:layer-protocol-name, 'mac-fc:LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER')";\r
52     uses mac-fc-spec;\r
53     description\r
54       "none";\r
55   }\r
56 \r
57   /****************************************\r
58    * package notifications\r
59    **************************************/ \r
60 \r
61   notification object-creation-notification {\r
62     uses object-creation-notification;\r
63     description\r
64       "none";\r
65   }\r
66 \r
67   grouping object-creation-notification {\r
68     leaf counter {\r
69       type int32;\r
70       default "-1";\r
71       config false;\r
72       description\r
73         "Counts object creation notifications.";\r
74     }\r
75     leaf timestamp {\r
76       type yang:date-and-time;\r
77       default "2010-11-20T14:00:00+01:00";\r
78       config false;\r
79       description\r
80         "none";\r
81     }\r
82     leaf object-id-ref {\r
83       type leafref {\r
84         path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";\r
85         require-instance false;\r
86       }\r
87       config false;\r
88       description\r
89         "none";\r
90     }\r
91     leaf object-type {\r
92       type string;\r
93       default "Type of created object not specified.";\r
94       config false;\r
95       description\r
96         "none";\r
97     }\r
98     description\r
99       "none";\r
100   }\r
101 \r
102   notification object-deletion-notification {\r
103     uses object-deletion-notification;\r
104     description\r
105       "none";\r
106   }\r
107 \r
108   grouping object-deletion-notification {\r
109     leaf counter {\r
110       type int32;\r
111       default "-1";\r
112       config false;\r
113       description\r
114         "Counts object deletion notifications.";\r
115     }\r
116     leaf timestamp {\r
117       type yang:date-and-time;\r
118       default "2010-11-20T14:00:00+01:00";\r
119       config false;\r
120       description\r
121         "none";\r
122     }\r
123     leaf object-id-ref {\r
124       type leafref {\r
125         path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";\r
126         require-instance false;\r
127       }\r
128       config false;\r
129       description\r
130         "none";\r
131     }\r
132     description\r
133       "none";\r
134   }\r
135 \r
136   notification attribute-value-changed-notification {\r
137     uses attribute-value-changed-notification;\r
138     description\r
139       "none";\r
140   }\r
141 \r
142   grouping attribute-value-changed-notification {\r
143     leaf counter {\r
144       type int32;\r
145       default "-1";\r
146       config false;\r
147       description\r
148         "Counts attribute value changed notifications.";\r
149     }\r
150     leaf timestamp {\r
151       type yang:date-and-time;\r
152       default "2010-11-20T14:00:00+01:00";\r
153       config false;\r
154       description\r
155         "none";\r
156     }\r
157     leaf object-id-ref {\r
158       type leafref {\r
159         path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";\r
160         require-instance false;\r
161       }\r
162       config false;\r
163       description\r
164         "none";\r
165     }\r
166     leaf attribute-name {\r
167       type string;\r
168       default "Attribute name not specified.";\r
169       config false;\r
170       description\r
171         "Name of the attribute that has been changed.";\r
172     }\r
173     leaf new-value {\r
174       type string;\r
175       default "New value not specified.";\r
176       config false;\r
177       description\r
178         "Attribute value converted to a string (xml, json, ...)";\r
179     }\r
180     description\r
181       "To be sent when an attribute has changed and one or more controllers have to update their data.";\r
182   }\r
183 \r
184   notification problem-notification {\r
185     uses problem-notification;\r
186     description\r
187       "none";\r
188   }\r
189 \r
190   grouping problem-notification {\r
191     leaf counter {\r
192       type int32;\r
193       default "-1";\r
194       config false;\r
195       description\r
196         "Counts problem notifications";\r
197     }\r
198     leaf timestamp {\r
199       type yang:date-and-time;\r
200       default "2010-11-20T14:00:00+01:00";\r
201       config false;\r
202       description\r
203         "none";\r
204     }\r
205     leaf object-id-ref {\r
206       type leafref {\r
207         path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";\r
208         require-instance false;\r
209       }\r
210       config false;\r
211       description\r
212         "none";\r
213     }\r
214     leaf problem {\r
215       type string;\r
216       default "Problem name not specified.";\r
217       config false;\r
218       description\r
219         "Name of the problem according to *Capability::supportedAlarmList";\r
220     }\r
221     leaf severity {\r
222       type severity-type;\r
223       default "SEVERITY_TYPE_WARNING";\r
224       config false;\r
225       description\r
226         "Severity of the problem according to *Configuration::problemSeverityList";\r
227     }\r
228     description\r
229       "none";\r
230   }\r
231 \r
232   /****************************************\r
233    * grouping statements for object classes\r
234    **************************************/ \r
235   /****************************************\r
236    * package super-classes\r
237    **************************************/ \r
238 \r
239   grouping current-problem {\r
240     leaf sequence-number {\r
241       type int16;\r
242       config false;\r
243       description\r
244         "Unique sequence number of the current problem object.";\r
245     }\r
246     leaf timestamp {\r
247       type yang:date-and-time;\r
248       default "2010-11-20T14:00:00+01:00";\r
249       config false;\r
250       description\r
251         "none";\r
252     }\r
253     leaf problem-severity {\r
254       type severity-type;\r
255       default "SEVERITY_TYPE_NOT_YET_DEFINED";\r
256       config false;\r
257       description\r
258         "Severity of the alarm.";\r
259     }\r
260     description\r
261       "none";\r
262   }\r
263 \r
264   grouping mac-fc-spec {\r
265     container mac-fc-pac {\r
266       uses mac-fc-pac;\r
267       description\r
268         "none";\r
269     }\r
270     description\r
271       "Represents an entry into the MAC forwarding table. Name in ieee802-dot1q-bridge.yang: filtering-entry.";\r
272   }\r
273 \r
274   grouping mac-fc-pac {\r
275     container mac-fc-capability {\r
276       config false;\r
277       uses mac-fc-capability;\r
278       description\r
279         "none";\r
280     }\r
281     container mac-fc-configuration {\r
282       uses mac-fc-configuration;\r
283       description\r
284         "none";\r
285     }\r
286     container mac-fc-status {\r
287       config false;\r
288       uses mac-fc-status;\r
289       description\r
290         "none";\r
291     }\r
292     container mac-fc-current-problems {\r
293       config false;\r
294       uses mac-fc-current-problems;\r
295       description\r
296         "none";\r
297     }\r
298     description\r
299       "none";\r
300   }\r
301 \r
302   grouping mac-fc-capability {\r
303     leaf admin-shut-down-is-avail {\r
304       type boolean;\r
305       default "false";\r
306       config false;\r
307       description\r
308         "true = Manual switching on and off of the forwarding construct without deleting it (underlying OSI network layers are also not affected) is available.";\r
309     }\r
310     leaf-list supported-alarm-list {\r
311       type string;\r
312       default "Supported Alarms not yet defined.";\r
313       config false;\r
314       description\r
315         "Available alarms to be listed.";\r
316     }\r
317     description\r
318       "none";\r
319   }\r
320 \r
321   grouping mac-fc-configuration {\r
322     leaf fc-name {\r
323       type string;\r
324       default "FC name not yet defined.";\r
325       description\r
326         "Name of the ForwardingConstruct. Free text field to be filled by the operator.";\r
327     }\r
328     leaf fc-is-on {\r
329       type boolean;\r
330       default "false";\r
331       description\r
332         "Only effective if (adminShutDownIsAvail==true). true = Activation of the forwarding of frames. false = De-activation of the ForwardingConstruct without deleting it (underlying OSI network layers are not affected).";\r
333     }\r
334     leaf database-id {\r
335       type int32;\r
336       default "-1";\r
337       description\r
338         "The identity of the Filtering Database. Name in ieee802-dot1q-bridge.yang: database-id.";\r
339     }\r
340     leaf mac-address {\r
341       type string;\r
342       default "00:00:00:00:00:00";\r
343       description\r
344         "Configuration of a MAC address (unicast, multicast, broadcast), for which the device has forwarding and/or filtering information.";\r
345     }\r
346     leaf entry-kind {\r
347       type entry-kind-type;\r
348       default "ENTRY_KIND_TYPE_NOT_YET_DEFINED";\r
349       description\r
350         "The type of filtering entry. Whether static or dynamic. Static entries can be created, deleted, and retrieved. However, dynamic entries can only be deleted or retrieved by the management entity. Consequently, a Bridge is not required to accept a command that can alter the dynamic entries except delete a dynamic entry. Name in ieee802-dot1q-bridge.yang: entry-type.";\r
351     }\r
352     list problem-kind-severity-list {\r
353       key "problem-kind-name";\r
354       uses problem-kind-severity-type;\r
355       description\r
356         "Severity of the problem to be configured.";\r
357     }\r
358     description\r
359       "none";\r
360   }\r
361 \r
362   grouping mac-fc-status {\r
363     leaf fc-status {\r
364       type fc-status-type;\r
365       default "FC_STATUS_TYPE_NOT_YET_DEFINED";\r
366       config false;\r
367       description\r
368         "The status of this entry. Name in ieee802-dot1q-bridge.yang: status.";\r
369     }\r
370     description\r
371       "none";\r
372   }\r
373 \r
374   grouping mac-fc-current-problems {\r
375     list current-problem-list {\r
376       key "sequence-number";\r
377       config false;\r
378       uses mac-fc-current-problem-type;\r
379       description\r
380         "none";\r
381     }\r
382     leaf number-of-current-problems {\r
383       type int8;\r
384       default "-1";\r
385       config false;\r
386       description\r
387         "Number of alarms, which are currently active on this interface.";\r
388     }\r
389     leaf time-of-latest-change {\r
390       type yang:date-and-time;\r
391       default "2010-11-20T14:00:00+01:00";\r
392       config false;\r
393       description\r
394         "Date and time when the list of alarms has been changed for the last time.";\r
395     }\r
396     description\r
397       "none";\r
398   }\r
399 \r
400   /****************************************\r
401    * typedef statements\r
402    **************************************/ \r
403 \r
404   typedef entry-kind-type {\r
405     type identityref {\r
406       base ENTRY_KIND_TYPE;\r
407     }\r
408     description\r
409       "none";\r
410   }\r
411 \r
412   typedef fc-status-type {\r
413     type identityref {\r
414       base FC_STATUS_TYPE;\r
415     }\r
416     description\r
417       "none";\r
418   }\r
419 \r
420   /*********************************************\r
421    * grouping statements for complex data types\r
422    *******************************************/ \r
423 \r
424   identity ENTRY_KIND_TYPE {\r
425     description\r
426       "none";\r
427   }\r
428 \r
429   identity ENTRY_KIND_TYPE_STATIC {\r
430     base ENTRY_KIND_TYPE;\r
431     description\r
432       "Static entries can be created, deleted, and retrieved. Name in ieee802-dot1q-bridge.yang: static.";\r
433   }\r
434 \r
435   identity ENTRY_KIND_TYPE_DYNAMIC {\r
436     base ENTRY_KIND_TYPE;\r
437     description\r
438       "Dynamic/learnt entries can only be deleted or retrieved. Name in ieee802-dot1q-bridge.yang: dynamic.";\r
439   }\r
440 \r
441   identity ENTRY_KIND_TYPE_NOT_YET_DEFINED {\r
442     base ENTRY_KIND_TYPE;\r
443     description\r
444       "none";\r
445   }\r
446 \r
447   identity FC_STATUS_TYPE {\r
448     description\r
449       "none";\r
450   }\r
451 \r
452   identity FC_STATUS_TYPE_OTHER {\r
453     base FC_STATUS_TYPE;\r
454     description\r
455       "None of the following. This may include the case where some other object is being used to determine if and how frames addressed to the value of the corresponding instance of 'address' are being forwarded. Name in ieee802-dot1q-bridge.yang: other.";\r
456   }\r
457 \r
458   identity FC_STATUS_TYPE_INVALID {\r
459     base FC_STATUS_TYPE;\r
460     description\r
461       "This entry is no longer valid (e.g., it was learned but has since aged out), but has not yet been flushed from the table. Name in ieee802-dot1q-bridge.yang: invalid.";\r
462   }\r
463 \r
464   identity FC_STATUS_TYPE_LEARNED {\r
465     base FC_STATUS_TYPE;\r
466     description\r
467       "The value of the corresponding instance of the port node was learned and is being used. Name in ieee802-dot1q-bridge.yang: learned.";\r
468   }\r
469 \r
470   identity FC_STATUS_TYPE_SELF {\r
471     base FC_STATUS_TYPE;\r
472     description\r
473       "The value of the corresponding instance of the address node representing one of the devices address. Name in ieee802-dot1q-bridge.yang: self.";\r
474   }\r
475 \r
476   identity FC_STATUS_TYPE_MANAGEMENT {\r
477     base FC_STATUS_TYPE;\r
478     description\r
479       "The value of the corresponding instance of address node that is also the value of an existing instance. Name in ieee802-dot1q-bridge.yang: mgmt.";\r
480   }\r
481 \r
482   identity FC_STATUS_TYPE_NOT_YET_DEFINED {\r
483     base FC_STATUS_TYPE;\r
484     description\r
485       "none";\r
486   }\r
487 \r
488   identity SEVERITY_TYPE {\r
489     description\r
490       "none";\r
491   }\r
492 \r
493   identity SEVERITY_TYPE_NON_ALARMED {\r
494     base SEVERITY_TYPE;\r
495     description\r
496       "none";\r
497   }\r
498 \r
499   identity SEVERITY_TYPE_WARNING {\r
500     base SEVERITY_TYPE;\r
501     description\r
502       "none";\r
503   }\r
504 \r
505   identity SEVERITY_TYPE_MINOR {\r
506     base SEVERITY_TYPE;\r
507     description\r
508       "none";\r
509   }\r
510 \r
511   identity SEVERITY_TYPE_MAJOR {\r
512     base SEVERITY_TYPE;\r
513     description\r
514       "none";\r
515   }\r
516 \r
517   identity SEVERITY_TYPE_CRITICAL {\r
518     base SEVERITY_TYPE;\r
519     description\r
520       "none";\r
521   }\r
522 \r
523   identity SEVERITY_TYPE_NOT_YET_DEFINED {\r
524     base SEVERITY_TYPE;\r
525     description\r
526       "none";\r
527   }\r
528 \r
529   /****************************************\r
530    * package super-types\r
531    **************************************/ \r
532 \r
533   typedef severity-type {\r
534     type identityref {\r
535       base SEVERITY_TYPE;\r
536     }\r
537     description\r
538       "According to ITU-T M.3160";\r
539   }\r
540 \r
541   grouping problem-kind-severity-type {\r
542     leaf problem-kind-name {\r
543       type string;\r
544       description\r
545         "Name of the alarm according to supportedAlarmList";\r
546     }\r
547     leaf problem-kind-severity {\r
548       type severity-type;\r
549       default "SEVERITY_TYPE_NOT_YET_DEFINED";\r
550       description\r
551         "Severity of this type of alarm.";\r
552     }\r
553     description\r
554       "none";\r
555   }\r
556 \r
557   grouping mac-fc-current-problem-type {\r
558     leaf problem-name {\r
559       type string;\r
560       default "Problem name not specified.";\r
561       config false;\r
562       description\r
563         "Name of the alarm according to *Capability::supportedAlarmList.";\r
564     }\r
565     uses current-problem;\r
566     description\r
567       "none";\r
568   }\r
569 }\r