Debian Codegraph @

ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_global_module.rst

raw
1 .. _cisco.nxos.nxos_lldp_global_module:
2
3
4 ***************************
5 cisco.nxos.nxos_lldp_global
6 ***************************
7
8 **LLDP 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 configures and manages the Link Layer Discovery Protocol(LLDP) attributes on NX-OS platforms.
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>A list of link layer discovery 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>holdtime</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">integer</span>
59 </div>
60 </td>
61 <td>
62 </td>
63 <td>
64 <div>Amount of time the receiving device should hold the information (in seconds)</div>
65 </td>
66 </tr>
67 <tr>
68 <td class="elbow-placeholder"></td>
69 <td colspan="3">
70 <div class="ansibleOptionAnchor" id="parameter-"></div>
71 <b>port_id</b>
72 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
73 <div style="font-size: small">
74 <span style="color: purple">integer</span>
75 </div>
76 </td>
77 <td>
78 <ul style="margin: 0; padding: 0"><b>Choices:</b>
79 <li>0</li>
80 <li>1</li>
81 </ul>
82 </td>
83 <td>
84 <div>This attribute defines if the interface names should be advertised in the long(0) or short(1) form.</div>
85 </td>
86 </tr>
87 <tr>
88 <td class="elbow-placeholder"></td>
89 <td colspan="3">
90 <div class="ansibleOptionAnchor" id="parameter-"></div>
91 <b>reinit</b>
92 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
93 <div style="font-size: small">
94 <span style="color: purple">integer</span>
95 </div>
96 </td>
97 <td>
98 </td>
99 <td>
100 <div>Amount of time to delay the initialization of LLDP on any interface (in seconds)</div>
101 </td>
102 </tr>
103 <tr>
104 <td class="elbow-placeholder"></td>
105 <td colspan="3">
106 <div class="ansibleOptionAnchor" id="parameter-"></div>
107 <b>timer</b>
108 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
109 <div style="font-size: small">
110 <span style="color: purple">integer</span>
111 </div>
112 </td>
113 <td>
114 </td>
115 <td>
116 <div>Frequency at which LLDP updates need to be transmitted (in seconds)</div>
117 </td>
118 </tr>
119 <tr>
120 <td class="elbow-placeholder"></td>
121 <td colspan="3">
122 <div class="ansibleOptionAnchor" id="parameter-"></div>
123 <b>tlv_select</b>
124 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
125 <div style="font-size: small">
126 <span style="color: purple">dictionary</span>
127 </div>
128 </td>
129 <td>
130 </td>
131 <td>
132 <div>This attribute can be used to specify the TLVs that need to be sent and received in the LLDP packets. By default, all TLVs are advertised</div>
133 </td>
134 </tr>
135 <tr>
136 <td class="elbow-placeholder"></td>
137 <td class="elbow-placeholder"></td>
138 <td colspan="2">
139 <div class="ansibleOptionAnchor" id="parameter-"></div>
140 <b>dcbxp</b>
141 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
142 <div style="font-size: small">
143 <span style="color: purple">boolean</span>
144 </div>
145 </td>
146 <td>
147 <ul style="margin: 0; padding: 0"><b>Choices:</b>
148 <li>no</li>
149 <li>yes</li>
150 </ul>
151 </td>
152 <td>
153 <div>Used to specify the Data Center Bridging Exchange Protocol TLV</div>
154 </td>
155 </tr>
156 <tr>
157 <td class="elbow-placeholder"></td>
158 <td class="elbow-placeholder"></td>
159 <td colspan="2">
160 <div class="ansibleOptionAnchor" id="parameter-"></div>
161 <b>management_address</b>
162 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
163 <div style="font-size: small">
164 <span style="color: purple">dictionary</span>
165 </div>
166 </td>
167 <td>
168 </td>
169 <td>
170 <div>Used to specify the management address in TLV messages</div>
171 </td>
172 </tr>
173 <tr>
174 <td class="elbow-placeholder"></td>
175 <td class="elbow-placeholder"></td>
176 <td class="elbow-placeholder"></td>
177 <td colspan="1">
178 <div class="ansibleOptionAnchor" id="parameter-"></div>
179 <b>v4</b>
180 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
181 <div style="font-size: small">
182 <span style="color: purple">boolean</span>
183 </div>
184 </td>
185 <td>
186 <ul style="margin: 0; padding: 0"><b>Choices:</b>
187 <li>no</li>
188 <li>yes</li>
189 </ul>
190 </td>
191 <td>
192 <div>Management address with TLV v4</div>
193 </td>
194 </tr>
195 <tr>
196 <td class="elbow-placeholder"></td>
197 <td class="elbow-placeholder"></td>
198 <td class="elbow-placeholder"></td>
199 <td colspan="1">
200 <div class="ansibleOptionAnchor" id="parameter-"></div>
201 <b>v6</b>
202 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
203 <div style="font-size: small">
204 <span style="color: purple">boolean</span>
205 </div>
206 </td>
207 <td>
208 <ul style="margin: 0; padding: 0"><b>Choices:</b>
209 <li>no</li>
210 <li>yes</li>
211 </ul>
212 </td>
213 <td>
214 <div>Management address with TLV v6</div>
215 </td>
216 </tr>
217
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>port</b>
224 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
225 <div style="font-size: small">
226 <span style="color: purple">dictionary</span>
227 </div>
228 </td>
229 <td>
230 </td>
231 <td>
232 <div>Used to manage port based attributes in TLV messages</div>
233 </td>
234 </tr>
235 <tr>
236 <td class="elbow-placeholder"></td>
237 <td class="elbow-placeholder"></td>
238 <td class="elbow-placeholder"></td>
239 <td colspan="1">
240 <div class="ansibleOptionAnchor" id="parameter-"></div>
241 <b>description</b>
242 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
243 <div style="font-size: small">
244 <span style="color: purple">boolean</span>
245 </div>
246 </td>
247 <td>
248 <ul style="margin: 0; padding: 0"><b>Choices:</b>
249 <li>no</li>
250 <li>yes</li>
251 </ul>
252 </td>
253 <td>
254 <div>Used to specify the port description TLV</div>
255 </td>
256 </tr>
257 <tr>
258 <td class="elbow-placeholder"></td>
259 <td class="elbow-placeholder"></td>
260 <td class="elbow-placeholder"></td>
261 <td colspan="1">
262 <div class="ansibleOptionAnchor" id="parameter-"></div>
263 <b>vlan</b>
264 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
265 <div style="font-size: small">
266 <span style="color: purple">boolean</span>
267 </div>
268 </td>
269 <td>
270 <ul style="margin: 0; padding: 0"><b>Choices:</b>
271 <li>no</li>
272 <li>yes</li>
273 </ul>
274 </td>
275 <td>
276 <div>Used to specify the port VLAN ID TLV</div>
277 </td>
278 </tr>
279
280 <tr>
281 <td class="elbow-placeholder"></td>
282 <td class="elbow-placeholder"></td>
283 <td colspan="2">
284 <div class="ansibleOptionAnchor" id="parameter-"></div>
285 <b>power_management</b>
286 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
287 <div style="font-size: small">
288 <span style="color: purple">boolean</span>
289 </div>
290 </td>
291 <td>
292 <ul style="margin: 0; padding: 0"><b>Choices:</b>
293 <li>no</li>
294 <li>yes</li>
295 </ul>
296 </td>
297 <td>
298 <div>Used to specify IEEE 802.3 DTE Power via MDI TLV</div>
299 </td>
300 </tr>
301 <tr>
302 <td class="elbow-placeholder"></td>
303 <td class="elbow-placeholder"></td>
304 <td colspan="2">
305 <div class="ansibleOptionAnchor" id="parameter-"></div>
306 <b>system</b>
307 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
308 <div style="font-size: small">
309 <span style="color: purple">dictionary</span>
310 </div>
311 </td>
312 <td>
313 </td>
314 <td>
315 <div>Used to manage system based attributes in TLV messages</div>
316 </td>
317 </tr>
318 <tr>
319 <td class="elbow-placeholder"></td>
320 <td class="elbow-placeholder"></td>
321 <td class="elbow-placeholder"></td>
322 <td colspan="1">
323 <div class="ansibleOptionAnchor" id="parameter-"></div>
324 <b>capabilities</b>
325 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
326 <div style="font-size: small">
327 <span style="color: purple">boolean</span>
328 </div>
329 </td>
330 <td>
331 <ul style="margin: 0; padding: 0"><b>Choices:</b>
332 <li>no</li>
333 <li>yes</li>
334 </ul>
335 </td>
336 <td>
337 <div>Used to specify the system capabilities TLV</div>
338 </td>
339 </tr>
340 <tr>
341 <td class="elbow-placeholder"></td>
342 <td class="elbow-placeholder"></td>
343 <td class="elbow-placeholder"></td>
344 <td colspan="1">
345 <div class="ansibleOptionAnchor" id="parameter-"></div>
346 <b>description</b>
347 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
348 <div style="font-size: small">
349 <span style="color: purple">boolean</span>
350 </div>
351 </td>
352 <td>
353 <ul style="margin: 0; padding: 0"><b>Choices:</b>
354 <li>no</li>
355 <li>yes</li>
356 </ul>
357 </td>
358 <td>
359 <div>Used to specify the system description TLV</div>
360 </td>
361 </tr>
362 <tr>
363 <td class="elbow-placeholder"></td>
364 <td class="elbow-placeholder"></td>
365 <td class="elbow-placeholder"></td>
366 <td colspan="1">
367 <div class="ansibleOptionAnchor" id="parameter-"></div>
368 <b>name</b>
369 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
370 <div style="font-size: small">
371 <span style="color: purple">boolean</span>
372 </div>
373 </td>
374 <td>
375 <ul style="margin: 0; padding: 0"><b>Choices:</b>
376 <li>no</li>
377 <li>yes</li>
378 </ul>
379 </td>
380 <td>
381 <div>Used to specify the system name TLV</div>
382 </td>
383 </tr>
384
385
386
387 <tr>
388 <td colspan="4">
389 <div class="ansibleOptionAnchor" id="parameter-"></div>
390 <b>running_config</b>
391 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
392 <div style="font-size: small">
393 <span style="color: purple">string</span>
394 </div>
395 </td>
396 <td>
397 </td>
398 <td>
399 <div>This option is used only with state <em>parsed</em>.</div>
400 <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | include lldp</b>.</div>
401 <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>
402 </td>
403 </tr>
404 <tr>
405 <td colspan="4">
406 <div class="ansibleOptionAnchor" id="parameter-"></div>
407 <b>state</b>
408 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
409 <div style="font-size: small">
410 <span style="color: purple">string</span>
411 </div>
412 </td>
413 <td>
414 <ul style="margin: 0; padding: 0"><b>Choices:</b>
415 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
416 <li>replaced</li>
417 <li>overridden</li>
418 <li>deleted</li>
419 <li>gathered</li>
420 <li>rendered</li>
421 <li>parsed</li>
422 </ul>
423 </td>
424 <td>
425 <div>The state of the configuration after module completion.</div>
426 <div>States <code>replaced</code> and <code>overridden</code> have the same behaviour for this module.</div>
427 </td>
428 </tr>
429 </table>
430 <br/>
431
432
433 Notes
434 -----
435
436 .. note::
437 - Tested against NxOS 7.3.(0)D1(1) on VIRL
438 - Unsupported for Cisco MDS
439 - The LLDP feature needs to be enabled before using this module
440
441
442
443 Examples
444 --------
445
446 .. code-block:: yaml
447
448 # Using merged
449 # Before state:
450 # -------------
451 #
452 # user(config)# show running-config | include lldp
453 # feature lldp
454
455 - name: Merge provided configuration with device configuration
456 cisco.nxos.nxos_lldp_global:
457 config:
458 timer: 35
459 holdtime: 100
460 state: merged
461
462 # After state:
463 # ------------
464 #
465 # user(config)# show running-config | include lldp
466 # feature lldp
467 # lldp timer 35
468 # lldp holdtime 100
469
470
471 # Using replaced
472 # Before state:
473 # -------------
474 #
475 # user(config)# show running-config | include lldp
476 # feature lldp
477 # lldp holdtime 100
478 # lldp reinit 5
479 # lldp timer 35
480
481 - name: Replace device configuration of specific LLDP attributes with provided configuration
482 cisco.nxos.nxos_lldp_global:
483 config:
484 timer: 40
485 tlv_select:
486 system:
487 description: true
488 name: false
489 management_address:
490 v4: true
491 state: replaced
492
493 # After state:
494 # ------------
495 #
496 # user(config)# show running-config | include lldp
497 # feature lldp
498 # lldp timer 40
499 # no lldp tlv-select system-name
500
501
502 # Using deleted
503 # Before state:
504 # -------------
505 #
506 # user(config)# show running-config | include lldp
507 # feature lldp
508 # lldp holdtime 5
509 # lldp reinit 3
510
511 - name: Delete LLDP configuration (this will by default remove all lldp configuration)
512 cisco.nxos.nxos_lldp_global:
513 state: deleted
514
515 # After state:
516 # ------------
517 #
518 # user(config)# show running-config | include lldp
519 # feature lldp
520
521 # Using rendered
522
523 - name: Use rendered state to convert task input to device specific commands
524 cisco.nxos.nxos_lldp_global:
525 config:
526 holdtime: 130
527 port_id: 1
528 reinit: 5
529 tlv_select:
530 dcbxp: true
531 power_management: true
532 state: rendered
533
534 # Task Output (redacted)
535 # -----------------------
536
537 # rendered:
538 # - "lldp tlv-select dcbxp"
539 # - "lldp tlv-select power-management"
540 # - "lldp portid-subtype 1"
541 # - "lldp reinit 5"
542 # - "lldp holdtime 130"
543
544 # Using parsed
545
546 # parsed.cfg
547 # ------------
548 # lldp holdtime 131
549 # lldp reinit 7
550 # no lldp tlv-select system-name
551 # no lldp tlv-select system-description
552
553 # Task output (redacted)
554 # -----------------------
555
556 # parsed:
557 # holdtime: 131
558 # reinit: 7
559 # tlv_select:
560 # system:
561 # description: false
562 # name: false
563
564 # Using gathered
565
566 # Existing device config state
567 # -------------------------------
568 # feature lldp
569 # lldp holdtime 129
570 # lldp reinit 5
571 # lldp timer 35
572 # no lldp tlv-select system-name
573
574 # Task output (redacted)
575 # -----------------------
576
577 # gathered:
578 # reinit: 5
579 # timer: 35
580 # tlv_select:
581 # system:
582 # name: False
583 # holdtime: 129
584
585
586
587 Return Values
588 -------------
589 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:
590
591 .. raw:: html
592
593 <table border=0 cellpadding=0 class="documentation-table">
594 <tr>
595 <th colspan="1">Key</th>
596 <th>Returned</th>
597 <th width="100%">Description</th>
598 </tr>
599 <tr>
600 <td colspan="1">
601 <div class="ansibleOptionAnchor" id="return-"></div>
602 <b>after</b>
603 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
604 <div style="font-size: small">
605 <span style="color: purple">dictionary</span>
606 </div>
607 </td>
608 <td>when changed</td>
609 <td>
610 <div>The configuration as structured data after module completion.</div>
611 <br/>
612 <div style="font-size: smaller"><b>Sample:</b></div>
613 <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
614 of the parameters above.</div>
615 </td>
616 </tr>
617 <tr>
618 <td colspan="1">
619 <div class="ansibleOptionAnchor" id="return-"></div>
620 <b>before</b>
621 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
622 <div style="font-size: small">
623 <span style="color: purple">dictionary</span>
624 </div>
625 </td>
626 <td>always</td>
627 <td>
628 <div>The configuration as structured data prior to module invocation.</div>
629 <br/>
630 <div style="font-size: smaller"><b>Sample:</b></div>
631 <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
632 of the parameters above.</div>
633 </td>
634 </tr>
635 <tr>
636 <td colspan="1">
637 <div class="ansibleOptionAnchor" id="return-"></div>
638 <b>commands</b>
639 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
640 <div style="font-size: small">
641 <span style="color: purple">list</span>
642 </div>
643 </td>
644 <td>always</td>
645 <td>
646 <div>The set of commands pushed to the remote device.</div>
647 <br/>
648 <div style="font-size: smaller"><b>Sample:</b></div>
649 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lldp holdtime 125&#x27;, &#x27;lldp reinit 4&#x27;, &#x27;no lldp tlv-select system-name&#x27;]</div>
650 </td>
651 </tr>
652 </table>
653 <br/><br/>
654
655
656 Status
657 ------
658
659
660 Authors
661 ~~~~~~~
662
663 - Adharsh Srivats Rangarajan (@adharshsrivatsr)