Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / o-ran-sc / o-ran-ru / o-ran-sc-types-v1.yang
1 module o-ran-sc-types-v1 {
2     yang-version 1.1;
3     namespace "urn:o-ran:sc:types:1.0";
4     prefix ot;
5
6     organization
7       "O-RAN Software Community";
8     contact
9       "www.o-ran-sc.org";
10     description
11       "This module defines common type definitions related to O-RAN.
12        
13        Copyright 2020 the O-RAN Alliance.
14        
15        Licensed under the Apache License, Version 2.0 (the 'License');
16        you may not use this file except in compliance with the License.
17        You may obtain a copy of the License at
18        
19        http://www.apache.org/licenses/LICENSE-2.0
20        
21        Unless required by applicable law or agreed to in writing, software
22        distributed under the License is distributed on an 'AS IS' BASIS,
23        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24        See the License for the specific language governing permissions and
25        limitations under the License.";
26
27     revision 2020-02-20 {
28         description
29           "initial revision";
30         reference
31           "O-RAN-OAM-Interface-Specification (O1)";
32     }
33
34     // Identity
35     identity control-element-type {
36         description
37           "Base identity for the different and upcoming control-element types.";
38     }
39
40     identity e-node-b {
41         base control-element-type;
42         description
43           "Indicates a control element representing an eNodeB.";
44         reference
45           "O-RAN OAM Architecture Specification";
46     }
47
48     identity g-node-b {
49         base control-element-type;
50         description
51           "Indicates a managed element representing an gNodeB.";
52         reference
53           "O-RAN OAM Architecture Specification";
54     }
55
56     identity control-function-type {
57         description
58           "Base identity for the different and upcoming control-function types.";
59     }
60
61     // administrative-state
62     identity administrative-state {
63         description
64           "The administrative state is used to show whether use of a resource
65            is allowed or prohibited.
66            The administrative state can be observed and directly controlled by
67            certain operational roles.
68            Typically, only a user in the provider context with administrative
69            privileges is allowed to write the administrative state,
70            any other users are restricted to read only.";
71         reference
72           "ftp://www.3gpp.org/tsg_ran/WG3_Iu/TSGR3_07/Docs/Pdfs/R3-99b77.PDF";
73     }
74
75     identity administrative-state-locked {
76         base administrative-state;
77         description
78           "Users are administratively prohibited from making use of the
79            resource.";
80     }
81
82     identity administrative-state-unlocked {
83         base administrative-state;
84         description
85           "Users are allowed to use the resource.";
86     }
87
88     identity administrative-state-shutting-down {
89         base administrative-state;
90         description
91           "The entity is administratively restricted to existing instances of
92            use only. There may be specific actions to remove existing uses.
93            No new instances of use can be enabled.
94            The resource automatically transitions to “locked” when the last
95            user quits.
96            The administrative state is not visible in the client context.
97            The life cycle state “pending removal” should be used to indicate to
98            the client that the provider intends to remove the resource.";
99     }
100
101     // administrative-control
102     identity administrative-control {
103         description
104           "Reflects the current control action when the entity is not in the
105            desired state.";
106     }
107
108     identity administrative-control-unlock {
109         base administrative-control;
110         description
111           "The intention is for the entity to become unlocked.
112            The entity may already be UNLOCKED.";
113     }
114
115     identity administrative-control-lock-passive {
116         base administrative-control;
117         description
118           "The intention is for the entity to become locked but no effort is
119            expected to move to the Locked state (the state will be achieved once
120            all users stop using the resource).
121            The entity may be LOCKED.";
122     }
123
124     identity administrative-control-lock-active {
125         base administrative-control;
126         description
127           "The intention is for the entity to become locked and it is expected
128            that effort will be made to move to the Locked state (users will be
129            actively removed).
130            The entity may already be LOCKED.";
131     }
132
133     identity administrative-control-lock-immediate {
134         base administrative-control;
135         description
136           "The intention is for the entity to become locked and it is expected
137            to move to the Locked state immediately (users will be force removed).
138            The entity may already be LOCKED.";
139     }
140
141     identity administrative-control-quiescent {
142         base administrative-control;
143         description
144           "The administrative state is at a stable value (LOCKED/UNLOCKED) and
145            no action is being taken.";
146     }
147
148     // operational-state
149     identity operational-state {
150         description
151           "The operational state base identity to be used to indicate whether
152            or not the resource is installed and working.";
153         reference
154           "https://www.3gpp.org/ftp/tsg_ran/WG3_Iu/TSGR3_06/Docs/Pdfs/r3-99994.pdf";
155     }
156
157     identity operational-state-disabled {
158         base operational-state;
159         description
160           "The resource is unable to meet the SLA of the user of the resource.
161            If no (explicit) SLA is defined the resource is disabled if it is
162            totally inoperable and unable to provide service to the user.";
163     }
164
165     identity operational-state-enabled {
166         base operational-state;
167         description
168           "The resource is partially or fully operable and available for use.";
169     }
170
171     identity lifecycle-state {
172         description
173           "This state is used to track the planned deployment, allocation to
174            clients and withdrawal of resources.";
175     }
176
177     identity lifecycle-state-planned {
178         base lifecycle-state;
179         description
180           "The resource is planned but is not present in the network.
181            Should include a 'time' when the resources are expected to be
182            installed.";
183     }
184
185     identity lifecycle-state-potential-available {
186         base lifecycle-state;
187         description
188           "The supporting resources are present in the network but are shared
189            with other clients; or require further configuration before they can
190            be used; or both.
191            (1) When a potential resource is configured and allocated to a
192                client it is moved to the INSTALLED state for that client.
193            (2) If the potential resource has been consumed (e.g. allocated to
194                another client) it is moved to the POTENTIAL BUSY state for all
195                other clients.";
196     }
197
198     identity lifecycle-state-potential-busy {
199         base lifecycle-state;
200         description
201           "The supporting resources are present in the network but have been
202            allocated to other clients.";
203     }
204
205     identity lifecycle-state-installed {
206         base lifecycle-state;
207         description
208           "The resource is present in the network and is capable of providing
209            the service.";
210     }
211
212     identity lifecycle-state-pending-removal {
213         base lifecycle-state;
214         description
215           "The resource has been marked for removal. Should include a 'time'
216            when the resources are expected to be removed.";
217     }
218
219     // Type definitions
220     typedef e2ap-protocol-type {
221         // TODO switch to identity
222         type enumeration {
223             enum not-specified {
224                 description
225                   "None";
226             }
227             enum x2-setup-request {
228                 description
229                   "X2 setup request";
230             }
231             enum endc-x2-setup-request {
232                 description
233                   "ENDC X2 setup request";
234             }
235         }
236         description
237           "The E2AP protocol setup types";
238     }
239
240     typedef connection-status-type {
241         // TODO swtitch to identity
242         type enumeration {
243             enum not-specified {
244                 description
245                   "None";
246             }
247             enum connected {
248                 description
249                   "Connected";
250             }
251             enum connecting {
252                 description
253                   "Connecting";
254             }
255             enum disconnected {
256                 description
257                   "Disconnected";
258             }
259             enum setup-failed {
260                 description
261                   "Setup failed";
262             }
263             enum shutting-down {
264                 description
265                   "Shutting down";
266             }
267             enum shutdown {
268                 description
269                   "Shutdown";
270             }
271         }
272         description
273           "The connection status of gNB";
274     }
275
276     typedef sized-printable-string {
277         type string {
278             length "1..63";
279             pattern
280               '[\\x20-\\x7E]';
281         }
282         description
283           "A string of printable ASCII characters with a size of
284            1 to 64 characters.";
285     }
286 }