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