Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / template / o-ran-sc-root-v1.yang
1 module o-ran-sc-root-v1 {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:yang:o-ran-sc-root-v1";
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 2021 the O-RAN Software Community.
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 2021-03-09 {
38     description
39       "The namespace was updated according to O-RAN-SC yang guidelines.
40        The namespace must end with the full module name.";
41     reference
42       "https://jira.o-ran-sc.org/browse/OAM-168";
43   }
44   revision 2020-02-20 {
45     description
46       "initial revision";
47     reference
48       "O-RAN-OAM-Interface-Specification (O1)";
49   }
50
51   // Groupings
52
53   grouping controlled-identifier-grp {
54     leaf authority-ref {
55       type ot:sized-printable-string;
56       description
57         "A name or identifier referencing the authority to which is
58          responsible to create, modify or delete
59          the controlled identifier. ";
60     }
61     leaf identifer {
62       type string {
63         length "1..255";
64       }
65       description
66         "The external controlled identifier value for this controlled
67          object.";
68     }
69     description
70       "An object class specifying an object identifier, which is calculated
71        or generated by the consumer of the API..";
72   }
73
74   grouping state-grp {
75     leaf operational-state {
76       type identityref {
77         base ot:operational-state;
78       }
79       config false;
80       description
81         "The operational state is used to indicate whether or not the
82          resource is installed and working.";
83     }
84     leaf administrative-control {
85       type identityref {
86         base ot:administrative-control;
87       }
88       description
89         "The administrative-control state provides control of the
90          availability of specific resources without modification to the
91          provisioning of those resources.
92          The value is the current control target. The actual
93          administrative-state may or may not be at target.";
94     }
95     leaf administrative-state {
96       type identityref {
97         base ot:administrative-state;
98       }
99       config false;
100       description
101         "Shows whether or not the client has permission to use or has a
102          prohibition against using the resource.
103          The administrative state expresses usage permissions for
104          specific resources without modification to the provisioning
105          of those resources.";
106     }
107     leaf lifecycle-state {
108       type identityref {
109         base ot:lifecycle-state;
110       }
111       description
112         "Used to track the planned deployment, allocation to clients and
113          withdrawal of resources.";
114     }
115     description
116       "Provides general state attributes.";
117   }
118
119   grouping control-base-grp {
120     leaf identifier {
121       type yang:uuid;
122       mandatory true;
123       description
124         "The network wide unique identifier an object. The value will
125           never change and maybe used as reference even long time after
126           the object instance itself was deleted.
127           The value is calculated of generated by the provider of this
128           API.";
129     }
130     list controlled-identifier {
131       key "authority-ref";
132       uses controlled-identifier-grp;
133       description
134         "A list of external controlled identifiers, set by an external
135          authority. There must not be any function implemented on the
136          API provider itself next to updating the list on request and
137          storing it persistently. ";
138     }
139     leaf name {
140       type ot:sized-printable-string;
141       description
142         "A user defined human readable identifier. The value may chance
143          during the lifetime of the object and must not be used by any
144          software for references.";
145     }
146     leaf label {
147       type string {
148         length "1..64";
149       }
150       description
151         "A human readable value that is not expected to be unique and is
152          allowed to change. A label carries no semantics with respect to
153          the purpose of the object and has no effect on the object
154          behavior or state.";
155     }
156     uses state-grp;
157     description
158       "The control-base object class representation an abstract object class,
159        which all is used by all important control object classes.";
160   }
161
162   container controlled-element {
163     presence "Enables O-RAN";
164     uses control-base-grp;
165     list controlled-function {
166       key "identifier";
167       uses control-base-grp;
168       leaf function-type {
169         type identityref {
170           base ot:control-function-type;
171         }
172         description
173           "The reference to the O-RAN Alliance functions of the OAM
174            Architecture specification.";
175       }
176       description
177         "A list of abstract object classes which needs to be
178          augmented by the authority of providing the function.";
179     }
180     description
181       "The root container of an element (network-element,
182        manged-element, network-function, ...). it groups the
183        functions provided by the element. in a most disaggregated RAN
184        the each element provides only one function.";
185   }
186 }