Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / working / o-ran-sc / o-ran-sc-topology / o-ran-sc-topology-additional-information.yang
1 module o-ran-sc-topology-additional-information {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:yang:o-ran-sc-topology-additional-information:1.0";
4   prefix osctai;
5
6   import ietf-yang-types {
7     prefix yang;
8     reference
9       "RFC 6991: Common YANG Data Types.";
10   }
11
12   organization
13     "O-RAN Software Community";
14   contact
15     "www.o-ran.org";
16   description
17     "This module contains YANG definitions for the O-RAN Topology and its
18      additional information exposed northbound of the Service Management and
19      Orchestration framework (SMO).
20      By intention this yang model has no strict dependencies to other yang
21      modules defining data structures. The dependencies are only to type
22      definitions.
23      In order to extend existing data tree the identifier of the data are
24      used. For example values of uuids or values of yang:instance-identifier are
25      used as references to the extended data tree.
26
27      Copyright 2022 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 2022-05-20 {
42     description
43       "Initial revision";
44     reference
45       "O-RAN-SC: https://jira.o-ran-sc.org/browse/OAM-248";
46   }
47
48   /* Type Definitions */
49
50   typedef resource {
51     type union {
52       type instance-identifier {
53         require-instance false;
54       }
55       type yang:uuid;
56       type string;
57     }
58     description
59       "This is an identification of the referenced resource, such as an
60        interface or a network function.  It should be as fine-grained as
61        possible to both guide the operator and guarantee uniqueness of the
62        additional information.
63
64        If the extended resource is modeled in YANG, this type should
65        be an instance-identifier.
66
67        If the extended object is identified by a Universally Unique
68        Identifier (UUID), use the uuid type.
69
70        If the resource is anything else, for example, a distinguished
71        name or a Common Information Model (CIM) path, this type will
72        be a string.
73
74        If the server supports several models, the precedence should
75        be in the order as given in the union definition.";
76     reference
77       "This type definition is inspired by
78        RFC 8632: A YANG Data Model for Alarm Management
79        type definition 'resource'";
80   }
81
82   /* Type definitions */
83
84   typedef label {
85     type string {
86       length "1..255";
87     }
88     description
89       "A human readable string.";
90   }
91
92   typedef slice-differentiator {
93     type string {
94       pattern '([0-9a-fA-F]{2}){3}';
95     }
96     default "FFFFFF";
97     description
98       "The slice-differentiator type represents an 3GPP TS 23.003 slice
99        differentiator. The canonical representation uses lowercase
100        characters.";
101     reference
102       "3GPP TS 28.003 V17.5.0 clause 28.4.2";
103   }
104
105   typedef tracking-area-code {
106     type string {
107       pattern '([0-9a-fA-F]{2}){3}';
108     }
109     description
110       "The tracking-area-code type represents an 3GPP TS 38.413 tracking
111        area code. The canonical representation uses lowercase characters.";
112     reference
113       "3GPP TS 38.413 V17.0.0 clause 9.3.3.10";
114   }
115
116   /* Groupings (object classes) */
117
118   grouping area-label {
119     leaf tracking-area-code {
120       type tracking-area-code;
121       description
122         "An 3-octet string identifying a tracking area.";
123     }
124     leaf label {
125       type label;
126       mandatory true;
127       description
128         "A human readable label of the tracking area.";
129     }
130     description
131       "A mapping table for tracking-area-codes to human readable labels.";
132   }
133
134   grouping slice-label {
135     leaf slice-differentiator {
136       type slice-differentiator;
137       description
138         "An 3-octet string identifying a slice.";
139     }
140     leaf label {
141       type label;
142       mandatory true;
143       description
144         "A human readable label of the slice.";
145     }
146     description
147       "A mapping table for slice-differentiator to human readable labels.";
148   }
149
150   grouping node {
151     leaf resource {
152       type resource;
153       description
154         "A reference to an object instance. ";
155     }
156     leaf name {
157       type string;
158       description
159         "An human readable identifier of the resource.";
160     }
161     leaf tracking-area-code {
162       type tracking-area-code;
163       description
164         "An 3-octet string identifying a tracking area.";
165     }
166     leaf slice-differentiator {
167       type slice-differentiator;
168       description
169         "An 3-octet string identifying a network slice.";
170     }
171     leaf-list tag {
172       type label;
173       description
174         "A list of short group identifiers for grouping of resources on runtime,
175          even the group identifiers are unknown during compile time.";
176     }
177     description
178       "An abstract object class with additional information of a resource.
179        The extended resource object instance is referenced by the 'resource'
180        attribute.";
181   }
182
183   /* Data tree */
184
185   container additional-information {
186     list node {
187       key "resource";
188       uses node;
189       description
190         "A list for additional information where each row is identified by a
191          reference to the extended object instance.";
192     }
193     list area-label {
194       key "tracking-area-code";
195       uses area-label;
196       description
197         "A list for additional information where each row is identified by a
198          tracking area code.";
199     }
200     list slice-label {
201       key "slice-differentiator";
202       uses slice-label;
203       description
204         "A list for additional information where each row is identified by a
205          slice differentiator.";
206     }
207     description
208       "The root container of this module.";
209   }
210 }