Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / o-ran-sc / o-ran-ru / o-ran-sc-root-v1.yang
1 module o-ran-sc-root-v1 {
2   yang-version 1.1;
3   namespace "urn:o-ran:sc:root:1.0";
4   prefix or;
5
6   import o-ran-sc-types-v1 {
7     prefix ot;
8   }
9   import ietf-yang-types {
10     prefix yang;
11     reference
12       "RFC 6991: Common YANG Data Types";
13   }
14
15   organization
16     "O-RAN Software Community";
17   contact
18     "www.o-ran-sc.org";
19   description
20     "This module defines the root controlled object classes for a
21      disaggregated RAN.
22
23      Copyright 2020 the O-RAN Alliance.
24
25      Licensed under the Apache License, Version 2.0 (the 'License');
26      you may not use this file except in compliance with the License.
27      You may obtain a copy of the License at
28
29      http://www.apache.org/licenses/LICENSE-2.0
30
31      Unless required by applicable law or agreed to in writing, software
32      distributed under the License is distributed on an 'AS IS' BASIS,
33      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34      See the License for the specific language governing permissions and
35      limitations under the License.";
36
37   revision 2020-02-20 {
38     description
39       "initial revision";
40     reference
41       "O-RAN-OAM-Interface-Specification (O1)";
42   }
43
44   // Groupings
45
46   grouping controlled-identifier-grp {
47     leaf authority-ref {
48       type ot:sized-printable-string;
49       description
50         "A name or indentifier referencing the authority to which is
51          responsable to create, modify or delete
52          the controlled identifier. ";
53     }
54     leaf identifer {
55       type string {
56         length "1..255";
57       }
58       description
59         "The external controlled identifier value for this controlled
60          object.";
61     }
62     description
63       "An object class specifiing an object identifier, which is caluculated
64        or generated by the consumer of the API..";
65   }
66
67   grouping state-grp {
68     leaf operational-state {
69       type identityref {
70         base ot:operational-state;
71       }
72       config false;
73       description
74         "The operational state is used to indicate whether or not the
75          resource is installed and working.";
76     }
77     leaf administrative-control {
78       type identityref {
79         base ot:administrative-control;
80       }
81       description
82         "The administrative-control state provides control of the
83          availability of specific resources without modification to the
84          provisioning of those resources.
85          The value is the current control target. The actual
86          administrative-state may or may not be at target.";
87     }
88     leaf administrative-state {
89       type identityref {
90         base ot:administrative-state;
91       }
92       config false;
93       description
94         "Shows whether or not the client has permission to use or has a
95          prohibition against using the resource.
96          The administrative state expresses usage permissions for
97          specific resources without modification to the provisioning
98          of those resources.";
99     }
100     leaf lifecycle-state {
101       type identityref {
102         base ot:lifecycle-state;
103       }
104       description
105         "Used to track the planned deployment, allocation to clients and
106          withdrawal of resources.";
107     }
108     description
109       "Provides general state attributes.";
110   }
111
112   grouping control-base-grp {
113     leaf identifier {
114       type yang:uuid;
115       mandatory true;
116       description
117         "The network wide unique identifier an object. The value will
118           never change and maybe used as reference even long time after
119           the object instance itself was deleted.
120           The value is calculated of generated by the provider of this
121           API.";
122     }
123     list controlled-identifier {
124       key "authority-ref";
125       uses controlled-identifier-grp;
126       description
127         "A list of external controlled identifiers, set by an external
128          authority. There must not be any function implemented on the
129          API provider itself next to updating the list on request and
130          storing it persistently. ";
131     }
132     leaf name {
133       type ot:sized-printable-string;
134       description
135         "A user defined human readable identifier. The value may chance
136          during the lifetime of the object and must not be used by any
137          software for references.";
138     }
139     leaf label {
140       type string {
141         length "1..64";
142       }
143       description
144         "A human readable value that is not expected to be unique and is
145          allowed to change. A label carries no semantics with respect to
146          the purpose of the object and has no effect on the object
147          behavior or state.";
148     }
149     uses state-grp;
150     description
151       "The control-base object class representation an abstract object class,
152        which all is used by all important control object classes.";
153   }
154
155   container controlled-element {
156     presence "Enables O-RAN";
157     uses control-base-grp;
158     list controlled-function {
159       key "identifier";
160       uses control-base-grp;
161       leaf function-type {
162         type identityref {
163           base ot:control-function-type;
164         }
165         description
166           "The reference to the O-RAN Alliance functions of the OAM
167            Architecture specification.";
168       }
169       description
170         "A list of abstract object classes which needs to be
171          augmented by the authority of providing the function.";
172     }
173     description
174       "The root container of an element (network-element,
175        manged-element, network-function, ...). it groups the
176        functions provided by the element. in a most disaggregated RAN
177        the each element provides only one function.";
178   }
179 }