Bug fix.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / 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           // [ast] Fix for list without key
268           key name;
269           // [ast] end fix
270           leaf name{
271             type leafref{
272               path "/o-ran-elements:processing-elements/o-ran-elements:ru-elements/o-ran-elements:name";
273             }
274
275             description
276               "the name of ru-elements in o-ran-processing-elements
277                when TRANSPORT is selected as object-unit for the reception
278                window stats.";
279           }
280           leaf count {
281             type uint64;
282             mandatory true;
283
284             description
285               "the number of data packet are counted for the reception
286                window stats.";
287           }
288
289           description
290             "the number of data packet are counted for the reception
291              window stats per TRANSPORT.";
292         }
293       }
294
295       case EAXC_ID {
296         list eaxc-measured-result {
297           // [ast] Fix for list without key
298           key eaxc-id;
299           // [ast] end fix
300           leaf eaxc-id{
301             type uint16;
302
303             description
304               "eaxc-id is used
305                when EAXC_ID is selected as object-unit for the reception
306                window stats.
307                EAXC_ID consists of DU-Port-Id, Band-Selector, CC-id and
308                RU-Port-Id to be used in header of C/U-plane data packet.";
309           }
310           leaf count {
311             type uint64;
312             mandatory true;
313
314             description
315               "the number of data packet are counted for the reception
316                window stats.";
317           }
318           leaf transport-name {
319             type leafref{
320               path "/o-ran-elements:processing-elements/o-ran-elements:ru-elements/o-ran-elements:name";
321             }
322
323             description
324               "the name of ru-elements in o-ran-processing-elements for the
325                transport information corresponding to this eaxc-id";
326           }
327
328           description
329             "the number of data packet are counted for the reception
330              window stats per EAXC-ID.";
331         }
332       }
333
334       description
335         "measurement-result for the reception window stats depends on the
336          configured object-unit, RU, TRANSPORT or EAXC_ID";
337     }
338   }
339
340   grouping measurement-group {
341     description
342       "Group of measurement results";
343
344     leaf enable-SFTP-upload {
345       type boolean;
346       default false;
347       description
348         "Flag to enable upload of performance measurement result files.";
349     }
350
351     leaf enable-random-file-upload {
352       type boolean;
353       default false;
354       description
355         "Flag to enable upload of performance measurement result files at
356          random within file-upload-interval.";
357     }
358
359     list remote-SFTP-uploads {
360       key remote-SFTP-upload-path;
361       description
362         "SFTP upload can be done to one or more than one SFTP servers";
363
364       leaf remote-SFTP-upload-path {
365         type inet:uri;
366         description
367           "URI specifying the remote location where the files are to uploaded.
368           The following format is possible:
369           sftp://<username>@<host>[:<port>]/path";
370       }
371
372       uses o-ran-fm:credential-information;
373     }
374
375 // transceiver measurements applicable to all O-RAN HW functions
376
377     leaf transceiver-measurement-interval {
378       type uint16;
379       units seconds;
380       description
381         "measurement interval to measure the performance of transceiver
382          measurement objects periodically.";
383     }
384
385 // RX Window measurements applicable to O-RAN WG4 defined functions
386
387     leaf rx-window-measurement-interval {
388       type uint16;
389       units seconds;
390       description
391         "measurement interval to measure the performance of reception
392          window measurement objects periodically.";
393     }
394
395     leaf notification-interval {
396       type uint16;
397       units seconds;
398       description
399         "notification interval for the measurement result to be notified
400          periodically.";
401     }
402
403     leaf file-upload-interval {
404       type uint16;
405       units seconds;
406       description
407         "file upload interval for the measurement result file to be
408          uploaded periodically.";
409     }
410
411     leaf max-bin-count{
412       type uint16;
413       config false;
414       mandatory true;
415       description
416         "indicates the maximum value of configurable bin-count for frequency
417          table in transceiver-measurement-objects as one of module
418          capabilities.";
419     }
420
421     list transceiver-measurement-objects {
422       key "measurement-object";
423       description
424         "optional list used to report transceiver measurements
425         applicable to any O-RAN defined hardware function";
426       leaf measurement-object {
427         type enumeration {
428           enum RX_POWER {
429             description
430               "Measured Rx input power in mW for SFP or lane 1 of QSFP";
431           }
432           enum RX_POWER_LANE_2 {
433             description
434               "Measured Rx input power in mW for lane 2 of QSFP";
435           }
436           enum RX_POWER_LANE_3 {
437             description
438               "Measured Rx input power in mW for lane 3 of QSFP";
439           }
440           enum RX_POWER_LANE_4 {
441             description
442               "Measured Rx input power in mW for lane 4 of QSFP";
443           }
444           enum TX_POPWER {
445             description
446               "Measured Tx input power in mW.";
447           }
448           enum TX_POWER_LANE_2 {
449             description
450               "Measured Tx input power in mW for lane 2 of QSFP";
451           }
452           enum TX_POWER_LANE_3 {
453             description
454               "Measured Tx input power in mW for lane 3 of QSFP";
455           }
456           enum TX_POWER_LANE_4 {
457             description
458               "Measured Tx input power in mW for lane 4 of QSFP";
459           }
460           enum TX_BIAS_COUNT {
461             description
462               "Internally measured Tx Bias Current in mA for SFP or lane 1 of QSFP";
463           }
464           enum TX_BIAS_COUNT_LANE_2 {
465             description
466               "Internally measured Tx Bias Current in mA for lane 2 of QSFP";
467           }
468           enum TX_BIAS_COUNT_LANE_3 {
469             description
470               "Internally measured Tx Bias Current in mA for lane 3 of QSFP";
471           }
472           enum TX_BIAS_COUNT_LANE_4 {
473             description
474               "Internally measured Tx Bias Current in mA for lane 4 of QSFP";
475           }
476           enum VOLTAGE {
477             description
478               "Internally measured transceiver supply voltage in mV";
479           }
480           enum TEMPERATURE {
481             description
482               "Internally measured optional laser temperature in degrees Celsius.";
483           }
484         }
485         description "Target metric to measure the performance";
486       }
487
488       leaf active {
489         type boolean;
490         default false;
491         description
492           "Enable/disable the performance measurement per Object";
493       }
494
495       leaf-list report-info {
496         type enumeration {
497           enum MAXIMUM {
498             description
499               "to report maximum value and its recorded time within the
500                measurement-interval for the measurement-object.";
501           }
502           enum MINIMUM {
503             description
504               "to report minimum value and its recorded time within the
505                measurement-interval for the measurement-object.";
506           }
507           enum FIRST {
508             description
509               "to report first value and its recorded time within the
510                measurement-interval for the measurement-object.";
511           }
512           enum LATEST {
513             description
514               "to report latest value and its recorded time within the
515                measurement-interval for the measurement-object.";
516           }
517           enum FREQUENCY_TABLE {
518             description
519               "to report frequency bin table within the
520                measurement-interval for the measurement-object.";
521           }
522         }
523         description "The reporting info to the measurement object.";
524       }
525
526       leaf object-unit {
527         type enumeration {
528           enum PORT_NUMBER {
529             description
530               "unit to measure the performance per object-id";
531           }
532         }
533         mandatory true;
534         description "unit to measure the performance per object-id.";
535       }
536
537       leaf function {
538         type enumeration {
539           enum RAW {
540             description
541               "the value is expressed by real value.";
542           }
543           enum LOG_10 {
544             description
545               "the value is expressed by logarithm with base 10.";
546           }
547         }
548
549         description
550           "the value to be recorded for transceiver-measurement
551            by real value or log 10.";
552       }
553
554       leaf bin-count {
555         type uint16;
556
557         description
558           "the number of bin for the frequency table.
559            This value shall be less than max-bin-count";
560       }
561
562       leaf lower-bound {
563         type decimal64 {
564           fraction-digits 4;
565         }
566
567         description
568           "the lower value of the first bin of frequency table.";
569       }
570
571       leaf upper-bound {
572         type decimal64 {
573           fraction-digits 4;
574         }
575
576         description
577           "the upper value of the last bin of frequency table.";
578       }
579       uses transceiver-measurement-result-grouping;
580 // configuration and measurement result for the transceiver-measurement
581
582     }
583
584     list rx-window-measurement-objects {
585       key "measurement-object";
586       description
587         "optional list used to report RX Window measurements
588         applicable to O-RAN WG4 define O-RU functions";
589       leaf measurement-object {
590         type enumeration {
591           enum RX_ON_TIME {
592             description
593               "the number of data packets, received on time within
594                the reception window.";
595           }
596           enum RX_EARLY {
597             description
598               "the number of data packets, received before
599                the reception window.";
600           }
601           enum RX_LATE {
602             description
603               "the number of data packets, received after
604                the reception window.";
605           }
606           enum RX_CORRUPT {
607             description
608               "the number of data packets, which are corrupt or whose header
609                is incorrect.";
610           }
611           enum RX_DUPL {
612             description
613               "the number of data packets, which is duplicated with other packets,
614                received within the measurement period.";
615           }
616           enum RX_TOTAL {
617             description
618               "the total number of received data packets.";
619           }
620         }
621         description
622           "target reception window metric to measure the performance.";
623       }
624
625       leaf active {
626         type boolean;
627         default false;
628         description
629           "Enable/disable the performance measurement per reception window
630            measurement object.";
631       }
632
633       leaf object-unit {
634         type enumeration {
635           enum RU {
636             description
637               "the reception window stats are counted per hardware component.
638               This may be the parent 'module' or child 'port' component.";
639           }
640           enum TRANSPORT {
641             if-feature GRANULARITY-TRANSPORT-MEASUREMENT;
642             description
643               "the reception window stats are counted per transport flow.
644               When there are multiple transport flows between O-DU and O-RU,
645                e.g. multiple sets of o-du mac address, ru mac address and
646                     vlan-id, the reception window stats per transport flow
647                     are counted in this case.
648               This configuration is allowed only when O-RU supports
649               a feature GRANULARITY-TRANSPORT-MEASUREMENT.";
650           }
651           enum EAXC_ID {
652             if-feature GRANULARITY-EAXC-ID-MEASUREMENT;
653
654             description
655               "the reception window stats are counted per eAxC ID, which is
656                used in the header of receivd data packet.
657               This configuration is allowed only when O-RU supports
658               a feature GRANULARITY-EAXC-ID-MEASUREMENT.";
659           }
660         }
661         description
662           "unit to measure the performance per object-id.";
663       }
664
665       leaf report-info {
666         type enumeration {
667           enum COUNT {
668             description
669               "the number of data packet are counted for the reception
670                window stats.";
671           }
672         }
673         description
674           "The reporting info to the measurement object.";
675       }
676
677       uses rx-window-measurement-result-grouping;
678 // configuration and measurement result for the reception window stats
679
680     }
681   }
682
683   grouping measurement-notification {
684     list transceiver-stats {
685       key "measurement-object";
686       leaf measurement-object {
687         type leafref {
688           path "/performance-measurement-objects/transceiver-measurement-objects/measurement-object";
689         }
690
691         description
692           "measurement-object for the transceiver-measurement";
693       }
694
695       uses start-and-end-time;
696       uses transceiver-measurement-result-grouping;
697
698       description
699         "measurement result of transceiver-measurement per measurement-object";
700     }
701
702     list rx-window-stats {
703       key "measurement-object";
704       leaf measurement-object {
705         type leafref {
706           path "/performance-measurement-objects/rx-window-measurement-objects/measurement-object";
707         }
708
709         description
710           "measurement-object for the reception window measurement";
711       }
712       uses start-and-end-time;
713       uses rx-window-measurement-result-grouping;
714
715       description
716         "measurement result for the reception window measurement per
717          measurement-object";
718
719     }
720
721     description
722       "notification may contain measurement result for transceiver-stats
723        and/or rx-window-stats";
724   }
725
726   // Top level container
727
728   container performance-measurement-objects {
729     description
730       "configuration for performance management and measurement-result are
731        included";
732     uses measurement-group;
733   }
734
735 // Notifications
736
737   notification measurement-result-stats {
738     description
739       "Notification may contain measurement results for transceiver-stats
740        and/or rx-window-stats";
741     uses measurement-notification;
742   }
743 }