Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_lldp_global_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_lldp_global_module:
2
3
4 ******************************************
5 dellemc.enterprise_sonic.sonic_lldp_global
6 ******************************************
7
8 **Manage Global LLDP configurations on SONiC**
9
10
11 Version added: 2.1.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of global LLDP parameters for use on LLDP enabled Layer 2 interfaces of devices running SONiC.
21 - It is intended for use in conjunction with LLDP Layer 2 interface configuration applied on participating interfaces.
22
23
24
25
26 Parameters
27 ----------
28
29 .. raw:: html
30
31 <table border=0 cellpadding=0 class="documentation-table">
32 <tr>
33 <th colspan="3">Parameter</th>
34 <th>Choices/<font color="blue">Defaults</font></th>
35 <th width="100%">Comments</th>
36 </tr>
37 <tr>
38 <td colspan="3">
39 <div class="ansibleOptionAnchor" id="parameter-"></div>
40 <b>config</b>
41 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
42 <div style="font-size: small">
43 <span style="color: purple">dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>The set of link layer discovery protocol global attribute configurations</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>enable</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">boolean</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>no</li>
65 <li>yes</li>
66 </ul>
67 </td>
68 <td>
69 <div>This argument is a boolean value to enable or disable LLDP.</div>
70 </td>
71 </tr>
72 <tr>
73 <td class="elbow-placeholder"></td>
74 <td colspan="2">
75 <div class="ansibleOptionAnchor" id="parameter-"></div>
76 <b>hello_time</b>
77 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
78 <div style="font-size: small">
79 <span style="color: purple">integer</span>
80 </div>
81 </td>
82 <td>
83 </td>
84 <td>
85 <div>Frequency at which LLDP advertisements are sent (in seconds).</div>
86 <div>The range is from 5 to 254 sec</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td colspan="2">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>mode</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">string</span>
97 </div>
98 </td>
99 <td>
100 <ul style="margin: 0; padding: 0"><b>Choices:</b>
101 <li>receive</li>
102 <li>transmit</li>
103 </ul>
104 </td>
105 <td>
106 <div>By default both transmit and receive of LLDP frames is enabled.</div>
107 <div>This command can be used to configure either in receive only or transmit only mode.</div>
108 </td>
109 </tr>
110 <tr>
111 <td class="elbow-placeholder"></td>
112 <td colspan="2">
113 <div class="ansibleOptionAnchor" id="parameter-"></div>
114 <b>multiplier</b>
115 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
116 <div style="font-size: small">
117 <span style="color: purple">integer</span>
118 </div>
119 </td>
120 <td>
121 </td>
122 <td>
123 <div>Multiplier value is used to determine the timeout interval (i.e. hello-time x multiplier value)</div>
124 <div>The range is from 1 to 10</div>
125 </td>
126 </tr>
127 <tr>
128 <td class="elbow-placeholder"></td>
129 <td colspan="2">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>system_description</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">string</span>
135 </div>
136 </td>
137 <td>
138 </td>
139 <td>
140 <div>Description of this system to be sent in LLDP advertisements.</div>
141 <div>When configured, this value is used in the advertisements instead of the default system description.</div>
142 </td>
143 </tr>
144 <tr>
145 <td class="elbow-placeholder"></td>
146 <td colspan="2">
147 <div class="ansibleOptionAnchor" id="parameter-"></div>
148 <b>system_name</b>
149 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
150 <div style="font-size: small">
151 <span style="color: purple">string</span>
152 </div>
153 </td>
154 <td>
155 </td>
156 <td>
157 <div>Specifying a descriptive system name using this command, user may find it easier to distinguish the device with LLDP.</div>
158 <div>By default, the host name is used.</div>
159 </td>
160 </tr>
161 <tr>
162 <td class="elbow-placeholder"></td>
163 <td colspan="2">
164 <div class="ansibleOptionAnchor" id="parameter-"></div>
165 <b>tlv_select</b>
166 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
167 <div style="font-size: small">
168 <span style="color: purple">dictionary</span>
169 </div>
170 </td>
171 <td>
172 </td>
173 <td>
174 <div>By default, management address and system capabilities TLV are advertised in LLDP frames.</div>
175 <div>This configuration option can be used to selectively suppress sending of these TLVs to the Peer.</div>
176 </td>
177 </tr>
178 <tr>
179 <td class="elbow-placeholder"></td>
180 <td class="elbow-placeholder"></td>
181 <td colspan="1">
182 <div class="ansibleOptionAnchor" id="parameter-"></div>
183 <b>management_address</b>
184 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
185 <div style="font-size: small">
186 <span style="color: purple">boolean</span>
187 </div>
188 </td>
189 <td>
190 <ul style="margin: 0; padding: 0"><b>Choices:</b>
191 <li>no</li>
192 <li>yes</li>
193 </ul>
194 </td>
195 <td>
196 <div>Enable or disable management address TLV.</div>
197 </td>
198 </tr>
199 <tr>
200 <td class="elbow-placeholder"></td>
201 <td class="elbow-placeholder"></td>
202 <td colspan="1">
203 <div class="ansibleOptionAnchor" id="parameter-"></div>
204 <b>system_capabilities</b>
205 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
206 <div style="font-size: small">
207 <span style="color: purple">boolean</span>
208 </div>
209 </td>
210 <td>
211 <ul style="margin: 0; padding: 0"><b>Choices:</b>
212 <li>no</li>
213 <li>yes</li>
214 </ul>
215 </td>
216 <td>
217 <div>Enable or disable system capabilities TLV.</div>
218 </td>
219 </tr>
220
221
222 <tr>
223 <td colspan="3">
224 <div class="ansibleOptionAnchor" id="parameter-"></div>
225 <b>state</b>
226 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
227 <div style="font-size: small">
228 <span style="color: purple">string</span>
229 </div>
230 </td>
231 <td>
232 <ul style="margin: 0; padding: 0"><b>Choices:</b>
233 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
234 <li>deleted</li>
235 </ul>
236 </td>
237 <td>
238 <div>The state specifies the type of configuration update to be performed on the device.</div>
239 <div>If the state is &quot;merged&quot;, merge specified attributes with existing configured attributes.</div>
240 <div>For &quot;deleted&quot;, delete the specified attributes from existing configuration.</div>
241 </td>
242 </tr>
243 </table>
244 <br/>
245
246
247 Notes
248 -----
249
250 .. note::
251 - Tested against Enterprise SONiC Distribution by Dell Technologies.
252 - Supports ``check_mode``.
253
254
255
256 Examples
257 --------
258
259 .. code-block:: yaml
260
261 # Using "deleted" state
262 #
263 # Before state:
264 # -------------
265 #
266 # sonic# show running-configuration
267 # !
268 # lldp receive
269 # lldp timer 200
270 # lldp multiplier 1
271 # lldp system-name 8999_System
272 # lldp system-description sonic_system
273 # !
274
275 - name: Delete LLDP configurations
276 dellemc.enterprise_sonic.sonic_lldp_global:
277 config:
278 hello_time: 200
279 system_description: sonic_system
280 mode: receive
281 multiplier: 1
282 state: deleted
283
284 # After state:
285 # ------------
286 # sonic# show running-configuration | grep lldp
287 # !
288 # lldp system-name 8999_System
289 # !
290 # sonic#
291
292
293 # Using "deleted" state
294 #
295 # Before state:
296 # -------------
297 #
298 # sonic# show running-configuration | grep lldp
299 # sonic#
300
301 - name: Delete default LLDP configurations
302 dellemc.enterprise_sonic.sonic_lldp_global:
303 config:
304 tlv_select:
305 system_capabilities: true
306 state: deleted
307
308 # After state:
309 # ------------
310 # sonic# show running-configuration
311 # !
312 # no lldp tlv-select system-capabilities
313 # !
314
315
316 # Using "deleted" state
317 #
318 # Before state:
319 # -------------
320 #
321 # sonic# show running-configuration | grep lldp
322 # !
323 # lldp receive
324 # lldp timer 200
325 # lldp multiplier 1
326 # lldp system-name 8999_System
327 # lldp system-description sonic_system
328 # !
329
330 - name: Delete all LLDP configuration
331 dellemc.enterprise_sonic.sonic_lldp_global:
332 config:
333 state: deleted
334
335 # After state: (No LLDP global configuration present.)
336 # ------------
337 # sonic# show running-configuration | grep lldp
338 # sonic#
339
340
341 # Using "merged" state
342 #
343 # Before state:
344 # -------------
345 #
346 # sonic# show running-configuration | grep lldp
347 # sonic#
348
349 - name: Modify LLDP configurations
350 dellemc.enterprise_sonic.sonic_lldp_global:
351 config:
352 enable: false
353 multiplier: 9
354 system_name: CR_sonic
355 hello_time: 18
356 mode: receive
357 system_description: Sonic_System
358 tlv_select:
359 management_address: true
360 system_capabilities: false
361 state: merged
362
363 # After state:
364 # ------------
365 # sonic# show running-configuration | grep lldp
366 # !
367 # no lldp enable
368 # no lldp tlv-select system_capabilities
369 # lldp receive
370 # lldp timer 18
371 # lldp multiplier 9
372 # lldp system-name CR_sonic
373 # lldp system-description Sonic_System
374 # !
375
376
377 # Using "merged" state
378 #
379 # Before state:
380 # -------------
381 #
382 # sonic# show running-configuration | grep lldp
383 # !
384 # lldp receive
385 # lldp timer 200
386 # lldp multiplier 1
387 # lldp system-name 8999_System
388 # lldp system-description sonic_system
389 # !
390
391 - name: Modify LLDP configurations
392 dellemc.enterprise_sonic.sonic_lldp_global:
393 config:
394 multiplier: 9
395 system_name: CR_sonic
396 state: merged
397
398 # After state:
399 # ------------
400 # sonic# show running-configuration | grep lldp
401 # !
402 # lldp receive
403 # lldp timer 200
404 # lldp multiplier 9
405 # lldp system-name CR_sonic
406 # lldp system-description sonic_system
407 # !
408
409
410
411 Return Values
412 -------------
413 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:
414
415 .. raw:: html
416
417 <table border=0 cellpadding=0 class="documentation-table">
418 <tr>
419 <th colspan="1">Key</th>
420 <th>Returned</th>
421 <th width="100%">Description</th>
422 </tr>
423 <tr>
424 <td colspan="1">
425 <div class="ansibleOptionAnchor" id="return-"></div>
426 <b>after</b>
427 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
428 <div style="font-size: small">
429 <span style="color: purple">list</span>
430 </div>
431 </td>
432 <td>when changed</td>
433 <td>
434 <div>The resulting configuration module invocation.</div>
435 <br/>
436 <div style="font-size: smaller"><b>Sample:</b></div>
437 <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>
438 </td>
439 </tr>
440 <tr>
441 <td colspan="1">
442 <div class="ansibleOptionAnchor" id="return-"></div>
443 <b>after_generated</b>
444 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
445 <div style="font-size: small">
446 <span style="color: purple">list</span>
447 </div>
448 </td>
449 <td>when <code>check_mode</code></td>
450 <td>
451 <div>The generated configuration module invocation.</div>
452 <br/>
453 <div style="font-size: smaller"><b>Sample:</b></div>
454 <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>
455 </td>
456 </tr>
457 <tr>
458 <td colspan="1">
459 <div class="ansibleOptionAnchor" id="return-"></div>
460 <b>before</b>
461 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
462 <div style="font-size: small">
463 <span style="color: purple">list</span>
464 </div>
465 </td>
466 <td>always</td>
467 <td>
468 <div>The configuration prior to the module invocation.</div>
469 <br/>
470 <div style="font-size: smaller"><b>Sample:</b></div>
471 <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>
472 </td>
473 </tr>
474 <tr>
475 <td colspan="1">
476 <div class="ansibleOptionAnchor" id="return-"></div>
477 <b>commands</b>
478 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
479 <div style="font-size: small">
480 <span style="color: purple">list</span>
481 </div>
482 </td>
483 <td>always</td>
484 <td>
485 <div>The set of commands pushed to the remote device.</div>
486 <br/>
487 <div style="font-size: smaller"><b>Sample:</b></div>
488 <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>
489 </td>
490 </tr>
491 </table>
492 <br/><br/>
493
494
495 Status
496 ------
497
498
499 Authors
500 ~~~~~~~
501
502 - Divya Balasubramanian(@divya-balasubramania)