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