Refactor folder structure.
[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-06-05" {
76     description
77       "version 1.0.2
78
79       1) backward compatible changes according to NOK-0002 sFTP Server Authentication Correction.
80       2) simplifying file management and authentication to reuse from o-ran-file-management module
81       3) minor fixes according to lack of descriptions and reference";
82
83     reference "ORAN-WG4.M.0-v01.00";
84   }
85
86   revision "2019-03-28" {
87     description
88       "version 1.0.2
89
90       1) added to descriptions to indicate applicability of leafs and Containers
91       to separate O-RAN use cases";
92
93     reference "ORAN-WG4.M.0-v01.00";
94   }
95
96   revision "2019-03-07" {
97     description
98       "version 1.0.1
99
100       1) backward compatible changes to introduce groupings.";
101
102     reference "ORAN-WG4.M.0-v01.00";
103   }
104
105   revision "2019-02-04" {
106     description
107       "version 1.0.0
108
109       1) imported model from xRAN
110       2) changed namespace and reference from xran to o-ran";
111
112     reference "ORAN-WG4.M.0-v01.00";
113   }
114
115
116   feature GRANULARITY-TRANSPORT-MEASUREMENT {
117     description
118       "This feature indicates that the O-RU supports an optional object-unit TRANSPORT in rx-window-measurement.";
119   }
120
121   feature GRANULARITY-EAXC-ID-MEASUREMENT {
122     description
123       "This feature indicates that the O-RU supports an optional object-unit EAXC_ID in rx-window-measurement.";
124   }
125
126   grouping start-and-end-time {
127     description
128       "Definition for start and end time for an event";
129
130     leaf start-time {
131       type yang-types:date-and-time;
132       description
133         "Start time for measurement of object stats";
134     }
135     leaf end-time {
136       type yang-types:date-and-time;
137       description
138         "End time for measurement of object stats";
139     }
140   }
141
142   grouping transceiver-measurement-result-grouping {
143     description
144       "transceiver-measurement-result are listed per port-number";
145
146     list transceiver-measurement-result {
147       key "object-unit-id";
148       config false;
149       leaf object-unit-id {
150         type leafref {
151           path "/if:interfaces/if:interface/o-ran-int:port-reference/o-ran-int:port-number";
152         }
153
154         description
155           "port-number is used for the object-unit-id for the
156            transceiver-measurement-result, for which object-unit is
157            PORT_NUMBER only";
158       }
159       container min {
160         description
161           "minimum value with recorded time are included for the
162            measurement-object";
163
164         leaf value {
165           type decimal64 {
166             fraction-digits 4;
167           }
168
169           description
170             "minimum value for the measurment-object";
171         }
172         leaf time {
173           type yang-types:date-and-time;
174
175           description
176             "recorded time for the minimum value";
177         }
178       }
179       container max {
180         description
181         "maximum value with recorded time are included for the
182          measurement-object";
183
184         leaf value {
185           type decimal64 {
186             fraction-digits 4;
187           }
188
189           description
190             "maximum value for the measurment-object";
191         }
192         leaf time {
193           type yang-types:date-and-time;
194
195           description
196             "recorded time for the maximum value";
197         }
198       }
199       container first {
200         description
201           "first value with the recorded time are included for the
202            measurement-object";
203
204         leaf value {
205           type decimal64 {
206             fraction-digits 4;
207           }
208
209           description
210             "first value of the measurement-object";
211         }
212         leaf time {
213           type yang-types:date-and-time;
214
215           description
216             "recorded time for the first value";
217         }
218       }
219       container latest {
220         description
221           "latest value with the recorded time are included for the
222            measurement-object";
223
224         leaf value {
225           type decimal64 {
226             fraction-digits 4;
227           }
228
229           description
230             "latest value of the measurement-object";
231         }
232         leaf time {
233           type yang-types:date-and-time;
234
235           description
236             "recorded time for the latest value";
237         }
238       }
239       leaf-list frequeny-table {
240         type uint32;
241
242         description
243           "frequency-table for the measurment-object are included per bin.
244            The configuration parameters for this frequency-table are defined
245            by bin-count, lower-bound and upper-bound";
246       }
247
248       description
249         "List of transceiver measurement results";
250     }
251   }
252
253   grouping rx-window-measurement-result-grouping{
254     description
255       "Group of measurement reasults for rx window measurements";
256
257     choice object-unit-id {
258       config false;
259       case RU {
260         leaf name{
261           type leafref {
262             path "/hw:hardware/hw:component/hw:name";
263           }
264
265           description
266             "the name of O-RU module or one of its child ports
267             in ietf-hardware/component is used when O-RU is selected as
268             object-unit for the reception window stats.";
269         }
270         leaf count {
271           type uint64;
272           mandatory true;
273
274           description
275             "the number of data packet are counted for the reception
276              window stats per O-RU.";
277         }
278       }
279
280       case TRANSPORT {
281         list tr-measured-result{
282           key name;
283           leaf name{
284             type leafref{
285               path "/o-ran-elements:processing-elements/o-ran-elements:ru-elements/o-ran-elements:name";
286             }
287
288             description
289               "the name of ru-elements in o-ran-processing-elements
290                when TRANSPORT is selected as object-unit for the reception
291                window stats.";
292           }
293           leaf count {
294             type uint64;
295             mandatory true;
296
297             description
298               "the number of data packet are counted for the reception
299                window stats.";
300           }
301
302           description
303             "the number of data packet are counted for the reception
304              window stats per TRANSPORT.";
305         }
306       }
307
308       case EAXC_ID {
309         list eaxc-measured-result {
310           key eaxc-id;
311           leaf eaxc-id{
312             type uint16;
313
314             description
315               "eaxc-id is used
316                when EAXC_ID is selected as object-unit for the reception
317                window stats.
318                EAXC_ID consists of DU-Port-Id, Band-Selector, CC-id and
319                RU-Port-Id to be used in header of C/U-plane data packet.";
320           }
321           leaf count {
322             type uint64;
323             mandatory true;
324
325             description
326               "the number of data packet are counted for the reception
327                window stats.";
328           }
329           leaf transport-name {
330             type leafref{
331               path "/o-ran-elements:processing-elements/o-ran-elements:ru-elements/o-ran-elements:name";
332             }
333
334             description
335               "the name of ru-elements in o-ran-processing-elements for the
336                transport information corresponding to this eaxc-id";
337           }
338
339           description
340             "the number of data packet are counted for the reception
341              window stats per EAXC-ID.";
342         }
343       }
344
345       description
346         "measurement-result for the reception window stats depends on the
347          configured object-unit, RU, TRANSPORT or EAXC_ID";
348     }
349   }
350
351   grouping measurement-group {
352     description
353       "Group of measurement results";
354
355     leaf enable-SFTP-upload {
356       type boolean;
357       default false;
358       description
359         "Flag to enable upload of performance measurement result files.";
360     }
361
362     leaf enable-random-file-upload {
363       type boolean;
364       default false;
365       description
366         "Flag to enable upload of performance measurement result files at
367          random within file-upload-interval.";
368     }
369
370     list remote-SFTP-uploads {
371       key remote-SFTP-upload-path;
372       description
373         "SFTP upload can be done to one or more than one SFTP servers";
374
375       leaf remote-SFTP-upload-path {
376         type inet:uri;
377         description
378           "URI specifying the remote location where the files are to uploaded.
379           The following format is possible:
380           sftp://<username>@<host>[:<port>]/path";
381       }
382
383       uses o-ran-fm:credential-information;
384     }
385
386 // transceiver measurements applicable to all O-RAN HW functions
387
388     leaf transceiver-measurement-interval {
389       type uint16;
390       units seconds;
391       description
392         "measurement interval to measure the performance of transceiver
393          measurement objects periodically.";
394     }
395
396 // RX Window measurements applicable to O-RAN WG4 defined functions
397
398     leaf rx-window-measurement-interval {
399       type uint16;
400       units seconds;
401       description
402         "measurement interval to measure the performance of reception
403          window measurement objects periodically.";
404     }
405
406     leaf notification-interval {
407       type uint16;
408       units seconds;
409       description
410         "notification interval for the measurement result to be notified
411          periodically.";
412     }
413
414     leaf file-upload-interval {
415       type uint16;
416       units seconds;
417       description
418         "file upload interval for the measurement result file to be
419          uploaded periodically.";
420     }
421
422     leaf max-bin-count{
423       type uint16;
424       config false;
425       mandatory true;
426       description
427         "indicates the maximum value of configurable bin-count for frequency
428          table in transceiver-measurement-objects as one of module
429          capabilities.";
430     }
431
432     list transceiver-measurement-objects {
433       key "measurement-object";
434       description
435         "optional list used to report transceiver measurements
436         applicable to any O-RAN defined hardware function";
437       leaf measurement-object {
438         type enumeration {
439           enum RX_POWER {
440             description
441               "Measured Rx input power in mW";
442           }
443           enum TX_POPWER {
444             description
445               "Measured Tx input power in mW.";
446           }
447           enum TX_BIAS_COUNT {
448             description
449               "Internally measured Tx Bias Current in mA";
450           }
451           enum VOLTAGE {
452             description
453               "Internally measured transceiver supply voltage in mV";
454           }
455           enum TEMPERATURE {
456             description
457               "Internally measured optional laser temperature in degrees Celsius.";
458           }
459         }
460         description "Target metric to measure the performance";
461       }
462
463       leaf active {
464         type boolean;
465         default false;
466         description
467           "Enable/disable the performance measurement per Object";
468       }
469
470       leaf-list report-info {
471         type enumeration {
472           enum MAXIMUM {
473             description
474               "to report maximum value and its recorded time within the
475                measurement-interval for the measurement-object.";
476           }
477           enum MINIMUM {
478             description
479               "to report minimum value and its recorded time within the
480                measurement-interval for the measurement-object.";
481           }
482           enum FIRST {
483             description
484               "to report first value and its recorded time within the
485                measurement-interval for the measurement-object.";
486           }
487           enum LATEST {
488             description
489               "to report latest value and its recorded time within the
490                measurement-interval for the measurement-object.";
491           }
492           enum FREQUENCY_TABLE {
493             description
494               "to report frequency bin table within the
495                measurement-interval for the measurement-object.";
496           }
497         }
498         description "The reporting info to the measurement object.";
499       }
500
501       leaf object-unit {
502         type enumeration {
503           enum PORT_NUMBER {
504             description
505               "unit to measure the performance per object-id";
506           }
507         }
508         mandatory true;
509         description "unit to measure the performance per object-id.";
510       }
511
512       leaf function {
513         type enumeration {
514           enum RAW {
515             description
516               "the value is expressed by real value.";
517           }
518           enum LOG_10 {
519             description
520               "the value is expressed by logarithm with base 10.";
521           }
522         }
523
524         description
525           "the value to be recorded for transceiver-measurement
526            by real value or log 10.";
527       }
528
529       leaf bin-count {
530         type uint16;
531
532         description
533           "the number of bin for the frequency table.
534            This value shall be less than max-bin-count";
535       }
536
537       leaf lower-bound {
538         type decimal64 {
539           fraction-digits 4;
540         }
541
542         description
543           "the lower value of the first bin of frequency table.";
544       }
545
546       leaf upper-bound {
547         type decimal64 {
548           fraction-digits 4;
549         }
550
551         description
552           "the upper value of the last bin of frequency table.";
553       }
554       uses transceiver-measurement-result-grouping;
555 // configuration and measurement result for the transceiver-measurement
556
557     }
558
559     list rx-window-measurement-objects {
560       key "measurement-object";
561       description
562         "optional list used to report RX Window measurements
563         applicable to O-RAN WG4 define O-RU functions";
564       leaf measurement-object {
565         type enumeration {
566           enum RX_ON_TIME {
567             description
568               "the number of data packets, received on time within
569                the reception window.";
570           }
571           enum RX_EARLY {
572             description
573               "the number of data packets, received before
574                the reception window.";
575           }
576           enum RX_LATE {
577             description
578               "the number of data packets, received after
579                the reception window.";
580           }
581           enum RX_CORRUPT {
582             description
583               "the number of data packets, which are corrupt or whose header
584                is incorrect.";
585           }
586           enum RX_DUPL {
587             description
588               "the number of data packets, which is duplicated with other packets,
589                received within the measurement period.";
590           }
591           enum RX_TOTAL {
592             description
593               "the total number of received data packets.";
594           }
595         }
596         description
597           "target reception window metric to measure the performance.";
598       }
599
600       leaf active {
601         type boolean;
602         default false;
603         description
604           "Enable/disable the performance measurement per reception window
605            measurement object.";
606       }
607
608       leaf object-unit {
609         type enumeration {
610           enum RU {
611             description
612               "the reception window stats are counted per hardware component.
613               This may be the parent 'module' or child 'port' component.";
614           }
615           enum TRANSPORT {
616             if-feature GRANULARITY-TRANSPORT-MEASUREMENT;
617             description
618               "the reception window stats are counted per transport flow.
619               When there are multiple transport flows between O-DU and O-RU,
620                e.g. multiple sets of o-du mac address, ru mac address and
621                     vlan-id, the reception window stats per transport flow
622                     are counted in this case.
623               This configuration is allowed only when O-RU supports
624               a feature GRANULARITY-TRANSPORT-MEASUREMENT.";
625           }
626           enum EAXC_ID {
627             if-feature GRANULARITY-EAXC-ID-MEASUREMENT;
628
629             description
630               "the reception window stats are counted per eAxC ID, which is
631                used in the header of receivd data packet.
632               This configuration is allowed only when O-RU supports
633               a feature GRANULARITY-EAXC-ID-MEASUREMENT.";
634           }
635         }
636         description
637           "unit to measure the performance per object-id.";
638       }
639
640       leaf report-info {
641         type enumeration {
642           enum COUNT {
643             description
644               "the number of data packet are counted for the reception
645                window stats.";
646           }
647         }
648         description
649           "The reporting info to the measurement object.";
650       }
651
652       uses rx-window-measurement-result-grouping;
653 // configuration and measurement result for the reception window stats
654
655     }
656   }
657
658   grouping measurement-notification {
659     list transceiver-stats {
660       key "measurement-object";
661       leaf measurement-object {
662         type leafref {
663           path "/performance-measurement-objects/transceiver-measurement-objects/measurement-object";
664         }
665
666         description
667           "measurement-object for the transceiver-measurement";
668       }
669
670       uses start-and-end-time;
671       uses transceiver-measurement-result-grouping;
672
673       description
674         "measurement result of transceiver-measurement per measurement-object";
675     }
676
677     list rx-window-stats {
678       key "measurement-object";
679       leaf measurement-object {
680         type leafref {
681           path "/performance-measurement-objects/rx-window-measurement-objects/measurement-object";
682         }
683
684         description
685           "measurement-object for the reception window measurement";
686       }
687       uses start-and-end-time;
688       uses rx-window-measurement-result-grouping;
689
690       description
691         "measurement result for the reception window measurement per
692          measurement-object";
693
694     }
695
696     description
697       "notification may contain measurement result for transceiver-stats
698        and/or rx-window-stats";
699   }
700
701   // Top level container
702
703   container performance-measurement-objects {
704     description
705       "configuration for performance management and measurement-result are
706        included";
707     uses measurement-group;
708   }
709
710 // Notifications
711
712   notification measurement-result-stats {
713     description
714       "Notification may contain measurement results for transceiver-stats
715        and/or rx-window-stats";
716     uses measurement-notification;
717   }
718 }