Debian Codegraph @

ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst

raw
1 .. _cisco.iosxr.iosxr_lacp_interfaces_module:
2
3
4 *********************************
5 cisco.iosxr.iosxr_lacp_interfaces
6 *********************************
7
8 **Resource module to configure LACP interfaces.**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module manages Link Aggregation Control Protocol (LACP) attributes of interfaces on IOS-XR devices.
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="3">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="3">
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">list</span>
43 / <span style="color: purple">elements=dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>A dictionary of LACP interfaces options.</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="2">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>churn_logging</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">string</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>actor</li>
65 <li>partner</li>
66 <li>both</li>
67 </ul>
68 </td>
69 <td>
70 <div>Specifies the parameter for logging of LACP churn events.</div>
71 <div>Valid only for ether-bundles.</div>
72 <div>Mode &#x27;actor&#x27; logs actor churn events only.</div>
73 <div>Mode &#x27;partner&#x27; logs partner churn events only.</div>
74 <div>Mode &#x27;both&#x27; logs actor and partner churn events only.</div>
75 </td>
76 </tr>
77 <tr>
78 <td class="elbow-placeholder"></td>
79 <td colspan="2">
80 <div class="ansibleOptionAnchor" id="parameter-"></div>
81 <b>collector_max_delay</b>
82 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
83 <div style="font-size: small">
84 <span style="color: purple">integer</span>
85 </div>
86 </td>
87 <td>
88 </td>
89 <td>
90 <div>Specifies the collector max delay to be signaled to the LACP partner.</div>
91 <div>Valid only for ether-bundles.</div>
92 <div>Refer to vendor documentation for valid values.</div>
93 </td>
94 </tr>
95 <tr>
96 <td class="elbow-placeholder"></td>
97 <td colspan="2">
98 <div class="ansibleOptionAnchor" id="parameter-"></div>
99 <b>name</b>
100 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
101 <div style="font-size: small">
102 <span style="color: purple">string</span>
103 </div>
104 </td>
105 <td>
106 </td>
107 <td>
108 <div>Name/Identifier of the interface or Ether-Bundle.</div>
109 </td>
110 </tr>
111 <tr>
112 <td class="elbow-placeholder"></td>
113 <td colspan="2">
114 <div class="ansibleOptionAnchor" id="parameter-"></div>
115 <b>period</b>
116 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
117 <div style="font-size: small">
118 <span style="color: purple">integer</span>
119 </div>
120 </td>
121 <td>
122 </td>
123 <td>
124 <div>Specifies the rate at which packets are sent or received.</div>
125 <div>For ether-bundles, this specifies the period to be used by its member links.</div>
126 <div>Refer to vendor documentation for valid values.</div>
127 </td>
128 </tr>
129 <tr>
130 <td class="elbow-placeholder"></td>
131 <td colspan="2">
132 <div class="ansibleOptionAnchor" id="parameter-"></div>
133 <b>switchover_suppress_flaps</b>
134 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
135 <div style="font-size: small">
136 <span style="color: purple">integer</span>
137 </div>
138 </td>
139 <td>
140 </td>
141 <td>
142 <div>Specifies the time for which to suppress flaps during a LACP switchover.</div>
143 <div>Valid only for ether-bundles.</div>
144 <div>Refer to vendor documentation for valid values.</div>
145 </td>
146 </tr>
147 <tr>
148 <td class="elbow-placeholder"></td>
149 <td colspan="2">
150 <div class="ansibleOptionAnchor" id="parameter-"></div>
151 <b>system</b>
152 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
153 <div style="font-size: small">
154 <span style="color: purple">dictionary</span>
155 </div>
156 </td>
157 <td>
158 </td>
159 <td>
160 <div>This dict object contains configurable options related to LACP system parameters for ether-bundles.</div>
161 </td>
162 </tr>
163 <tr>
164 <td class="elbow-placeholder"></td>
165 <td class="elbow-placeholder"></td>
166 <td colspan="1">
167 <div class="ansibleOptionAnchor" id="parameter-"></div>
168 <b>mac</b>
169 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
170 <div style="font-size: small">
171 <span style="color: purple">string</span>
172 </div>
173 </td>
174 <td>
175 </td>
176 <td>
177 <div>Specifies the system ID to use in LACP negotiations for the bundle, encoded as a MAC address.</div>
178 </td>
179 </tr>
180 <tr>
181 <td class="elbow-placeholder"></td>
182 <td class="elbow-placeholder"></td>
183 <td colspan="1">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>priority</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">integer</span>
189 </div>
190 </td>
191 <td>
192 </td>
193 <td>
194 <div>Specifies the system priority to use in LACP negotiations for the bundle.</div>
195 <div>Refer to vendor documentation for valid values.</div>
196 </td>
197 </tr>
198
199
200 <tr>
201 <td colspan="3">
202 <div class="ansibleOptionAnchor" id="parameter-"></div>
203 <b>running_config</b>
204 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
205 <div style="font-size: small">
206 <span style="color: purple">string</span>
207 </div>
208 </td>
209 <td>
210 </td>
211 <td>
212 <div>This option is used only with state <em>parsed</em>.</div>
213 <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config int</b>.</div>
214 <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
215 </td>
216 </tr>
217 <tr>
218 <td colspan="3">
219 <div class="ansibleOptionAnchor" id="parameter-"></div>
220 <b>state</b>
221 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
222 <div style="font-size: small">
223 <span style="color: purple">string</span>
224 </div>
225 </td>
226 <td>
227 <ul style="margin: 0; padding: 0"><b>Choices:</b>
228 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
229 <li>replaced</li>
230 <li>overridden</li>
231 <li>deleted</li>
232 <li>parsed</li>
233 <li>gathered</li>
234 <li>rendered</li>
235 </ul>
236 </td>
237 <td>
238 <div>The state of the configuration after module completion.</div>
239 </td>
240 </tr>
241 </table>
242 <br/>
243
244
245 Notes
246 -----
247
248 .. note::
249 - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
250
251
252
253 Examples
254 --------
255
256 .. code-block:: yaml
257
258 # Using merged
259 #
260 #
261 # ------------
262 # Before state
263 # ------------
264 #
265 #
266 #
267 # RP/0/0/CPU0:an-iosxr#sh running-config interface
268 # Sun Jul 21 18:01:35.079 UTC
269 # interface Bundle-Ether10
270 # !
271 # interface Bundle-Ether11
272 # !
273 # interface Bundle-Ether12
274 # !
275 # interface Loopback888
276 # description test for ansible
277 # shutdown
278 # !
279 # interface MgmtEth0/0/CPU0/0
280 # ipv4 address 192.0.2.11 255.255.255.0
281 # !
282 # interface GigabitEthernet0/0/0/1
283 # description 'GigabitEthernet - 1'
284 # !
285 # interface GigabitEthernet0/0/0/2
286 # description "GigabitEthernet - 2"
287 # !
288 # interface GigabitEthernet0/0/0/3
289 # description "GigabitEthernet - 3"
290 # !
291 # interface GigabitEthernet0/0/0/4
292 # description "GigabitEthernet - 4"
293 # !
294 #
295 #
296
297 - name: Merge provided configuration with device configuration
298 cisco.iosxr.iosxr_lacp_interfaces:
299 config:
300 - name: Bundle-Ether10
301 churn_logging: actor
302 collector_max_delay: 100
303 switchover_suppress_flaps: 500
304 - name: Bundle-Ether11
305 system:
306 mac: 00c2.4c00.bd15
307 - name: GigabitEthernet0/0/0/1
308 period: 200
309 state: merged
310
311
312 #
313 #
314 # -----------
315 # After state
316 # -----------
317 #
318 #
319 # RP/0/0/CPU0:an-iosxr#sh run int
320 # Sun Jul 21 18:24:52.413 UTC
321 # interface Bundle-Ether10
322 # lacp churn logging actor
323 # lacp switchover suppress-flaps 500
324 # lacp collector-max-delay 100
325 # !
326 # interface Bundle-Ether11
327 # lacp system mac 00c2.4c00.bd15
328 # !
329 # interface Bundle-Ether12
330 # !
331 # interface Loopback888
332 # description test for ansible
333 # shutdown
334 # !
335 # interface MgmtEth0/0/CPU0/0
336 # ipv4 address 192.0.2.11 255.255.255.0
337 # !
338 # interface GigabitEthernet0/0/0/1
339 # description 'GigabitEthernet - 1"
340 # lacp period 200
341 # !
342 # interface GigabitEthernet0/0/0/2
343 # description "GigabitEthernet - 2"
344 # !
345 # interface GigabitEthernet0/0/0/3
346 # description "GigabitEthernet - 3"
347 # !
348 # interface GigabitEthernet0/0/0/4
349 # description "GigabitEthernet - 4"
350 # !
351 #
352
353
354 # Using replaced
355 #
356 #
357 # ------------
358 # Before state
359 # ------------
360 #
361 #
362 # RP/0/0/CPU0:an-iosxr#sh run int
363 # Sun Jul 21 18:24:52.413 UTC
364 # interface Bundle-Ether10
365 # lacp churn logging actor
366 # lacp switchover suppress-flaps 500
367 # lacp collector-max-delay 100
368 # !
369 # interface Bundle-Ether11
370 # lacp system mac 00c2.4c00.bd15
371 # !
372 # interface Bundle-Ether12
373 # !
374 # interface Loopback888
375 # description test for ansible
376 # shutdown
377 # !
378 # interface MgmtEth0/0/CPU0/0
379 # ipv4 address 192.0.2.11 255.255.255.0
380 # !
381 # interface GigabitEthernet0/0/0/1
382 # description 'GigabitEthernet - 1"
383 # lacp period 200
384 # !
385 # interface GigabitEthernet0/0/0/2
386 # description "GigabitEthernet - 2"
387 # !
388 # interface GigabitEthernet0/0/0/3
389 # description "GigabitEthernet - 3"
390 # !
391 # interface GigabitEthernet0/0/0/4
392 # description "GigabitEthernet - 4"
393 # !
394 #
395
396 - name: Replace LACP configuration of listed interfaces with provided configuration
397 cisco.iosxr.iosxr_lacp_interfaces:
398 config:
399 - name: Bundle-Ether10
400 churn_logging: partner
401 - name: GigabitEthernet0/0/0/2
402 period: 300
403 state: replaced
404
405
406 #
407 #
408 # -----------
409 # After state
410 # -----------
411 #
412 #
413 # RP/0/0/CPU0:an-iosxr#sh run int
414 # Sun Jul 21 18:50:21.929 UTC
415 # interface Bundle-Ether10
416 # lacp churn logging partner
417 # !
418 # interface Bundle-Ether11
419 # lacp system mac 00c2.4c00.bd15
420 # !
421 # interface Bundle-Ether12
422 # !
423 # interface Loopback888
424 # description test for ansible
425 # shutdown
426 # !
427 # interface MgmtEth0/0/CPU0/0
428 # ipv4 address 192.0.2.11 255.255.255.0
429 # !
430 # interface GigabitEthernet0/0/0/1
431 # description 'GigabitEthernet - 1"
432 # lacp period 200
433 # !
434 # interface GigabitEthernet0/0/0/2
435 # description "GigabitEthernet - 2"
436 # lacp period 300
437 # !
438 # interface GigabitEthernet0/0/0/3
439 # description "GigabitEthernet - 3"
440 # !
441 # interface GigabitEthernet0/0/0/4
442 # description "GigabitEthernet - 4"
443 # !
444 #
445 #
446
447
448 # Using overridden
449 #
450 #
451 # ------------
452 # Before state
453 # ------------
454 #
455 #
456 # RP/0/0/CPU0:an-iosxr#sh run int
457 # Sun Jul 21 18:24:52.413 UTC
458 # interface Bundle-Ether10
459 # lacp churn logging actor
460 # lacp switchover suppress-flaps 500
461 # lacp collector-max-delay 100
462 # !
463 # interface Bundle-Ether11
464 # lacp system mac 00c2.4c00.bd15
465 # !
466 # interface Bundle-Ether12
467 # !
468 # interface Loopback888
469 # description test for ansible
470 # shutdown
471 # !
472 # interface MgmtEth0/0/CPU0/0
473 # ipv4 address 192.0.2.11 255.255.255.0
474 # !
475 # interface GigabitEthernet0/0/0/1
476 # description 'GigabitEthernet - 1"
477 # lacp period 200
478 # !
479 # interface GigabitEthernet0/0/0/2
480 # description "GigabitEthernet - 2"
481 # lacp period 200
482 # !
483 # interface GigabitEthernet0/0/0/3
484 # description "GigabitEthernet - 3"
485 # !
486 # interface GigabitEthernet0/0/0/4
487 # description "GigabitEthernet - 4"
488 # !
489 #
490 #
491
492 - name: Override all interface LACP configuration with provided configuration
493 cisco.iosxr.iosxr_lacp_interfaces:
494 config:
495 - name: Bundle-Ether12
496 churn_logging: both
497 collector_max_delay: 100
498 switchover_suppress_flaps: 500
499 - name: GigabitEthernet0/0/0/1
500 period: 300
501 state: overridden
502
503
504 #
505 #
506 # -----------
507 # After state
508 # -----------
509 #
510 #
511 # RP/0/0/CPU0:an-iosxr(config-if)#do sh run int
512 # Sun Jul 21 19:32:36.115 UTC
513 # interface Bundle-Ether10
514 # !
515 # interface Bundle-Ether11
516 # !
517 # interface Bundle-Ether12
518 # lacp churn logging both
519 # lacp switchover suppress-flaps 500
520 # lacp collector-max-delay 100
521 # !
522 # interface Loopback888
523 # description test for ansible
524 # shutdown
525 # !
526 # interface MgmtEth0/0/CPU0/0
527 # ipv4 address 192.0.2.11 255.255.255.0
528 # !
529 # interface GigabitEthernet0/0/0/1
530 # description 'GigabitEthernet - 1"
531 # lacp period 300
532 # !
533 # interface GigabitEthernet0/0/0/2
534 # description "GigabitEthernet - 2"
535 # !
536 # interface GigabitEthernet0/0/0/3
537 # description "GigabitEthernet - 3"
538 # !
539 # interface GigabitEthernet0/0/0/4
540 # description "GigabitEthernet - 4"
541 # !
542 #
543
544
545 # Using deleted
546 #
547 #
548 # ------------
549 # Before state
550 # ------------
551 #
552 #
553 # RP/0/0/CPU0:an-iosxr#sh run int
554 # Sun Jul 21 18:24:52.413 UTC
555 # interface Bundle-Ether10
556 # lacp churn logging actor
557 # lacp switchover suppress-flaps 500
558 # lacp collector-max-delay 100
559 # !
560 # interface Bundle-Ether11
561 # lacp non-revertive
562 # !
563 # interface Bundle-Ether12
564 # !
565 # interface Loopback888
566 # description test for ansible
567 # shutdown
568 # !
569 # interface MgmtEth0/0/CPU0/0
570 # ipv4 address 192.0.2.11 255.255.255.0
571 # !
572 # interface GigabitEthernet0/0/0/1
573 # description 'GigabitEthernet - 1"
574 # lacp period 200
575 # !
576 # interface GigabitEthernet0/0/0/2
577 # description "GigabitEthernet - 2"
578 # lacp period 300
579 # !
580 # interface GigabitEthernet0/0/0/3
581 # description "GigabitEthernet - 3"
582 # !
583 # interface GigabitEthernet0/0/0/4
584 # description "GigabitEthernet - 4"
585 # !
586 #
587
588 - name: >-
589 Deleted LACP configurations of provided interfaces (Note - This won't delete
590 the interface itself)
591 cisco.iosxr.iosxr_lacp_interfaces:
592 config:
593 - name: Bundle-Ether10
594 - name: Bundle-Ether11
595 - name: GigabitEthernet0/0/0/1
596 - name: GigabitEthernet0/0/0/2
597 state: deleted
598
599
600 #
601 #
602 # -----------
603 # After state
604 # -----------
605 #
606 #
607 # Using parsed:
608
609 # parsed.cfg
610 # interface Bundle-Ether10
611 # lacp churn logging actor
612 # lacp switchover suppress-flaps 500
613 # lacp collector-max-delay 100
614 # !
615 # interface Bundle-Ether11
616 # lacp system mac 00c2.4c00.bd15
617 # !
618 # interface MgmtEth0/0/CPU0/0
619 # ipv4 address 192.0.2.11 255.255.255.0
620 # !
621 # interface GigabitEthernet0/0/0/1
622 # lacp period 200
623 # !
624 #
625
626 - name: Convert lacp interfaces config to argspec without connecting to the appliance
627 cisco.iosxr.iosxr_lacp_interfaces:
628 running_config: "{{ lookup('file', './parsed.cfg') }}"
629 state: parsed
630
631 # --------------
632 # Output:
633 # --------------
634
635 # parsed:
636 # - name: Bundle-Ether10
637 # churn_logging: actor
638 # collector_max_delay: 100
639 # switchover_suppress_flaps: 500
640 #
641 # - name: Bundle-Ether11
642 # system:
643 # mac: 00c2.4c00.bd15
644 #
645 # - name: GigabitEthernet0/0/0/1
646 # period: 200
647 #
648 #
649
650 # Using gathered:
651
652 # Native config:
653 # interface Bundle-Ether10
654 # lacp churn logging actor
655 # lacp switchover suppress-flaps 500
656 # lacp collector-max-delay 100
657 # !
658 # interface Bundle-Ether11
659 # lacp system mac 00c2.4c00.bd15
660 # !
661 # interface MgmtEth0/0/CPU0/0
662 # ipv4 address 192.0.2.11 255.255.255.0
663 # !
664 # interface GigabitEthernet0/0/0/1
665 # lacp period 200
666 # !
667 #
668
669 - name: Gather IOSXR lacp interfaces configuration
670 cisco.iosxr.iosxr_lacp_interfaces:
671 config:
672 state: gathered
673
674 # ----------
675 # Output
676 # ---------
677 # gathered:
678 # - name: Bundle-Ether10
679 # churn_logging: actor
680 # collector_max_delay: 100
681 # switchover_suppress_flaps: 500
682 #
683 # - name: Bundle-Ether11
684 # system:
685 # mac: 00c2.4c00.bd15
686 #
687 # - name: GigabitEthernet0/0/0/1
688 # period: 200
689
690 # Using rendered:
691
692 - name: Render platform specific commands from task input using rendered state
693 cisco.iosxr.iosxr_lacp_interfaces:
694 config:
695 - name: Bundle-Ether10
696 churn_logging: actor
697 collector_max_delay: 100
698 switchover_suppress_flaps: 500
699 - name: Bundle-Ether11
700 system:
701 mac: 00c2.4c00.bd15
702 - name: GigabitEthernet0/0/0/1
703 period: 200
704 state: rendered
705
706
707 # -------------
708 # Output
709 # -------------
710 # rendered: [
711 # - "interface Bundle-Ether10"
712 # - " lacp churn logging actor"
713 # - " lacp switchover suppress-flaps 500"
714 # - " lacp collector-max-delay 100"
715 # - "interface Bundle-Ether11"
716 # - " lacp system mac 00c2.4c00.bd15"
717 # - "interface MgmtEth0/0/CPU0/0"
718 # - " ipv4 address 192.0.2.11 255.255.255.0"
719 # - "interface GigabitEthernet0/0/0/1"
720 # - " lacp period 200"
721 #
722
723
724
725 Return Values
726 -------------
727 Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
728
729 .. raw:: html
730
731 <table border=0 cellpadding=0 class="documentation-table">
732 <tr>
733 <th colspan="1">Key</th>
734 <th>Returned</th>
735 <th width="100%">Description</th>
736 </tr>
737 <tr>
738 <td colspan="1">
739 <div class="ansibleOptionAnchor" id="return-"></div>
740 <b>after</b>
741 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
742 <div style="font-size: small">
743 <span style="color: purple">list</span>
744 </div>
745 </td>
746 <td>when changed</td>
747 <td>
748 <div>The configuration as structured data after module completion.</div>
749 <br/>
750 <div style="font-size: smaller"><b>Sample:</b></div>
751 <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
752 of the parameters above.</div>
753 </td>
754 </tr>
755 <tr>
756 <td colspan="1">
757 <div class="ansibleOptionAnchor" id="return-"></div>
758 <b>before</b>
759 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
760 <div style="font-size: small">
761 <span style="color: purple">list</span>
762 </div>
763 </td>
764 <td>always</td>
765 <td>
766 <div>The configuration as structured data prior to module invocation.</div>
767 <br/>
768 <div style="font-size: smaller"><b>Sample:</b></div>
769 <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
770 of the parameters above.</div>
771 </td>
772 </tr>
773 <tr>
774 <td colspan="1">
775 <div class="ansibleOptionAnchor" id="return-"></div>
776 <b>commands</b>
777 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
778 <div style="font-size: small">
779 <span style="color: purple">list</span>
780 </div>
781 </td>
782 <td>always</td>
783 <td>
784 <div>The set of commands pushed to the remote device.</div>
785 <br/>
786 <div style="font-size: smaller"><b>Sample:</b></div>
787 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Bundle-Ether10&#x27;, &#x27;lacp churn logging partner&#x27;, &#x27;lacp period 150&#x27;]</div>
788 </td>
789 </tr>
790 </table>
791 <br/><br/>
792
793
794 Status
795 ------
796
797
798 Authors
799 ~~~~~~~
800
801 - Nilashish Chakraborty (@nilashishc)