Configurable HTTP(S) support for VES messaging
[sim/o1-interface.git] / ntsimulator / deploy / o-ran / yang / o-ran-performance-management.yang
1 module o-ran-performance-management {
2   yang-version 1.1;
3   namespace "urn:o-ran:performance-management:1.0";
4   prefix "o-ran-pm";
5
6   import ietf-yang-types {
7     prefix "yang-types";
8     revision-date 2013-07-15;
9   }
10
11   // import idetifier for O-RU
12   import ietf-hardware {
13     prefix "hw";
14   }
15
16   // import ietf-interface
17   import ietf-interfaces {
18     prefix "if";
19   }
20
21   // import ietf-inet-type
22   import ietf-inet-types {
23     prefix "inet";
24   }
25
26   // import port-number
27   import o-ran-interfaces {
28     prefix "o-ran-int";
29   }
30
31   // import ru-mac-address, o-du-mac-address and vlan-id
32   import o-ran-processing-element {
33     prefix "o-ran-elements";
34   }
35
36   import o-ran-file-management {
37     prefix "o-ran-fm";
38   }
39
40   organization "O-RAN Alliance";
41
42   contact
43     "www.o-ran.org";
44
45   description
46     "This module defines the configuration for performance measurement for
47     transceiver and rx-window measurement objects.
48
49     Copyright 2019 the O-RAN Alliance.
50
51     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
52     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
54     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
55     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
56     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
57     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
58     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
59     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
60     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
61     POSSIBILITY OF SUCH DAMAGE.
62
63     Redistribution and use in source and binary forms, with or without
64     modification, are permitted provided that the following conditions are met:
65
66     * Redistributions of source code must retain the above copyright notice,
67     this list of conditions and the above disclaimer.
68     * Redistributions in binary form must reproduce the above copyright notice,
69     this list of conditions and the above disclaimer in the documentation
70     and/or other materials provided with the distribution.
71     * Neither the Members of the O-RAN Alliance nor the names of its
72     contributors may be used to endorse or promote products derived from
73     this software without specific prior written permission.";
74
75   revision "2019-07-03" {
76     description
77       "version 2.0.0
78
79       1) added new measurement objects for QSFP
80       2) backward compatible changes to correct sFTP Server Authentication.
81       3) simplifying file management and authentication to reuse from o-ran-file-management module
82       4) minor fixes according to lack of descriptions and reference
83       5) added to descriptions to indicate applicability of leafs and Containers
84       to separate O-RAN use cases
85       6) backward compatible changes to introduce groupings.";
86
87     reference "ORAN-WG4.M.0-v02.00";
88   }
89
90   revision "2019-02-04" {
91     description
92       "version 1.0.0
93
94       1) imported model from xRAN
95       2) changed namespace and reference from xran to o-ran";
96
97     reference "ORAN-WG4.M.0-v01.00";
98   }
99
100
101   feature GRANULARITY-TRANSPORT-MEASUREMENT {
102     description
103       "This feature indicates that the O-RU supports an optional object-unit TRANSPORT in rx-window-measurement.";
104   }
105
106   feature GRANULARITY-EAXC-ID-MEASUREMENT {
107     description
108       "This feature indicates that the O-RU supports an optional object-unit EAXC_ID in rx-window-measurement.";
109   }
110
111   grouping start-and-end-time {
112     description
113       "Definition for start and end time for an event";
114
115     leaf start-time {
116       type yang-types:date-and-time;
117       description
118         "Start time for measurement of object stats";
119     }
120     leaf end-time {
121       type yang-types:date-and-time;
122       description
123         "End time for measurement of object stats";
124     }
125   }
126
127   grouping transceiver-measurement-result-grouping {
128     description
129       "transceiver-measurement-result are listed per port-number";
130
131     list transceiver-measurement-result {
132       key "object-unit-id";
133       config false;
134       leaf object-unit-id {
135         type leafref {
136           path "/if:interfaces/if:interface/o-ran-int:port-reference/o-ran-int:port-number";
137         }
138
139         description
140           "port-number is used for the object-unit-id for the
141            transceiver-measurement-result, for which object-unit is
142            PORT_NUMBER only";
143       }
144       container min {
145         description
146           "minimum value with recorded time are included for the
147            measurement-object";
148
149         leaf value {
150           type decimal64 {
151             fraction-digits 4;
152           }
153
154           description
155             "minimum value for the measurment-object";
156         }
157         leaf time {
158           type yang-types:date-and-time;
159
160           description
161             "recorded time for the minimum value";
162         }
163       }
164       container max {
165         description
166         "maximum value with recorded time are included for the
167          measurement-object";
168
169         leaf value {
170           type decimal64 {
171             fraction-digits 4;
172           }
173
174           description
175             "maximum value for the measurment-object";
176         }
177         leaf time {
178           type yang-types:date-and-time;
179
180           description
181             "recorded time for the maximum value";
182         }
183       }
184       container first {
185         description
186           "first value with the recorded time are included for the
187            measurement-object";
188
189         leaf value {
190           type decimal64 {
191             fraction-digits 4;
192           }
193
194           description
195             "first value of the measurement-object";
196         }
197         leaf time {
198           type yang-types:date-and-time;
199
200           description
201             "recorded time for the first value";
202         }
203       }
204       container latest {
205         description
206           "latest value with the recorded time are included for the
207            measurement-object";
208
209         leaf value {
210           type decimal64 {
211             fraction-digits 4;
212           }
213
214           description
215             "latest value of the measurement-object";
216         }
217         leaf time {
218           type yang-types:date-and-time;
219
220           description
221             "recorded time for the latest value";
222         }
223       }
224       leaf-list frequeny-table {
225         type uint32;
226
227         description
228           "frequency-table for the measurment-object are included per bin.
229            The configuration parameters for this frequency-table are defined
230            by bin-count, lower-bound and upper-bound";
231       }
232
233       description
234         "List of transceiver measurement results";
235     }
236   }
237
238   grouping rx-window-measurement-result-grouping{
239     description
240       "Group of measurement reasults for rx window measurements";
241
242     choice object-unit-id {
243       config false;
244       case RU {
245         leaf name{
246           type leafref {
247             path "/hw:hardware/hw:component/hw:name";
248           }
249
250           description
251             "the name of O-RU module or one of its child ports
252             in ietf-hardware/component is used when O-RU is selected as
253             object-unit for the reception window stats.";
254         }
255         leaf count {
256           type uint64;
257           mandatory true;
258
259           description
260             "the number of data packet are counted for the reception
261              window stats per O-RU.";
262         }
263       }
264
265       case TRANSPORT {
266         list tr-measured-result{
267           leaf name{
268             type leafref{
269               path "/o-ran-elements:processing-elements/o-ran-elements:ru-elements/o-ran-elements:name";
270             }
271
272             description
273               "the name of ru-elements in o-ran-processing-elements
274                when TRANSPORT is selected as object-unit for the reception
275                window stats.";
276           }
277           leaf count {
278             type uint64;
279             mandatory true;
280
281             description
282               "the number of data packet are counted for the reception
283                window stats.";
284           }
285
286           description
287             "the number of data packet are counted for the reception
288              window stats per TRANSPORT.";
289         }
290       }
291
292       case EAXC_ID {
293         list eaxc-measured-result {
294           leaf eaxc-id{
295             type uint16;
296
297             description
298               "eaxc-id is used
299                when EAXC_ID is selected as object-unit for the reception
300                window stats.
301                EAXC_ID consists of DU-Port-Id, Band-Selector, CC-id and
302                RU-Port-Id to be used in header of C/U-plane data packet.";
303           }
304           leaf count {
305             type uint64;
306             mandatory true;
307
308             description
309               "the number of data packet are counted for the reception
310                window stats.";
311           }
312           leaf transport-name {
313             type leafref{
314               path "/o-ran-elements:processing-elements/o-ran-elements:ru-elements/o-ran-elements:name";
315             }
316
317             description
318               "the name of ru-elements in o-ran-processing-elements for the
319                transport information corresponding to this eaxc-id";
320           }
321
322           description
323             "the number of data packet are counted for the reception
324              window stats per EAXC-ID.";
325         }
326       }
327
328       description
329         "measurement-result for the reception window stats depends on the
330          configured object-unit, RU, TRANSPORT or EAXC_ID";
331     }
332   }
333
334   grouping measurement-group {
335     description
336       "Group of measurement results";
337
338     leaf enable-SFTP-upload {
339       type boolean;
340       default false;
341       description
342         "Flag to enable upload of performance measurement result files.";
343     }
344
345     leaf enable-random-file-upload {
346       type boolean;
347       default false;
348       description
349         "Flag to enable upload of performance measurement result files at
350          random within file-upload-interval.";
351     }
352
353     list remote-SFTP-uploads {
354       key remote-SFTP-upload-path;
355       description
356         "SFTP upload can be done to one or more than one SFTP servers";
357
358       leaf remote-SFTP-upload-path {
359         type inet:uri;
360         description
361           "URI specifying the remote location where the files are to uploaded.
362           The following format is possible:
363           sftp://<username>@<host>[:<port>]/path";
364       }
365
366       uses o-ran-fm:credential-information;
367     }
368
369 // transceiver measurements applicable to all O-RAN HW functions
370
371     leaf transceiver-measurement-interval {
372       type uint16;
373       units seconds;
374       description
375         "measurement interval to measure the performance of transceiver
376          measurement objects periodically.";
377     }
378
379 // RX Window measurements applicable to O-RAN WG4 defined functions
380
381     leaf rx-window-measurement-interval {
382       type uint16;
383       units seconds;
384       description
385         "measurement interval to measure the performance of reception
386          window measurement objects periodically.";
387     }
388
389     leaf notification-interval {
390       type uint16;
391       units seconds;
392       description
393         "notification interval for the measurement result to be notified
394          periodically.";
395     }
396
397     leaf file-upload-interval {
398       type uint16;
399       units seconds;
400       description
401         "file upload interval for the measurement result file to be
402          uploaded periodically.";
403     }
404
405     leaf max-bin-count{
406       type uint16;
407       config false;
408       mandatory true;
409       description
410         "indicates the maximum value of configurable bin-count for frequency
411          table in transceiver-measurement-objects as one of module
412          capabilities.";
413     }
414
415     list transceiver-measurement-objects {
416       key "measurement-object";
417       description
418         "optional list used to report transceiver measurements
419         applicable to any O-RAN defined hardware function";
420       leaf measurement-object {
421         type enumeration {
422           enum RX_POWER {
423             description
424               "Measured Rx input power in mW for SFP or lane 1 of QSFP";
425           }
426           enum RX_POWER_LANE_2 {
427             description
428               "Measured Rx input power in mW for lane 2 of QSFP";
429           }
430           enum RX_POWER_LANE_3 {
431             description
432               "Measured Rx input power in mW for lane 3 of QSFP";
433           }
434           enum RX_POWER_LANE_4 {
435             description
436               "Measured Rx input power in mW for lane 4 of QSFP";
437           }
438           enum TX_POPWER {
439             description
440               "Measured Tx input power in mW.";
441           }
442           enum TX_POWER_LANE_2 {
443             description
444               "Measured Tx input power in mW for lane 2 of QSFP";
445           }
446           enum TX_POWER_LANE_3 {
447             description
448               "Measured Tx input power in mW for lane 3 of QSFP";
449           }
450           enum TX_POWER_LANE_4 {
451             description
452               "Measured Tx input power in mW for lane 4 of QSFP";
453           }
454           enum TX_BIAS_COUNT {
455             description
456               "Internally measured Tx Bias Current in mA for SFP or lane 1 of QSFP";
457           }
458           enum TX_BIAS_COUNT_LANE_2 {
459             description
460               "Internally measured Tx Bias Current in mA for lane 2 of QSFP";
461           }
462           enum TX_BIAS_COUNT_LANE_3 {
463             description
464               "Internally measured Tx Bias Current in mA for lane 3 of QSFP";
465           }
466           enum TX_BIAS_COUNT_LANE_4 {
467             description
468               "Internally measured Tx Bias Current in mA for lane 4 of QSFP";
469           }
470           enum VOLTAGE {
471             description
472               "Internally measured transceiver supply voltage in mV";
473           }
474           enum TEMPERATURE {
475             description
476               "Internally measured optional laser temperature in degrees Celsius.";
477           }
478         }
479         description "Target metric to measure the performance";
480       }
481
482       leaf active {
483         type boolean;
484         default false;
485         description
486           "Enable/disable the performance measurement per Object";
487       }
488
489       leaf-list report-info {
490         type enumeration {
491           enum MAXIMUM {
492             description
493               "to report maximum value and its recorded time within the
494                measurement-interval for the measurement-object.";
495           }
496           enum MINIMUM {
497             description
498               "to report minimum value and its recorded time within the
499                measurement-interval for the measurement-object.";
500           }
501           enum FIRST {
502             description
503               "to report first value and its recorded time within the
504                measurement-interval for the measurement-object.";
505           }
506           enum LATEST {
507             description
508               "to report latest value and its recorded time within the
509                measurement-interval for the measurement-object.";
510           }
511           enum FREQUENCY_TABLE {
512             description
513               "to report frequency bin table within the
514                measurement-interval for the measurement-object.";
515           }
516         }
517         description "The reporting info to the measurement object.";
518       }
519
520       leaf object-unit {
521         type enumeration {
522           enum PORT_NUMBER {
523             description
524               "unit to measure the performance per object-id";
525           }
526         }
527         mandatory true;
528         description "unit to measure the performance per object-id.";
529       }
530
531       leaf function {
532         type enumeration {
533           enum RAW {
534             description
535               "the value is expressed by real value.";
536           }
537           enum LOG_10 {
538             description
539               "the value is expressed by logarithm with base 10.";
540           }
541         }
542
543         description
544           "the value to be recorded for transceiver-measurement
545            by real value or log 10.";
546       }
547
548       leaf bin-count {
549         type uint16;
550
551         description
552           "the number of bin for the frequency table.
553            This value shall be less than max-bin-count";
554       }
555
556       leaf lower-bound {
557         type decimal64 {
558           fraction-digits 4;
559         }
560
561         description
562           "the lower value of the first bin of frequency table.";
563       }
564
565       leaf upper-bound {
566         type decimal64 {
567           fraction-digits 4;
568         }
569
570         description
571           "the upper value of the last bin of frequency table.";
572       }
573       uses transceiver-measurement-result-grouping;
574 // configuration and measurement result for the transceiver-measurement
575
576     }
577
578     list rx-window-measurement-objects {
579       key "measurement-object";
580       description
581         "optional list used to report RX Window measurements
582         applicable to O-RAN WG4 define O-RU functions";
583       leaf measurement-object {
584         type enumeration {
585           enum RX_ON_TIME {
586             description
587               "the number of data packets, received on time within
588                the reception window.";
589           }
590           enum RX_EARLY {
591             description
592               "the number of data packets, received before
593                the reception window.";
594           }
595           enum RX_LATE {
596             description
597               "the number of data packets, received after
598                the reception window.";
599           }
600           enum RX_CORRUPT {
601             description
602               "the number of data packets, which are corrupt or whose header
603                is incorrect.";
604           }
605           enum RX_DUPL {
606             description
607               "the number of data packets, which is duplicated with other packets,
608                received within the measurement period.";
609           }
610           enum RX_TOTAL {
611             description
612               "the total number of received data packets.";
613           }
614         }
615         description
616           "target reception window metric to measure the performance.";
617       }
618
619       leaf active {
620         type boolean;
621         default false;
622         description
623           "Enable/disable the performance measurement per reception window
624            measurement object.";
625       }
626
627       leaf object-unit {
628         type enumeration {
629           enum RU {
630             description
631               "the reception window stats are counted per hardware component.
632               This may be the parent 'module' or child 'port' component.";
633           }
634           enum TRANSPORT {
635             if-feature GRANULARITY-TRANSPORT-MEASUREMENT;
636             description
637               "the reception window stats are counted per transport flow.
638               When there are multiple transport flows between O-DU and O-RU,
639                e.g. multiple sets of o-du mac address, ru mac address and
640                     vlan-id, the reception window stats per transport flow
641                     are counted in this case.
642               This configuration is allowed only when O-RU supports
643               a feature GRANULARITY-TRANSPORT-MEASUREMENT.";
644           }
645           enum EAXC_ID {
646             if-feature GRANULARITY-EAXC-ID-MEASUREMENT;
647
648             description
649               "the reception window stats are counted per eAxC ID, which is
650                used in the header of receivd data packet.
651               This configuration is allowed only when O-RU supports
652               a feature GRANULARITY-EAXC-ID-MEASUREMENT.";
653           }
654         }
655         description
656           "unit to measure the performance per object-id.";
657       }
658
659       leaf report-info {
660         type enumeration {
661           enum COUNT {
662             description
663               "the number of data packet are counted for the reception
664                window stats.";
665           }
666         }
667         description
668           "The reporting info to the measurement object.";
669       }
670
671       uses rx-window-measurement-result-grouping;
672 // configuration and measurement result for the reception window stats
673
674     }
675   }
676
677   grouping measurement-notification {
678     list transceiver-stats {
679       key "measurement-object";
680       leaf measurement-object {
681         type leafref {
682           path "/performance-measurement-objects/transceiver-measurement-objects/measurement-object";
683         }
684
685         description
686           "measurement-object for the transceiver-measurement";
687       }
688
689       uses start-and-end-time;
690       uses transceiver-measurement-result-grouping;
691
692       description
693         "measurement result of transceiver-measurement per measurement-object";
694     }
695
696     list rx-window-stats {
697       key "measurement-object";
698       leaf measurement-object {
699         type leafref {
700           path "/performance-measurement-objects/rx-window-measurement-objects/measurement-object";
701         }
702
703         description
704           "measurement-object for the reception window measurement";
705       }
706       uses start-and-end-time;
707       uses rx-window-measurement-result-grouping;
708
709       description
710         "measurement result for the reception window measurement per
711          measurement-object";
712
713     }
714
715     description
716       "notification may contain measurement result for transceiver-stats
717        and/or rx-window-stats";
718   }
719
720   // Top level container
721
722   container performance-measurement-objects {
723     description
724       "configuration for performance management and measurement-result are
725        included";
726     uses measurement-group;
727   }
728
729 // Notifications
730
731   notification measurement-result-stats {
732     description
733       "Notification may contain measurement results for transceiver-stats
734        and/or rx-window-stats";
735     uses measurement-notification;
736   }
737 }