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