Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_bgp_ext_communities_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_bgp_ext_communities_module:
2
3
4 **************************************************
5 dellemc.enterprise_sonic.sonic_bgp_ext_communities
6 **************************************************
7
8 **Manage BGP extended community-list 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 extcommunity-list for devices 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_extcommunity_list&#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>match</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><div style="color: blue"><b>any</b>&nbsp;&larr;</div></li>
66 </ul>
67 </td>
68 <td>
69 <div>Matches any/all of the the members.</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>members</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>Members of this BGP ext community list.</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>regex</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">list</span>
97 / <span style="color: purple">elements=string</span>
98 </div>
99 </td>
100 <td>
101 </td>
102 <td>
103 <div>Members of this BGP ext community list. Regular expression string can be given here. Applicable for expanded ext BGP community type.</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>route_origin</b>
112 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
113 <div style="font-size: small">
114 <span style="color: purple">list</span>
115 / <span style="color: purple">elements=string</span>
116 </div>
117 </td>
118 <td>
119 </td>
120 <td>
121 <div>Members of this BGP ext community list. The format of route_origin is in either 0..65535:0..65535 or A.B.C.D:[1..65535] format.</div>
122 </td>
123 </tr>
124 <tr>
125 <td class="elbow-placeholder"></td>
126 <td class="elbow-placeholder"></td>
127 <td colspan="1">
128 <div class="ansibleOptionAnchor" id="parameter-"></div>
129 <b>route_target</b>
130 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
131 <div style="font-size: small">
132 <span style="color: purple">list</span>
133 / <span style="color: purple">elements=string</span>
134 </div>
135 </td>
136 <td>
137 </td>
138 <td>
139 <div>Members of this BGP ext community list. The format of route_target is in either 0..65535:0..65535 or A.B.C.D:[1..65535] format.</div>
140 </td>
141 </tr>
142
143 <tr>
144 <td class="elbow-placeholder"></td>
145 <td colspan="2">
146 <div class="ansibleOptionAnchor" id="parameter-"></div>
147 <b>name</b>
148 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
149 <div style="font-size: small">
150 <span style="color: purple">string</span>
151 / <span style="color: red">required</span>
152 </div>
153 </td>
154 <td>
155 </td>
156 <td>
157 <div>Name of the BGP ext communitylist.</div>
158 </td>
159 </tr>
160 <tr>
161 <td class="elbow-placeholder"></td>
162 <td colspan="2">
163 <div class="ansibleOptionAnchor" id="parameter-"></div>
164 <b>permit</b>
165 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
166 <div style="font-size: small">
167 <span style="color: purple">boolean</span>
168 </div>
169 </td>
170 <td>
171 <ul style="margin: 0; padding: 0"><b>Choices:</b>
172 <li>no</li>
173 <li>yes</li>
174 </ul>
175 </td>
176 <td>
177 <div>Permits or denies this community.</div>
178 <div>Default value while adding a new ext-community-list is False.</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>type</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">string</span>
189 </div>
190 </td>
191 <td>
192 <ul style="margin: 0; padding: 0"><b>Choices:</b>
193 <li><div style="color: blue"><b>standard</b>&nbsp;&larr;</div></li>
194 <li>expanded</li>
195 </ul>
196 </td>
197 <td>
198 <div>Whether it is a standard or expanded ext community_list entry.</div>
199 </td>
200 </tr>
201
202 <tr>
203 <td colspan="3">
204 <div class="ansibleOptionAnchor" id="parameter-"></div>
205 <b>state</b>
206 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
207 <div style="font-size: small">
208 <span style="color: purple">string</span>
209 </div>
210 </td>
211 <td>
212 <ul style="margin: 0; padding: 0"><b>Choices:</b>
213 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
214 <li>deleted</li>
215 <li>replaced</li>
216 <li>overridden</li>
217 </ul>
218 </td>
219 <td>
220 <div>The state of the configuration after module completion.</div>
221 </td>
222 </tr>
223 </table>
224 <br/>
225
226
227 Notes
228 -----
229
230 .. note::
231 - Tested against Enterprise SONiC Distribution by Dell Technologies.
232 - Supports ``check_mode``.
233
234
235
236 Examples
237 --------
238
239 .. code-block:: yaml
240
241 # Using "deleted" state
242
243 # Before state:
244 # -------------
245 #
246 # show bgp ext-community-list
247 # Standard extended community list test: match: ANY
248 # permit rt:101:101
249 # permit rt:201:201
250
251 - name: Deletes a BGP ext community member
252 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
253 config:
254 - name: test
255 type: standard
256 members:
257 route_target:
258 - 201:201
259 state: deleted
260
261 # After state:
262 # ------------
263 #
264 # show bgp ext-community-list
265 # Standard extended community list test: match: ANY
266 # permit rt:101:101
267 #
268
269
270 # Using "deleted" state
271
272 # Before state:
273 # -------------
274 #
275 # show bgp ext-community-list
276 # Standard extended community list test: match: ANY
277 # permit rt:101:101
278 # permit rt:201:201
279 # Expanded extended community list test1: match: ALL
280 # deny 101:102
281
282 - name: Deletes a single BGP extended community
283 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
284 config:
285 - name: test1
286 members:
287 state: deleted
288
289 # After state:
290 # ------------
291 #
292 # show bgp ext-community-list
293 # Standard extended community list test: match: ANY
294 # permit rt:101:101
295 # permit rt:201:201
296 #
297
298
299 # Using "deleted" state
300
301 # Before state:
302 # -------------
303 #
304 # show bgp ext-community-list
305 # Standard extended community list test: match: ANY
306 # permit rt:101:101
307 # permit rt:201:201
308 # Expanded extended community list test1: match: ALL
309 # deny 101:102
310
311 - name: Deletes all BGP extended communities
312 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
313 config:
314 state: deleted
315
316 # After state:
317 # ------------
318 #
319 # show bgp ext-community-list
320 #
321
322
323 # Using "deleted" state
324
325 # Before state:
326 # -------------
327 #
328 # show bgp ext-community-list
329 # Standard extended community list test: match: ANY
330 # permit rt:101:101
331 # permit rt:201:201
332 # Expanded extended community list test1: match: ALL
333 # deny 101:102
334
335 - name: Deletes all members in a single BGP extended community
336 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
337 config:
338 - name: test1
339 members:
340 regex:
341 state: deleted
342
343 # After state:
344 # ------------
345 #
346 # show bgp ext-community-list
347 # Standard extended community list test: match: ANY
348 # permit rt:101:101
349 # permit rt:201:201
350 #
351
352
353 # Using "merged" state
354
355 # Before state:
356 # -------------
357 #
358 # show bgp ext-community-list
359 # Standard extended community list test: match: ANY
360 # permit rt:101:101
361 # permit rt:201:201
362 # Expanded extended community list test1: match: ALL
363 # deny 101:102
364
365 - name: Adds new community list
366 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
367 config:
368 - name: test3
369 type: standard
370 match: any
371 permit: true
372 members:
373 route_origin:
374 - "301:301"
375 - "401:401"
376 state: merged
377
378 # After state:
379 # ------------
380 #
381 # show bgp ext-community-list
382 # Standard extended community list test: match: ANY
383 # permit rt:101:101
384 # permit rt:201:201
385 # Expanded extended community list test1: match: ALL
386 # deny 101:102
387 # Standard extended community list test3: match: ANY
388 # permit soo:301:301
389 # permit soo:401:401
390
391
392 # Using "replaced" state
393
394 # Before state:
395 # -------------
396 #
397 # show bgp ext-community-list
398 # Standard extended community list test: match: ANY
399 # permit rt:101:101
400 # permit rt:201:201
401 # Expanded extended community list test1: match: ALL
402 # deny 101:102
403
404 - name: Replacing a single BGP extended community
405 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
406 config:
407 - name: test
408 type: expanded
409 permit: true
410 match: all
411 members:
412 regex:
413 - 301:302
414 state: replaced
415
416 # After state:
417 # ------------
418 #
419 # show bgp ext-community-list
420 # Expanded extended community list test: match: ALL
421 # permit 301:302
422 # Expanded extended community list test1: match: ALL
423 # deny 101:102
424 #
425
426
427 # Using "overridden" state
428
429 # Before state:
430 # -------------
431 #
432 # show bgp ext-community-list
433 # Standard extended community list test: match: ANY
434 # permit rt:101:101
435 # permit rt:201:201
436 # Expanded extended community list test1: match: ALL
437 # deny 101:102
438
439
440 - name: Override the entire list of BGP extended community
441 dellemc.enterprise_sonic.sonic_bgp_ext_communities:
442 config:
443 - name: test3
444 type: expanded
445 permit: true
446 match: all
447 members:
448 regex:
449 - 301:302
450 state: overridden
451
452 # After state:
453 # ------------
454 #
455 # show bgp ext-community-list
456 # Expanded extended community list test3: match: ALL
457 # permit 301:302
458 #
459
460
461
462 Return Values
463 -------------
464 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:
465
466 .. raw:: html
467
468 <table border=0 cellpadding=0 class="documentation-table">
469 <tr>
470 <th colspan="1">Key</th>
471 <th>Returned</th>
472 <th width="100%">Description</th>
473 </tr>
474 <tr>
475 <td colspan="1">
476 <div class="ansibleOptionAnchor" id="return-"></div>
477 <b>after</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>when changed</td>
484 <td>
485 <div>The resulting configuration module invocation.</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;">The configuration returned will always be in the same format as the parameters above.</div>
489 </td>
490 </tr>
491 <tr>
492 <td colspan="1">
493 <div class="ansibleOptionAnchor" id="return-"></div>
494 <b>before</b>
495 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
496 <div style="font-size: small">
497 <span style="color: purple">list</span>
498 </div>
499 </td>
500 <td>always</td>
501 <td>
502 <div>The configuration prior to the module invocation.</div>
503 <br/>
504 <div style="font-size: smaller"><b>Sample:</b></div>
505 <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>
506 </td>
507 </tr>
508 <tr>
509 <td colspan="1">
510 <div class="ansibleOptionAnchor" id="return-"></div>
511 <b>commands</b>
512 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
513 <div style="font-size: small">
514 <span style="color: purple">list</span>
515 </div>
516 </td>
517 <td>always</td>
518 <td>
519 <div>The set of commands pushed to the remote device.</div>
520 <br/>
521 <div style="font-size: smaller"><b>Sample:</b></div>
522 <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>
523 </td>
524 </tr>
525 </table>
526 <br/><br/>
527
528
529 Status
530 ------
531
532
533 Authors
534 ~~~~~~~
535
536 - Kumaraguru Narayanan (@nkumaraguru)