Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_bgp_as_paths_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_bgp_as_paths_module:
2
3
4 *******************************************
5 dellemc.enterprise_sonic.sonic_bgp_as_paths
6 *******************************************
7
8 **Manage BGP autonomous system path (or as-path-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 bgp_as_paths 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="2">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="2">
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_as_paths&#x27; configurations.</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="1">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>members</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">list</span>
60 / <span style="color: purple">elements=string</span>
61 </div>
62 </td>
63 <td>
64 </td>
65 <td>
66 <div>Members of this BGP as-path; regular expression string can be provided.</div>
67 </td>
68 </tr>
69 <tr>
70 <td class="elbow-placeholder"></td>
71 <td colspan="1">
72 <div class="ansibleOptionAnchor" id="parameter-"></div>
73 <b>name</b>
74 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
75 <div style="font-size: small">
76 <span style="color: purple">string</span>
77 / <span style="color: red">required</span>
78 </div>
79 </td>
80 <td>
81 </td>
82 <td>
83 <div>Name of as-path-list.</div>
84 </td>
85 </tr>
86 <tr>
87 <td class="elbow-placeholder"></td>
88 <td colspan="1">
89 <div class="ansibleOptionAnchor" id="parameter-"></div>
90 <b>permit</b>
91 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
92 <div style="font-size: small">
93 <span style="color: purple">boolean</span>
94 </div>
95 </td>
96 <td>
97 <ul style="margin: 0; padding: 0"><b>Choices:</b>
98 <li>no</li>
99 <li>yes</li>
100 </ul>
101 </td>
102 <td>
103 <div>Permits or denies this as-path.</div>
104 <div>Default value while adding a new as-path-list is <code>False</code>.</div>
105 </td>
106 </tr>
107
108 <tr>
109 <td colspan="2">
110 <div class="ansibleOptionAnchor" id="parameter-"></div>
111 <b>state</b>
112 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
113 <div style="font-size: small">
114 <span style="color: purple">string</span>
115 </div>
116 </td>
117 <td>
118 <ul style="margin: 0; padding: 0"><b>Choices:</b>
119 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
120 <li>deleted</li>
121 <li>replaced</li>
122 <li>overridden</li>
123 </ul>
124 </td>
125 <td>
126 <div>The state of the configuration after module completion.</div>
127 </td>
128 </tr>
129 </table>
130 <br/>
131
132
133 Notes
134 -----
135
136 .. note::
137 - Tested against Enterprise SONiC Distribution by Dell Technologies.
138 - Supports ``check_mode``.
139
140
141
142 Examples
143 --------
144
145 .. code-block:: yaml
146
147 # Using "deleted" state
148
149 # Before state:
150 # -------------
151 #
152 # show bgp as-path-access-list
153 # AS path list test:
154 # action: permit
155 # members: 808.*,909.*
156
157 - name: Delete BGP as path list
158 dellemc.enterprise_sonic.sonic_bgp_as_paths:
159 config:
160 - name: test
161 members:
162 - 909.*
163 permit: true
164 state: deleted
165
166 # After state:
167 # ------------
168 #
169 # show bgp as-path-access-list
170 # AS path list test:
171 # action: permit
172 # members: 808.*
173
174
175 # Using "deleted" state
176
177 # Before state:
178 # -------------
179 #
180 # show bgp as-path-access-list
181 # AS path list test:
182 # action: permit
183 # members: 808.*,909.*
184 # AS path list test1:
185 # action: deny
186 # members: 608.*,709.*
187
188 - name: Deletes BGP as-path list
189 dellemc.enterprise_sonic.sonic_bgp_as_paths:
190 config:
191 - name: test
192 members:
193 state: deleted
194
195 # After state:
196 # ------------
197 #
198 # show bgp as-path-access-list
199 # AS path list test1:
200 # action: deny
201 # members: 608.*,709.*
202
203
204 # Using "deleted" state
205
206 # Before state:
207 # -------------
208 #
209 # show bgp as-path-access-list
210 # AS path list test:
211 # action: permit
212 # members: 808.*,909.*
213
214 - name: Deletes BGP as-path list
215 dellemc.enterprise_sonic.sonic_bgp_as_paths:
216 config:
217 state: deleted
218
219 # After state:
220 # ------------
221 #
222 # show bgp as-path-access-list
223 # (No bgp as-path-access-list configuration present)
224
225
226 # Using "merged" state
227
228 # Before state:
229 # -------------
230 #
231 # show bgp as-path-access-list
232 # (No bgp as-path-access-list configuration present)
233
234 - name: Create a BGP as-path list
235 dellemc.enterprise_sonic.sonic_bgp_as_paths:
236 config:
237 - name: test
238 members:
239 - 909.*
240 permit: true
241 state: merged
242
243 # After state:
244 # ------------
245 #
246 # show bgp as-path-access-list
247 # AS path list test:
248 # action: permit
249 # members: 909.*
250
251
252 # Using "replaced" state
253
254 # Before state:
255 # -------------
256 #
257 # show bgp as-path-access-list
258 # AS path list test:
259 # action: permit
260 # members: 800.*,808.*
261 # AS path list test1:
262 # action: deny
263 # members: 500.*
264
265 - name: Replace device configuration of specified BGP as-path lists with provided configuration
266 dellemc.enterprise_sonic.sonic_bgp_as_paths:
267 config:
268 - name: test
269 members:
270 - 900.*
271 - 901.*
272 permit: true
273 - name: test1
274 - name: test2
275 members:
276 - 100.*
277 permit: true
278 state: replaced
279
280 # After state:
281 # ------------
282 #
283 # show bgp as-path-access-list
284 # AS path list test:
285 # action: permit
286 # members: 900.*,901.*
287 # AS path list test2:
288 # action: permit
289 # members: 100.*
290
291
292 # Using "overridden" state
293
294 # Before state:
295 # -------------
296 #
297 # show bgp as-path-access-list
298 # AS path list test:
299 # action: permit
300 # members: 800.*,808.*
301 # AS path list test1:
302 # action: deny
303 # members: 500.*
304
305 - name: Override device configuration of all BGP as-path lists with provided configuration
306 dellemc.enterprise_sonic.sonic_bgp_as_paths:
307 config:
308 - name: test
309 members:
310 - 900.*
311 - 901.*
312 permit: true
313 state: overridden
314
315 # After state:
316 # ------------
317 #
318 # show bgp as-path-access-list
319 # AS path list test:
320 # action: permit
321 # members: 900.*,901.*
322
323
324
325 Return Values
326 -------------
327 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:
328
329 .. raw:: html
330
331 <table border=0 cellpadding=0 class="documentation-table">
332 <tr>
333 <th colspan="1">Key</th>
334 <th>Returned</th>
335 <th width="100%">Description</th>
336 </tr>
337 <tr>
338 <td colspan="1">
339 <div class="ansibleOptionAnchor" id="return-"></div>
340 <b>after</b>
341 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
342 <div style="font-size: small">
343 <span style="color: purple">list</span>
344 </div>
345 </td>
346 <td>when changed</td>
347 <td>
348 <div>The resulting configuration module invocation.</div>
349 <br/>
350 <div style="font-size: smaller"><b>Sample:</b></div>
351 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned is always in the same format as the parameters above.</div>
352 </td>
353 </tr>
354 <tr>
355 <td colspan="1">
356 <div class="ansibleOptionAnchor" id="return-"></div>
357 <b>before</b>
358 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
359 <div style="font-size: small">
360 <span style="color: purple">list</span>
361 </div>
362 </td>
363 <td>always</td>
364 <td>
365 <div>The configuration prior to the module invocation.</div>
366 <br/>
367 <div style="font-size: smaller"><b>Sample:</b></div>
368 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned is always in the same format as the parameters above.</div>
369 </td>
370 </tr>
371 <tr>
372 <td colspan="1">
373 <div class="ansibleOptionAnchor" id="return-"></div>
374 <b>commands</b>
375 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
376 <div style="font-size: small">
377 <span style="color: purple">list</span>
378 </div>
379 </td>
380 <td>always</td>
381 <td>
382 <div>The set of commands pushed to the remote device.</div>
383 <br/>
384 <div style="font-size: smaller"><b>Sample:</b></div>
385 <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>
386 </td>
387 </tr>
388 </table>
389 <br/><br/>
390
391
392 Status
393 ------
394
395
396 Authors
397 ~~~~~~~
398
399 - Kumaraguru Narayanan (@nkumaraguru)