blob: e49dcb6276eea3ceb5775e05177989e9d51c2d68 [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module openconfig-lacp {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/lacp";
7
8 prefix "oc-lacp";
9
10 // import some basic types
11 import openconfig-interfaces { prefix oc-if; }
12 import openconfig-yang-types { prefix oc-yang; }
13 import openconfig-extensions { prefix oc-ext; }
14
15
16
17 // meta
18 organization "OpenConfig working group";
19
20 contact
21 "OpenConfig working group
22 www.openconfig.net";
23
24 description
25 "This module describes configuration and operational state
26 data for Link Aggregation Control Protocol (LACP) for
27 managing aggregate interfaces. It works in conjunction with
28 the OpenConfig interfaces and aggregate interfaces models.";
29
30 oc-ext:openconfig-version "1.1.0";
31
32 revision "2017-05-05" {
33 description
34 "Add member local and remote port num";
35 reference "1.1.0";
36 }
37
38 revision "2016-05-26" {
39 description
40 "OpenConfig public release";
41 reference "1.0.2";
42 }
43
44
45 // typedef statements
46
47 typedef lacp-activity-type {
48 type enumeration {
49 enum ACTIVE {
50 description
51 "Interface is an active member, i.e., will detect and
52 maintain aggregates";
53 }
54 enum PASSIVE {
55 description
56 "Interface is a passive member, i.e., it participates
57 with an active partner";
58 }
59 }
60 description
61 "Describes the LACP membership type, active or passive, of the
62 interface in the aggregate";
63 reference "IEEE 802.1AX-2008";
64 }
65
66 typedef lacp-timeout-type {
67 type enumeration {
68 enum LONG {
69 description
70 "Participant wishes to use long timeouts to detect
71 status of the aggregate, i.e., will expect less frequent
72 transmissions. Long timeout is 90 seconds.";
73 }
74 enum SHORT {
75 description
76 "Participant wishes to use short timeouts, i.e., expects
77 frequent transmissions to aggressively detect status
78 changes. Short timeout is 3 seconds.";
79 }
80 }
81 description
82 "Type of timeout used, short or long, by LACP participants";
83 reference "IEEE 802.1AX-2008";
84 }
85
86 typedef lacp-synchronization-type {
87 type enumeration {
88 enum IN_SYNC {
89 description
90 "Participant is in sync with the system id and key
91 transmitted";
92 }
93 enum OUT_SYNC {
94 description
95 "Participant is not in sync with the system id and key
96 transmitted";
97 }
98 }
99 description
100 "Indicates LACP synchronization state of participant";
101 reference "IEEE 802.1AX-2008";
102 }
103
104 typedef lacp-period-type {
105 type enumeration {
106 enum FAST {
107 description "Send LACP packets every second";
108 }
109 enum SLOW {
110 description "Send LACP packets every 30 seconds";
111 }
112 }
113 description
114 "Defines the period options for the time between sending
115 LACP messages";
116 reference "IEEE 802.3ad";
117 }
118
119 // grouping statements
120
121
122 grouping aggregation-lacp-members-config {
123 description
124 "Configuration data for lacp member interfaces";
125
126 //currently a placeholder -- the list of member interfaces
127 //and their status is considered opstate only
128 }
129
130 grouping aggregation-lacp-members-state {
131 description
132 "Operational status data for the member interfaces";
133
134 leaf interface {
135 type oc-if:base-interface-ref;
136 description
137 "Reference to interface member of the LACP aggregate";
138 }
139
140 leaf activity {
141 type lacp-activity-type;
142 description "Indicates participant is active or passive";
143 }
144
145 leaf timeout {
146 type lacp-timeout-type;
147 description
148 "The timeout type (short or long) used by the
149 participant";
150 }
151
152 leaf synchronization {
153 type lacp-synchronization-type;
154 description
155 "Indicates whether the participant is in-sync or
156 out-of-sync";
157 }
158
159 leaf aggregatable {
160 type boolean;
161 description
162 "A true value indicates that the participant will allow
163 the link to be used as part of the aggregate. A false
164 value indicates the link should be used as an individual
165 link";
166 }
167
168 leaf collecting {
169 type boolean;
170 description
171 "If true, the participant is collecting incoming frames
172 on the link, otherwise false";
173 }
174
175 leaf distributing {
176 type boolean;
177 description
178 "When true, the participant is distributing outgoing
179 frames; when false, distribution is disabled";
180 }
181
182 leaf system-id {
183 type oc-yang:mac-address;
184 description
185 "MAC address that defines the local system ID for the
186 aggregate interface";
187 }
188
189 leaf oper-key {
190 type uint16;
191 description
192 "Current operational value of the key for the aggregate
193 interface";
194 }
195
196 leaf partner-id {
197 type oc-yang:mac-address;
198 description
199 "MAC address representing the protocol partner's interface
200 system ID";
201 }
202
203 leaf partner-key {
204 type uint16;
205 description
206 "Operational value of the protocol partner's key";
207 }
208
209 leaf port-num {
210 type uint16;
211 description
212 "Port number of the local (actor) aggregation member";
213 }
214
215 leaf partner-port-num {
216 type uint16;
217 description
218 "Port number of the partner (remote) port for this member
219 port";
220 }
221 }
222
223grouping aggregation-lacp-members-statistics {
224 description
225 "LACP packet statistics for the member interfaces";
226
227 container counters {
228 description
229 "LACP protocol counters";
230
231 leaf lacp-in-pkts {
232 type oc-yang:counter64;
233 description
234 "Number of LACPDUs received";
235 }
236
237 leaf lacp-out-pkts {
238 type oc-yang:counter64;
239 description
240 "Number of LACPDUs transmitted";
241 }
242
243 leaf lacp-rx-errors {
244 type oc-yang:counter64;
245 description
246 "Number of LACPDU receive packet errors";
247 }
248
249 leaf lacp-tx-errors {
250 type oc-yang:counter64;
251 description
252 "Number of LACPDU transmit packet errors";
253 }
254
255 leaf lacp-unknown-errors {
256 type oc-yang:counter64;
257 description
258 "Number of LACPDU unknown packet errors";
259 }
260
261 leaf lacp-errors {
262 type oc-yang:counter64;
263 description
264 "Number of LACPDU illegal packet errors";
265 }
266 }
267 }
268
269 grouping aggregation-lacp-members-top {
270 description
271 "Top-level grouping for aggregate members list";
272
273 container members {
274 config false;
275 description
276 "Enclosing container for the list of members interfaces of
277 the aggregate. This list is considered operational state
278 only so is labeled config false and has no config container";
279
280 list member {
281 key "interface";
282 description
283 "List of member interfaces and their associated status for
284 a LACP-controlled aggregate interface. Member list is not
285 configurable here -- each interface indicates items
286 its participation in the LAG.";
287
288 leaf interface {
289 type leafref {
290 path "../state/interface";
291 }
292 description
293 "Reference to aggregate member interface";
294 }
295
296
297 container state {
298
299 config false;
300
301 description
302 "Operational state data for aggregate members";
303
304 uses aggregation-lacp-members-state;
305 uses aggregation-lacp-members-statistics;
306 }
307 }
308 }
309 }
310
311 grouping lacp-interfaces-config {
312 description
313 "Configuration data for each LACP-enabled interface";
314
315 leaf name {
316 type oc-if:base-interface-ref;
317 description
318 "Reference to the interface on which LACP should be
319 configured. The type of the target interface must be
320 ieee8023adLag";
321 }
322
323 leaf interval {
324 type lacp-period-type;
325 default SLOW;
326 description
327 "Set the period between LACP messages -- uses
328 the lacp-period-type enumeration.";
329 }
330
331 leaf lacp-mode {
332 type lacp-activity-type;
333 default ACTIVE;
334 description
335 "ACTIVE is to initiate the transmission of LACP packets.
336 PASSIVE is to wait for peer to initiate the transmission of
337 LACP packets.";
338 //TODO:some implementations configure the LACP mode on each
339 //member interface rather than on the LAG interface. There
340 //may be use cases for this identified at a later time.
341 }
342
343 leaf system-id-mac {
344 type oc-yang:mac-address;
345 description
346 "The MAC address portion of the node's System ID. This is
347 combined with the system priority to construct the 8-octet
348 system-id";
349 }
350
351 uses aggregation-lacp-global-config;
352 }
353
354 grouping lacp-interfaces-state {
355 description
356 "Operational state data for each LACP-enabled interface";
357 }
358
359 grouping lacp-interfaces-top {
360 description
361 "Top-level grouping for LACP-enabled interfaces";
362
363 container interfaces {
364 description
365 "Enclosing container for the list of LACP-enabled
366 interfaces";
367
368 list interface {
369 key "name";
370 description
371 "List of aggregate interfaces managed by LACP";
372
373 leaf name {
374 type leafref {
375 path "../config/name";
376 }
377 description
378 "Reference to the list key";
379 }
380
381 container config {
382 description
383 "Configuration data for each LACP aggregate interface";
384
385 uses lacp-interfaces-config;
386 }
387
388 container state {
389
390 config false;
391
392 description
393 "Operational state data for each LACP aggregate
394 interface";
395
396 uses lacp-interfaces-config;
397 uses lacp-interfaces-state;
398 }
399
400 uses aggregation-lacp-members-top;
401 }
402 }
403 }
404
405 grouping aggregation-lacp-global-config {
406 description
407 "Configuration data for LACP aggregate interfaces";
408
409
410 leaf system-priority {
411 type uint16;
412 description
413 "Sytem priority used by the node on this LAG interface.
414 Lower value is higher priority for determining which node
415 is the controlling system.";
416 }
417 }
418
419 grouping aggregation-lacp-global-state {
420 description
421 "Operational data for LACP aggregate interfaces";
422
423 }
424
425 grouping aggregation-lacp-top {
426 description
427 "Top level configuration and state variable containers for
428 LACP data";
429
430 container lacp {
431 description
432 "Configuration and operational state data for LACP protocol
433 operation on the aggregate interface";
434
435 container config {
436 description
437 "Configuration data for LACP";
438
439 uses aggregation-lacp-global-config;
440 }
441
442 container state {
443
444 config false;
445 description
446 "Operational state data for LACP";
447
448 uses aggregation-lacp-global-config;
449 uses aggregation-lacp-global-state;
450 }
451 uses lacp-interfaces-top;
452 }
453 }
454
455 // data definition statements
456 uses aggregation-lacp-top;
457
458 // augment statements
459
460
461}