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