Release version 1.3.1
[ccsdk/features.git] / sdnr / wt / devicemanager-onap / onf14 / provider / src / main / yang / mac-fd-1-0.yang
1 module mac-fd-1-0 {\r
2   yang-version 1.1;\r
3   namespace "urn:onf:yang:mac-fd-1-0";\r
4   prefix mac-fd;\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: MacFd@openBackhaul.com\r
18      Editor : Thorsten Heinze\r
19      Email  : Thorsten.Heinze@openBackhaul.com";\r
20   description\r
21     "Technology specific amendment to the ForwardingDomain class for documenting potential forwarding (Ethernet Switch) 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/macFd/issues for changes.";\r
39     reference\r
40       "https://github.com/openBackhaul/macFd/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" {\r
51     when "derived-from-or-self(./core-model:layer-protocol-name, 'vlan-fd:LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER')";\r
52     uses mac-fd-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: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: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: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: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-fd-spec {\r
265     container mac-fd-pac {\r
266       uses mac-fd-pac;\r
267       description\r
268         "none";\r
269     }\r
270     description\r
271       "The database that holds static and learned entries describing the MAC forwarding. Name in ieee802-dot1q-bridge.yang: filtering-database.";\r
272   }\r
273 \r
274   grouping mac-fd-pac {\r
275     container mac-fd-capability {\r
276       config false;\r
277       uses mac-fd-capability;\r
278       description\r
279         "none";\r
280     }\r
281     container mac-fd-configuration {\r
282       uses mac-fd-configuration;\r
283       description\r
284         "none";\r
285     }\r
286     container mac-fd-status {\r
287       config false;\r
288       uses mac-fd-status;\r
289       description\r
290         "none";\r
291     }\r
292     container mac-fd-current-problems {\r
293       config false;\r
294       uses mac-fd-current-problems;\r
295       description\r
296         "none";\r
297     }\r
298     description\r
299       "none";\r
300   }\r
301 \r
302   grouping mac-fd-capability {\r
303     leaf maximum-number-of-entries {\r
304       type int32;\r
305       default "-1";\r
306       config false;\r
307       description\r
308         "The maximum number of entries that can be held in the FDB. Name in ieee802-dot1q-bridge.yang: size.";\r
309     }\r
310     leaf admin-shut-down-is-avail {\r
311       type boolean;\r
312       default "false";\r
313       config false;\r
314       description\r
315         "true = Manual switching on and off of the forwarding domain without deleting it (underlying OSI network layers are also not affected) is available.";\r
316     }\r
317     leaf maintenance-timer-range {\r
318       type string;\r
319       default "Range of the maintenance timer not yet defined.";\r
320       config false;\r
321       description\r
322         "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";\r
323     }\r
324     leaf-list supported-alarm-list {\r
325       type string;\r
326       default "Supported Alarms Not Yet Defined";\r
327       config false;\r
328       description\r
329         "Available alarms to be listed.";\r
330     }\r
331     description\r
332       "none";\r
333   }\r
334 \r
335   grouping mac-fd-configuration {\r
336     leaf fd-name {\r
337       type string;\r
338       default "Forwarding Domain name not yet defined.";\r
339       description\r
340         "Name of the ForwardingDomain. Free text field to be filled by the operator.";\r
341     }\r
342     leaf fd-is-on {\r
343       type boolean;\r
344       default "false";\r
345       description\r
346         "Only effective if (adminShutDownIsAvail==true). true = Activation of the ForwardingDomain. false = De-activation of the ForwardingDomain without deleting it (underlying OSI network layers are not affected).";\r
347     }\r
348     leaf mac-address {\r
349       type string;\r
350       default "00:00:00:00:00:00";\r
351       description\r
352         "Configuration of the MAC address of a switch or virtual switch, which is defined by some VLAN.";\r
353     }\r
354     leaf aging-time {\r
355       type int32;\r
356       units "s";\r
357       default "-1";\r
358       description\r
359         "The timeout period (10..10,000,000) in seconds for aging out dynamically-learned forwarding information. Name in ieee802-dot1q-bridge.yang: aging-time.";\r
360     }\r
361     leaf maintenance-timer {\r
362       type int32;\r
363       units "s";\r
364       default "-1";\r
365       description\r
366         "Time of existence of any maintenance configuration. false = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";\r
367     }\r
368     list problem-kind-severity-list {\r
369       key "problem-kind-name";\r
370       uses problem-kind-severity-type;\r
371       description\r
372         "Severity of each entry of the SupportedAlarmList to be configured.";\r
373     }\r
374     description\r
375       "none";\r
376   }\r
377 \r
378   grouping mac-fd-status {\r
379     leaf mac-address-cur {\r
380       type string;\r
381       default "00:00:00:00:00:00";\r
382       config false;\r
383       description\r
384         "MAC address assigned to a switch or virtual switch, which is defined by some VLAN.";\r
385     }\r
386     leaf number-of-static-entries-cur {\r
387       type int32;\r
388       default "-1";\r
389       config false;\r
390       description\r
391         "The number of Static Filtering entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: static-entries.";\r
392     }\r
393     leaf number-of-dynamic-entries-cur {\r
394       type int32;\r
395       default "-1";\r
396       config false;\r
397       description\r
398         "The number of Dynamic Filtering entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: dynamic-entries.";\r
399     }\r
400     leaf number-of-mac-registrations-cur {\r
401       type int32;\r
402       default "-1";\r
403       config false;\r
404       description\r
405         "The number of MAC Address Registration entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: mac-address-registration-entries.";\r
406     }\r
407     leaf fd-status {\r
408       type fd-status-type;\r
409       default "FD_STATUS_TYPE_NOT_YET_DEFINED";\r
410       config false;\r
411       description\r
412         "Operational status of the forwarding domain.";\r
413     }\r
414     description\r
415       "none";\r
416   }\r
417 \r
418   grouping mac-fd-current-problems {\r
419     list current-problem-list {\r
420       key "sequence-number";\r
421       config false;\r
422       uses mac-fd-current-problem-type;\r
423       description\r
424         "none";\r
425     }\r
426     description\r
427       "none";\r
428   }\r
429 \r
430   /****************************************\r
431    * typedef statements\r
432    **************************************/ \r
433   /*********************************************\r
434    * grouping statements for complex data types\r
435    *******************************************/ \r
436 \r
437   identity SEVERITY_TYPE {\r
438     description\r
439       "none";\r
440   }\r
441 \r
442   identity SEVERITY_TYPE_NON_ALARMED {\r
443     base SEVERITY_TYPE;\r
444     description\r
445       "none";\r
446   }\r
447 \r
448   identity SEVERITY_TYPE_WARNING {\r
449     base SEVERITY_TYPE;\r
450     description\r
451       "none";\r
452   }\r
453 \r
454   identity SEVERITY_TYPE_MINOR {\r
455     base SEVERITY_TYPE;\r
456     description\r
457       "none";\r
458   }\r
459 \r
460   identity SEVERITY_TYPE_MAJOR {\r
461     base SEVERITY_TYPE;\r
462     description\r
463       "none";\r
464   }\r
465 \r
466   identity SEVERITY_TYPE_CRITICAL {\r
467     base SEVERITY_TYPE;\r
468     description\r
469       "none";\r
470   }\r
471 \r
472   identity SEVERITY_TYPE_NOT_YET_DEFINED {\r
473     base SEVERITY_TYPE;\r
474     description\r
475       "none";\r
476   }\r
477 \r
478   identity FD_STATUS_TYPE {\r
479     description\r
480       "none";\r
481   }\r
482 \r
483   identity FD_STATUS_TYPE_UP {\r
484     base FD_STATUS_TYPE;\r
485     description\r
486       "Ready to pass packets.";\r
487   }\r
488 \r
489   identity FD_STATUS_TYPE_DOWN {\r
490     base FD_STATUS_TYPE;\r
491     description\r
492       "The interface does not pass any packets.";\r
493   }\r
494 \r
495   identity FD_STATUS_TYPE_TESTING {\r
496     base FD_STATUS_TYPE;\r
497     description\r
498       "In some test mode.  No operational packets can be passed.";\r
499   }\r
500 \r
501   identity FD_STATUS_TYPE_UNKNOWN {\r
502     base FD_STATUS_TYPE;\r
503     description\r
504       "Status cannot be determined for some reason.";\r
505   }\r
506 \r
507   identity FD_STATUS_TYPE_DORMANT {\r
508     base FD_STATUS_TYPE;\r
509     description\r
510       "Waiting for some external event.";\r
511   }\r
512 \r
513   identity FD_STATUS_TYPE_NOT_PRESENT {\r
514     base FD_STATUS_TYPE;\r
515     description\r
516       "Some component (typically hardware) is missing.";\r
517   }\r
518 \r
519   identity FD_STATUS_TYPE_LOWER_LAYER_DOWN {\r
520     base FD_STATUS_TYPE;\r
521     description\r
522       "Down due to state of lower-layer interface(s).";\r
523   }\r
524 \r
525   identity FD_STATUS_TYPE_ADMIN_DOWN {\r
526     base FD_STATUS_TYPE;\r
527     description\r
528       "Down due to configuration.";\r
529   }\r
530 \r
531   identity FD_STATUS_TYPE_NOT_YET_DEFINED {\r
532     base FD_STATUS_TYPE;\r
533     description\r
534       "none";\r
535   }\r
536 \r
537   /****************************************\r
538    * package super-types\r
539    **************************************/ \r
540 \r
541   typedef severity-type {\r
542     type identityref {\r
543       base SEVERITY_TYPE;\r
544     }\r
545     description\r
546       "none";\r
547   }\r
548 \r
549   typedef fd-status-type {\r
550     type identityref {\r
551       base FD_STATUS_TYPE;\r
552     }\r
553     description\r
554       "Current Status of the Forwarding Domain";\r
555   }\r
556 \r
557   grouping problem-kind-severity-type {\r
558     leaf problem-kind-name {\r
559       type string;\r
560       description\r
561         "Name of the alarm according to SupportedAlarmList";\r
562     }\r
563     leaf problem-kind-severity {\r
564       type severity-type;\r
565       default "SEVERITY_TYPE_NOT_YET_DEFINED";\r
566       description\r
567         "Severity of this type of alarm.";\r
568     }\r
569     description\r
570       "none";\r
571   }\r
572 \r
573   grouping mac-fd-current-problem-type {\r
574     leaf problem-name {\r
575       type string;\r
576       default "Problem name not specified.";\r
577       config false;\r
578       description\r
579         "Name of the alarm according to SupportedAlarmList";\r
580     }\r
581     uses current-problem;\r
582     description\r
583       "none";\r
584   }\r
585 }\r