Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_qos_wred_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_qos_wred_module:
2
3
4 ***************************************
5 dellemc.enterprise_sonic.sonic_qos_wred
6 ***************************************
7
8 **Manage QoS WRED profiles configuration on SONiC**
9
10
11 Version added: 2.5.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of QoS WRED profiles for 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">list</span>
43 / <span style="color: purple">elements=dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>QoS WRED profile configuration</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>ecn</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">string</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>all</li>
65 <li>none</li>
66 </ul>
67 </td>
68 <td>
69 <div>ECN setting for colored packets</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>green</b>
77 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
78 <div style="font-size: small">
79 <span style="color: purple">dictionary</span>
80 </div>
81 </td>
82 <td>
83 </td>
84 <td>
85 <div>WRED configuration for green packets</div>
86 </td>
87 </tr>
88 <tr>
89 <td class="elbow-placeholder"></td>
90 <td class="elbow-placeholder"></td>
91 <td colspan="1">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>drop_probability</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">integer</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Drop probablity percentage rate for green packets</div>
103 <div>Range 0-100</div>
104 </td>
105 </tr>
106 <tr>
107 <td class="elbow-placeholder"></td>
108 <td class="elbow-placeholder"></td>
109 <td colspan="1">
110 <div class="ansibleOptionAnchor" id="parameter-"></div>
111 <b>enable</b>
112 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
113 <div style="font-size: small">
114 <span style="color: purple">boolean</span>
115 </div>
116 </td>
117 <td>
118 <ul style="margin: 0; padding: 0"><b>Choices:</b>
119 <li>no</li>
120 <li>yes</li>
121 </ul>
122 </td>
123 <td>
124 <div>Enable or disable WRED for green packets</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_threshold</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>Maximum threshold set for green packets in bytes</div>
142 <div>Range 1000-12480000</div>
143 </td>
144 </tr>
145 <tr>
146 <td class="elbow-placeholder"></td>
147 <td class="elbow-placeholder"></td>
148 <td colspan="1">
149 <div class="ansibleOptionAnchor" id="parameter-"></div>
150 <b>min_threshold</b>
151 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
152 <div style="font-size: small">
153 <span style="color: purple">integer</span>
154 </div>
155 </td>
156 <td>
157 </td>
158 <td>
159 <div>Minimum threshold set for green packets in bytes</div>
160 <div>Range 1000-12480000</div>
161 </td>
162 </tr>
163
164 <tr>
165 <td class="elbow-placeholder"></td>
166 <td colspan="2">
167 <div class="ansibleOptionAnchor" id="parameter-"></div>
168 <b>name</b>
169 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
170 <div style="font-size: small">
171 <span style="color: purple">string</span>
172 / <span style="color: red">required</span>
173 </div>
174 </td>
175 <td>
176 </td>
177 <td>
178 <div>Name of the WRED profile</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>red</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">dictionary</span>
189 </div>
190 <div style="font-style: italic; font-size: small; color: darkgreen">added in 4.0.0</div>
191 </td>
192 <td>
193 </td>
194 <td>
195 <div>WRED configuration for red packets</div>
196 </td>
197 </tr>
198 <tr>
199 <td class="elbow-placeholder"></td>
200 <td class="elbow-placeholder"></td>
201 <td colspan="1">
202 <div class="ansibleOptionAnchor" id="parameter-"></div>
203 <b>drop_probability</b>
204 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
205 <div style="font-size: small">
206 <span style="color: purple">integer</span>
207 </div>
208 </td>
209 <td>
210 </td>
211 <td>
212 <div>Drop probablity percentage rate for red packets</div>
213 <div>Range 0-100</div>
214 </td>
215 </tr>
216 <tr>
217 <td class="elbow-placeholder"></td>
218 <td class="elbow-placeholder"></td>
219 <td colspan="1">
220 <div class="ansibleOptionAnchor" id="parameter-"></div>
221 <b>enable</b>
222 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
223 <div style="font-size: small">
224 <span style="color: purple">boolean</span>
225 </div>
226 </td>
227 <td>
228 <ul style="margin: 0; padding: 0"><b>Choices:</b>
229 <li>no</li>
230 <li>yes</li>
231 </ul>
232 </td>
233 <td>
234 <div>Enable or disable WRED for red packets</div>
235 </td>
236 </tr>
237 <tr>
238 <td class="elbow-placeholder"></td>
239 <td class="elbow-placeholder"></td>
240 <td colspan="1">
241 <div class="ansibleOptionAnchor" id="parameter-"></div>
242 <b>max_threshold</b>
243 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
244 <div style="font-size: small">
245 <span style="color: purple">integer</span>
246 </div>
247 </td>
248 <td>
249 </td>
250 <td>
251 <div>Maximum threshold set for red packets in bytes</div>
252 <div>Range 1000-12480000</div>
253 </td>
254 </tr>
255 <tr>
256 <td class="elbow-placeholder"></td>
257 <td class="elbow-placeholder"></td>
258 <td colspan="1">
259 <div class="ansibleOptionAnchor" id="parameter-"></div>
260 <b>min_threshold</b>
261 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
262 <div style="font-size: small">
263 <span style="color: purple">integer</span>
264 </div>
265 </td>
266 <td>
267 </td>
268 <td>
269 <div>Minimum threshold set for red packets in bytes</div>
270 <div>Range 1000-12480000</div>
271 </td>
272 </tr>
273
274 <tr>
275 <td class="elbow-placeholder"></td>
276 <td colspan="2">
277 <div class="ansibleOptionAnchor" id="parameter-"></div>
278 <b>yellow</b>
279 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
280 <div style="font-size: small">
281 <span style="color: purple">dictionary</span>
282 </div>
283 <div style="font-style: italic; font-size: small; color: darkgreen">added in 4.0.0</div>
284 </td>
285 <td>
286 </td>
287 <td>
288 <div>WRED configuration for yellow packets</div>
289 </td>
290 </tr>
291 <tr>
292 <td class="elbow-placeholder"></td>
293 <td class="elbow-placeholder"></td>
294 <td colspan="1">
295 <div class="ansibleOptionAnchor" id="parameter-"></div>
296 <b>drop_probability</b>
297 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
298 <div style="font-size: small">
299 <span style="color: purple">integer</span>
300 </div>
301 </td>
302 <td>
303 </td>
304 <td>
305 <div>Drop probablity percentage rate for yellow packets</div>
306 <div>Range 0-100</div>
307 </td>
308 </tr>
309 <tr>
310 <td class="elbow-placeholder"></td>
311 <td class="elbow-placeholder"></td>
312 <td colspan="1">
313 <div class="ansibleOptionAnchor" id="parameter-"></div>
314 <b>enable</b>
315 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
316 <div style="font-size: small">
317 <span style="color: purple">boolean</span>
318 </div>
319 </td>
320 <td>
321 <ul style="margin: 0; padding: 0"><b>Choices:</b>
322 <li>no</li>
323 <li>yes</li>
324 </ul>
325 </td>
326 <td>
327 <div>Enable or disable WRED for yellow packets</div>
328 </td>
329 </tr>
330 <tr>
331 <td class="elbow-placeholder"></td>
332 <td class="elbow-placeholder"></td>
333 <td colspan="1">
334 <div class="ansibleOptionAnchor" id="parameter-"></div>
335 <b>max_threshold</b>
336 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
337 <div style="font-size: small">
338 <span style="color: purple">integer</span>
339 </div>
340 </td>
341 <td>
342 </td>
343 <td>
344 <div>Maximum threshold set for yellow packets in bytes</div>
345 <div>Range 1000-12480000</div>
346 </td>
347 </tr>
348 <tr>
349 <td class="elbow-placeholder"></td>
350 <td class="elbow-placeholder"></td>
351 <td colspan="1">
352 <div class="ansibleOptionAnchor" id="parameter-"></div>
353 <b>min_threshold</b>
354 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
355 <div style="font-size: small">
356 <span style="color: purple">integer</span>
357 </div>
358 </td>
359 <td>
360 </td>
361 <td>
362 <div>Minimum threshold set for yellow packets in bytes</div>
363 <div>Range 1000-12480000</div>
364 </td>
365 </tr>
366
367
368 <tr>
369 <td colspan="3">
370 <div class="ansibleOptionAnchor" id="parameter-"></div>
371 <b>state</b>
372 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
373 <div style="font-size: small">
374 <span style="color: purple">string</span>
375 </div>
376 </td>
377 <td>
378 <ul style="margin: 0; padding: 0"><b>Choices:</b>
379 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
380 <li>deleted</li>
381 <li>overridden</li>
382 <li>replaced</li>
383 </ul>
384 </td>
385 <td>
386 <div>The state of the configuration after module completion.</div>
387 </td>
388 </tr>
389 </table>
390 <br/>
391
392
393 Notes
394 -----
395
396 .. note::
397 - Tested against Enterprise SONiC Distribution by Dell Technologies.
398 - Supports ``check_mode``.
399
400
401
402 Examples
403 --------
404
405 .. code-block:: yaml
406
407 # Using "merged" state
408 #
409 # Before state:
410 # -------------
411 #
412 # sonic# show qos wred-policy
413 # (No qos wred-policy configuration present)
414
415 - name: Merge QoS WRED policy configuration
416 dellemc.enterprise_sonic.sonic_qos_wred:
417 config:
418 - name: profile1
419 ecn: green
420 green:
421 enable: true
422 min_threshold: 1000
423 max_threshold: 5000
424 drop_probability: 25
425 red:
426 enable: true
427 min_threshold: 1000
428 max_threshold: 5000
429 drop_probability: 25
430 yellow:
431 enable: true
432 min_threshold: 1000
433 max_threshold: 5000
434 drop_probability: 25
435 state: merged
436
437 # After state:
438 # ------------
439 #
440 # sonic# show qos wred-policy
441 # ---------------------------------------------------
442 # Policy : profile1
443 # ---------------------------------------------------
444 # ecn : ecn_all
445 # green-min-threshold : 1 KBytes
446 # green-max-threshold : 5 KBytes
447 # green-drop-probability : 25
448 # red-min-threshold : 1 KBytes
449 # red-max-threshold : 5 KBytes
450 # red-drop-probability : 25
451 # yellow-min-threshold : 1 KBytes
452 # yellow-max-threshold : 5 KBytes
453 # yellow-drop-probability : 25
454 #
455 #
456 # Using "replaced" state
457 #
458 # Before state:
459 # -------------
460 #
461 # sonic# show qos wred-policy
462 # ---------------------------------------------------
463 # Policy : profile1
464 # ---------------------------------------------------
465 # ecn : ecn_all
466 # green-min-threshold : 1 KBytes
467 # green-max-threshold : 5 KBytes
468 # green-drop-probability : 25
469 # red-min-threshold : 1 KBytes
470 # red-max-threshold : 5 KBytes
471 # red-drop-probability : 25
472 # yellow-min-threshold : 1 KBytes
473 # yellow-max-threshold : 5 KBytes
474 # yellow-drop-probability : 25
475
476
477 - name: Replace QoS WRED policy configuration
478 dellemc.enterprise_sonic.sonic_qos_wred:
479 config:
480 - name: profile1
481 green:
482 drop_probability: 75
483 state: replaced
484
485 # After state:
486 # ------------
487 #
488 # sonic# show qos wred-policy
489 # ---------------------------------------------------
490 # Policy : profile1
491 # ---------------------------------------------------
492 # green-drop-probability : 75
493
494 # Using "overridden" state
495 #
496 # Before state:
497 # -------------
498 #
499 # sonic# show qos wred-policy
500 # ---------------------------------------------------
501 # Policy : profile1
502 # ---------------------------------------------------
503 # ecn : ecn_all
504 # green-min-threshold : 1 KBytes
505 # green-max-threshold : 5 KBytes
506 # green-drop-probability : 25
507 # red-min-threshold : 1 KBytes
508 # red-max-threshold : 5 KBytes
509 # red-drop-probability : 25
510 # yellow-min-threshold : 1 KBytes
511 # yellow-max-threshold : 5 KBytes
512 # yellow-drop-probability : 25
513
514 - name: Override QoS WRED policy configuration
515 dellemc.enterprise_sonic.sonic_qos_wred:
516 config:
517 - name: profile2
518 ecn: green
519 green:
520 enable: false
521 min_threshold: 3000
522 max_threshold: 9000
523 drop_probability: 75
524 state: overridden
525
526 # After state:
527 # ------------
528 #
529 # sonic# show qos wred-policy
530 # ---------------------------------------------------
531 # Policy : profile2
532 # ---------------------------------------------------
533 # ecn : ecn_all
534 # green-min-threshold : 3 KBytes
535 # green-max-threshold : 9 KBytes
536 # green-drop-probability : 75
537 # red-min-threshold : 1 KBytes
538 # red-max-threshold : 5 KBytes
539 # red-drop-probability : 25
540 # yellow-min-threshold : 1 KBytes
541 # yellow-max-threshold : 5 KBytes
542 # yellow-drop-probability : 25
543 #
544 #
545 # Using "deleted" state
546 #
547 # Before state:
548 # -------------
549 #
550 # sonic# show qos wred-policy
551 # ---------------------------------------------------
552 # Policy : profile1
553 # ---------------------------------------------------
554 # ecn : ecn_all
555 # green-min-threshold : 1 KBytes
556 # green-max-threshold : 5 KBytes
557 # green-drop-probability : 25
558 # red-min-threshold : 1 KBytes
559 # red-max-threshold : 5 KBytes
560 # red-drop-probability : 25
561 # yellow-min-threshold : 1 KBytes
562 # yellow-max-threshold : 5 KBytes
563 # yellow-drop-probability : 25
564 # ---------------------------------------------------
565 # Policy : profile2
566 # ---------------------------------------------------
567 # ecn : ecn_all
568 # green-min-threshold : 3 KBytes
569 # green-max-threshold : 9 KBytes
570 # green-drop-probability : 75
571 # red-min-threshold : 1 KBytes
572 # red-max-threshold : 5 KBytes
573 # red-drop-probability : 25
574 # yellow-min-threshold : 1 KBytes
575 # yellow-max-threshold : 5 KBytes
576 # yellow-drop-probability : 25
577
578 - name: Delete QoS WRED policy configuration
579 dellemc.enterprise_sonic.sonic_qos_wred:
580 config:
581 - name: profile1
582 - name: profile2
583 green:
584 enable: false
585 min_threshold: 3000
586 max_threshold: 9000
587 state: deleted
588
589 # After state:
590 # ------------
591 #
592 # sonic# show qos wred-policy
593 # ---------------------------------------------------
594 # Policy : profile2
595 # ---------------------------------------------------
596 # ecn : ecn_all
597 # green-drop-probability : 75
598 # red-min-threshold : 1 KBytes
599 # red-max-threshold : 5 KBytes
600 # red-drop-probability : 25
601 # yellow-min-threshold : 1 KBytes
602 # yellow-max-threshold : 5 KBytes
603 # yellow-drop-probability : 25
604
605
606
607 Return Values
608 -------------
609 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:
610
611 .. raw:: html
612
613 <table border=0 cellpadding=0 class="documentation-table">
614 <tr>
615 <th colspan="1">Key</th>
616 <th>Returned</th>
617 <th width="100%">Description</th>
618 </tr>
619 <tr>
620 <td colspan="1">
621 <div class="ansibleOptionAnchor" id="return-"></div>
622 <b>after</b>
623 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
624 <div style="font-size: small">
625 <span style="color: purple">list</span>
626 </div>
627 </td>
628 <td>when changed</td>
629 <td>
630 <div>The resulting configuration module invocation.</div>
631 <br/>
632 <div style="font-size: smaller"><b>Sample:</b></div>
633 <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>
634 </td>
635 </tr>
636 <tr>
637 <td colspan="1">
638 <div class="ansibleOptionAnchor" id="return-"></div>
639 <b>after_generated</b>
640 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
641 <div style="font-size: small">
642 <span style="color: purple">list</span>
643 </div>
644 </td>
645 <td>when <code>check_mode</code></td>
646 <td>
647 <div>The generated configuration module invocation.</div>
648 <br/>
649 <div style="font-size: smaller"><b>Sample:</b></div>
650 <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
651 as the parameters above.</div>
652 </td>
653 </tr>
654 <tr>
655 <td colspan="1">
656 <div class="ansibleOptionAnchor" id="return-"></div>
657 <b>before</b>
658 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
659 <div style="font-size: small">
660 <span style="color: purple">list</span>
661 </div>
662 </td>
663 <td>always</td>
664 <td>
665 <div>The configuration prior to the module invocation.</div>
666 <br/>
667 <div style="font-size: smaller"><b>Sample:</b></div>
668 <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>
669 </td>
670 </tr>
671 <tr>
672 <td colspan="1">
673 <div class="ansibleOptionAnchor" id="return-"></div>
674 <b>commands</b>
675 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
676 <div style="font-size: small">
677 <span style="color: purple">list</span>
678 </div>
679 </td>
680 <td>always</td>
681 <td>
682 <div>The set of commands pushed to the remote device.</div>
683 <br/>
684 <div style="font-size: smaller"><b>Sample:</b></div>
685 <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>
686 </td>
687 </tr>
688 </table>
689 <br/><br/>
690
691
692 Status
693 ------
694
695
696 Authors
697 ~~~~~~~
698
699 - S\. Talabi (@stalabi1)