Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_lst_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_lst_module:
2
3
4 **********************************
5 dellemc.enterprise_sonic.sonic_lst
6 **********************************
7
8 **Manage link state tracking (LST) configuration on SONiC**
9
10
11 Version added: 3.1.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of LST for devices running SONiC
21
22
23
24
25 Parameters
26 ----------
27
28 .. raw:: html
29
30 <table border=0 cellpadding=0 class="documentation-table">
31 <tr>
32 <th colspan="4">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="4">
38 <div class="ansibleOptionAnchor" id="parameter-"></div>
39 <b>config</b>
40 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
41 <div style="font-size: small">
42 <span style="color: purple">dictionary</span>
43 </div>
44 </td>
45 <td>
46 </td>
47 <td>
48 <div>LST configuration</div>
49 </td>
50 </tr>
51 <tr>
52 <td class="elbow-placeholder"></td>
53 <td colspan="3">
54 <div class="ansibleOptionAnchor" id="parameter-"></div>
55 <b>interfaces</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">list</span>
59 / <span style="color: purple">elements=dictionary</span>
60 </div>
61 </td>
62 <td>
63 </td>
64 <td>
65 <div>LST configuration for interfaces</div>
66 </td>
67 </tr>
68 <tr>
69 <td class="elbow-placeholder"></td>
70 <td class="elbow-placeholder"></td>
71 <td colspan="2">
72 <div class="ansibleOptionAnchor" id="parameter-"></div>
73 <b>downstream_group</b>
74 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
75 <div style="font-size: small">
76 <span style="color: purple">string</span>
77 </div>
78 </td>
79 <td>
80 </td>
81 <td>
82 <div>LST group name used to track the interface as downstream</div>
83 </td>
84 </tr>
85 <tr>
86 <td class="elbow-placeholder"></td>
87 <td class="elbow-placeholder"></td>
88 <td colspan="2">
89 <div class="ansibleOptionAnchor" id="parameter-"></div>
90 <b>name</b>
91 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
92 <div style="font-size: small">
93 <span style="color: purple">string</span>
94 / <span style="color: red">required</span>
95 </div>
96 </td>
97 <td>
98 </td>
99 <td>
100 <div>Name of interface</div>
101 </td>
102 </tr>
103 <tr>
104 <td class="elbow-placeholder"></td>
105 <td class="elbow-placeholder"></td>
106 <td colspan="2">
107 <div class="ansibleOptionAnchor" id="parameter-"></div>
108 <b>upstream_groups</b>
109 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
110 <div style="font-size: small">
111 <span style="color: purple">list</span>
112 / <span style="color: purple">elements=dictionary</span>
113 </div>
114 </td>
115 <td>
116 </td>
117 <td>
118 <div>Upstream groups configuration</div>
119 </td>
120 </tr>
121 <tr>
122 <td class="elbow-placeholder"></td>
123 <td class="elbow-placeholder"></td>
124 <td class="elbow-placeholder"></td>
125 <td colspan="1">
126 <div class="ansibleOptionAnchor" id="parameter-"></div>
127 <b>group_name</b>
128 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
129 <div style="font-size: small">
130 <span style="color: purple">string</span>
131 / <span style="color: red">required</span>
132 </div>
133 </td>
134 <td>
135 </td>
136 <td>
137 <div>LST group name used to track the interface as upstream</div>
138 </td>
139 </tr>
140
141
142 <tr>
143 <td class="elbow-placeholder"></td>
144 <td colspan="3">
145 <div class="ansibleOptionAnchor" id="parameter-"></div>
146 <b>lst_groups</b>
147 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
148 <div style="font-size: small">
149 <span style="color: purple">list</span>
150 / <span style="color: purple">elements=dictionary</span>
151 </div>
152 </td>
153 <td>
154 </td>
155 <td>
156 <div>LST groups configuration</div>
157 </td>
158 </tr>
159 <tr>
160 <td class="elbow-placeholder"></td>
161 <td class="elbow-placeholder"></td>
162 <td colspan="2">
163 <div class="ansibleOptionAnchor" id="parameter-"></div>
164 <b>all_evpn_es_downstream</b>
165 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
166 <div style="font-size: small">
167 <span style="color: purple">boolean</span>
168 </div>
169 </td>
170 <td>
171 <ul style="margin: 0; padding: 0"><b>Choices:</b>
172 <li>no</li>
173 <li>yes</li>
174 </ul>
175 </td>
176 <td>
177 <div>Indicates that the LST group tracks all EVPN ethernet segments as downstream interfaces</div>
178 </td>
179 </tr>
180 <tr>
181 <td class="elbow-placeholder"></td>
182 <td class="elbow-placeholder"></td>
183 <td colspan="2">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>all_mclags_downstream</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">boolean</span>
189 </div>
190 </td>
191 <td>
192 <ul style="margin: 0; padding: 0"><b>Choices:</b>
193 <li>no</li>
194 <li>yes</li>
195 </ul>
196 </td>
197 <td>
198 <div>Indicates that the LST group tracks all MCLAGs as downstream interfaces</div>
199 </td>
200 </tr>
201 <tr>
202 <td class="elbow-placeholder"></td>
203 <td class="elbow-placeholder"></td>
204 <td colspan="2">
205 <div class="ansibleOptionAnchor" id="parameter-"></div>
206 <b>group_description</b>
207 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
208 <div style="font-size: small">
209 <span style="color: purple">string</span>
210 </div>
211 </td>
212 <td>
213 </td>
214 <td>
215 <div>Description of LST group</div>
216 </td>
217 </tr>
218 <tr>
219 <td class="elbow-placeholder"></td>
220 <td class="elbow-placeholder"></td>
221 <td colspan="2">
222 <div class="ansibleOptionAnchor" id="parameter-"></div>
223 <b>group_type</b>
224 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
225 <div style="font-size: small">
226 <span style="color: purple">string</span>
227 </div>
228 </td>
229 <td>
230 <ul style="margin: 0; padding: 0"><b>Choices:</b>
231 <li>l3</li>
232 </ul>
233 </td>
234 <td>
235 <div>LST group type</div>
236 </td>
237 </tr>
238 <tr>
239 <td class="elbow-placeholder"></td>
240 <td class="elbow-placeholder"></td>
241 <td colspan="2">
242 <div class="ansibleOptionAnchor" id="parameter-"></div>
243 <b>name</b>
244 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
245 <div style="font-size: small">
246 <span style="color: purple">string</span>
247 / <span style="color: red">required</span>
248 </div>
249 </td>
250 <td>
251 </td>
252 <td>
253 <div>Name of LST group</div>
254 </td>
255 </tr>
256 <tr>
257 <td class="elbow-placeholder"></td>
258 <td class="elbow-placeholder"></td>
259 <td colspan="2">
260 <div class="ansibleOptionAnchor" id="parameter-"></div>
261 <b>threshold_down</b>
262 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
263 <div style="font-size: small">
264 <span style="color: purple">integer</span>
265 </div>
266 </td>
267 <td>
268 </td>
269 <td>
270 <div>Downstream ports will shut down if the threshold falls below this value</div>
271 <div>Range 0-100</div>
272 </td>
273 </tr>
274 <tr>
275 <td class="elbow-placeholder"></td>
276 <td class="elbow-placeholder"></td>
277 <td colspan="2">
278 <div class="ansibleOptionAnchor" id="parameter-"></div>
279 <b>threshold_type</b>
280 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
281 <div style="font-size: small">
282 <span style="color: purple">string</span>
283 </div>
284 </td>
285 <td>
286 <ul style="margin: 0; padding: 0"><b>Choices:</b>
287 <li>percentage</li>
288 </ul>
289 </td>
290 <td>
291 <div>Type of threshold calculation scheme to use</div>
292 </td>
293 </tr>
294 <tr>
295 <td class="elbow-placeholder"></td>
296 <td class="elbow-placeholder"></td>
297 <td colspan="2">
298 <div class="ansibleOptionAnchor" id="parameter-"></div>
299 <b>threshold_up</b>
300 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
301 <div style="font-size: small">
302 <span style="color: purple">integer</span>
303 </div>
304 </td>
305 <td>
306 </td>
307 <td>
308 <div>Downstream ports will go online if the threshold is greater than or equal to this value</div>
309 <div>Range 0-100</div>
310 </td>
311 </tr>
312 <tr>
313 <td class="elbow-placeholder"></td>
314 <td class="elbow-placeholder"></td>
315 <td colspan="2">
316 <div class="ansibleOptionAnchor" id="parameter-"></div>
317 <b>timeout</b>
318 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
319 <div style="font-size: small">
320 <span style="color: purple">integer</span>
321 </div>
322 </td>
323 <td>
324 </td>
325 <td>
326 <div>Time in seconds to wait to bring up the downstream ports after the first upstream port is online</div>
327 <div>Range 1-1800</div>
328 </td>
329 </tr>
330
331
332 <tr>
333 <td colspan="4">
334 <div class="ansibleOptionAnchor" id="parameter-"></div>
335 <b>state</b>
336 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
337 <div style="font-size: small">
338 <span style="color: purple">string</span>
339 </div>
340 </td>
341 <td>
342 <ul style="margin: 0; padding: 0"><b>Choices:</b>
343 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
344 <li>deleted</li>
345 <li>replaced</li>
346 <li>overridden</li>
347 </ul>
348 </td>
349 <td>
350 <div>The state of the configuration after module completion</div>
351 </td>
352 </tr>
353 </table>
354 <br/>
355
356
357 Notes
358 -----
359
360 .. note::
361 - Tested against Enterprise SONiC Distribution by Dell Technologies.
362 - Supports ``check_mode``.
363
364
365
366 Examples
367 --------
368
369 .. code-block:: yaml
370
371 # Using "merged" state
372 #
373 # Before state:
374 # -------------
375 #
376 # sonic# show running-configuration link state tracking
377 # (No link state tracking configuration present)
378 # sonic# show running-configuration interface Ethernet 20
379 # !
380 # interface Ethernet20
381 # (No link state tracking configuration present for interface Ethernet20)
382 # sonic# show running-configuration interface Ethernet 24
383 # !
384 # interface Ethernet24
385 # (No link state tracking configuration present for interface Ethernet24)
386
387 - name: Merge LST configuration
388 dellemc.enterprise_sonic.sonic_lst:
389 config:
390 lst_groups:
391 - name: lst
392 all_evpn_es_downstream: true
393 group_description: abc
394 group_type: l3
395 threshold_down: 20
396 threshold_type: percentage
397 threshold_up: 40
398 timeout: 120
399 interfaces:
400 - name: Ethernet20
401 downstream_group: lst
402 - name: Ethernet24
403 upstream_groups:
404 - group_name: lst
405 state: merged
406
407 # After state:
408 # ------------
409 #
410 # sonic# show running-configuration link state tracking
411 # !
412 # link state track lst
413 # timeout 120
414 # description abc
415 # downstream all-evpn-es
416 # threshold type percentage up 40 down 20
417 # sonic# show running-configuration interface Ethernet 20
418 # !
419 # interface Ethernet20
420 # link state track lst downstream
421 # sonic# show running-configuration interface Ethernet 24
422 # !
423 # interface Ethernet24
424 # link state track lst upstream
425
426
427 # Using "replaced" state
428 #
429 # Before state:
430 # -------------
431 #
432 # sonic# show running-configuration link state tracking
433 # !
434 # link state track lst
435 # timeout 120
436 # description abc
437 # downstream all-evpn-es
438 # threshold type percentage up 40 down 20
439 # sonic# show running-configuration interface Ethernet 20
440 # !
441 # interface Ethernet20
442 # link state track lst downstream
443 # sonic# show running-configuration interface Ethernet 24
444 # !
445 # interface Ethernet24
446 # link state track lst upstream
447
448 - name: Replace LST configuration
449 dellemc.enterprise_sonic.sonic_lst:
450 config:
451 lst_groups:
452 - name: lst
453 all_mclags_downstream: true
454 timeout: 75
455 interfaces:
456 - name: Ethernet20
457 upstream_groups:
458 - group_name: lst
459 - name: Ethernet24
460 downstream_group: lst
461 state: replaced
462
463 # After state:
464 # ------------
465 #
466 # sonic# show running-configuration link state tracking
467 # !
468 # link state track lst
469 # timeout 75
470 # downstream all-mclag
471 # sonic# show running-configuration interface Ethernet 20
472 # !
473 # interface Ethernet20
474 # link state track lst upstream
475 # sonic# show running-configuration interface Ethernet 24
476 # !
477 # interface Ethernet24
478 # link state track lst downstream
479
480
481 # Using "overridden" state
482 #
483 # Before state:
484 # -------------
485 #
486 # sonic# show running-configuration link state tracking
487 # !
488 # link state track lst
489 # timeout 75
490 # downstream all-mclag
491 # sonic# show running-configuration interface Ethernet 20
492 # !
493 # interface Ethernet20
494 # link state track lst upstream
495 # sonic# show running-configuration interface Ethernet 24
496 # !
497 # interface Ethernet24
498 # link state track lst downstream
499
500 - name: Override LST configuration
501 dellemc.enterprise_sonic.sonic_lst:
502 config:
503 lst_groups:
504 - name: lst2
505 all_evpn_es_downstream: true
506 group_description: xyz
507 group_type: l3
508 threshold_down: 30
509 threshold_type: percentage
510 threshold_up: 50
511 timeout: 130
512 interfaces:
513 - name: Ethernet20
514 downstream_group: lst2
515 state: overridden
516
517 # After state:
518 # ------------
519 #
520 # sonic# show running-configuration link state tracking
521 # !
522 # link state track lst2
523 # timeout 130
524 # description xyz
525 # downstream all-evpn-es
526 # threshold type percentage up 50 down 30
527 # sonic# show running-configuration interface Ethernet 20
528 # !
529 # interface Ethernet20
530 # link state track lst2 downstream
531 # sonic# show running-configuration interface Ethernet 24
532 # !
533 # interface Ethernet24
534 # (No link state configuration present for interface Ethernet24)
535
536
537 # Using "deleted" state
538 #
539 # Before state:
540 # -------------
541 #
542 # sonic# show running-configuration link state tracking
543 # !
544 # link state track lst2
545 # timeout 130
546 # description xyz
547 # downstream all-evpn-es
548 # threshold type percentage up 50 down 30
549 # sonic# show running-configuration interface Ethernet 20
550 # !
551 # interface Ethernet20
552 # link state track lst2 downstream
553 # sonic# show running-configuration interface Ethernet 24
554 # !
555 # interface Ethernet24
556 # link state track lst2 upstream
557
558 - name: Delete LST configuration
559 dellemc.enterprise_sonic.sonic_lst:
560 config:
561 lst_groups:
562 - name: lst2
563 all_evpn_es_downstream: true
564 group_description: xyz
565 threshold_down: 30
566 threshold_type: percentage
567 threshold_up: 50
568 timeout: 130
569 interfaces:
570 - name: Ethernet20
571 downstream_group: lst2
572 - name: Ethernet24
573 upstream_groups:
574 - group_name: lst2
575 state: deleted
576
577 # After state:
578 # ------------
579 #
580 # sonic# show running-configuration link state tracking
581 # !
582 # link state track lst2
583 # sonic# show running-configuration interface Ethernet 20
584 # !
585 # interface Ethernet20
586 # (No link state configuration present for interface Ethernet20)
587 # sonic# show running-configuration interface Ethernet 24
588 # !
589 # interface Ethernet24
590 # (No link state configuration present for interface Ethernet24)
591
592
593 # Using "deleted" state
594 #
595 # Before state:
596 # -------------
597 #
598 # sonic# show running-configuration link state tracking
599 # !
600 # link state track lst
601 # timeout 120
602 # description abc
603 # downstream all-evpn-es
604 # threshold type percentage up 40 down 20
605 # sonic# show running-configuration interface Ethernet 20
606 # !
607 # interface Ethernet20
608 # link state track lst downstream
609 # sonic# show running-configuration interface Ethernet 24
610 # !
611 # interface Ethernet24
612 # link state track lst upstream
613
614 - name: Delete LST configuration
615 dellemc.enterprise_sonic.sonic_lst:
616 config: {}
617 state: deleted
618
619 # After state:
620 # ------------
621 #
622 # sonic# show running-configuration link state tracking
623 # (No link state tracking configuration present)
624 # sonic# show running-configuration interface Ethernet 20
625 # !
626 # interface Ethernet20
627 # (No link state tracking configuration present for interface Ethernet20)
628 # sonic# show running-configuration interface Ethernet 24
629 # !
630 # interface Ethernet24
631 # (No link state tracking configuration present for interface Ethernet24)
632
633
634
635 Return Values
636 -------------
637 Common return values are documented `here <https://docs.ansible.com/projects/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
638
639 .. raw:: html
640
641 <table border=0 cellpadding=0 class="documentation-table">
642 <tr>
643 <th colspan="1">Key</th>
644 <th>Returned</th>
645 <th width="100%">Description</th>
646 </tr>
647 <tr>
648 <td colspan="1">
649 <div class="ansibleOptionAnchor" id="return-"></div>
650 <b>after</b>
651 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
652 <div style="font-size: small">
653 <span style="color: purple">dictionary</span>
654 </div>
655 </td>
656 <td>when changed</td>
657 <td>
658 <div>The resulting configuration from module invocation.</div>
659 <br/>
660 <div style="font-size: smaller"><b>Sample:</b></div>
661 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format as the parameters above.</div>
662 </td>
663 </tr>
664 <tr>
665 <td colspan="1">
666 <div class="ansibleOptionAnchor" id="return-"></div>
667 <b>after_generated</b>
668 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
669 <div style="font-size: small">
670 <span style="color: purple">dictionary</span>
671 </div>
672 </td>
673 <td>when <code>check_mode</code></td>
674 <td>
675 <div>The generated configuration from module invocation.</div>
676 <br/>
677 <div style="font-size: smaller"><b>Sample:</b></div>
678 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format as the parameters above.</div>
679 </td>
680 </tr>
681 <tr>
682 <td colspan="1">
683 <div class="ansibleOptionAnchor" id="return-"></div>
684 <b>before</b>
685 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
686 <div style="font-size: small">
687 <span style="color: purple">dictionary</span>
688 </div>
689 </td>
690 <td>always</td>
691 <td>
692 <div>The configuration prior to the module invocation.</div>
693 <br/>
694 <div style="font-size: smaller"><b>Sample:</b></div>
695 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format as the parameters above.</div>
696 </td>
697 </tr>
698 <tr>
699 <td colspan="1">
700 <div class="ansibleOptionAnchor" id="return-"></div>
701 <b>commands</b>
702 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
703 <div style="font-size: small">
704 <span style="color: purple">list</span>
705 </div>
706 </td>
707 <td>always</td>
708 <td>
709 <div>The set of commands pushed to the remote device.</div>
710 <br/>
711 <div style="font-size: smaller"><b>Sample:</b></div>
712 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
713 </td>
714 </tr>
715 </table>
716 <br/><br/>
717
718
719 Status
720 ------
721
722
723 Authors
724 ~~~~~~~
725
726 - S\. Talabi (@stalabi1)