Add performance management to o-ran-sc-du-hello-world
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / o-ran-du / o-ran-sc-du-hello-world.yang
1 module o-ran-sc-du-hello-world {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:yang:o-ran-sc-du-hello-world";
4   prefix duhw;
5
6   import nts-common {
7     prefix ntsc;
8   }
9
10   organization
11     "O-RAN Software Community";
12   contact
13     "www.o-ran-sc.org";
14   description
15     "This module contains the O-RAN Software Community Distributed Unit
16      API description. This API data model describes ...
17      
18      * Cell and Radio Resource Management (RRM) parameters defined by 3GPP in7
19        the context of the O-RAN Software Community E-Release and its
20        'Slice Resource Quota Provisioning and Assurance' use case.
21
22      * VES Subscription parameters according to OPNFV and ONAP.
23
24      * Performance Management parameters per Cell and for the measurement types
25        * average user-equipment throughput-downlink
26        * average user-equipment throughput uplink
27        as defined in 3GPP TS 28.552.
28
29      The module is inspired by 3GPP TS 28.541 5G Network Resource Model (NRM).
30      The intent is to reduce the implementation efforts. It is not intended
31      to fragment the industry.
32
33      Due the reduction of the model in terms of scope and completeness this
34      module cannot and must not be used in production environments.
35      The main purpose is to show case the implemented functions by
36      O-RAN-SC O-DU project. The module name 'hello-world' highlights
37      this fact.
38
39      Copyright 2021 the O-RAN Software Community.
40
41      Licensed under the Apache License, Version 2.0 (the 'License');
42      you may not use this file except in compliance with the License.
43      You may obtain a copy of the License at
44
45      http://www.apache.org/licenses/LICENSE-2.0
46
47      Unless required by applicable law or agreed to in writing, software
48      distributed under the License is distributed on an 'AS IS' BASIS,
49      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50      See the License for the specific language governing permissions and
51      limitations under the License.";
52   reference 
53     "3GPP TS 28.541 5G Network Resource Model (NRM)
54      OPNFV VES - https://wiki.opnfv.org/display/ves";
55
56   revision 2021-10-29 {
57     description
58       "Performance management added.";
59     reference
60       "3GPP TS 28.552
61        https://jira.o-ran-sc.org/browse/OAM-232";
62   }
63   revision 2021-10-20 {
64     description
65       "Subscription management added.";
66     reference
67       "https://jira.o-ran-sc.org/browse/OAM-233";
68   }
69   revision 2021-10-02 {
70     description
71       "Updates based on the RSAC use case descriptions of O-RAN-SC E-Release.";
72     reference
73       "https://jira.o-ran-sc.org/browse/OAM-230";
74   }
75   revision 2021-10-01 {
76     description
77       "Updates based on the RSAC use case descriptions of O-RAN-SC E-Release.";
78     reference
79       "https://jira.o-ran-sc.org/browse/OAM-229
80        https://wiki.o-ran-sc.org/download/attachments/35881433/RSY-2021.08.04-OSC-Slice_Discovery%20and%20Registration_v01.pptx?api=v2";
81   }
82   revision 2021-04-08 {
83     description
84       "Updates based on the RSAC call 2021-04-08.";
85     reference
86       "https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=20878423";
87   }
88   revision 2021-03-06 {
89     description
90       "initial revision";
91     reference
92       "https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=20878423";
93   }
94
95   // Features
96
97   feature distributed-unit {
98     description
99       "This feature indicates that the network-function implements
100        an O-RAN distributed function.";
101     reference
102       "O-RAN.WG1.O-RAN-Architecture-Description-v04.00 - 4.3.5 O-DU";
103   }
104
105   feature subscription-management {
106     description
107       "This feature indicates that the network-function implements
108        a subscription-function for sending notifications to a consumer.";
109   }
110
111   feature snssai-subcounter {
112     description
113       "This feature indicates that the network-function implements
114        a performance measurement functions for single-network-slice-
115        selection-assistance-info (S-NSSAI).";
116     reference
117       "3GPP TS 28.552";
118   }
119
120   feature performance-measurement {
121     description
122       "This feature indicates that the network-function implements
123        a performance measurement function.";
124     reference
125       "3GPP TS 28.623
126        3GPP TS 28.622";
127   }
128
129   // Identities
130
131   identity performance-measurement-type-id {
132     description
133       "Base identity for performance measurement types. 
134        A unique identification of the measurement, not including the resource. 
135        Different resources can share measurement types.
136
137        A string-based qualifier can be used in addition to the
138        identity in order to have different measurement types based on
139        information not known at design-time.
140        Standards and vendors can define sub-identities to clearly
141        identify specific measurement types.
142
143        This identity is abstract and MUST NOT be used for measurements.";
144   }
145
146   identity user-equipment-average-throughput-downlink {
147     base performance-measurement-type-id;
148     description
149       "The identifier for a measurement value which indicates the average 
150        downlink-throughput for all user-equipment.";
151     reference
152       "3GPP TS 28.552";
153   }
154
155   identity user-equipment-average-throughput-uplink {
156     base performance-measurement-type-id;
157     description
158       "The identifier for a measurement value which indicates the average 
159        downlink-throughput for all user-equipment.";
160     reference
161       "3GPP TS 28.552";
162   }
163
164   // Type definitions
165
166   typedef administrative-state {
167     type enumeration {
168       enum locked {
169         value 0;
170         description
171           "The resource is administratively prohibited from performing
172            services for its users.";
173       }
174       enum unlocked {
175         value 1;
176         description
177           "The resource is administratively permitted to perform
178            services for its users. This is independent of its inherent
179            operability.";
180       }
181       enum shutting-down {
182         value 2;
183         description
184           "Use of the resource is administratively permitted to
185            existing instances of use only. While the system remains in
186            the shutting down state the manager or the managed element
187            may at any time cause the resource to transition to the
188            locked state.";
189       }
190     }
191     description
192       "The administration of managed objects operates independently of the
193        operability and usage of managed objects and is described by the
194        administrative state attribute, which has three values. These are values
195        are called locked, unlocked and shutting down.";
196     reference
197       "3GPP TS 28.625 and ITU-T X.731 / ISO/IEC 10164-2";
198   }
199
200   typedef cell-state {
201     type enumeration {
202       enum idle {
203         description
204           "The cell resources are not in use.";
205       }
206       enum inactive {
207         description
208           "The cell resources shall not serve UEs.";
209         reference
210           "3GPP TS 38.401";
211       }
212       enum active {
213         description
214           "The cell resources shall be able to serve UEs.";
215         reference
216           "3GPP TS 38.401";
217       }
218     }
219     description
220       "The cell state indicates the usage state of the cell instance.
221        It describes whether the cell is not currently in use (idle),
222        or currently in use but not configured to carry traffic (inactive)
223        or is currently in use and is configured to carry traffic (active).";
224     reference
225       "3GPP TS 28.541";
226   }
227
228   typedef connection-status {
229     type enumeration {
230       enum disconnected {
231         value 0;
232         description
233           "The connection to the remote network function is not established.";
234       }
235       enum connecting {
236         value 1;
237         description
238           "The system is about to connect to the remote network function.";
239       }
240       enum connected {
241         value 2;
242         description
243           "The system is connected to the remote network function.";
244       }
245       enum disconnecting {
246         value 3;
247         description
248           "The system is about to disconnect from the remote network
249            function.";
250       }
251       enum unable-to-connect {
252         value 4;
253         description
254           "This value is reported, when the system tried several times
255            to connect and finally gave up.";
256       }
257     }
258     description
259       "A non extensible enumeration representing a connection status.";
260   }
261
262   typedef distinguished-name {
263     type string {
264       pattern '([a-zA-Z][a-zA-Z0-9-]*=(\\( |#|\\|>|<|;|"|\+|,|[a-fA-F0-9]{2})|[^\\><;"+,# ])'
265             + '((\\( |#|\\|>|<|;|"|\+|,|[a-fA-F0-9]{2})|[^\\><;"+,])*'
266             + '(\\( |#|\\|>|<|;|"|\+|,|[a-fA-F0-9]{2})|[^\\><;"+, ]))?'
267             + '[,\+])*[a-zA-Z][a-zA-Z0-9-]*=(\\( |#|\\|>|<|;|"|\+|,|[a-fA-F0-9]{2})|[^\\><;"+,# ])'
268             + '((\\( |#|\\|>|<|;|"|\+|,|[a-fA-F0-9]{2})'
269             + '|[^\\><;"+,])*(\\( |#|\\|>|<|;|"|\+|,|[a-fA-F0-9]{2})|[^\\><;"+, ]))?';
270     }
271     description
272       "The type definition for distinguished names according to RFC 4512.";
273     reference
274       "RFC 4512 Lightweight Directory Access Protocol (LDAP):
275                 Directory Information Models
276        https://datatracker.ietf.org/doc/html/rfc4512#section-2.3.2";
277   }
278
279   typedef mobile-country-code-type {
280     type string {
281       pattern '^[02-79][0-9][0-9]$';
282     }
283     description
284       "The mobile country code consists of three decimal digits,
285        The first digit of the mobile country code identifies the geographic
286        region (the digits 1 and 8 are not used):";
287     reference
288       "3GPP TS 23.003 subclause 2.2 and 12.1";
289   }
290
291   typedef mobile-network-code-type {
292     type string {
293       pattern '^[0-9]{2,3}$';
294     }
295     description
296       "The mobile network code consists of two or three
297        decimal digits (for example: MNC of 001 is not the same as MNC of 01)";
298     reference
299       "3GPP TS 23.003 subclause 2.2 and 12.1";
300   }
301
302   typedef o-ru-reference {
303     type leafref {
304       path "/network-function/du-to-ru-connection/name";
305     }
306     description
307       "A reference to a remote network function representing an O-RU.";
308   }
309
310   typedef operational-state {
311     type enumeration {
312       enum disabled {
313         value 0;
314         description
315           "The resource is totally inoperable.";
316         reference
317           "CCITT Rec. X.731 (1992 E) - ISO/IEC 10164-2 : 1993 (E)
318            Chapter 7.1.1.2 Disable";
319       }
320       enum enabled {
321         value 1;
322         description
323           "The resource is partially or fully operable.";
324         reference
325           "CCITT Rec. X.731 (1992 E) - ISO/IEC 10164-2 : 1993 (E)
326            Chapter 7.1.1.1 Enable";
327       }
328     }
329     description
330       "The operability of a resource is described by the operational state
331        attribute, which has two possible values: disabled and enabled.";
332     reference
333       "3GPP TS 28.625 and ITU-T X.731 / ISO/IEC 10164-2";
334   }
335
336   typedef performance-measurement-type-id {
337     type identityref {
338       base performance-measurement-type-id;
339     }
340     description
341       "Identifies an performance-measurement type. The description of the 
342        performance-measurement type id MUST indicate if the it is abstract or 
343        not. An abstract performance-measurement type is used as a base for other 
344        performance-measurement type ids and will not be used as a value for a 
345        performance-measurement or be present in an 
346        performance-measurement dictionary/inventory.";
347   }
348
349   typedef resource-type {
350     type enumeration {
351       enum prb {
352         description
353           "Physical Resource Block (PRB)
354            for a cell of a distributed unit.";
355       }
356       enum prb-ul {
357         description
358           "Physical Resource Block (PRB) uplink
359            for a cell of a distributed unit.";
360       }
361       enum prb-dl {
362         description
363           "Physical Resource Block (PRB) downlink
364            for a cell of a distributed unit.";
365       }
366       enum rrc {
367         description
368           "Radio Resource Control (RRC)
369            for a cell of a centralized unit.";
370       }
371       enum drb {
372         description
373           "Data radio bearer (DRB)
374            for a user plane function of a centralized unit.";
375       }
376     }
377     description
378       "A type describing the resource for radio-resource-management.";
379     reference
380       "3GPP TS 28.541 V17.34.0 (2021-0609)";
381   }
382
383   typedef tracking-area-code-type {
384     type uint32 {
385       range "0..16777215";
386     }
387     description
388       "The type definition for a Tracking Area Code.";
389     reference
390       "3GPP TS 23.003 clause 19.4.2.3";
391   }
392
393   // Abstract object classes - groupings
394
395   grouping cell-grp {
396     description
397       "Represents the cell object class.";
398     reference
399       "3GPP TS 28.541
400        https://forge.3gpp.org/rep/sa5/MnS/blob/Rel17-draft/yang-models/_3gpp-nr-nrm-cell.yang
401        line 40";
402     leaf local-id {
403       type uint16 {
404         range "0..16383";
405       }
406       mandatory true;
407       description
408         "Identifies a cell within a o-ran-sc-du-function. Together with the
409          corresponding o-ran-sc-du-function identifier in forms the cell
410          identity.";
411       reference
412         "NCI in 3GPP TS 38.300";
413     }
414     leaf traffic-state {
415       type cell-state;
416       config false;
417       description
418         "Indicates whether the corresponding entity
419          - is not currently in use (idle), or
420          - currently in use but not configured to carry traffic (inactive), or
421          - currently in use and is configured to carry traffic (active).";
422     }
423     list public-land-mobile-networks {
424       key "mobile-country-code mobile-network-code slice-differentiator slice-service-type";
425       min-elements 1;
426       ordered-by user;
427       description
428         "The public-land-mobile-networks is a list of
429          public-land-mobile-network data type.
430          It defines which public-land-mobile-networks that can be served by
431          the cell, and which S-NSSAIs that can be supported by the cell for
432          corresponding public-land-mobile-network in case of network slicing
433          feature is supported. The public-land-mobile-network-id of the
434          first entry of the list is the public-land-mobile-network-id used to
435          construct the cell-global-identity.
436          If the public-land-mobile-network is associated with
437          a radio-resource-management-policy-ratio, then the settings of the
438          radio-resource-management-policy-ratio MUST be considered by
439          the distributed function implementation for this cell. ";
440       uses public-land-mobile-network;
441     }
442     leaf physical-cell-id {
443       type uint16 {
444         range "0..1007";
445       }
446       mandatory true;
447       description
448         "The Physical Cell Identity (PCI) of the cell.";
449       reference
450         "3GPP TS 36.211";
451     }
452     leaf tracking-area-code {
453       type tracking-area-code-type;
454       description
455         "The common 5GS Tracking Area Code for the public-land-mobile-networks.";
456       reference
457         "3GPP TS 23.003, 3GPP TS 38.473";
458     }
459     container absolute-radio-frequency-channel-number {
460       description
461         "This container groups parameters related to
462          absolute radio frequency channel number (ARFCN).";
463       leaf downlink {
464         type int32;
465         mandatory true;
466         description
467           "Absolute Radio Frequency Channel Number (ARFCN) for
468            downlink.";
469         reference
470           "3GPP TS 38.104";
471       }
472       leaf uplink {
473         type int32;
474         description
475           "Absolute Radio Frequency Channel Number (ARFCN) for
476            uplink.";
477         reference
478           "3GPP TS 38.104";
479       }
480       leaf supplementary-uplink {
481         type int32;
482         description
483           "Absolute Radio Frequency Channel Number (ARFCN) for
484            supplementary uplink.";
485         reference
486           "3GPP TS 38.104";
487       }
488     }
489     container base-station-channel-bandwidth {
490       description
491         "This container groups parameters related to
492          base station channel bandwidth.";
493       leaf downlink {
494         type uint32;
495         units "MHz";
496         description
497           "Base station channel bandwidth for downlink.";
498         reference
499           "3GPP TS 38.104";
500       }
501       leaf uplink {
502         type uint32;
503         units "MHz";
504         description
505           "Base station channel bandwidth for uplink.";
506         reference
507           "3GPP TS 38.104";
508       }
509       leaf supplementary-uplink {
510         type uint32;
511         units "MHz";
512         description
513           "Base station channel bandwidth for supplementary uplink.";
514         reference
515           "3GPP TS 38.104";
516       }
517     }
518     container synchronization-signal-block {
519       description
520         "This container groups parameters related to Synchronization Signal
521          Block (SSB).";
522       leaf frequency-channel-number {
523         type uint32 {
524           range "0..3279165";
525         }
526         mandatory true;
527         description
528           "Indicates cell defining Synchronization Signal Block (SSB) frequency
529            domain position.
530            Frequency (in terms of NR-ARFCN) of the cell defining SSB
531            transmission.
532            The frequency identifies the position of resource element RE=#0
533            (subcarrier #0) of resource block RB#10 of the SSB. The frequency
534            must be positioned on the global frequency raster, as defined in
535            3GPP TS 38.101-1, and within base station channel bandwidth down
536            link.";
537         reference
538           "3GPP TS 38.101-1";
539       }
540       leaf periodicity {
541         type uint8 {
542           range "5 | 10 | 20 | 40 | 80 | 160";
543         }
544         units "ms";
545         mandatory true;
546         description
547           "Indicates cell defined Synchronization Signal Block (SSB)
548            periodicity. The SSB periodicity is used for the rate matching
549            purpose.";
550       }
551       leaf subcarrier-spacing {
552         type uint8 {
553           range "15 | 30 | 120 | 240";
554         }
555         units "kHz";
556         mandatory true;
557         description
558           "Subcarrier spacing of Synchronization Signal Block (SSB).
559            Only the values 15 kHz or 30 kHz
560            (< 6 GHz), 120 kHz or 240 kHz (> 6 GHz) are applicable.";
561         reference
562           "3GPP TS 38.211";
563       }
564       leaf offset {
565         type uint8 {
566           range "0..159";
567         }
568         units "ms";
569         mandatory true;
570         description
571           "Indicates cell defining Synchronization Signal Block (SSB) time
572            domain position. Defined as the offset of the measurement window,
573            in which to receive Synchronization Signal/Physical Broadcast Channel
574            (SS/PBCH) blocks, where allowed values depend on the
575            Synchronization Signal Block periodicity.
576            Rule:
577              synchronization-signal-block-offset is lower than
578              synchronization-signal-block-periodicity).";
579       }
580       leaf duration {
581         type uint8 {
582           range "1..5";
583         }
584         units "ms";
585         mandatory true;
586         description
587           "Duration of the measurement window in which to receive
588            Synchronization Signal/Physical Broadcast Channel (SS/PBCH) blocks.";
589         reference
590           "3GPP TS 38.213";
591       }
592     }
593     uses performance-monitoring-point-grp {
594       if-feature performance-measurement;
595     }
596   }
597
598   grouping connection-grp {
599     status deprecated;
600     description
601       "An abstract object class representing a connection or link to an
602        external component.";
603     leaf name {
604       type string;
605       description
606         "It is proposed to use the network unique identifier of the remote
607          network function.
608          Note: After discussion the string was not restricted by a 'length'
609          statement of a 'pattern' statement. Please avoid leading and ending
610          spaces and consecutive spaces and any character outside of UTF-8-";
611     }
612     leaf operational-state {
613       type enumeration {
614         enum DISABLED {
615           description
616             "The resource is not functional.";
617         }
618         enum ENABLED {
619           description
620             "The resource is functional.";
621         }
622       }
623       config false;
624       description
625         "Operational state of a connection. Indicates
626          whether the resource is functional (ENABLED) or not (DISABLED).";
627       reference
628         "3GPP TS 28.625 and ITU-T X.731";
629     }
630     leaf administrative-state {
631       type enumeration {
632         enum LOCKED {
633           description
634             "LOCKED refers to a situation which is NOT considered as
635              â€˜normal operation'. Therefore, the O-DU will shut down the
636              connection to the related O-RU, when the value is set to LOCKED.";
637         }
638         enum UNLOCKED {
639           description
640             "UNLOCKED refers to a situation which is considered as
641              'normal operation'. Therefore, the O-DU will establish the
642              connection to the related O-RU, when the value is set to UNLOCKED.";
643         }
644         enum SHUTTING_DOWN {
645           description
646             "This value should not be used. At least the system
647              behavior is not defined.";
648         }
649       }
650       default "LOCKED";
651       description
652         "Administrative state of a connection.";
653       reference
654         "3GPP TS 28.625 and ITU-T X.731";
655     }
656     leaf cell-state {
657       type enumeration {
658         enum IDLE {
659           description
660             "Indicates whether the O-RU is not in use.";
661         }
662         enum INACTIVE {
663           description
664             "Indicates whether the O-RU is in use but not
665              configured to carry traffic.";
666         }
667         enum ACTIVE {
668           description
669             "Indicates whether the O-RU is in use and
670              configured to carry traffic.";
671         }
672       }
673       config false;
674       description
675         "Cell state of the O-RU instance.";
676       reference
677         "3GPP TS 28.625";
678     }
679     leaf status {
680       type connection-status;
681       default "disconnected";
682       config false;
683       description
684         "The value represents the connection status. ";
685     }
686   }
687
688   grouping distributed-unit-function {
689     description
690       "A simplified and reduced object class for a DU function.";
691     uses top-grp;
692     // uses mf3gpp:ManagedFunctionContainedClasses;
693     list cell {
694       key "id";
695       description
696         "Represents the cell and its configuration management.";
697       reference
698         "3GPP TS 28.541
699          https://forge.3gpp.org/rep/sa5/MnS/blob/Rel17-draft/yang-models/_3gpp-nr-nrm-cell.yang
700          line 215";
701       uses top-grp;
702       uses cell-grp;
703     }
704     list radio-resource-management-policy-ratio {
705       key "id";
706       description
707         "The radio-resource-management-policy-ratio object class is one
708          realization of a radio-resource-management-policy object class.
709          This Radio Resource Management framework allows
710          adding new policies by inheriting from the
711          abstract radio-resource-management-policy object class.";
712       uses top-grp;
713       uses radio-resource-management-policy-ratio-grp;
714     }
715   }
716   
717   grouping network-function {
718     description
719       "Represents telecommunications equipment or
720        TMN entities within the telecommunications network providing support
721        and/or service to the subscriber.";
722     leaf distinguished-name-prefix {
723       type distinguished-name;
724       description
725         "Provides naming context that allows the Managed
726          Elements to be partitioned into logical domains.
727          A Distinguished Name(DN) is defined by 3GPP TS 32.300,
728          which splits the DN into a DN Prefix and Local DN";
729     }
730     leaf location-name {
731       type string {
732         length "0..1023";
733       }
734       config false;
735       description
736         "The physical location (e.g. an address) of an entity
737          represented by a (derivative of) ManagedElement_. It may contain no
738          information to support the case where the derivative of
739          ManagedElement needs to represent a distributed multi-location NE.";
740     }
741   }
742
743   grouping network-function-grp {
744     status deprecated;
745     description
746       "An abstract object class grouping the O-RAN-SC-DU parameters with
747        focus on RSAC D-release Closed-Loop use case.";
748     list du-to-ru-connection {
749       key "name";
750       description
751         "A list of connection objects to O-RAN-SC radio units.";
752       uses connection-grp {
753         status deprecated;
754       }
755     }
756   }
757
758   grouping performance-measurement-job-grp {
759     description
760       "An abstract object class representing a performance-measurement-job";
761     leaf job-tag {
762       type string {
763         length "255";
764       }
765       description
766         "A job group identifier to combine several performance-measurement-jobs
767          to one logical job.";
768     }
769     leaf-list performance-metrics {
770       type instance-identifier;
771       min-elements 1;
772       description
773         "Performance metrics (or performance measurement counter values)
774          include measurements defined in TS 28.552 and KPIs defined in TS 28.554
775          and enhanced by O-RAN working groups.
776          Performance metrics are identified with their xPath including their
777          identity.
778
779          Example for average downlink user equipment throughput per cell
780          /network-function/distributed-unit-functions[id='<id-value>']/cell[id='<id-value']/supported-measurements/performance-measurement-type[.='user-equipment-average-throughput-downlink']
781
782          Example for a specific slice-differentiator (here sd=12345) subcounter of average downlink user equipment throughput
783          /network-function/distributed-unit-functions[id='<id-value>']/cell[id='<id-value']/supported-measurements/performance-measurement-type[.='user-equipment-average-throughput-downlink']/supported-snssai-subcounter-instances/slice-differentiator[.=12345]";
784       reference
785         "3GPP TS 28.552
786          3GPP TS 28.554
787          O-RAN WG10 PM-Coordination-Team";
788     }
789     leaf granularity-period {
790       type uint32 {
791         range "1..max";
792       }
793       units "s";
794       mandatory true;
795       description
796         "The interval time in seconds between the start of a measurement and the
797          end of a measurement.
798          If the network-function does not support the intended 
799          granularity-period, then the network-function SHOULD use the supported
800          granularity-period which is lower than the configured/intended period.";
801       reference
802         "3GPP TS 28.552
803          3GPP TS 28.554
804          O-RAN WG10 PM-Coordination";
805     }
806     leaf-list object-reference {
807       type instance-identifier;
808       description
809         "A list of reference to objects, which SHOULD measure the referred
810          performance-metrics values.";
811     }
812     leaf stream-target {
813       if-feature subscription-management;
814       type leafref {
815         path "/network-function/subscription-streams/id";
816       }
817       mandatory true;
818       description
819         "A reference to the subscriber of the stream. ";
820     }
821   }
822
823   grouping performance-monitoring-point-grp {
824     description 
825       "An abstract object class providing monitoring and control functions for
826        performance measurements. Such grouping should be used by the monitoring 
827        object.";
828     list supported-measurements {
829       config false;
830       key "performance-measurement-type";
831       uses supported-measurement-grp;
832       description
833         "A list of performance measurements object providing the 
834          measurement-types (counters) and its potential subcounters. The values
835          ar provided by the combination of the event subscription and 
836          performance-measurement-job concepts.";
837     }
838   }
839
840   grouping public-land-mobile-network-id {
841     description
842       "The identity of a public land mobile network as complex type
843        constructed of two codes:
844        - mobile country code (MCC) and
845        - the mobile network code (MNC).";
846     reference
847       "3GPP TS 23.658
848        3GPP TS 32.101
849        3GPP TR 21.905";
850     leaf mobile-country-code {
851       type mobile-country-code-type;
852       mandatory true;
853       description
854         "The fist part of the public-land-mobile-network-id";
855     }
856     leaf mobile-network-code {
857       type mobile-network-code-type;
858       mandatory true;
859       description
860         "The second part of the public-land-mobile-network-id";
861     }
862   }
863
864   grouping public-land-mobile-network {
865     description
866       "The public-land-mobile-network data type define a S-NSSAI member
867        in a specific public-land-mobile-network-id, and it have two attributes
868        public-land-mobile-network-id and S-NSSAI (public-land-mobile-network-id,
869        S-NSSAI).
870        The public-land-mobile-network-id represents a data type that is
871        comprised of mcc mobile country code) and mnc (mobile network code),
872        (See TS 23.003 subclause 2.2 and 12.1) and S-NSSAI represents an
873        data type, that is comprised of an slice-service-type
874        (Slice/Service type) and an optional slice-differentiator field.";
875     uses public-land-mobile-network-id;
876     uses single-network-slice-selection-assistance-info;
877   }
878
879   grouping radio-resource-management-policy-grp {
880     description
881       "This object class represents the properties of an abstract
882        radio-resource-management-policy. The radio-resource-management-policy
883        object class needs to be subclassed to be instantiated.
884        It defines two attributes apart from those inherited from
885        Top object class:
886        - the resource-type attribute defines type of resource (PRB, RRC
887        connected users, DRB usage etc.) and
888        - the radio-resource-management-policy-members attribute
889        defines the radio-resource-management-policy-members that are subject
890        to this policy.
891        An Radio Resource Management resource (defined in resource-type
892        attribute) is located in cell or distributed-unit-function.
893        The radio-resource-management-policy-ratio object class is one
894        realization of a radio-resource-management-policy object class.
895        This Radio Resource Management framework allows adding new
896        policies by inheriting from the abstract radio-resource-management-policy
897        object class.";
898     leaf resource-type {
899       type resource-type;
900       mandatory true;
901       description
902         "The resource-type attribute defines type of resource that is
903          subject to policy.";
904     }
905     list radio-resource-management-policy-members {
906       key "mobile-country-code mobile-network-code slice-differentiator slice-service-type";
907       min-elements 1;
908       description
909         "It represents the list of radio-resource-management-policy-members
910          that the managed object is supporting.
911          A radio-resource-management-policy-member <<dataType>> include
912          the public-land-mobile-network-identifier <<dataType>> and
913          S-NSSAI <<dataType>>.";
914       uses public-land-mobile-network;
915     }
916   }
917
918   grouping radio-resource-management-policy-ratio-grp {
919     description
920       "Represents the radio-resource-management-policy-ratio concrete
921        object class.";
922     uses radio-resource-management-policy-grp;
923     leaf radio-resource-management-policy-max-ratio {
924       type uint8 {
925         range "0..100";
926       }
927       units "%";
928       default "100";
929       description
930         "This attribute specifies the maximum percentage of radio resources that
931          can be used by the associated
932          radio-resource-management-policy-members.
933          The maximum percentage of radio resource include at least one of
934          the shared resources, prioritized resources and dedicated resources.
935          The sum of the radio-resource-management-policy-max-ratio values
936          assigned to all radio-resource-management-policy-ratio(s)
937          name-contained by same ManagedEntity can be greater that 100.";
938     }
939     leaf radio-resource-management-policy-min-ratio {
940       type uint8 {
941         range "0..100";
942       }
943       units "percent";
944       default "0";
945       description
946         "This attribute specifies the minimum percentage of radio resources that
947          can be used by the associated
948          radio-resource-management-policy-members.
949          The minimum percentage of radio resources including at least one of
950          prioritized resources and dedicated resources. The sum of the
951          radio-resource-management-policy-min-ratio values assigned to all
952          radio-resource-management-policy-ratios
953          name-contained by same ManagedEntity shall be less or equal 100.";
954     }
955     leaf radio-resource-management-policy-dedicated-ratio {
956       type uint8 {
957         range "0..100";
958       }
959       units "percent";
960       default "0";
961       description
962         "This attribute specifies the percentage of radio resources that
963          dedicated used by the associated
964          radio-resource-management-policy-members.
965          The sum of the radio-resource-management-policy-dedicated-ratio values
966          assigned to all radio-resource-management-policy-ratios
967          name-contained by same ManagedEntity shall be less or equal 100.";
968     }
969   }
970
971   grouping rpc-output {
972     description
973       "A generic RPC output syntax.";
974     leaf response-status {
975       type enumeration {
976         enum ok {
977           value 200;
978           description
979             "The system has successfully performed that request.";
980         }
981         enum accepted {
982           value 202;
983           description
984             "The system has received and accepted the request. It continues
985              processing the request. The final status of the processing
986              procedures are reported by a notification service. This response
987              status is typically for long running transactions.";
988         }
989         enum internal-server-error {
990           value 500;
991           description
992             "The request cannot be performed.";
993         }
994       }
995       mandatory true;
996       description
997         "The response status related to the corresponding request.
998          Its values are inspired by HTTP response status codes.";
999       reference
1000         "RFC 7231 â€“ Response Status Codes - Section 6.3.4";
1001     }
1002     leaf message {
1003       type string;
1004       description
1005         "A human readable text complementary to the response status. ";
1006     }
1007   }
1008
1009   grouping single-network-slice-selection-assistance-info {
1010     description
1011       "Single Network Slice Selection Assistance Information (S-NSSAI)";
1012     reference
1013       "3GPP TS 23.003";
1014     leaf slice-differentiator {
1015       type uint32 {
1016         range "0..16777215";
1017       }
1018       description
1019         "Slice Differentiator can be used to identify and tag a slice.
1020          If not needed, the value can be set to the value 16777215.";
1021       reference
1022         "3GPP TS 23.003";
1023     }
1024     leaf slice-service-type {
1025       type uint8;
1026       description
1027         "Slice/Service Type as defined in 3GPP TS 23.501.";
1028       reference
1029         "3GPP TS 23.501";
1030     }
1031   }
1032   
1033   grouping supported-measurement-grp {
1034     description
1035       "An abstract object class for performance management. The object class
1036        could be implemented by any kind of resource which can measure data
1037        and expose the measured data for quality assurance.";
1038     leaf performance-measurement-type {
1039       type performance-measurement-type-id;
1040       description
1041         "A list of measurement types which are supported by this 
1042          network-function for each slice.";
1043     }
1044     list supported-snssai-subcounter-instances {
1045       if-feature "snssai-subcounter";
1046       must "current()/../../../cell/id";
1047       key "slice-differentiator slice-service-type";
1048       uses single-network-slice-selection-assistance-info;
1049       description
1050         "A conditional list of S-NSSAIs used as an address to uniquely identify a 
1051          measurement value. The 'must' statement ensures that this list only
1052          exits, when the measurement-type is measured by an entity represented
1053          as a 'cell' object. ";
1054     }    
1055   }
1056
1057   grouping top-grp {
1058     description
1059       "Ane abstract class supplying a naming attribute.";
1060     reference
1061       "3GPP TS 28.620";
1062     leaf id {
1063       type string;
1064       mandatory true;
1065       description
1066         "Key leaf (namingAttribute) for a class/list.
1067          Should be used as a key leaf for lists representing
1068          stage 2 classes.";
1069       reference
1070         "3GPP TS 32.300 Name convention for managed objects";
1071     }
1072     leaf administrative-state {
1073       type administrative-state;
1074       default "locked";
1075       description
1076         "Administrative state of an object. Indicates the
1077          permission to use or prohibition against the object, imposed
1078          through the OAM services.";
1079     }
1080     leaf operational-state {
1081       type operational-state;
1082       config false;
1083       mandatory true;
1084       description
1085         "Operational state of the object. Indicates
1086          whether the associated resource is installed and partially or fully
1087          operable (enabled) or the associated resource is not installed or
1088          not operable (disabled).";
1089     }
1090     leaf user-label {
1091       type string {
1092         length "0..255";
1093       }
1094       description
1095         "A user defined label of the object. There is no function associated to
1096          the user label.
1097          However, the network function stores the value persistently.";
1098     }
1099   }
1100   
1101   // Data nodes
1102
1103   container network-function {
1104     presence "network-function";
1105     description
1106       "The root container for the configuration and operational data.
1107        The object class would be called by 3GPP 'ManagedElement' and by
1108        ONF 'ControlConstruct'.";
1109     uses top-grp;
1110     uses network-function;
1111     list distributed-unit-functions {
1112       if-feature "distributed-unit";
1113       key "id";
1114       description
1115         "Represents the logical function distributed unit.";
1116       reference
1117         "3GPP TS 28.541";
1118       uses distributed-unit-function;
1119     }
1120     list subscription-streams {
1121       if-feature "subscription-management";
1122       key "id";
1123       description
1124         "The list represents all streams to a consumer. To subscribe for 
1125          events an entry in this list should be created. To unsubscribe the
1126          corresponding entry must be deleted.";
1127       uses top-grp;
1128       uses ntsc:ves-endpoint-g;
1129     }
1130     list performance-measurement-jobs {
1131       if-feature "performance-measurement";
1132       key "id";
1133       description
1134         "This list represents a performance measurement jobs for this
1135          network-function.
1136          To activate the production of the specified performance measurement,
1137          the SMO needs to create a performance-measurement-job instance.
1138          To completely deactivate a running performance-measurement-job the
1139          SMO deletes the corresponding the performance-measurement-job in
1140          this list.
1141          For temporary deactivation of the performance-measurement-job, the SMO
1142          SHALL set the administrative state value to 'locked'. In this situation
1143          the network-function must indicated that the
1144          performance-measurement-job is not functional by setting the
1145          operational-state to 'disabled'.
1146          Once the administrative state value is set back to 'unlocked', the
1147          performance-measurement-job SHOULD start is function again and indicate
1148          this situation by setting the operational-state to 'enabled'.";
1149       uses top-grp;
1150       uses performance-measurement-job-grp;
1151     }
1152     uses network-function-grp {
1153       status deprecated;
1154     }
1155   }
1156
1157   // Remote procedure calls - actions on root level
1158
1159   rpc connect {
1160     status obsolete;
1161     description
1162       "An action to establish the connection to a remote network function.";
1163     input {
1164       leaf remote-network-function {
1165         type o-ru-reference;
1166         mandatory true;
1167         description
1168           "An reference to a remote network function - an O-RU - to which
1169            a connection should be established.";
1170       }
1171     }
1172     output {
1173       uses rpc-output;
1174     }
1175   }
1176
1177   rpc disconnect {
1178     status obsolete;
1179     description
1180       "An action to destroy the connection to a remote network function.";
1181     input {
1182       leaf remote-network-function {
1183         type o-ru-reference;
1184         mandatory true;
1185         description
1186           "An reference to a remote network function - an O-RU - to which
1187            the connection should be destroyed.";
1188       }
1189     }
1190     output {
1191       uses rpc-output;
1192     }
1193   }
1194 }