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