7faefa0e0b1675bb37506c476cbe00feb88f80bb
[scp/oam/modeling.git] / data-model / yang / published / xran / 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           leaf name{
247             type leafref{
248               path "/xran-elements:processing-elements/xran-elements:ru-elements/xran-elements:name";
249             }
250
251             description
252               "the name of ru-elements in xran-processing-elements
253                when TRANSPORT is selected as object-unit for the reception
254                window stats.";
255           }
256           leaf count {
257             type uint64;
258             mandatory true;
259
260             description
261               "the number of data packet are counted for the reception
262                window stats.";
263           }
264
265           description
266             "the number of data packet are counted for the reception
267              window stats per TRANSPORT.";
268         }
269       }
270
271       case EAXC_ID {
272         list eaxc-measured-result {
273           leaf eaxc-id{
274             type uint16;
275
276             description
277               "eaxc-id is used
278                when EAXC_ID is selected as object-unit for the reception
279                window stats.
280                EAXC_ID consists of CU-Port-Id, Band-Selector, CC-id and
281                RU-Port-Id to be used in header of C/U-plane data packet.";
282           }
283           leaf count {
284             type uint64;
285             mandatory true;
286
287             description
288               "the number of data packet are counted for the reception
289                window stats.";
290           }
291           leaf transport-name {
292             type leafref{
293               path "/xran-elements:processing-elements/xran-elements:ru-elements/xran-elements:name";
294             }
295
296             description
297               "the name of ru-elements in xran-processing-elements for the
298                transport information corresponding to this eaxc-id";
299           }
300
301           description
302             "the number of data packet are counted for the reception
303              window stats per EAXC-ID.";
304         }
305       }
306
307       description
308         "measurement-result for the reception window stats depends on the
309          configured object-unit, RU, TRANSPORT or EAXC_ID";
310     }
311   }
312
313   container performance-measurement-objects {
314     description
315       "configuration for performance management and measurement-result are
316        included";
317
318     leaf enable-SFTP-upload {
319       type boolean;
320       default false;
321       description
322         "Flag to enable upload of performance measurement result files.";
323     }
324
325     leaf enable-random-file-upload {
326       type boolean;
327       default false;
328       description
329         "Flag to enable upload of performance measurement result files at
330          random within file-upload-interval.";
331     }
332
333     list remote-SFTP-uploads {
334       key remote-SFTP-upload-path;
335       description
336         "SFTP upload can be done to one or more than one SFTP servers";
337
338       leaf remote-SFTP-upload-path {
339         type inet:uri;
340         description
341           "URI specifying the remote location where the files are to uploaded.
342           The following format is possible:
343           sftp://<username>@<host>[:<port>]";
344       }
345
346       choice credentials {
347         description
348           "Type of authentication to use for SFTP upload.";
349
350         case password {
351           container password {
352             presence true;
353             leaf password {
354               type string;
355               mandatory true;
356
357               description
358                 "password needed for authentication.";
359             }
360             description
361               "password authentication method in use";
362           }
363         }
364         case certificate {
365           container certificate {
366             presence true;
367             description
368               "certificate authentication method in use";
369           }
370         }
371       }
372     }
373
374     leaf transceiver-measurement-interval {
375       type uint16;
376       description
377         "measurement interval to measure the performance of transceiver
378          measurement objects periodically.";
379     }
380
381     leaf rx-window-measurement-interval {
382       type uint16;
383       description
384         "measurement interval to measure the performance of reception
385          window measurement objects periodically.";
386     }
387
388     leaf notification-interval {
389       type uint16;
390       description
391         "notification interval for the measurement result to be notified
392          periodically.";
393     }
394
395     leaf file-upload-interval {
396       type uint16;
397       description
398         "file upload interval for the measurement result file to be
399          uploaded periodically.";
400     }
401
402     list transceiver-measurement-objects {
403       key "measurement-object";
404       leaf measurement-object {
405         type enumeration {
406           enum RX_POWER {
407             description
408               "Measured Rx input power in mW";
409           }
410           enum TX_POPWER {
411             description
412               "Measured Tx input power in mW.";
413           }
414           enum TX_BIAS_COUNT {
415             description
416               "Internally measured Tx Bias Current in mA";
417           }
418           enum VOLTAGE {
419             description
420               "Internally measured transceiver supply voltage in mV";
421           }
422           enum TEMPERATURE {
423             description
424               "Internally measured optional laser temperature in degrees Celsius.";
425           }
426         }
427         description "Target metric to measure the performance";
428       }
429
430       leaf active {
431         type boolean;
432         default false;
433         description
434           "Enable/disable the performance measurement per Object";
435       }
436
437       leaf-list report-info {
438         type enumeration {
439           enum MAXIMUM {
440             description
441               "to report maximum value and its recorded time within the
442                measurement-interval for the measurement-object.";
443           }
444           enum MINIMUM {
445             description
446               "to report minimum value and its recorded time within the
447                measurement-interval for the measurement-object.";
448           }
449           enum FIRST {
450             description
451               "to report first value and its recorded time within the
452                measurement-interval for the measurement-object.";
453           }
454           enum LATEST {
455             description
456               "to report latest value and its recorded time within the
457                measurement-interval for the measurement-object.";
458           }
459           enum FREQUENCY_TABLE {
460             description
461               "to report frequency bin table within the
462                measurement-interval for the measurement-object.";
463           }
464         }
465         description "The reporting info to the measurement object.";
466       }
467
468       leaf object-unit {
469         type enumeration {
470           enum PORT_NUMBER {
471             description
472               "unit to measure the performance per object-id";
473           }
474         }
475         mandatory true;
476         description "unit to measure the performance per object-id.";
477       }
478
479       leaf function {
480         type enumeration {
481           enum RAW {
482             description
483               "the value is expressed by real value.";
484           }
485           enum LOG_10 {
486             description
487               "the value is expressed by logarithm with base 10.";
488           }
489         }
490
491         description
492           "the value to be recorded for transceiver-measurement
493            by real value or log 10.";
494       }
495
496       leaf bin-count {
497         type uint32;
498
499         description
500           "the number of bin for the frequency table.";
501       }
502
503       leaf lower-bound {
504         type decimal64 {
505           fraction-digits 4;
506         }
507
508         description
509           "the lower value of the first bin of frequency table.";
510       }
511
512       leaf upper-bound {
513         type decimal64 {
514           fraction-digits 4;
515         }
516
517         description
518           "the upper value of the last bin of frequency table.";
519       }
520       uses transceiver-measurement-result-grouping;
521
522       description
523         "configuration and measurement result for the transceiver-measurement.";
524     }
525
526     list rx-window-measurement-objects {
527       key "measurement-object";
528       leaf measurement-object {
529         type enumeration {
530           enum RX_ON_TIME {
531             description
532               "the number of data packets, received on time within
533                the reception window.";
534           }
535           enum RX_EARLY {
536             description
537               "the number of data packets, received before
538                the reception window.";
539           }
540           enum RX_LATE {
541             description
542               "the number of data packets, received after
543                the reception window.";
544           }
545           enum RX_CORRUPT {
546             description
547               "the number of data packets, which are corrupt or whose header
548                is incorrect.";
549           }
550           enum RX_DUPL {
551             description
552               "the number of data packets, which is duplicated with other packets,
553                received within the measurement period.";
554           }
555           enum RX_TOTAL {
556             description
557               "the total number of received data packets.";
558           }
559         }
560         description
561           "target reception window metric to measure the performance.";
562       }
563
564       leaf active {
565         type boolean;
566         default false;
567         description
568           "Enable/disable the performance measurement per reception window
569            measurement object.";
570       }
571
572       leaf object-unit {
573         type enumeration {
574           enum RU {
575             description
576               "the reception window stats are counted per RU.";
577           }
578           enum TRANSPORT {
579             if-feature GRANULARITY-TRANSPORT-MEASUREMENT;
580             description
581               "the reception window stats are counted per transport flow.
582               When there are multiple transport flows between lls-CU and RU,
583                e.g. multiple sets of lls-cu mac address, ru mac address and
584                     vlan-id, the reception window stats per transport flow
585                     are counted in this case.
586               This configuration is allowed only when RU supports
587               a feature GRANULARITY-TRANSPORT-MEASUREMENT.";
588           }
589           enum EAXC_ID {
590             if-feature GRANULARITY-EAXC-ID-MEASUREMENT;
591
592             description
593               "the reception window stats are counted per eAxC ID, which is
594                used in the header of receivd data packet.
595               This configuration is allowed only when RU supports
596               a feature GRANULARITY-EAXC-ID-MEASUREMENT.";
597           }
598         }
599         description
600           "unit to measure the performance per object-id.";
601       }
602
603       leaf report-info {
604         type enumeration {
605           enum COUNT {
606             description
607               "the number of data packet are counted for the reception
608                window stats.";
609           }
610         }
611         description
612           "The reporting info to the measurement object.";
613       }
614
615       uses rx-window-measurement-result-grouping;
616
617       description
618         "configuration and measurement result for the reception window stats";
619     }
620   }
621
622   notification measurement-result-stats {
623     list transceiver-stats {
624       key "measurement-object";
625       leaf measurement-object {
626         type leafref {
627           path "/performance-measurement-objects/transceiver-measurement-objects/measurement-object";
628         }
629
630         description
631           "measurement-object for the transceiver-measurement";
632       }
633
634       uses start-and-end-time;
635       uses transceiver-measurement-result-grouping;
636
637       description
638         "measurement result of transceiver-measurement per measurement-object";
639     }
640
641     list rx-window-stats {
642       key "measurement-object";
643       leaf measurement-object {
644         type leafref {
645           path "/performance-measurement-objects/rx-window-measurement-objects/measurement-object";
646         }
647
648         description
649           "measurement-object for the reception window measurement";
650       }
651       uses start-and-end-time;
652       uses rx-window-measurement-result-grouping;
653
654       description
655         "measurement result for the reception window measurement per
656          measurement-object";
657
658     }
659
660     description
661       "notification may contain measurement result for transceiver-stats
662        and/or rx-window-stats";
663   }
664 }