Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-lbm@2021-12-01.yang
1 module o-ran-lbm {
2   yang-version 1.1;
3   namespace "urn:o-ran:lbm:1.0";
4   prefix "o-ran-lbm";
5
6   import ietf-yang-types {
7     prefix yang;
8     revision-date 2013-07-15;
9   }
10
11   import ietf-interfaces {
12     prefix if;
13   }
14
15   import o-ran-interfaces {
16     prefix "o-ran-int";
17   }
18
19   organization "O-RAN Alliance";
20
21   contact
22     "www.o-ran.org";
23
24   description
25     "This module defines the module capabilities for
26     the O-RAN Radio loop-back protocol (IEEE 802.1ag).
27     It is derived from MEF-38 (Service OAM Fault Management YANG Modules, April 2012)
28
29     Copyright 2021 the O-RAN Alliance.
30
31     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
32     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
35     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41     POSSIBILITY OF SUCH DAMAGE.
42
43     Redistribution and use in source and binary forms, with or without
44     modification, are permitted provided that the following conditions are met:
45
46     * Redistributions of source code must retain the above copyright notice,
47     this list of conditions and the above disclaimer.
48     * Redistributions in binary form must reproduce the above copyright notice,
49     this list of conditions and the above disclaimer in the documentation
50     and/or other materials provided with the distribution.
51     * Neither the Members of the O-RAN Alliance nor the names of its
52     contributors may be used to endorse or promote products derived from
53     this software without specific prior written permission.";
54
55   revision "2021-12-01" {
56     description
57       "version 1.2.0
58
59       1) typographical corrections in descriptions.";
60
61     reference "ORAN-WG4.M.0-v01.00";
62   }
63
64   revision "2021-03-22" {
65     description
66       "version 1.1.0
67
68       1) typographical corrections in descriptions.";
69
70     reference "ORAN-WG4.M.0-v01.00";
71   }
72
73   revision "2019-02-04" {
74     description
75       "version 1.0.0
76
77       1) imported model from xRAN
78       2) changed namespace and reference from xran to o-ran";
79
80     reference "ORAN-WG4.M.0-v01.00";
81   }
82
83   typedef priority-type {
84     type uint32 {
85       range "0..7";
86     }
87     description
88       "A 3 bit priority value to be used in the VLAN tag, if present
89        in the transmitted frame.";
90     reference "[802.1q] 12.14.7.3.2:e";
91   }
92
93   typedef mep-id-type {
94     type uint16 {
95       range "1..8191";
96     }
97     description
98       "Maintenance association End Point Identifier (MEPID): A small integer,
99        unique over a given Maintenance Association, identifying a
100        specific MEP.";
101     reference "[802.1q] 3.19 and 19.2.1";
102   }
103
104   typedef vlan-id-type {
105     type uint16 {
106       range "1..4094";
107     }
108     description
109       "The VLAN-ID that uniquely identifies a VLAN.  This is the 12-bit VLAN-ID
110        used in the VLAN Tag header.";
111     reference "[802.1q] 9.6";
112   }
113
114   typedef md-level-type {
115     type int32 {
116       range "0..7";
117     }
118     description
119       "Maintenance Domain Level (MD Level) identifier.  Higher numbers
120        correspond to higher Maintenance Domains, those with the greatest
121        physical reach, with the highest values for customers' CFM PDUs.
122        Lower numbers correspond to lower Maintenance Domains, those with
123        more limited physical reach, with the lowest values for CFM PDUs
124        protecting single bridges or physical links.";
125     reference "[802.1q] 18.3, 21.4.1, IEEE8021-CFM-MIB.Dot1agCfmMDLevel";
126   }
127
128   typedef lbm-transaction-id-type {
129     type uint32;
130     description
131       "A loopback transaction identifier";
132     reference "[802.1q] 21.7.3";
133   }
134
135 // grouping
136
137   grouping md-group {
138     description "the maintenance domain grouping";
139     list maintenance-domain {
140       key "id";
141       description
142         "A Maintenance Domain managed object is required in order to create an MA
143          with a MAID that includes that Maintenance Domain's Name. From
144          this Maintenance Domain managed object, all Maintenance
145          Association managed objects associated with that Maintenance
146          Domain managed object can be accessed, and thus controlled.";
147       reference "[802.1q] 12.14.5";
148
149       leaf id {
150         type string;
151         description
152           "A unique identifier of a Maintenance Domain";
153         reference "[802.1q] 12.14.5";
154       }
155
156       leaf name {
157         type string;
158         description
159           "The value for the Maintenance Domain Name. Only the name-type
160           'character-string' is supported";
161         reference "[802.1q] 21.6.5.1 (Table 21-19), 12.14.5.3.2:a";
162       }
163
164       leaf md-level {
165         type md-level-type;
166         default 0;
167         description
168           "Integer identifying the Maintenance Domain Level (MD Level).  Higher
169            numbers correspond to higher Maintenance Domains, those with the
170            greatest physical reach, with the highest values for customers'
171            CFM PDUs.  Lower numbers correspond to lower Maintenance
172            Domains, those with more limited physical reach, with the lowest
173            values for CFM PDUs protecting single bridges or physical links.";
174         reference "[802.1q] 12.14.5.1.3:b";
175       }
176
177       list maintenance-association {
178         key "id";
179         description
180           "This list represents Maintenance Entity Groups (Y.1731) or
181            Maintenance Associations (802.1ag). MEGs/MAs are sets of
182            MEPs, each configured to the same service inside a common
183            OAM domain.";
184         leaf id {
185           type string;
186           description
187             "A unique identifier of a Maintenance Association";
188           reference "[802.1q] 12.14.6";
189         }
190         leaf name {
191           type string;
192
193           description
194             "The value for the Maintenance Association Name. Only the name-type
195             'character-string' is supported";
196           reference "[802.1q] 12.14.5.3.2:b, Table 21-20";
197         }
198
199         list component-list {
200           key "component-id";
201           description
202             "A list of components each of which can be managed in a manner
203              essentially equivalent to an 802.1Q bridge.";
204           reference "[802.1q] IEEE8021-CFM-V2-MIB.ieee8021CfmMaCompTable";
205
206           leaf component-id {
207             type uint32;
208             description
209               "The bridge component within the system to which the information
210                in this maintenance-association applies";
211             reference "[802.1q] IEEE8021-CFM-V2-MIB.ieee8021CfmMaComponentId";
212           }
213
214           leaf name {
215             type string;
216
217             description
218               "The value for the Maintenance Association Name. Only the name-type
219               'character-string' is supported";
220             reference "[802.1q] 12.14.5.3.2:b, Table 21-20";
221           }
222
223           leaf-list vid {
224             type leafref {
225               path "/if:interfaces/if:interface/o-ran-int:vlan-id";
226             }
227             min-elements 1;
228             ordered-by user;
229             description
230               "The VID(s) monitored by this MA, or 0, if the MA is not attached to any
231                VID. The first VID returned is the MA's Primary VID";
232             reference "[802.1q] 12.14.5.3.2:b";
233           }
234
235           leaf-list remote-meps {
236             type mep-id-type;
237             description
238               "A list of the MEPIDs of the MEPs in the MA.";
239             reference "[802.1q] 12.14.6.1.3:g";
240           }
241
242           list maintenance-association-end-point {
243             key "mep-identifier";
244             description
245               "The list of Maintenance association End Points in a specific Maintenance
246               Association.";
247
248             leaf mep-identifier {
249               type mep-id-type;
250               description
251                 "Integer that is unique among all the MEPs in the same MA. Other
252                 definition is: a small integer, unique over a given
253                 Maintenance Association, identifying a specific Maintenance
254                 association End Point.";
255               reference "[802.1q] 12.14.6.3.2:b";
256             }
257
258             leaf interface {
259               type leafref {
260                 path "/if:interfaces/if:interface/if:name";
261               }
262               mandatory true;
263               description
264               "An interface, either a Bridge Port or an aggregated IEEE 802.3 port
265                within a Bridge Port, to which the MEP is attached. Each interface in
266                the system is uniquely identified by an interface-name. The structure
267                and content of the name is outside the scope of this specification.";
268               reference "[802.1q] 12.14.7.1.3:b";
269             }
270
271             leaf primary-vid {
272               type leafref {
273                 path "/if:interfaces/if:interface/o-ran-int:vlan-id";
274               }
275               mandatory true;
276               description
277               "The Primary VID of the MEP. The value 0 indicates that either the
278                Primary VID is that of the MEP's MA or that the MEP's MA is
279                associated with no VID";
280               reference "[802.1q] 12.14.7.1.3:d";
281             }
282
283             leaf administrative-state {
284               type boolean;
285               mandatory true;
286               description
287                 "The administrative state of the MEP";
288               reference "[802.1q] 12.14.7.1.3:e";
289             }
290
291             leaf mac-address {
292               type leafref {
293                 path "/if:interfaces/if:interface/o-ran-int:mac-address";
294               }
295               config false;
296               description
297                 "The MAC address of the MEP";
298               reference "[802.1q] 12.14.7.1.3:i";
299             }
300
301             container loopback {
302               config false;
303               description
304                 "Data definitions related to the Loopback function.";
305               leaf replies-transmitted {
306                 type yang:counter32;
307                 config false;
308                 mandatory true;
309                 description
310                   "The total number of LBRs transmitted.";
311                 reference "[802.1q] 12.14.7.1.3:ad";
312               }
313             }
314           }
315         }
316       }
317     }
318   }
319
320 // top level container
321   container md-data-definitions {
322     description
323       "Data definitions related to the maintenance domains used for supporting
324       Ethernet loopback connectivity checks";
325     uses md-group;
326   }
327 }