Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_dcbx_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_dcbx_module:
2
3
4 ***********************************
5 dellemc.enterprise_sonic.sonic_dcbx
6 ***********************************
7
8 **Manage DCBx configurations on SONiC**
9
10
11 Version added: 3.1.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of DCBx parameters in devices running SONiC.
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">dictionary</span>
43 </div>
44 </td>
45 <td>
46 </td>
47 <td>
48 <div>The set of DCBx attribute configurations</div>
49 </td>
50 </tr>
51 <tr>
52 <td class="elbow-placeholder"></td>
53 <td colspan="2">
54 <div class="ansibleOptionAnchor" id="parameter-"></div>
55 <b>global</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>Global DCBx configuration</div>
65 </td>
66 </tr>
67 <tr>
68 <td class="elbow-placeholder"></td>
69 <td class="elbow-placeholder"></td>
70 <td colspan="1">
71 <div class="ansibleOptionAnchor" id="parameter-"></div>
72 <b>enabled</b>
73 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
74 <div style="font-size: small">
75 <span style="color: purple">boolean</span>
76 </div>
77 </td>
78 <td>
79 <ul style="margin: 0; padding: 0"><b>Choices:</b>
80 <li>no</li>
81 <li>yes</li>
82 </ul>
83 </td>
84 <td>
85 <div>This argument is a boolean value to enable or disable DCBx.</div>
86 <div>It has a default value of False in SONiC and has an operational</div>
87 <div>default value of False for the enterproise_sonic Ansible collection</div>
88 </td>
89 </tr>
90
91 <tr>
92 <td class="elbow-placeholder"></td>
93 <td colspan="2">
94 <div class="ansibleOptionAnchor" id="parameter-"></div>
95 <b>interfaces</b>
96 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
97 <div style="font-size: small">
98 <span style="color: purple">list</span>
99 / <span style="color: purple">elements=dictionary</span>
100 </div>
101 </td>
102 <td>
103 </td>
104 <td>
105 <div>Interfaces DCBx configuration</div>
106 </td>
107 </tr>
108 <tr>
109 <td class="elbow-placeholder"></td>
110 <td class="elbow-placeholder"></td>
111 <td colspan="1">
112 <div class="ansibleOptionAnchor" id="parameter-"></div>
113 <b>enabled</b>
114 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
115 <div style="font-size: small">
116 <span style="color: purple">boolean</span>
117 </div>
118 </td>
119 <td>
120 <ul style="margin: 0; padding: 0"><b>Choices:</b>
121 <li>no</li>
122 <li>yes</li>
123 </ul>
124 </td>
125 <td>
126 <div>This argument is a boolean value to enable or disable DCBx.</div>
127 <div>It has a default value of True in SONiC and has an operational</div>
128 <div>default value of True for the enterprise_sonic Ansible collection</div>
129 <div>This command is supported only on physical interfaces and not on logical interfaces.</div>
130 </td>
131 </tr>
132 <tr>
133 <td class="elbow-placeholder"></td>
134 <td class="elbow-placeholder"></td>
135 <td colspan="1">
136 <div class="ansibleOptionAnchor" id="parameter-"></div>
137 <b>ets_configuration_tlv_enabled</b>
138 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
139 <div style="font-size: small">
140 <span style="color: purple">boolean</span>
141 </div>
142 </td>
143 <td>
144 <ul style="margin: 0; padding: 0"><b>Choices:</b>
145 <li>no</li>
146 <li>yes</li>
147 </ul>
148 </td>
149 <td>
150 <div>This command can be used to select whether to advertise and receive ETS configuration TLV.</div>
151 <div>It has a default value of True in SONiC and has an operational</div>
152 <div>default value of True for the enterproise_sonic Ansible collection</div>
153 </td>
154 </tr>
155 <tr>
156 <td class="elbow-placeholder"></td>
157 <td class="elbow-placeholder"></td>
158 <td colspan="1">
159 <div class="ansibleOptionAnchor" id="parameter-"></div>
160 <b>ets_recommendation_tlv_enabled</b>
161 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
162 <div style="font-size: small">
163 <span style="color: purple">boolean</span>
164 </div>
165 </td>
166 <td>
167 <ul style="margin: 0; padding: 0"><b>Choices:</b>
168 <li>no</li>
169 <li>yes</li>
170 </ul>
171 </td>
172 <td>
173 <div>This command can be used to select whether to advertise and receive ETS recommendation TLV.</div>
174 <div>It has a default value of True in SONiC and has an operational</div>
175 <div>default value of True for the enterproise_sonic Ansible collection</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>name</b>
184 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
185 <div style="font-size: small">
186 <span style="color: purple">string</span>
187 / <span style="color: red">required</span>
188 </div>
189 </td>
190 <td>
191 </td>
192 <td>
193 <div>Interface name for which DCBx needs to be configured.</div>
194 <div>This must be a physical (Ethernet) interface.</div>
195 </td>
196 </tr>
197 <tr>
198 <td class="elbow-placeholder"></td>
199 <td class="elbow-placeholder"></td>
200 <td colspan="1">
201 <div class="ansibleOptionAnchor" id="parameter-"></div>
202 <b>pfc_tlv_enabled</b>
203 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
204 <div style="font-size: small">
205 <span style="color: purple">boolean</span>
206 </div>
207 </td>
208 <td>
209 <ul style="margin: 0; padding: 0"><b>Choices:</b>
210 <li>no</li>
211 <li>yes</li>
212 </ul>
213 </td>
214 <td>
215 <div>This command can be used to select whether to advertise and receive PFC TLV.</div>
216 <div>It has a default value of True in SONiC and has an operational</div>
217 <div>default value of True for the enterproise_sonic Ansible collection</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 <li>replaced</li>
236 <li>overridden</li>
237 </ul>
238 </td>
239 <td>
240 <div>The state specifies the type of configuration update to be performed on the device.</div>
241 <div>If the state is &quot;merged&quot;, merge specified attributes with existing configured attributes.</div>
242 <div>For &quot;deleted&quot;, delete the specified attributes from existing configuration.</div>
243 </td>
244 </tr>
245 </table>
246 <br/>
247
248
249
250
251 Examples
252 --------
253
254 .. code-block:: yaml
255
256 # Using "merged" state for DCBx interface configuration
257 #
258 # Before State:
259 # -------------
260 #
261 # sonic# show running-configuration interface Ethernet0
262 # !
263 # interface Ethernet0
264 # mtu 9100
265 # speed 25000
266 # unreliable-los auto
267 # no shutdown
268
269 - name: Modify DCBx Interface configurations
270 dellemc.enterprise_sonic.sonic_dcbx:
271 config:
272 -interfaces:
273 - name: Ethernet0
274 enabled: false
275 pfc_tlv_enabled: false
276 ets_configuration_tlv_enabled: false
277 ets_recommendation_tlv_enabled: false
278 state: merged
279
280 # After State:
281 # ------------
282 #
283 # sonic# show running-configuration interface Ethernet0
284 # !
285 # interface Ethernet0
286 # mtu 9100
287 # speed 25000
288 # unreliable-los auto
289 # no shutdown
290 # no dcbx enable
291 # no dcbx tlv-select pfc
292 # no dcbx tlv-select ets-conf
293 # no dcbx tlv-select ets-reco
294
295 # Using "merged" state for DCBx global configuration
296 #
297 # Before State:
298 # -------------
299 #
300 # sonic# show running-configuration | grep dcbx
301 # sonic#
302
303 - name: Modify DCBX configurations
304 dellemc.enterprise_sonic.sonic_dcbx:
305 config:
306 global:
307 enabled: true
308 state: merged
309
310 # After State:
311 # ------------
312 #
313 # sonic# show running-configuration | grep dcbx
314 # !
315 # dcbx enable
316 # !
317
318 # Using "merged" state for DCBx interface configuration
319 #
320 # Before State:
321 # -------------
322 # sonic# show running-configuration interface Ethernet 0
323 # !
324 # interface Ethernet0
325 # mtu 9100
326 # speed 25000
327 # unreliable-los auto
328 # no shutdown
329 # no dcbx enable
330 # no dcbx tlv-select pfc
331 # no dcbx tlv-select ets-conf
332 # no dcbx tlv-select ets-reco
333
334
335 - name: Modify DCBx Interface configurations
336 dellemc.enterprise_sonic.sonic_dcbx:
337 config:
338 interfaces:
339 - name: Ethernet0
340 enabled: true
341 pfc_tlv_enabled: true
342 ets_configuration_tlv_enabled: true
343 ets_recommendation_tlv_enabled: true
344 state: merged
345
346 # After State:
347 # ------------
348 #
349 # sonic# show running-configuration interface Ethernet0
350 # !
351 # interface Ethernet0
352 # mtu 9100
353 # speed 25000
354 # unreliable-los auto
355 # no shutdown
356
357 # Using "deleted" state for DCBx interface configuration
358 #
359 # Before State:
360 # -------------
361 #
362 # sonic# show running-configuration interface Ethernet 0
363 # !
364 # interface Ethernet0
365 # mtu 9100
366 # speed 25000
367 # unreliable-los auto
368 # no shutdown
369 # no dcbx enable
370 # no dcbx tlv-select pfc
371 # no dcbx tlv-select ets-conf
372 # no dcbx tlv-select ets-reco
373
374
375 - name: Delete and set default DCBx Interface configurations
376 dellemc.enterprise_sonic.sonic_dcbx:
377 config:
378 interfaces:
379 - name: Ethernet0
380 enabled: false
381 pfc_tlv_enabled: false
382 ets_configuration_tlv_enabled: false
383 ets_recommendation_tlv_enabled: false
384 state: deleted
385
386 # After State:
387 # ------------
388 #
389 # sonic# show running-configuration interface Ethernet0
390 # !
391 # interface Ethernet0
392 # mtu 9100
393 # speed 25000
394 # unreliable-los auto
395 # no shutdown
396
397 # Using "replaced" state for DCBx interface configuration
398 #
399 # Before State:
400 # -------------
401 #
402 # sonic# show running-configuration interface Ethernet0
403 # !
404 # interface Ethernet0
405 # mtu 9100
406 # speed 25000
407 # unreliable-los auto
408 # no shutdown
409 # no dcbx tlv-select pfc
410 # no dcbx tlv-select ets-conf
411 # no dcbx tlv-select ets-reco
412 #
413 # sonic# show running-configuration interface Ethernet4
414 # !
415 # interface Ethernet4
416 # mtu 9100
417 # speed 25000
418 # unreliable-los auto
419 # no shutdown
420 # no dcbx enable
421 # no dcbx tlv-select pfc
422
423 - name: Modify DCBx Interface configurations
424 dellemc.enterprise_sonic.sonic_dcbx:
425 config:
426 -interfaces:
427 - name: Ethernet0
428 enabled: false
429 state: replaced
430
431 # After State:
432 # ------------
433 #
434 # sonic# show running-configuration interface Ethernet0
435 # !
436 # interface Ethernet0
437 # mtu 9100
438 # speed 25000
439 # unreliable-los auto
440 # no shutdown
441 # no dcbx enable
442 #
443 # sonic# show running-configuration interface Ethernet4
444 # !
445 # interface Ethernet4
446 # mtu 9100
447 # speed 25000
448 # unreliable-los auto
449 # no shutdown
450 # no dcbx enable
451 # no dcbx tlv-select pfc
452
453 # Using "overridden" state for DCBx interface configuration
454 #
455 # Before State:
456 # -------------
457 # sonic# show running-configuration interface Ethernet0
458 # !
459 # interface Ethernet0
460 # mtu 9100
461 # speed 25000
462 # unreliable-los auto
463 # no shutdown
464 # no dcbx tlv-select pfc
465 # no dcbx tlv-select ets-conf
466 # no dcbx tlv-select ets-reco
467 #
468 # sonic# show running-configuration interface Ethernet4
469 # !
470 # interface Ethernet4
471 # mtu 9100
472 # speed 25000
473 # unreliable-los auto
474 # no shutdown
475 # no dcbx enable
476 # no dcbx tlv-select pfc
477 #
478 # sonic# show running-configuration interface Ethernet8
479 # !
480 # interface Ethernet8
481 # mtu 9100
482 # speed 25000
483 # unreliable-los auto
484 # no shutdown
485 # no dcbx enable
486 # no dcbx tlv-select pfc
487 # no dcbx tlv-select ets-conf
488 # no dcbx tlv-select ets-reco
489 #
490 # sonic# show running-configuration interface Ethernet12
491 # !
492 # interface Ethernet12
493 # mtu 9100
494 # speed 25000
495 # unreliable-los auto
496 # no shutdown
497
498 - name: Modify DCBx Interface configurations
499 dellemc.enterprise_sonic.sonic_dcbx:
500 config:
501 -interfaces:
502 - name: Ethernet0
503 enabled: false
504 state: overridden
505
506 # After State:
507 # ------------
508 # sonic# show running-configuration interface Ethernet0
509 # !
510 # interface Ethernet0
511 # mtu 9100
512 # speed 25000
513 # unreliable-los auto
514 # no shutdown
515 # no dcbx enable
516 #
517 # sonic# show running-configuration interface Ethernet4
518 # !
519 # interface Ethernet4
520 # mtu 9100
521 # speed 25000
522 # unreliable-los auto
523 # no shutdown
524 #
525 # sonic# show running-configuration interface Ethernet8
526 # !
527 # interface Ethernet8
528 # mtu 9100
529 # speed 25000
530 # unreliable-los auto
531 # no shutdown
532 #
533 # sonic# show running-configuration interface Ethernet12
534 # !
535 # interface Ethernet12
536 # mtu 9100
537 # speed 25000
538 # unreliable-los auto
539 # no shutdown
540
541 # Using "deleted" state for DCBx global configuration
542 #
543 # Before State:
544 # -------------
545 #
546 # sonic# show running-configuration | grep dcbx
547 # !
548 # dcbx enable
549 # !
550
551 - name: Delete DCBX mode configuration
552 dellemc.enterprise_sonic.sonic_dcbx:
553 config:
554 global:
555 enabled: true
556 state: deleted
557
558 # After State:
559 # ------------
560 #
561 # sonic# show running-configuration | grep dcbx
562 # sonic#
563
564
565
566 Return Values
567 -------------
568 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:
569
570 .. raw:: html
571
572 <table border=0 cellpadding=0 class="documentation-table">
573 <tr>
574 <th colspan="1">Key</th>
575 <th>Returned</th>
576 <th width="100%">Description</th>
577 </tr>
578 <tr>
579 <td colspan="1">
580 <div class="ansibleOptionAnchor" id="return-"></div>
581 <b>after</b>
582 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
583 <div style="font-size: small">
584 <span style="color: purple">list</span>
585 </div>
586 </td>
587 <td>when changed, if <code>check_mode</code> is not set</td>
588 <td>
589 <div>The resulting configuration from module invocation.</div>
590 <br/>
591 <div style="font-size: smaller"><b>Sample:</b></div>
592 <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>
593 </td>
594 </tr>
595 <tr>
596 <td colspan="1">
597 <div class="ansibleOptionAnchor" id="return-"></div>
598 <b>after_generated</b>
599 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
600 <div style="font-size: small">
601 <span style="color: purple">list</span>
602 </div>
603 </td>
604 <td>when <code>check_mode</code></td>
605 <td>
606 <div>The generated (simulated) configuration from module invocation.</div>
607 <br/>
608 <div style="font-size: smaller"><b>Sample:</b></div>
609 <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
610 as the parameters above.</div>
611 </td>
612 </tr>
613 <tr>
614 <td colspan="1">
615 <div class="ansibleOptionAnchor" id="return-"></div>
616 <b>before</b>
617 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
618 <div style="font-size: small">
619 <span style="color: purple">list</span>
620 </div>
621 </td>
622 <td>always</td>
623 <td>
624 <div>The configuration prior to the module invocation.</div>
625 <br/>
626 <div style="font-size: smaller"><b>Sample:</b></div>
627 <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>
628 </td>
629 </tr>
630 <tr>
631 <td colspan="1">
632 <div class="ansibleOptionAnchor" id="return-"></div>
633 <b>commands</b>
634 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
635 <div style="font-size: small">
636 <span style="color: purple">list</span>
637 </div>
638 </td>
639 <td>always</td>
640 <td>
641 <div>The set of commands pushed to the remote device.</div>
642 <br/>
643 <div style="font-size: smaller"><b>Sample:</b></div>
644 <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>
645 </td>
646 </tr>
647 </table>
648 <br/><br/>
649
650
651 Status
652 ------
653
654
655 Authors
656 ~~~~~~~
657
658 - Bing Sun(@bsun-sudo), Haemanthi Sree KR (@haemanthisree)