Debian Codegraph @

ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_interfaces_module.rst

raw
1 .. _cisco.nxos.nxos_lacp_interfaces_module:
2
3
4 *******************************
5 cisco.nxos.nxos_lacp_interfaces
6 *******************************
7
8 **LACP interfaces resource module**
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 NX-OS Interfaces.
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>convergence</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">dictionary</span>
60 </div>
61 </td>
62 <td>
63 </td>
64 <td>
65 <div>This dict contains configurable options related to convergence. Applicable only for Port-channel.</div>
66 </td>
67 </tr>
68 <tr>
69 <td class="elbow-placeholder"></td>
70 <td class="elbow-placeholder"></td>
71 <td colspan="1">
72 <div class="ansibleOptionAnchor" id="parameter-"></div>
73 <b>graceful</b>
74 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
75 <div style="font-size: small">
76 <span style="color: purple">boolean</span>
77 </div>
78 </td>
79 <td>
80 <ul style="margin: 0; padding: 0"><b>Choices:</b>
81 <li>no</li>
82 <li>yes</li>
83 </ul>
84 </td>
85 <td>
86 <div>port-channel lacp graceful convergence. Disable this only with lacp ports connected to Non-Nexus peer. Disabling this with Nexus peer can lead to port suspension.</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td class="elbow-placeholder"></td>
92 <td colspan="1">
93 <div class="ansibleOptionAnchor" id="parameter-"></div>
94 <b>vpc</b>
95 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
96 <div style="font-size: small">
97 <span style="color: purple">boolean</span>
98 </div>
99 </td>
100 <td>
101 <ul style="margin: 0; padding: 0"><b>Choices:</b>
102 <li>no</li>
103 <li>yes</li>
104 </ul>
105 </td>
106 <td>
107 <div>Enable lacp convergence for vPC port channels.</div>
108 </td>
109 </tr>
110
111 <tr>
112 <td class="elbow-placeholder"></td>
113 <td colspan="2">
114 <div class="ansibleOptionAnchor" id="parameter-"></div>
115 <b>links</b>
116 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
117 <div style="font-size: small">
118 <span style="color: purple">dictionary</span>
119 </div>
120 </td>
121 <td>
122 </td>
123 <td>
124 <div>This dict contains configurable options related to max and min port-channel links. Applicable only for Port-channel.</div>
125 </td>
126 </tr>
127 <tr>
128 <td class="elbow-placeholder"></td>
129 <td class="elbow-placeholder"></td>
130 <td colspan="1">
131 <div class="ansibleOptionAnchor" id="parameter-"></div>
132 <b>max</b>
133 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
134 <div style="font-size: small">
135 <span style="color: purple">integer</span>
136 </div>
137 </td>
138 <td>
139 </td>
140 <td>
141 <div>Port-channel max bundle.</div>
142 </td>
143 </tr>
144 <tr>
145 <td class="elbow-placeholder"></td>
146 <td class="elbow-placeholder"></td>
147 <td colspan="1">
148 <div class="ansibleOptionAnchor" id="parameter-"></div>
149 <b>min</b>
150 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
151 <div style="font-size: small">
152 <span style="color: purple">integer</span>
153 </div>
154 </td>
155 <td>
156 </td>
157 <td>
158 <div>Port-channel min links.</div>
159 </td>
160 </tr>
161
162 <tr>
163 <td class="elbow-placeholder"></td>
164 <td colspan="2">
165 <div class="ansibleOptionAnchor" id="parameter-"></div>
166 <b>mode</b>
167 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
168 <div style="font-size: small">
169 <span style="color: purple">string</span>
170 </div>
171 </td>
172 <td>
173 <ul style="margin: 0; padding: 0"><b>Choices:</b>
174 <li>delay</li>
175 </ul>
176 </td>
177 <td>
178 <div>LACP mode. Applicable only for Port-channel.</div>
179 </td>
180 </tr>
181 <tr>
182 <td class="elbow-placeholder"></td>
183 <td colspan="2">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>name</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">string</span>
189 / <span style="color: red">required</span>
190 </div>
191 </td>
192 <td>
193 </td>
194 <td>
195 <div>Name of the interface.</div>
196 </td>
197 </tr>
198 <tr>
199 <td class="elbow-placeholder"></td>
200 <td colspan="2">
201 <div class="ansibleOptionAnchor" id="parameter-"></div>
202 <b>port_priority</b>
203 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
204 <div style="font-size: small">
205 <span style="color: purple">integer</span>
206 </div>
207 </td>
208 <td>
209 </td>
210 <td>
211 <div>LACP port priority for the interface. Range 1-65535. Applicable only for Ethernet.</div>
212 </td>
213 </tr>
214 <tr>
215 <td class="elbow-placeholder"></td>
216 <td colspan="2">
217 <div class="ansibleOptionAnchor" id="parameter-"></div>
218 <b>rate</b>
219 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
220 <div style="font-size: small">
221 <span style="color: purple">string</span>
222 </div>
223 </td>
224 <td>
225 <ul style="margin: 0; padding: 0"><b>Choices:</b>
226 <li>fast</li>
227 <li>normal</li>
228 </ul>
229 </td>
230 <td>
231 <div>Rate at which PDUs are sent by LACP. Applicable only for Ethernet. At fast rate LACP is transmitted once every 1 second. At normal rate LACP is transmitted every 30 seconds after the link is bundled.</div>
232 </td>
233 </tr>
234 <tr>
235 <td class="elbow-placeholder"></td>
236 <td colspan="2">
237 <div class="ansibleOptionAnchor" id="parameter-"></div>
238 <b>suspend_individual</b>
239 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
240 <div style="font-size: small">
241 <span style="color: purple">boolean</span>
242 </div>
243 </td>
244 <td>
245 <ul style="margin: 0; padding: 0"><b>Choices:</b>
246 <li>no</li>
247 <li>yes</li>
248 </ul>
249 </td>
250 <td>
251 <div>port-channel lacp state. Disabling this will cause lacp to put the port to individual state and not suspend the port in case it does not get LACP BPDU from the peer ports in the port-channel.</div>
252 </td>
253 </tr>
254
255 <tr>
256 <td colspan="3">
257 <div class="ansibleOptionAnchor" id="parameter-"></div>
258 <b>running_config</b>
259 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
260 <div style="font-size: small">
261 <span style="color: purple">string</span>
262 </div>
263 </td>
264 <td>
265 </td>
266 <td>
267 <div>This option is used only with state <em>parsed</em>.</div>
268 <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b>.</div>
269 <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>
270 </td>
271 </tr>
272 <tr>
273 <td colspan="3">
274 <div class="ansibleOptionAnchor" id="parameter-"></div>
275 <b>state</b>
276 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
277 <div style="font-size: small">
278 <span style="color: purple">string</span>
279 </div>
280 </td>
281 <td>
282 <ul style="margin: 0; padding: 0"><b>Choices:</b>
283 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
284 <li>replaced</li>
285 <li>overridden</li>
286 <li>deleted</li>
287 <li>gathered</li>
288 <li>rendered</li>
289 <li>parsed</li>
290 </ul>
291 </td>
292 <td>
293 <div>The state of the configuration after module completion.</div>
294 </td>
295 </tr>
296 </table>
297 <br/>
298
299
300 Notes
301 -----
302
303 .. note::
304 - Tested against NXOS 7.3.(0)D1(1) on VIRL
305 - Unsupported for Cisco MDS
306
307
308
309 Examples
310 --------
311
312 .. code-block:: yaml
313
314 # Using merged
315
316 # Before state:
317 # -------------
318 #
319
320 - name: Merge provided configuration with device configuration.
321 cisco.nxos.nxos_lacp_interfaces:
322 config:
323 - name: Ethernet1/3
324 port_priority: 5
325 rate: fast
326 state: merged
327
328 # After state:
329 # ------------
330 #
331 # interface Ethernet1/3
332 # lacp port-priority 5
333 # lacp rate fast
334
335
336 # Using replaced
337
338 # Before state:
339 # -------------
340 #
341 # interface Ethernet1/3
342 # lacp port-priority 5
343 # interface port-channel11
344 # lacp mode delay
345
346 - name: Replace device lacp interfaces configuration with the given configuration.
347 cisco.nxos.nxos_lacp_interfaces:
348 config:
349 - name: port-channel11
350 links:
351 min: 4
352 state: replaced
353
354 # After state:
355 # ------------
356 #
357 # interface Ethernet1/3
358 # lacp port-priority 5
359 # interface port-channel11
360 # lacp min-links 4
361
362
363 # Using overridden
364
365 # Before state:
366 # -------------
367 #
368 # interface Ethernet1/3
369 # lacp port-priority 5
370 # interface port-channel11
371 # lacp mode delay
372
373 - name: Override device configuration of all LACP interfaces attributes of given interfaces
374 on device with provided configuration.
375 cisco.nxos.nxos_lacp_interfaces:
376 config:
377 - name: port-channel11
378 links:
379 min: 4
380 state: overridden
381
382 # After state:
383 # ------------
384 #
385 # interface port-channel11
386 # lacp min-links 4
387
388
389 # Using deleted
390
391 # Before state:
392 # -------------
393 #
394 # interface Ethernet1/3
395 # lacp port-priority 5
396 # interface port-channel11
397 # lacp mode delay
398
399 - name: Delete LACP interfaces configurations.
400 cisco.nxos.nxos_lacp_interfaces:
401 state: deleted
402
403 # After state:
404 # ------------
405 #
406
407 # Using rendered
408
409 - name: Use rendered state to convert task input to device specific commands
410 cisco.nxos.nxos_lacp_interfaces:
411 config:
412 - name: Ethernet1/800
413 rate: fast
414 - name: Ethernet1/801
415 rate: fast
416 port_priority: 32
417 - name: port-channel10
418 links:
419 max: 15
420 min: 2
421 convergence:
422 graceful: true
423 state: rendered
424
425 # Task Output (redacted)
426 # -----------------------
427
428 # rendered:
429 # - "interface Ethernet1/800"
430 # - "lacp rate fast"
431 # - "interface Ethernet1/801"
432 # - "lacp port-priority 32"
433 # - "lacp rate fast"
434 # - "interface port-channel10"
435 # - "lacp min-links 2"
436 # - "lacp max-bundle 15"
437 # - "lacp graceful-convergence"
438
439 # Using parsed
440
441 # parsed.cfg
442 # ------------
443
444 # interface port-channel10
445 # lacp min-links 10
446 # lacp max-bundle 15
447 # interface Ethernet1/800
448 # lacp port-priority 100
449 # lacp rate fast
450
451 - name: Use parsed state to convert externally supplied config to structured format
452 cisco.nxos.nxos_lacp_interfaces:
453 running_config: "{{ lookup('file', 'parsed.cfg') }}"
454 state: parsed
455
456 # Task output (redacted)
457 # -----------------------
458
459 # parsed:
460 # - name: port-channel10
461 # links:
462 # max: 15
463 # min: 10
464 # - name: Ethernet1/800
465 # port_priority: 100
466 # rate: fast
467
468 # Using gathered
469
470 # Existing device config state
471 # -------------------------------
472 # interface Ethernet1/1
473 # lacp port-priority 5
474 # lacp rate fast
475 # interface port-channel10
476 # lacp mode delay
477 # interface port-channel11
478 # lacp max-bundle 10
479 # lacp min-links 5
480
481 - name: Gather lacp_interfaces facts from the device using nxos_lacp_interfaces
482 cisco.nxos.nxos_lacp_interfaces:
483 state: gathered
484
485 # Task output (redacted)
486 # -----------------------
487 # gathered:
488 # - name: Ethernet1/1
489 # port_priority: 5
490 # rate: fast
491 # - name: port-channel10
492 # mode: delay
493 # - name: port-channel11
494 # links:
495 # max: 10
496 # min: 5
497
498
499
500 Return Values
501 -------------
502 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:
503
504 .. raw:: html
505
506 <table border=0 cellpadding=0 class="documentation-table">
507 <tr>
508 <th colspan="1">Key</th>
509 <th>Returned</th>
510 <th width="100%">Description</th>
511 </tr>
512 <tr>
513 <td colspan="1">
514 <div class="ansibleOptionAnchor" id="return-"></div>
515 <b>after</b>
516 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
517 <div style="font-size: small">
518 <span style="color: purple">list</span>
519 </div>
520 </td>
521 <td>when changed</td>
522 <td>
523 <div>The configuration as structured data after module completion.</div>
524 <br/>
525 <div style="font-size: smaller"><b>Sample:</b></div>
526 <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
527 of the parameters above.</div>
528 </td>
529 </tr>
530 <tr>
531 <td colspan="1">
532 <div class="ansibleOptionAnchor" id="return-"></div>
533 <b>before</b>
534 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
535 <div style="font-size: small">
536 <span style="color: purple">list</span>
537 </div>
538 </td>
539 <td>always</td>
540 <td>
541 <div>The configuration as structured data prior to module invocation.</div>
542 <br/>
543 <div style="font-size: smaller"><b>Sample:</b></div>
544 <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
545 of the parameters above.</div>
546 </td>
547 </tr>
548 <tr>
549 <td colspan="1">
550 <div class="ansibleOptionAnchor" id="return-"></div>
551 <b>commands</b>
552 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
553 <div style="font-size: small">
554 <span style="color: purple">list</span>
555 </div>
556 </td>
557 <td>always</td>
558 <td>
559 <div>The set of commands pushed to the remote device.</div>
560 <br/>
561 <div style="font-size: smaller"><b>Sample:</b></div>
562 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface port-channel10&#x27;, &#x27;lacp min-links 5&#x27;, &#x27;lacp mode delay&#x27;]</div>
563 </td>
564 </tr>
565 </table>
566 <br/><br/>
567
568
569 Status
570 ------
571
572
573 Authors
574 ~~~~~~~
575
576 - Trishna Guha (@trishnaguha)