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