Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_bgp_communities_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_bgp_communities_module:
2
3
4 **********************************************
5 dellemc.enterprise_sonic.sonic_bgp_communities
6 **********************************************
7
8 **Manage BGP community and its parameters**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of BGP bgp_communities for device running Enterprise SONiC Distribution by Dell Technologies.
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>A list of &#x27;bgp_communities&#x27; 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>local_as</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>Do not send outside local AS (well-known community); applicable for standard BGP community type.</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>match</b>
77 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
78 <div style="font-size: small">
79 <span style="color: purple">string</span>
80 </div>
81 </td>
82 <td>
83 <ul style="margin: 0; padding: 0"><b>Choices:</b>
84 <li>ALL</li>
85 <li>ANY</li>
86 </ul>
87 </td>
88 <td>
89 <div>Matches any/all of the members.</div>
90 <div>If unspecified, operational default value is <code>ANY</code>.</div>
91 </td>
92 </tr>
93 <tr>
94 <td class="elbow-placeholder"></td>
95 <td colspan="2">
96 <div class="ansibleOptionAnchor" id="parameter-"></div>
97 <b>members</b>
98 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
99 <div style="font-size: small">
100 <span style="color: purple">dictionary</span>
101 </div>
102 </td>
103 <td>
104 </td>
105 <td>
106 <div>Members of this BGP community list.</div>
107 </td>
108 </tr>
109 <tr>
110 <td class="elbow-placeholder"></td>
111 <td class="elbow-placeholder"></td>
112 <td colspan="1">
113 <div class="ansibleOptionAnchor" id="parameter-"></div>
114 <b>aann</b>
115 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
116 <div style="font-size: small">
117 <span style="color: purple">list</span>
118 / <span style="color: purple">elements=string</span>
119 </div>
120 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.0.0</div>
121 </td>
122 <td>
123 </td>
124 <td>
125 <div>Community number aa:nn format 0..65535:0..65535; applicable for standard BGP community type.</div>
126 </td>
127 </tr>
128 <tr>
129 <td class="elbow-placeholder"></td>
130 <td class="elbow-placeholder"></td>
131 <td colspan="1">
132 <div class="ansibleOptionAnchor" id="parameter-"></div>
133 <b>regex</b>
134 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
135 <div style="font-size: small">
136 <span style="color: purple">list</span>
137 / <span style="color: purple">elements=string</span>
138 </div>
139 </td>
140 <td>
141 </td>
142 <td>
143 <div>Members of this BGP community list. Regular expression string can be given here. Applicable for expanded BGP community type.</div>
144 </td>
145 </tr>
146
147 <tr>
148 <td class="elbow-placeholder"></td>
149 <td colspan="2">
150 <div class="ansibleOptionAnchor" id="parameter-"></div>
151 <b>name</b>
152 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
153 <div style="font-size: small">
154 <span style="color: purple">string</span>
155 / <span style="color: red">required</span>
156 </div>
157 </td>
158 <td>
159 </td>
160 <td>
161 <div>Name of the BGP community-list.</div>
162 </td>
163 </tr>
164 <tr>
165 <td class="elbow-placeholder"></td>
166 <td colspan="2">
167 <div class="ansibleOptionAnchor" id="parameter-"></div>
168 <b>no_advertise</b>
169 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
170 <div style="font-size: small">
171 <span style="color: purple">boolean</span>
172 </div>
173 </td>
174 <td>
175 <ul style="margin: 0; padding: 0"><b>Choices:</b>
176 <li>no</li>
177 <li>yes</li>
178 </ul>
179 </td>
180 <td>
181 <div>Do not advertise to any peer (well-known community); applicable for standard BGP community type.</div>
182 </td>
183 </tr>
184 <tr>
185 <td class="elbow-placeholder"></td>
186 <td colspan="2">
187 <div class="ansibleOptionAnchor" id="parameter-"></div>
188 <b>no_export</b>
189 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
190 <div style="font-size: small">
191 <span style="color: purple">boolean</span>
192 </div>
193 </td>
194 <td>
195 <ul style="margin: 0; padding: 0"><b>Choices:</b>
196 <li>no</li>
197 <li>yes</li>
198 </ul>
199 </td>
200 <td>
201 <div>Do not export to next AS (well-known community); applicable for standard BGP community type.</div>
202 </td>
203 </tr>
204 <tr>
205 <td class="elbow-placeholder"></td>
206 <td colspan="2">
207 <div class="ansibleOptionAnchor" id="parameter-"></div>
208 <b>no_peer</b>
209 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
210 <div style="font-size: small">
211 <span style="color: purple">boolean</span>
212 </div>
213 </td>
214 <td>
215 <ul style="margin: 0; padding: 0"><b>Choices:</b>
216 <li>no</li>
217 <li>yes</li>
218 </ul>
219 </td>
220 <td>
221 <div>Do not export to next AS (well-known community); applicable for standard BGP community type.</div>
222 </td>
223 </tr>
224 <tr>
225 <td class="elbow-placeholder"></td>
226 <td colspan="2">
227 <div class="ansibleOptionAnchor" id="parameter-"></div>
228 <b>permit</b>
229 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
230 <div style="font-size: small">
231 <span style="color: purple">boolean</span>
232 </div>
233 </td>
234 <td>
235 <ul style="margin: 0; padding: 0"><b>Choices:</b>
236 <li>no</li>
237 <li>yes</li>
238 </ul>
239 </td>
240 <td>
241 <div>Permits or denies this community.</div>
242 <div>If unspecified, operational default value is <code>False</code>.</div>
243 </td>
244 </tr>
245 <tr>
246 <td class="elbow-placeholder"></td>
247 <td colspan="2">
248 <div class="ansibleOptionAnchor" id="parameter-"></div>
249 <b>type</b>
250 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
251 <div style="font-size: small">
252 <span style="color: purple">string</span>
253 </div>
254 </td>
255 <td>
256 <ul style="margin: 0; padding: 0"><b>Choices:</b>
257 <li>standard</li>
258 <li>expanded</li>
259 </ul>
260 </td>
261 <td>
262 <div>Whether it is a standard or expanded community-list entry.</div>
263 <div>If unspecified, operational default value is <code>standard</code>.</div>
264 </td>
265 </tr>
266
267 <tr>
268 <td colspan="3">
269 <div class="ansibleOptionAnchor" id="parameter-"></div>
270 <b>state</b>
271 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
272 <div style="font-size: small">
273 <span style="color: purple">string</span>
274 </div>
275 </td>
276 <td>
277 <ul style="margin: 0; padding: 0"><b>Choices:</b>
278 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
279 <li>deleted</li>
280 <li>replaced</li>
281 <li>overridden</li>
282 </ul>
283 </td>
284 <td>
285 <div>The state of the configuration after module completion.</div>
286 </td>
287 </tr>
288 </table>
289 <br/>
290
291
292 Notes
293 -----
294
295 .. note::
296 - Tested against Enterprise SONiC Distribution by Dell Technologies.
297 - Supports ``check_mode``.
298
299
300
301 Examples
302 --------
303
304 .. code-block:: yaml
305
306 # Using "deleted" state
307
308 # Before state:
309 # -------------
310 #
311 # show bgp community-list
312 # Standard community list test: match: ANY
313 # permit local-as
314 # permit no-peer
315 # Expanded community list test1: match: ANY
316 # deny 101
317 # deny 302
318
319 - name: Delete a BGP community-list member
320 dellemc.enterprise_sonic.sonic_bgp_communities:
321 config:
322 - name: test1
323 type: expanded
324 permit: false
325 members:
326 regex:
327 - 302
328 state: deleted
329
330 # After state:
331 # ------------
332 #
333 # show bgp community-list
334 # Standard community list test: match: ANY
335 # permit local-as
336 # permit no-peer
337 # Expanded community list test1: match: ANY
338 # deny 101
339
340
341 # Using "deleted" state
342
343 # Before state:
344 # -------------
345 #
346 # show bgp community-list
347 # Standard community list test: match: ANY
348 # permit local-as
349 # permit no-peer
350 # Expanded community list test1: match: ANY
351 # deny 101
352 # deny 302
353
354 - name: Delete a single BGP community-list
355 dellemc.enterprise_sonic.sonic_bgp_communities:
356 config:
357 - name: test
358 type: standard
359 state: deleted
360
361 # After state:
362 # ------------
363 #
364 # show bgp community-list
365 # Expanded community list test1: match: ANY
366 # deny 101
367 # deny 302
368
369
370 # Using "deleted" state
371
372 # Before state:
373 # -------------
374 #
375 # show bgp community-list
376 # Standard community list test: match: ANY
377 # permit local-as
378 # permit no-peer
379 # Expanded community list test1: match: ANY
380 # deny 101
381 # deny 302
382
383 - name: Delete All BGP community-lists
384 dellemc.enterprise_sonic.sonic_bgp_communities:
385 config:
386 state: deleted
387
388 # After state:
389 # ------------
390 #
391 # show bgp community-list
392 #
393
394
395 # Using "deleted" state
396
397 # Before state:
398 # -------------
399 #
400 # show bgp community-list
401 # Standard community list test: match: ANY
402 # permit local-as
403 # permit no-peer
404 # Expanded community list test1: match: ANY
405 # deny 101
406 # deny 302
407
408 - name: Delete all members in a single BGP community-list
409 dellemc.enterprise_sonic.sonic_bgp_communities:
410 config:
411 - name: test1
412 type: expanded
413 members:
414 regex:
415 state: deleted
416
417 # After state:
418 # ------------
419 #
420 # show bgp community-list
421 # Standard community list test: match: ANY
422 # permit local-as
423 # permit no-peer
424
425
426 # Using "merged" state
427
428 # Before state:
429 # -------------
430 #
431 # show bgp community-list
432 # Expanded community list test1: match: ANY
433 # permit 101
434 # permit 302
435
436 - name: Add new BGP community-lists
437 dellemc.enterprise_sonic.sonic_bgp_communities:
438 config:
439 - name: test2
440 type: expanded
441 permit: true
442 members:
443 regex:
444 - 909
445 - name: test3
446 type: standard
447 permit: true
448 no_peer: true
449 members:
450 aann:
451 - 1000:10
452 state: merged
453
454 # After state:
455 # ------------
456 #
457 # show bgp community-list
458 # Expanded community list test1: match: ANY
459 # permit 101
460 # permit 302
461 # Expanded community list test2: match: ANY
462 # permit 909
463 # Standard community list test3: match: ANY
464 # permit 1000:10
465 # permit no-peer
466
467
468 # Using "replaced" state
469
470 # Before state:
471 # -------------
472 #
473 # show bgp community-list
474 # Standard community list test: match: ANY
475 # permit local-as
476 # permit no-peer
477 # Expanded community list test1: match: ANY
478 # deny 101
479 # deny 302
480
481 - name: Replacing a single BGP community-list
482 dellemc.enterprise_sonic.sonic_bgp_communities:
483 config:
484 - name: test
485 type: expanded
486 members:
487 regex:
488 - 301
489 - name: test2
490 type: standard
491 members:
492 aann:
493 - 1000:10
494 - 2000:20
495 - name: test3
496 type: standard
497 no_advertise: true
498 no_peer: true
499 permit: false
500 match: ALL
501 state: replaced
502
503 # After state:
504 # ------------
505 #
506 # show bgp community-list
507 # Expanded community list test: match: ANY
508 # deny 301
509 # Expanded community list test1: match: ANY
510 # deny 101
511 # deny 302
512 # Standard community list test2: match: ANY
513 # deny 1000:10
514 # deny 2000:10
515 # Standard community list test3: match: ALL
516 # deny no-advertise
517 # deny no-peer
518
519
520 # Using "overridden" state
521
522 # Before state:
523 # -------------
524 #
525 # show bgp community-list
526 # Standard community list test: match: ANY
527 # permit local-as
528 # permit no-peer
529 # Expanded community list test1: match: ANY
530 # deny 101
531 # deny 302
532
533 - name: Override entire BGP community-lists
534 dellemc.enterprise_sonic.sonic_bgp_communities:
535 config:
536 - name: test3
537 type: expanded
538 members:
539 regex:
540 - 301
541 state: overridden
542
543 # After state:
544 # ------------
545 #
546 # show bgp community-list
547 # Expanded community list test3: match: ANY
548 # deny 301
549 #
550
551
552
553 Return Values
554 -------------
555 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:
556
557 .. raw:: html
558
559 <table border=0 cellpadding=0 class="documentation-table">
560 <tr>
561 <th colspan="1">Key</th>
562 <th>Returned</th>
563 <th width="100%">Description</th>
564 </tr>
565 <tr>
566 <td colspan="1">
567 <div class="ansibleOptionAnchor" id="return-"></div>
568 <b>after</b>
569 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
570 <div style="font-size: small">
571 <span style="color: purple">list</span>
572 </div>
573 </td>
574 <td>when changed</td>
575 <td>
576 <div>The resulting configuration module invocation.</div>
577 <br/>
578 <div style="font-size: smaller"><b>Sample:</b></div>
579 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration that is returned is always in the same format as the parameters above.</div>
580 </td>
581 </tr>
582 <tr>
583 <td colspan="1">
584 <div class="ansibleOptionAnchor" id="return-"></div>
585 <b>before</b>
586 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
587 <div style="font-size: small">
588 <span style="color: purple">list</span>
589 </div>
590 </td>
591 <td>always</td>
592 <td>
593 <div>The configuration prior to the module invocation.</div>
594 <br/>
595 <div style="font-size: smaller"><b>Sample:</b></div>
596 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration that is returned is always in the same format as the parameters above.</div>
597 </td>
598 </tr>
599 <tr>
600 <td colspan="1">
601 <div class="ansibleOptionAnchor" id="return-"></div>
602 <b>commands</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">list</span>
606 </div>
607 </td>
608 <td>always</td>
609 <td>
610 <div>The set of commands that are pushed to the remote device.</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;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
614 </td>
615 </tr>
616 </table>
617 <br/><br/>
618
619
620 Status
621 ------
622
623
624 Authors
625 ~~~~~~~
626
627 - Kumaraguru Narayanan (@nkumaraguru)