Release version 1.3.1
[ccsdk/features.git] / sdnr / wt / devicemanager-onap / onf14 / provider / src / main / yang / qos-profile-1-0.yang
1 module qos-profile-1-0 {\r
2   yang-version 1.1;\r
3   namespace "urn:onf:yang:qos-profile-1-0";\r
4   prefix qos-profile;\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: QosProfile@openBackhaul.com\r
18      Editor : Thorsten Heinze\r
19      Email  : Thorsten.Heinze@openBackhaul.com";\r
20   description\r
21     "Copyright 2019 openBackhaul.com\r
22 \r
23      Licensed under the Apache License, Version 2.0 (the 'License');\r
24      you may not use this file except in compliance with the License.\r
25      You may obtain a copy of the License at\r
26      http://www.apache.org/licenses/LICENSE-2.0\r
27      Unless required by applicable law or agreed to in writing, software\r
28      distributed under the License is distributed on an 'AS IS' BASIS,\r
29      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
30      See the License for the specific language governing permissions and\r
31      limitations under the License.";\r
32 \r
33   revision 2020-01-24 {\r
34     description\r
35       "Model for the Transport SDN Pilot at Telefonica Germany.\r
36        Please view https://github.com/openBackhaul/qosProfile/issues for changes.";\r
37     reference\r
38       "https://github.com/openBackhaul/qosProfile/tree/tsp: Model definition\r
39        https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";\r
40   }\r
41   revision 2019-07-12 {\r
42     description\r
43       "Model for the Transport SDN Pilot at Telefonica Germany.\r
44        Please view https://github.com/openBackhaul/qosProfile/issues for changes.";\r
45     reference\r
46       "https://github.com/openBackhaul/qosProfile/tree/tsp: Model definition\r
47        https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";\r
48   }\r
49 \r
50   identity PROFILE_NAME_TYPE_QOS_PROFILE {\r
51     base core-model:PROFILE_NAME_TYPE;\r
52     description\r
53       "none";\r
54   }\r
55 \r
56   augment "/core-model:control-construct/core-model:profile-collection/core-model:profile" {\r
57     when "derived-from-or-self(./core-model:profile-name, 'qos-profile:PROFILE_NAME_TYPE_QOS_PROFILE')";\r
58     uses qos-profile-spec;\r
59     description\r
60       "none";\r
61   }\r
62 \r
63   /****************************************\r
64    * package notifications\r
65    **************************************/ \r
66 \r
67   notification object-creation-notification {\r
68     uses object-creation-notification;\r
69     description\r
70       "none";\r
71   }\r
72 \r
73   grouping object-creation-notification {\r
74     leaf counter {\r
75       type int32;\r
76       default "-1";\r
77       config false;\r
78       description\r
79         "Counts object creation notifications.";\r
80     }\r
81     leaf timestamp {\r
82       type yang:date-and-time;\r
83       default "2010-11-20T14:00:00+01:00";\r
84       config false;\r
85       description\r
86         "none";\r
87     }\r
88     leaf object-id-ref {\r
89       type leafref {\r
90         path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";\r
91         require-instance false;\r
92       }\r
93       config false;\r
94       description\r
95         "none";\r
96     }\r
97     leaf object-type {\r
98       type string;\r
99       default "Type of created object not specified.";\r
100       config false;\r
101       description\r
102         "none";\r
103     }\r
104     description\r
105       "none";\r
106   }\r
107 \r
108   notification object-deletion-notification {\r
109     uses object-deletion-notification;\r
110     description\r
111       "none";\r
112   }\r
113 \r
114   grouping object-deletion-notification {\r
115     leaf counter {\r
116       type int32;\r
117       default "-1";\r
118       config false;\r
119       description\r
120         "Counts object deletion notifications.";\r
121     }\r
122     leaf timestamp {\r
123       type yang:date-and-time;\r
124       default "2010-11-20T14:00:00+01:00";\r
125       config false;\r
126       description\r
127         "none";\r
128     }\r
129     leaf object-id-ref {\r
130       type leafref {\r
131         path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";\r
132         require-instance false;\r
133       }\r
134       config false;\r
135       description\r
136         "none";\r
137     }\r
138     description\r
139       "none";\r
140   }\r
141 \r
142   /****************************************\r
143    * grouping statements for object classes\r
144    **************************************/ \r
145 \r
146   grouping qos-profile-spec {\r
147     container qos-profile-pac {\r
148       uses qos-profile-pac;\r
149       description\r
150         "none";\r
151     }\r
152     description\r
153       "none";\r
154   }\r
155 \r
156   grouping qos-profile-pac {\r
157     container qos-profile-capability {\r
158       config false;\r
159       uses qos-profile-capability;\r
160       description\r
161         "none";\r
162     }\r
163     container qos-profile-configuration {\r
164       config false;\r
165       uses qos-profile-configuration;\r
166       description\r
167         "none";\r
168     }\r
169     description\r
170       "none";\r
171   }\r
172 \r
173   grouping qos-profile-capability {\r
174     leaf profile-naming-is-avail {\r
175       type boolean;\r
176       default "false";\r
177       config false;\r
178       description\r
179         "1 = There is a free text field available for naming the profile.";\r
180     }\r
181     leaf-list available-queue-list {\r
182       type queue-name-type;\r
183       config false;\r
184       min-elements 1;\r
185       max-elements 8;\r
186       description\r
187         "List of queues, which are available at the physical interface.";\r
188     }\r
189     leaf drop-precedence-at-be-queue-is-avail {\r
190       type boolean;\r
191       default "false";\r
192       config false;\r
193       description\r
194         "1 = Configuration of the drop precedence is available at the best effort queue.";\r
195     }\r
196     leaf drop-precedence-at-af-queues-is-avail {\r
197       type boolean;\r
198       default "false";\r
199       config false;\r
200       description\r
201         "1 = Configuration of the drop precedence is available at the assured forwarding queues.";\r
202     }\r
203     leaf drop-precedence-at-prio-queues-is-avail {\r
204       type boolean;\r
205       default "false";\r
206       config false;\r
207       description\r
208         "1 = Configuration of the drop precedence is available at the priority queues.";\r
209     }\r
210     leaf available-qos-profile-kind-list {\r
211       type qos-profile-kind-type;\r
212       default "QOS_PROFILE_KIND_TYPE_NOT_YET_DEFINED";\r
213       config false;\r
214       description\r
215         "List of header information that are supported to be base of the QoS definition.";\r
216     }\r
217     description\r
218       "none";\r
219   }\r
220 \r
221   grouping qos-profile-configuration {\r
222     leaf profile-name {\r
223       type string;\r
224       default "Name of profile not yet defined.";\r
225       description\r
226         "Identifier of the profile. Could be a name, could be a number. Free text field to be filled by the operator.";\r
227     }\r
228     leaf qos-profile-kind {\r
229       type qos-profile-kind-type;\r
230       default "QOS_PROFILE_KIND_TYPE_NOT_YET_DEFINED";\r
231       description\r
232         "Defines whether the sorting into queues is done based on VLAN, MPLS or IP header information.";\r
233     }\r
234     list ingress-8021p-to-per-hop-behavior-mapping-list {\r
235       key "queue-name drop-precedence-inside-queue";\r
236       min-elements 8;\r
237       max-elements 8;\r
238       uses per-hop-behavior-type;\r
239       description\r
240         "Only relevant when qosProfileKind == IEEE8021P. Associates the value of the three p-bits of the VLAN header with a per hop behavior at the physical interface. First entry in the list [0] relates to p-bit value '0'. Last entry in the list [7] relates to p-bit value '7'.";\r
241     }\r
242     list ingress-exp-to-per-hop-behavior-mapping-list {\r
243       key "queue-name drop-precedence-inside-queue";\r
244       min-elements 8;\r
245       max-elements 8;\r
246       uses per-hop-behavior-type;\r
247       description\r
248         "Only relevant when qosProfileKind == MPLS_EXP. Associates the value of the three p-bits of the MPLS header with a per hop behavior at the physical interface. First entry in the list [0] relates to p-bit value '0'. Last entry in the list [7] relates to p-bit value '7'.";\r
249     }\r
250     list ingress-ip-dscp-to-per-hop-behavior-mapping-list {\r
251       key "queue-name drop-precedence-inside-queue";\r
252       min-elements 64;\r
253       max-elements 64;\r
254       uses per-hop-behavior-type;\r
255       description\r
256         "Only relevant when qosProfileKind == IP_DSCP. Associates the value of the 8 dscp bits of the IP header with a per hop behavior at the physical interface. First entry in the list [0] relates to dscp value '0'. Last entry in the list [63] relates to dscp value '63'.";\r
257     }\r
258     leaf writing-per-hop-behavior-into-8021p-is-on {\r
259       type boolean;\r
260       default "false";\r
261       description\r
262         "1 = Original content of 802.1p bits is overwritten with local per hop behavior.";\r
263     }\r
264     list egress-per-hop-behavior-to-8021p-mapping-list {\r
265       key "mapping-number";\r
266       max-elements 24;\r
267       uses egress-per-hop-behavior-to-priority-bits-mapping-type;\r
268       description\r
269         "Only relevant if (writingPerHopBehaviorInto8021pIsOn==1). Translates (queue and drop precedence) into values of the three p-bits of the VLAN header.";\r
270     }\r
271     leaf writing-per-hop-behavior-into-mpls-exp-is-on {\r
272       type boolean;\r
273       default "false";\r
274       description\r
275         "1 = Original content of MPLS EXP bits is overwritten with local per hop behavior.";\r
276     }\r
277     list egress-per-hop-behavior-to-mpls-exp-mapping-list {\r
278       key "mapping-number";\r
279       max-elements 24;\r
280       uses egress-per-hop-behavior-to-priority-bits-mapping-type;\r
281       description\r
282         "Only relevant if (writingPerHopBehaviorIntoMplsExpIsOn==1). Translates (queue and drop precedence) into values of the three p-bits of the MPLS header.";\r
283     }\r
284     leaf writing-per-hop-behavior-into-ip-dscp-is-on {\r
285       type boolean;\r
286       default "false";\r
287       description\r
288         "1 = Original content of IP DSCP bits is overwritten with local per hop behavior.";\r
289     }\r
290     list egress-per-hop-behavior-to-ip-dscp-mapping-list {\r
291       key "mapping-number";\r
292       max-elements 24;\r
293       uses egress-per-hop-behavior-to-priority-bits-mapping-type;\r
294       description\r
295         "Only relevant if (writingPerHopBehaviorIntoIpDscpIsOn==1). Translates (queue and drop precedence) into values of the six dscp bits of the IP header.";\r
296     }\r
297     description\r
298       "Defines the profile that will be used for mapping between header information and queues (next hop behavior).";\r
299   }\r
300 \r
301   /****************************************\r
302    * typedef statements\r
303    **************************************/ \r
304 \r
305   typedef severity-type {\r
306     type identityref {\r
307       base SEVERITY_TYPE;\r
308     }\r
309     description\r
310       "none";\r
311   }\r
312 \r
313   typedef qos-profile-kind-type {\r
314     type identityref {\r
315       base QOS_PROFILE_KIND_TYPE;\r
316     }\r
317     description\r
318       "none";\r
319   }\r
320 \r
321   typedef queue-name-type {\r
322     type identityref {\r
323       base QUEUE_NAME_TYPE;\r
324     }\r
325     description\r
326       "none";\r
327   }\r
328 \r
329   typedef drop-precedence-type {\r
330     type identityref {\r
331       base DROP_PRECEDENCE_TYPE;\r
332     }\r
333     description\r
334       "none";\r
335   }\r
336 \r
337   /*********************************************\r
338    * grouping statements for complex data types\r
339    *******************************************/ \r
340 \r
341   identity SEVERITY_TYPE {\r
342     description\r
343       "none";\r
344   }\r
345 \r
346   identity SEVERITY_TYPE_NON-ALARMED {\r
347     base SEVERITY_TYPE;\r
348     description\r
349       "none";\r
350   }\r
351 \r
352   identity SEVERITY_TYPE_WARNING {\r
353     base SEVERITY_TYPE;\r
354     description\r
355       "none";\r
356   }\r
357 \r
358   identity SEVERITY_TYPE_MAJOR {\r
359     base SEVERITY_TYPE;\r
360     description\r
361       "none";\r
362   }\r
363 \r
364   identity SEVERITY_TYPE_MINOR {\r
365     base SEVERITY_TYPE;\r
366     description\r
367       "none";\r
368   }\r
369 \r
370   identity QOS_PROFILE_KIND_TYPE {\r
371     description\r
372       "none";\r
373   }\r
374 \r
375   identity QOS_PROFILE_KIND_TYPE_NONE {\r
376     base QOS_PROFILE_KIND_TYPE;\r
377     description\r
378       "none";\r
379   }\r
380 \r
381   identity QOS_PROFILE_KIND_TYPE_IEEE8021P {\r
382     base QOS_PROFILE_KIND_TYPE;\r
383     description\r
384       "none";\r
385   }\r
386 \r
387   identity QOS_PROFILE_KIND_TYPE_MPLS_EXP {\r
388     base QOS_PROFILE_KIND_TYPE;\r
389     description\r
390       "none";\r
391   }\r
392 \r
393   identity QOS_PROFILE_KIND_TYPE_IP_DSCP {\r
394     base QOS_PROFILE_KIND_TYPE;\r
395     description\r
396       "none";\r
397   }\r
398 \r
399   identity QOS_PROFILE_KIND_TYPE_NOT_YET_DEFINED {\r
400     base QOS_PROFILE_KIND_TYPE;\r
401     description\r
402       "none";\r
403   }\r
404 \r
405   identity QUEUE_NAME_TYPE {\r
406     description\r
407       "none";\r
408   }\r
409 \r
410   identity QUEUE_NAME_TYPE_BEST_EFFORT_QUEUE {\r
411     base QUEUE_NAME_TYPE;\r
412     description\r
413       "Queue 0.";\r
414   }\r
415 \r
416   identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE1 {\r
417     base QUEUE_NAME_TYPE;\r
418     description\r
419       "Queue 1.";\r
420   }\r
421 \r
422   identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE2 {\r
423     base QUEUE_NAME_TYPE;\r
424     description\r
425       "Queue 2.";\r
426   }\r
427 \r
428   identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE3 {\r
429     base QUEUE_NAME_TYPE;\r
430     description\r
431       "Queue 3.";\r
432   }\r
433 \r
434   identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE4 {\r
435     base QUEUE_NAME_TYPE;\r
436     description\r
437       "Queue 4.";\r
438   }\r
439 \r
440   identity QUEUE_NAME_TYPE_EXPEDITED_FORWARDING_QUEUE {\r
441     base QUEUE_NAME_TYPE;\r
442     description\r
443       "Queue 5.";\r
444   }\r
445 \r
446   identity QUEUE_NAME_TYPE_CLASS_SELECTOR_QUEUE6 {\r
447     base QUEUE_NAME_TYPE;\r
448     description\r
449       "Queue 6.";\r
450   }\r
451 \r
452   identity QUEUE_NAME_TYPE_CLASS_SELECTOR_QUEUE7 {\r
453     base QUEUE_NAME_TYPE;\r
454     description\r
455       "Queue 7.";\r
456   }\r
457 \r
458   identity QUEUE_NAME_TYPE_NOT_YET_DEFINED {\r
459     base QUEUE_NAME_TYPE;\r
460     description\r
461       "none";\r
462   }\r
463 \r
464   identity DROP_PRECEDENCE_TYPE {\r
465     description\r
466       "none";\r
467   }\r
468 \r
469   identity DROP_PRECEDENCE_TYPE_NONE {\r
470     base DROP_PRECEDENCE_TYPE;\r
471     description\r
472       "none";\r
473   }\r
474 \r
475   identity DROP_PRECEDENCE_TYPE_LOW {\r
476     base DROP_PRECEDENCE_TYPE;\r
477     description\r
478       "Would be equal to GREEN.";\r
479   }\r
480 \r
481   identity DROP_PRECEDENCE_TYPE_MEDIUM {\r
482     base DROP_PRECEDENCE_TYPE;\r
483     description\r
484       "Would be equal to YELLOW.";\r
485   }\r
486 \r
487   identity DROP_PRECEDENCE_TYPE_HIGH {\r
488     base DROP_PRECEDENCE_TYPE;\r
489     description\r
490       "Would be equal to RED.";\r
491   }\r
492 \r
493   identity DROP_PRECEDENCE_TYPE_NOT_YET_DEFINED {\r
494     base DROP_PRECEDENCE_TYPE;\r
495     description\r
496       "none";\r
497   }\r
498 \r
499   grouping per-hop-behavior-type {\r
500     leaf queue-name {\r
501       type queue-name-type;\r
502       description\r
503         "Name of the queue.";\r
504     }\r
505     leaf drop-precedence-inside-queue {\r
506       type drop-precedence-type;\r
507       description\r
508         "(if dropPrecedenceAt*QueueIsAvail for the referenced queue == 0) default value shall be kept and configuration attempts shall be ignored.";\r
509     }\r
510     description\r
511       "none";\r
512   }\r
513 \r
514   grouping egress-per-hop-behavior-to-priority-bits-mapping-type {\r
515     leaf mapping-number {\r
516       type int16;\r
517       description\r
518         "none";\r
519     }\r
520     container per-hop-behavior {\r
521       uses per-hop-behavior-type;\r
522       description\r
523         "Per hop behavior, which is to be translated into a p-bit entry in the VLAN, MPLS or IP header.";\r
524     }\r
525     leaf value-of-priority-bits {\r
526       type int8;\r
527       default "-1";\r
528       description\r
529         "Associated value of the three, three or six p-bits of the VLAN, MPLS or IP header.";\r
530     }\r
531     description\r
532       "none";\r
533   }\r
534 }\r