Debian Codegraph @

ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_module.rst

raw
1 .. _cisco.iosxr.iosxr_lacp_module:
2
3
4 **********************
5 cisco.iosxr.iosxr_lacp
6 **********************
7
8 **Resource module to configure LACP.**
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 Global Link Aggregation Control Protocol (LACP) 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="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>The provided configurations.</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>system</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">dictionary</span>
59 </div>
60 </td>
61 <td>
62 </td>
63 <td>
64 <div>This option sets the default system parameters for LACP bundles.</div>
65 </td>
66 </tr>
67 <tr>
68 <td class="elbow-placeholder"></td>
69 <td class="elbow-placeholder"></td>
70 <td colspan="2">
71 <div class="ansibleOptionAnchor" id="parameter-"></div>
72 <b>mac</b>
73 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
74 <div style="font-size: small">
75 <span style="color: purple">dictionary</span>
76 </div>
77 </td>
78 <td>
79 </td>
80 <td>
81 <div>The system MAC related configuration for LACP.</div>
82 </td>
83 </tr>
84 <tr>
85 <td class="elbow-placeholder"></td>
86 <td class="elbow-placeholder"></td>
87 <td class="elbow-placeholder"></td>
88 <td colspan="1">
89 <div class="ansibleOptionAnchor" id="parameter-"></div>
90 <b>address</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 </div>
95 </td>
96 <td>
97 </td>
98 <td>
99 <div>The system ID to use in LACP negotiations.</div>
100 </td>
101 </tr>
102
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>priority</b>
109 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
110 <div style="font-size: small">
111 <span style="color: purple">integer</span>
112 </div>
113 </td>
114 <td>
115 </td>
116 <td>
117 <div>The system priority to use in LACP negotiations.</div>
118 <div>Lower value is higher priority.</div>
119 <div>Refer to vendor documentation for valid values.</div>
120 </td>
121 </tr>
122
123
124 <tr>
125 <td colspan="4">
126 <div class="ansibleOptionAnchor" id="parameter-"></div>
127 <b>running_config</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 </div>
132 </td>
133 <td>
134 </td>
135 <td>
136 <div>This option is used only with state <em>parsed</em>.</div>
137 <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config lacp</b>.</div>
138 <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>
139 </td>
140 </tr>
141 <tr>
142 <td colspan="4">
143 <div class="ansibleOptionAnchor" id="parameter-"></div>
144 <b>state</b>
145 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
146 <div style="font-size: small">
147 <span style="color: purple">string</span>
148 </div>
149 </td>
150 <td>
151 <ul style="margin: 0; padding: 0"><b>Choices:</b>
152 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
153 <li>replaced</li>
154 <li>deleted</li>
155 <li>parsed</li>
156 <li>rendered</li>
157 <li>gathered</li>
158 <li>overridden</li>
159 </ul>
160 </td>
161 <td>
162 <div>The state of the configuration after module completion.</div>
163 </td>
164 </tr>
165 </table>
166 <br/>
167
168
169 Notes
170 -----
171
172 .. note::
173 - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
174
175
176
177 Examples
178 --------
179
180 .. code-block:: yaml
181
182 # Using merged
183 #
184 #
185 # ------------
186 # Before state
187 # ------------
188 #
189 #
190 # RP/0/0/CPU0:iosxr01#show running-config lacp
191 # Tue Jul 16 17:46:08.147 UTC
192 # % No such configuration item(s)
193 #
194 #
195
196 - name: Merge provided configuration with device configuration
197 cisco.iosxr.iosxr_lacp:
198 config:
199 system:
200 priority: 10
201 mac:
202 address: 00c1.4c00.bd15
203 state: merged
204
205 #
206 #
207 # -----------------------
208 # Module Execution Result
209 # -----------------------
210 #
211 # "before": {}
212 #
213 #
214 # "commands": [
215 # "lacp system priority 10",
216 # "lacp system mac 00c1.4c00.bd15"
217 # ]
218 #
219 #
220 # "after": {
221 # "system": {
222 # "mac": {
223 # "address": "00c1.4c00.bd15"
224 # },
225 # "priority": 10
226 # }
227 # }
228 #
229 # -----------
230 # After state
231 # -----------
232 #
233 #
234 # RP/0/0/CPU0:iosxr01#sh run lacp
235 # Tue Jul 16 17:51:29.365 UTC
236 # lacp system mac 00c1.4c00.bd15
237 # lacp system priority 10
238 #
239 #
240
241 # Using replaced
242 #
243 #
244 # -------------
245 # Before state
246 # -------------
247 #
248 #
249 # RP/0/0/CPU0:iosxr01#sh run lacp
250 # Tue Jul 16 17:53:59.904 UTC
251 # lacp system mac 00c1.4c00.bd15
252 # lacp system priority 10
253 #
254
255 - name: Replace device global lacp configuration with the given configuration
256 cisco.iosxr.iosxr_lacp:
257 config:
258 system:
259 priority: 11
260 state: replaced
261 #
262 #
263 # -----------------------
264 # Module Execution Result
265 # -----------------------
266 # "before": {
267 # "system": {
268 # "mac": {
269 # "address": "00c1.4c00.bd15"
270 # },
271 # "priority": 10
272 # }
273 # }
274 #
275 #
276 # "commands": [
277 # "no lacp system mac",
278 # "lacp system priority 11"
279 # ]
280 #
281 #
282 # "after": {
283 # "system": {
284 # "priority": 11
285 # }
286 # }
287 #
288 # -----------
289 # After state
290 # -----------
291 #
292 #
293 # RP/0/0/CPU0:iosxr01#sh run lacp
294 # Tue Jul 16 18:02:40.379 UTC
295 # lacp system priority 11
296 #
297 #
298
299 # Using deleted
300 #
301 #
302 # ------------
303 # Before state
304 # ------------
305 #
306 #
307 # RP/0/0/CPU0:iosxr01#sh run lacp
308 # Tue Jul 16 18:37:09.727 UTC
309 # lacp system mac 00c1.4c00.bd15
310 # lacp system priority 11
311 #
312 #
313
314 - name: Delete global LACP configurations from the device
315 cisco.iosxr.iosxr_lacp:
316 state: deleted
317
318 #
319 #
320 # -----------------------
321 # Module Execution Result
322 # -----------------------
323 # "before": {
324 # "system": {
325 # "mac": {
326 # "address": "00c1.4c00.bd15"
327 # },
328 # "priority": 11
329 # }
330 # }
331 #
332 #
333 # "commands": [
334 # "no lacp system mac",
335 # "no lacp system priority"
336 # ]
337 #
338 #
339 # "after": {}
340 #
341 # ------------
342 # After state
343 # ------------
344 #
345 #
346 # RP/0/0/CPU0:iosxr01#sh run lacp
347 # Tue Jul 16 18:39:44.116 UTC
348 # % No such configuration item(s)
349 #
350 #
351
352
353 # Using parsed
354 # parsed.cfg
355 # ------------
356 #
357 # lacp system mac 00c1.4c00.bd15
358 # lacp system priority 11
359 # - name: Convert LACP config to argspec without connecting to the appliance
360 # cisco.iosxr.iosxr_lacp:
361 # running_config: "{{ lookup('file', './parsed.cfg') }}"
362 # state: parsed
363 # Task Output (redacted)
364 # -----------------------
365 # "parsed": {
366 # "system": {
367 # "mac": {
368 # "address": "00c1.4c00.bd15"
369 # },
370 # "priority": 11
371 # }
372 # }
373
374
375 # Using rendered
376 - name: Render platform specific commands from task input using rendered state
377 cisco.iosxr.iosxr_lacp:
378 config:
379 system:
380 priority: 11
381 mac:
382 address: 00c1.4c00.bd15
383 state: rendered
384 # Task Output (redacted)
385 # -----------------------
386 # "rendered": [
387 # "lacp system priority 11",
388 # "lacp system mac 00c1.4c00.bd15"
389 # ]
390
391
392 # Using gathered
393 # Before state:
394 # ------------
395 #
396 # RP/0/0/CPU0:an-iosxr-02#show running-config lacp
397 # lacp system mac 00c1.4c00.bd15
398 # lacp system priority 11
399 - name: Gather IOSXR LACP configuration
400 cisco.iosxr.iosxr_lacp:
401 config:
402 state: gathered
403 # Task Output (redacted)
404 # -----------------------
405 #
406 # "gathered": {
407 # "system": {
408 # "mac": {
409 # "address": "00c1.4c00.bd15"
410 # },
411 # "priority": 11
412 # }
413 # }
414 # After state:
415 # ------------
416 #
417 # RP/0/0/CPU0:an-iosxr-02#show running-config lacp
418 # lacp system mac 00c1.4c00.bd15
419 # lacp system priority
420
421
422
423 Return Values
424 -------------
425 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:
426
427 .. raw:: html
428
429 <table border=0 cellpadding=0 class="documentation-table">
430 <tr>
431 <th colspan="1">Key</th>
432 <th>Returned</th>
433 <th width="100%">Description</th>
434 </tr>
435 <tr>
436 <td colspan="1">
437 <div class="ansibleOptionAnchor" id="return-"></div>
438 <b>after</b>
439 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
440 <div style="font-size: small">
441 <span style="color: purple">dictionary</span>
442 </div>
443 </td>
444 <td>when changed</td>
445 <td>
446 <div>The configuration as structured data after module completion.</div>
447 <br/>
448 <div style="font-size: smaller"><b>Sample:</b></div>
449 <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
450 of the parameters above.</div>
451 </td>
452 </tr>
453 <tr>
454 <td colspan="1">
455 <div class="ansibleOptionAnchor" id="return-"></div>
456 <b>before</b>
457 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
458 <div style="font-size: small">
459 <span style="color: purple">dictionary</span>
460 </div>
461 </td>
462 <td>always</td>
463 <td>
464 <div>The configuration as structured data prior to module invocation.</div>
465 <br/>
466 <div style="font-size: smaller"><b>Sample:</b></div>
467 <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
468 of the parameters above.</div>
469 </td>
470 </tr>
471 <tr>
472 <td colspan="1">
473 <div class="ansibleOptionAnchor" id="return-"></div>
474 <b>commands</b>
475 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
476 <div style="font-size: small">
477 <span style="color: purple">list</span>
478 </div>
479 </td>
480 <td>always</td>
481 <td>
482 <div>The set of commands pushed to the remote device.</div>
483 <br/>
484 <div style="font-size: smaller"><b>Sample:</b></div>
485 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lacp system priority 10&#x27;, &#x27;lacp system mac 00c1.4c00.bd15&#x27;]</div>
486 </td>
487 </tr>
488 </table>
489 <br/><br/>
490
491
492 Status
493 ------
494
495
496 Authors
497 ~~~~~~~
498
499 - Nilashish Chakraborty (@nilashishc)
500 - Rohit Thakur (@rohitthakur2590)