1 module itut-eth-linear-protection {
2 yang-version 1.1;
3 namespace "urn:itu:t:rec:eth-ne-resilience:yang:" +
4 "itut-eth-linear-protection";
5 prefix eth-lp;
6
7 import ieee802-dot1q-cfm {
8 prefix dot1q-cfm;
9 reference
10 "IEEE Std 802.1Qcx-2020.";
11 }
12
13 organization
14 "ITU-T Study Group 15 (SG15) Question 14 (Q14/15)";
15
16 contact
17 "Q14/15 Web: <https://www.itu.int/net4/ITU-T/lists/
18 q-text.aspx?Group=15&Period=18&QNo=14&Lang=en>
19
20 Q14/15 List: <t25sg15q14@lists.itu.int>
21
22 Editor: Rongduo LU
23 <lurongduo@chinamobile.com>
24
25 Editor: Liping CHEN
26 <chenlp@cict.com>
27
28 Editor: Italo BUSI
29 <italo.busi@huawei.com>
30
31 Editor: Kam LAM
32 <kam.lam@fhusainc.com>
33
34 Editor: Scott MANSFIELD
35 <scott.mansfield@ericsson.com>";
36
37 description
38 "This module defines a YANG data model for configuring the
39 Ethernet linear protection capabilities defined in ITU-T G.8031.
40
41 Copyright(C) ITU (2025).
42
43 All rights reserved. This version of this YANG module is part of
44 ITU-T G.8052.2 Resilience information/data models for the Ethernet
45 transport network element; see the Recommendation itself for full
46 legal notices.";
47
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
48 reference
49 "ITU-T G.8031 v4.1 (03/2018).";
50
51 /* Note to TSB: update the revision date with actual approval date
52 of G.8052.2 v1.2 and remove this note */
53 revision 2025-05-13 {
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
54 description
55 "Updated copyright and license terms.";
56 reference
57 "ITU-T G.8052.2 v1.2 (XX/2025)";
58 }
59
60 revision 2021-03-25 {
61 description
62 "Initial Version.";
63 reference
64 "ITU-T G.8052.2 v1.0 (08/2021).";
65 }
66
67 /*
68 * Typedefs
69 */
70
71 typedef protection-and-bridge-type {
72 type enumeration {
73 enum 1-plus-1-unidirectional-no-aps {
74 description
75 "The 1+1 unidirectional protection type, with no APS.";
76 }
77 enum 1-plus-1-unidirectional-with-aps {
78 description
79 "The 1+1 unidirectional protection type, with APS.";
80 }
81 enum 1-plus-1-bidirectional-with-aps {
82 description
83 "The 1+1 bidirectional protection type, with APS.";
84 }
85 enum 1-for-1-bidirectional-with-aps-using-selector-bridge {
86 description
87 "The 1:1 bidirectional protection type, with APS,
88 using a selector bridge.";
89 }
90 enum 1-for-1-bidirectional-with-aps-using-broadcast-bridge {
91 description
92 "The 1:1 bidirectional protection type, with APS,
93 using a broadcast bridge.";
94 }
95 }
96 description
97 "The Protection Type and Bridge Type for linear protection.";
98 reference
99 "ITU-T G.8031 v4.1 (03/2018): clause 11.4.";
100 }
101
102 typedef sd-protection-type {
103 type enumeration {
104 enum enabled {
105 description
106 "Enable protection switching when Signal Degrade (SD)
107 conditions are detected.";
108 }
109 enum disabled {
110 description
111 "Disable protection switching when Signal Degrade (SD)
112 conditions are detected.";
113 }
114 }
115 description
116 "Enable protection switching when Signal Degrade (SD)
117 conditions are detected.";
118 reference
119 "ITU-T G.8031 v4.1 (03/2018): clause 10.6;
120 ITU-T G.8051 v6.0 (12/2020): table 8-4.";
--------------------------------------------------------------------------------------------------------------------------
121 }
122
123 typedef reversion-mode {
124 type enumeration {
125 enum revertive {
126 description
127 "Revertive operation.";
128 }
129 enum non-revertive {
130 description
131 "Non-revertive operation.";
132 }
133 }
134 description
135 "The reversion mode (revertive or non-revertive).";
136 reference
137 "ITU-T G.8031 v4.1 (03/2018): clause 10.3.";
138 }
139
140 typedef command-type {
141 type enumeration {
142 enum lockout-of-protection {
143 description
144 "The Lockout of protection (LO) external command.";
145 reference
146 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1.";
147 }
148 enum forced-switch {
149 description
150 "The Forced switch (FS) external command.";
151 reference
152 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1.";
153 }
154 enum clear {
155 description
156 "The Clear external command.";
157 reference
158 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1.";
159 }
160 enum manual-switch-to-working {
161 description
162 "The Manual switch to working (MS-W) external command.";
163 reference
164 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1.";
165 }
166 enum manual-switch-to-protection {
167 description
168 "The Manual switch to protection (MS-P) external command.";
169 reference
170 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1.";
171 }
172 enum freeze {
173 description
174 "The Freeze external command.";
175 reference
176 "ITU-T G.8031 v4.1 (03/2018): clauses 9.2.";
177 }
178 enum clear-freeze {
179 description
180 "The clear Freeze external command.";
181 reference
182 "ITU-T G.8031 v4.1 (03/2018): clauses 9.2.";
183 }
184 enum exercise {
185 description
186 "The Exercise external command.";
187 reference
188 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1.";
189 }
190 }
191 description
192 "The type of linear protection external command.";
193 reference
194 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1 and 9.2.";
195 }
196
197
198 /*
199 * Data Nodes
200 */
201
202 container ethernet-linear-protections {
203 description
204 "Ethernet linear protection configuration and state.";
205 list ethernet-linear-protection {
206 key "elp-id";
207 description
208 "Instance of Ethernet linear protection.";
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
209 leaf elp-id {
210 type uint16;
211 description
212 "An index used to identify a given Ethernet linear
213 protection instance.";
214 }
215 leaf protection-and-bridge-type {
216 type protection-and-bridge-type;
217 default
218 "1-for-1-bidirectional-with-aps-using-selector-bridge";
219 description
220 "The linear protection and bridge types.";
221 reference
222 "ITU-T G.8031 v4.1 (03/2018): clause 11.4.";
223 }
224 leaf sd-protection-enabled {
225 type sd-protection-type;
226 default "disabled";
227 description
228 "Enable protection switching when Signal Degrade (SD)
229 conditions are detected.";
230 reference
231 "ITU-T G.8031 v4.1 (03/2018): clause 10.6;
232 ITU-T G.8051 v6.0 (12/2020): table 8-4.";
--------------------------------------------------------------------------------------------------------------------------
233 }
234 leaf reversion-mode {
235 type reversion-mode;
236 default "revertive";
237 description
238 "Indicates whether the protection scheme is revertive or
239 non-revertive.";
240 reference
241 "ITU-T G.8031 v4.1 (03/2018): clause 10.3.";
242 }
243 leaf wait-to-restore {
244 when '../reversion-mode = "revertive"' {
245 description
246 "When the reversion mode is revertive.";
247 }
248 type uint8 {
249 range "5..12";
250 }
251 units "minutes";
252 default "5";
253 description
254 "The Wait To Restore (WTR) time.";
255 reference
256 "ITU-T G.8031 v4.1 (03/2018): clause 11.13.";
257 }
258 leaf hold-off-time {
259 type uint64;
260 units "milli-seconds";
261 default 0;
262 description
263 "The Hold Off Time (HoT).
264
265 The suggested range is 0 to 10
266 seconds, in steps of 100 ms.";
267 reference
268 "ITU-T G.8031 v4.1 (03/2018): clause 11.12.";
269 }
270 leaf working-path-mg {
271 type leafref {
272 path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-group" +
273 "/dot1q-cfm:maintenance-group-id";
274 }
275 mandatory true;
276 description
277 "The maintenance group (MG) monitoring the working path.";
278 }
279 leaf protection-path-mg {
280 type leafref {
281 path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-group" +
282 "/dot1q-cfm:maintenance-group-id";
283 }
284 must '. != ../working-path-mg' {
285 error-message
286 "The MG monitoring the protection path shall be
287 different from the MG monitoring the working path.";
288 }
289 mandatory true;
290 description
291 "The maintenance group (MG) monitoring the protection
292 path.";
293 }
294 action external-command {
295 description
296 "Actions for linear protection external commands.";
297 input {
298 leaf command-type {
299 type command-type;
300 mandatory true;
301 description
302 "The type of the linear protection external command.";
303 }
304 }
305 }
306 }
307 }
308 }
|
1 module itut-eth-linear-protection {
2 yang-version 1.1;
3 namespace "urn:itu:t:rec:eth-ne-resilience:yang:"
4 + "itut-eth-linear-protection";
5 prefix eth-lp;
6
7 import ieee802-dot1q-cfm {
8 prefix dot1q-cfm;
9 reference
10 "IEEE Std 802.1Qcx-2020";
11 }
12
13 organization
14 "ITU-T Study Group 15 (SG15) - International Telecommunication
15 Union";
16 contact
17 "tsbsg15@itu.int";
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
18 description
19 "This module defines a YANG data model for configuring the
20 Ethernet linear protection capabilities defined in ITU-T G.8031.
21
22 The model fully conforms to the Network Management Datastore
23 Architecture (NMDA).
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
24
25 Copyright(C) ITU (2025).
26
27 All rights reserved. This version of this YANG module is part of
28 ITU-T G.8052.2 Resilience information/data models for the
29 Ethernet transport network element; see the Recommendation
30 itself for full legal notices.";
31 reference
32 "ITU-T G.8031 v4.1 (03/2018)";
33
34 /* Note to TSB: update the revision date with actual approval date
35 of G.8052.2 v1.2 and remove this note */
36 /* Note to TSB: replace (XX/2025) through the whole model with the
37 actual approval date of G.8052.2 v1.2 and remove this note. */
38 revision 2025-07-17 {
39 description
40 "Updated copyright and license terms.";
41 reference
42 "ITU-T G.8052.2 v1.2 (XX/2025)";
43 }
44
45 revision 2021-08-06 {
46 description
47 "Initial version.";
48 reference
49 "ITU-T G.8052.2 v1.0 (08/2021)";
50 }
51
52 /*
53 * Typedefs
54 */
55
56 typedef protection-and-bridge-type {
57 type enumeration {
58 enum 1-plus-1-unidirectional-no-aps {
59 description
60 "The 1+1 unidirectional protection type, with no APS.";
61 }
62 enum 1-plus-1-unidirectional-with-aps {
63 description
64 "The 1+1 unidirectional protection type, with APS.";
65 }
66 enum 1-plus-1-bidirectional-with-aps {
67 description
68 "The 1+1 bidirectional protection type, with APS.";
69 }
70 enum 1-for-1-bidirectional-with-aps-using-selector-bridge {
71 description
72 "The 1:1 bidirectional protection type, with APS,
73 using a selector bridge.";
74 }
75 enum 1-for-1-bidirectional-with-aps-using-broadcast-bridge {
76 description
77 "The 1:1 bidirectional protection type, with APS,
78 using a broadcast bridge.";
79 }
80 }
81 description
82 "The Protection Type and Bridge Type for linear protection.";
83 reference
84 "ITU-T G.8031 v4.1 (03/2018): clause 11.4";
85 }
86
87 typedef sd-protection-type {
88 type enumeration {
89 enum enabled {
90 description
91 "Enable protection switching when Signal Degrade (SD)
92 conditions are detected.";
93 }
94 enum disabled {
95 description
96 "Disable protection switching when Signal Degrade (SD)
97 conditions are detected.";
98 }
99 }
100 description
101 "Enable protection switching when Signal Degrade (SD)
102 conditions are detected.";
103 reference
104 "ITU-T G.8031 v4.1 (03/2018): clause 10.6
105
106 ITU-T G.8051 v6.0 (12/2020): table 8-4";
107 }
108
109 typedef reversion-mode {
110 type enumeration {
111 enum revertive {
112 description
113 "Revertive operation.";
114 }
115 enum non-revertive {
116 description
117 "Non-revertive operation.";
118 }
119 }
120 description
121 "The reversion mode (revertive or non-revertive).";
122 reference
123 "ITU-T G.8031 v4.1 (03/2018): clause 10.3";
124 }
125
126 typedef command-type {
127 type enumeration {
128 enum lockout-of-protection {
129 description
130 "The Lockout of protection (LO) external command.";
131 reference
132 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1";
133 }
134 enum forced-switch {
135 description
136 "The Forced switch (FS) external command.";
137 reference
138 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1";
139 }
140 enum clear {
141 description
142 "The Clear external command.";
143 reference
144 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1";
145 }
146 enum manual-switch-to-working {
147 description
148 "The Manual switch to working (MS-W) external command.";
149 reference
150 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1";
151 }
152 enum manual-switch-to-protection {
153 description
154 "The Manual switch to protection (MS-P) external command.";
155 reference
156 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1";
157 }
158 enum freeze {
159 description
160 "The Freeze external command.";
161 reference
162 "ITU-T G.8031 v4.1 (03/2018): clauses 9.2";
163 }
164 enum clear-freeze {
165 description
166 "The clear Freeze external command.";
167 reference
168 "ITU-T G.8031 v4.1 (03/2018): clauses 9.2";
169 }
170 enum exercise {
171 description
172 "The Exercise external command.";
173 reference
174 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1";
175 }
176 }
177 description
178 "The type of linear protection external command.";
179 reference
180 "ITU-T G.8031 v4.1 (03/2018): clauses 9.1 and 9.2";
181 }
182
--------------------------------------------------------------------------------------------------------------------------
183 /*
184 * Data Nodes
185 */
186
187 container ethernet-linear-protections {
188 description
189 "Ethernet linear protection configuration and state.";
190 list ethernet-linear-protection {
191 key "elp-id";
192 description
193 "Instance of Ethernet linear protection.";
194 action external-command {
195 description
196 "Actions for linear protection external commands.";
197 input {
198 leaf command-type {
199 type command-type;
200 mandatory true;
201 description
202 "The type of the linear protection external command.";
203 }
204 }
205 }
206 leaf elp-id {
207 type uint16;
208 description
209 "An index used to identify a given Ethernet linear
210 protection instance.";
211 }
212 leaf protection-and-bridge-type {
213 type protection-and-bridge-type;
214 default
215 "1-for-1-bidirectional-with-aps-using-selector-bridge";
216 description
217 "The linear protection and bridge types.";
218 reference
219 "ITU-T G.8031 v4.1 (03/2018): clause 11.4";
220 }
221 leaf sd-protection-enabled {
222 type sd-protection-type;
223 default "disabled";
224 description
225 "Enable protection switching when Signal Degrade (SD)
226 conditions are detected.";
227 reference
228 "ITU-T G.8031 v4.1 (03/2018): clause 10.6
229
230 ITU-T G.8051 v6.0 (12/2020): table 8-4";
231 }
232 leaf reversion-mode {
233 type reversion-mode;
234 default "revertive";
235 description
236 "Indicates whether the protection scheme is revertive or
237 non-revertive.";
238 reference
239 "ITU-T G.8031 v4.1 (03/2018): clause 10.3";
240 }
241 leaf wait-to-restore {
242 when '../reversion-mode = "revertive"' {
243 description
244 "When the reversion mode is revertive.";
245 }
246 type uint8 {
247 range "5..12";
248 }
249 units "minutes";
250 default "5";
251 description
252 "The Wait To Restore (WTR) time.";
253 reference
254 "ITU-T G.8031 v4.1 (03/2018): clause 11.13";
255 }
256 leaf hold-off-time {
257 type uint64;
258 units "milli-seconds";
259 default "0";
260 description
261 "The Hold Off Time (HoT).
262
263 The suggested range is 0 to 10
264 seconds, in steps of 100 ms.";
265 reference
266 "ITU-T G.8031 v4.1 (03/2018): clause 11.12";
267 }
268 leaf working-path-mg {
269 type leafref {
270 path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-group"
271 + "/dot1q-cfm:maintenance-group-id";
272 }
273 mandatory true;
274 description
275 "The maintenance group (MG) monitoring the working path.";
276 }
277 leaf protection-path-mg {
278 type leafref {
279 path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-group"
280 + "/dot1q-cfm:maintenance-group-id";
281 }
282 must '. != ../working-path-mg' {
283 error-message
284 "The MG monitoring the protection path shall be
285 different from the MG monitoring the working path.";
286 }
287 mandatory true;
288 description
289 "The maintenance group (MG) monitoring the protection
290 path.";
291 }
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
292 }
293 }
294 }
|