Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_ospfv3_area_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_ospfv3_area_module:
2
3
4 ******************************************
5 dellemc.enterprise_sonic.sonic_ospfv3_area
6 ******************************************
7
8 **Configure OSPFv3 area settings 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 for the area settings of OSPFv3 running on SONiC switches.
21 - Configure global/VRF OSPFv3 instance before configuring OSPFv3 areas.
22 - Configure OSPFv3 instance before configuring OSPFv3 areas.
23
24
25
26
27 Parameters
28 ----------
29
30 .. raw:: html
31
32 <table border=0 cellpadding=0 class="documentation-table">
33 <tr>
34 <th colspan="4">Parameter</th>
35 <th>Choices/<font color="blue">Defaults</font></th>
36 <th width="100%">Comments</th>
37 </tr>
38 <tr>
39 <td colspan="4">
40 <div class="ansibleOptionAnchor" id="parameter-"></div>
41 <b>config</b>
42 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
43 <div style="font-size: small">
44 <span style="color: purple">list</span>
45 / <span style="color: purple">elements=dictionary</span>
46 </div>
47 </td>
48 <td>
49 </td>
50 <td>
51 <div>Specifies configuration for OSPFv3 areas.</div>
52 <div><em>stub</em> and <em>nssa</em> are mutually exclusive.</div>
53 <div>If <em>area_id=0 or 0.0.0.0</em>, <em>stub/nssa</em> should not be specified.</div>
54 </td>
55 </tr>
56 <tr>
57 <td class="elbow-placeholder"></td>
58 <td colspan="3">
59 <div class="ansibleOptionAnchor" id="parameter-"></div>
60 <b>area_id</b>
61 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
62 <div style="font-size: small">
63 <span style="color: purple">string</span>
64 / <span style="color: red">required</span>
65 </div>
66 </td>
67 <td>
68 </td>
69 <td>
70 <div>Area ID of the network (A.B.C.D or 0 to 4294967295).</div>
71 </td>
72 </tr>
73 <tr>
74 <td class="elbow-placeholder"></td>
75 <td colspan="3">
76 <div class="ansibleOptionAnchor" id="parameter-"></div>
77 <b>filter_list_in</b>
78 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
79 <div style="font-size: small">
80 <span style="color: purple">string</span>
81 </div>
82 </td>
83 <td>
84 </td>
85 <td>
86 <div>Inter-area prefix filter list.</div>
87 <div>Filter incoming prefixes into the area.</div>
88 <div>Expects name of a prefix list.</div>
89 </td>
90 </tr>
91 <tr>
92 <td class="elbow-placeholder"></td>
93 <td colspan="3">
94 <div class="ansibleOptionAnchor" id="parameter-"></div>
95 <b>filter_list_out</b>
96 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
97 <div style="font-size: small">
98 <span style="color: purple">string</span>
99 </div>
100 </td>
101 <td>
102 </td>
103 <td>
104 <div>Inter-area prefix filter list.</div>
105 <div>Filter outgoing prefixes from the area.</div>
106 <div>Expects name of a prefix list.</div>
107 </td>
108 </tr>
109 <tr>
110 <td class="elbow-placeholder"></td>
111 <td colspan="3">
112 <div class="ansibleOptionAnchor" id="parameter-"></div>
113 <b>nssa</b>
114 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
115 <div style="font-size: small">
116 <span style="color: purple">dictionary</span>
117 </div>
118 </td>
119 <td>
120 </td>
121 <td>
122 <div>Configuration for NSSA type area.</div>
123 <div><em>default_originate</em> and <em>no_summary</em> are mutually exclusive.</div>
124 </td>
125 </tr>
126 <tr>
127 <td class="elbow-placeholder"></td>
128 <td class="elbow-placeholder"></td>
129 <td colspan="2">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>default_originate</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">dictionary</span>
135 </div>
136 </td>
137 <td>
138 </td>
139 <td>
140 <div>Advertise default route for the NSSA area.</div>
141 </td>
142 </tr>
143 <tr>
144 <td class="elbow-placeholder"></td>
145 <td class="elbow-placeholder"></td>
146 <td class="elbow-placeholder"></td>
147 <td colspan="1">
148 <div class="ansibleOptionAnchor" id="parameter-"></div>
149 <b>enabled</b>
150 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
151 <div style="font-size: small">
152 <span style="color: purple">boolean</span>
153 / <span style="color: red">required</span>
154 </div>
155 </td>
156 <td>
157 <ul style="margin: 0; padding: 0"><b>Choices:</b>
158 <li>no</li>
159 <li>yes</li>
160 </ul>
161 </td>
162 <td>
163 <div>Enable to advertise the default route for the NSSA area.</div>
164 </td>
165 </tr>
166 <tr>
167 <td class="elbow-placeholder"></td>
168 <td class="elbow-placeholder"></td>
169 <td class="elbow-placeholder"></td>
170 <td colspan="1">
171 <div class="ansibleOptionAnchor" id="parameter-"></div>
172 <b>metric</b>
173 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
174 <div style="font-size: small">
175 <span style="color: purple">integer</span>
176 </div>
177 </td>
178 <td>
179 </td>
180 <td>
181 <div>Configure metric for the redistributed route (0 to 16777214).</div>
182 </td>
183 </tr>
184 <tr>
185 <td class="elbow-placeholder"></td>
186 <td class="elbow-placeholder"></td>
187 <td class="elbow-placeholder"></td>
188 <td colspan="1">
189 <div class="ansibleOptionAnchor" id="parameter-"></div>
190 <b>metric_type</b>
191 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
192 <div style="font-size: small">
193 <span style="color: purple">integer</span>
194 </div>
195 </td>
196 <td>
197 <ul style="margin: 0; padding: 0"><b>Choices:</b>
198 <li>1</li>
199 <li>2</li>
200 </ul>
201 </td>
202 <td>
203 <div>Configure metric type for the redistributed route.</div>
204 </td>
205 </tr>
206
207 <tr>
208 <td class="elbow-placeholder"></td>
209 <td class="elbow-placeholder"></td>
210 <td colspan="2">
211 <div class="ansibleOptionAnchor" id="parameter-"></div>
212 <b>enabled</b>
213 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
214 <div style="font-size: small">
215 <span style="color: purple">boolean</span>
216 / <span style="color: red">required</span>
217 </div>
218 </td>
219 <td>
220 <ul style="margin: 0; padding: 0"><b>Choices:</b>
221 <li>no</li>
222 <li>yes</li>
223 </ul>
224 </td>
225 <td>
226 <div>Configure area as NSSA type area.</div>
227 </td>
228 </tr>
229 <tr>
230 <td class="elbow-placeholder"></td>
231 <td class="elbow-placeholder"></td>
232 <td colspan="2">
233 <div class="ansibleOptionAnchor" id="parameter-"></div>
234 <b>no_summary</b>
235 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
236 <div style="font-size: small">
237 <span style="color: purple">boolean</span>
238 </div>
239 </td>
240 <td>
241 <ul style="margin: 0; padding: 0"><b>Choices:</b>
242 <li>no</li>
243 <li>yes</li>
244 </ul>
245 </td>
246 <td>
247 <div>Disable inter-area route injection into the NSSA.</div>
248 </td>
249 </tr>
250 <tr>
251 <td class="elbow-placeholder"></td>
252 <td class="elbow-placeholder"></td>
253 <td colspan="2">
254 <div class="ansibleOptionAnchor" id="parameter-"></div>
255 <b>ranges</b>
256 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
257 <div style="font-size: small">
258 <span style="color: purple">list</span>
259 / <span style="color: purple">elements=dictionary</span>
260 </div>
261 </td>
262 <td>
263 </td>
264 <td>
265 <div>Configure address range summarization on border routers.</div>
266 </td>
267 </tr>
268 <tr>
269 <td class="elbow-placeholder"></td>
270 <td class="elbow-placeholder"></td>
271 <td class="elbow-placeholder"></td>
272 <td colspan="1">
273 <div class="ansibleOptionAnchor" id="parameter-"></div>
274 <b>advertise</b>
275 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
276 <div style="font-size: small">
277 <span style="color: purple">boolean</span>
278 </div>
279 </td>
280 <td>
281 <ul style="margin: 0; padding: 0"><b>Choices:</b>
282 <li>no</li>
283 <li>yes</li>
284 </ul>
285 </td>
286 <td>
287 <div>Enable address range advertising.</div>
288 <div>Default value while creating a new range is True.</div>
289 <div>If the <em>cost</em> is specified, <em>advertise</em> is unconditionally set to True during playbook execution.</div>
290 </td>
291 </tr>
292 <tr>
293 <td class="elbow-placeholder"></td>
294 <td class="elbow-placeholder"></td>
295 <td class="elbow-placeholder"></td>
296 <td colspan="1">
297 <div class="ansibleOptionAnchor" id="parameter-"></div>
298 <b>cost</b>
299 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
300 <div style="font-size: small">
301 <span style="color: purple">integer</span>
302 </div>
303 </td>
304 <td>
305 </td>
306 <td>
307 <div>Configure cost of address range (0 to 16777215).</div>
308 </td>
309 </tr>
310 <tr>
311 <td class="elbow-placeholder"></td>
312 <td class="elbow-placeholder"></td>
313 <td class="elbow-placeholder"></td>
314 <td colspan="1">
315 <div class="ansibleOptionAnchor" id="parameter-"></div>
316 <b>prefix</b>
317 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
318 <div style="font-size: small">
319 <span style="color: purple">string</span>
320 / <span style="color: red">required</span>
321 </div>
322 </td>
323 <td>
324 </td>
325 <td>
326 <div>Configure address range prefix.</div>
327 </td>
328 </tr>
329
330
331 <tr>
332 <td class="elbow-placeholder"></td>
333 <td colspan="3">
334 <div class="ansibleOptionAnchor" id="parameter-"></div>
335 <b>ranges</b>
336 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
337 <div style="font-size: small">
338 <span style="color: purple">list</span>
339 / <span style="color: purple">elements=dictionary</span>
340 </div>
341 </td>
342 <td>
343 </td>
344 <td>
345 <div>Configure address range summarization on border routers.</div>
346 </td>
347 </tr>
348 <tr>
349 <td class="elbow-placeholder"></td>
350 <td class="elbow-placeholder"></td>
351 <td colspan="2">
352 <div class="ansibleOptionAnchor" id="parameter-"></div>
353 <b>advertise</b>
354 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
355 <div style="font-size: small">
356 <span style="color: purple">boolean</span>
357 </div>
358 </td>
359 <td>
360 <ul style="margin: 0; padding: 0"><b>Choices:</b>
361 <li>no</li>
362 <li>yes</li>
363 </ul>
364 </td>
365 <td>
366 <div>Enable address range advertising.</div>
367 <div>Default value while creating a new range is True.</div>
368 <div>If the <em>cost</em> is specified, <em>advertise</em> is unconditionally set to True during playbook execution.</div>
369 </td>
370 </tr>
371 <tr>
372 <td class="elbow-placeholder"></td>
373 <td class="elbow-placeholder"></td>
374 <td colspan="2">
375 <div class="ansibleOptionAnchor" id="parameter-"></div>
376 <b>cost</b>
377 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
378 <div style="font-size: small">
379 <span style="color: purple">integer</span>
380 </div>
381 </td>
382 <td>
383 </td>
384 <td>
385 <div>Configure cost of address range (0 to 16777215).</div>
386 </td>
387 </tr>
388 <tr>
389 <td class="elbow-placeholder"></td>
390 <td class="elbow-placeholder"></td>
391 <td colspan="2">
392 <div class="ansibleOptionAnchor" id="parameter-"></div>
393 <b>prefix</b>
394 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
395 <div style="font-size: small">
396 <span style="color: purple">string</span>
397 / <span style="color: red">required</span>
398 </div>
399 </td>
400 <td>
401 </td>
402 <td>
403 <div>Configure address range prefix.</div>
404 </td>
405 </tr>
406
407 <tr>
408 <td class="elbow-placeholder"></td>
409 <td colspan="3">
410 <div class="ansibleOptionAnchor" id="parameter-"></div>
411 <b>stub</b>
412 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
413 <div style="font-size: small">
414 <span style="color: purple">dictionary</span>
415 </div>
416 </td>
417 <td>
418 </td>
419 <td>
420 <div>Configuration for STUB type area.</div>
421 </td>
422 </tr>
423 <tr>
424 <td class="elbow-placeholder"></td>
425 <td class="elbow-placeholder"></td>
426 <td colspan="2">
427 <div class="ansibleOptionAnchor" id="parameter-"></div>
428 <b>enabled</b>
429 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
430 <div style="font-size: small">
431 <span style="color: purple">boolean</span>
432 / <span style="color: red">required</span>
433 </div>
434 </td>
435 <td>
436 <ul style="margin: 0; padding: 0"><b>Choices:</b>
437 <li>no</li>
438 <li>yes</li>
439 </ul>
440 </td>
441 <td>
442 <div>Configure area as STUB type area.</div>
443 </td>
444 </tr>
445 <tr>
446 <td class="elbow-placeholder"></td>
447 <td class="elbow-placeholder"></td>
448 <td colspan="2">
449 <div class="ansibleOptionAnchor" id="parameter-"></div>
450 <b>no_summary</b>
451 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
452 <div style="font-size: small">
453 <span style="color: purple">boolean</span>
454 </div>
455 </td>
456 <td>
457 <ul style="margin: 0; padding: 0"><b>Choices:</b>
458 <li>no</li>
459 <li>yes</li>
460 </ul>
461 </td>
462 <td>
463 <div>Disable inter-area route injection into the STUB.</div>
464 </td>
465 </tr>
466
467 <tr>
468 <td class="elbow-placeholder"></td>
469 <td colspan="3">
470 <div class="ansibleOptionAnchor" id="parameter-"></div>
471 <b>vrf_name</b>
472 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
473 <div style="font-size: small">
474 <span style="color: purple">string</span>
475 / <span style="color: red">required</span>
476 </div>
477 </td>
478 <td>
479 </td>
480 <td>
481 <div>Name of the VRF this area belongs to.</div>
482 </td>
483 </tr>
484
485 <tr>
486 <td colspan="4">
487 <div class="ansibleOptionAnchor" id="parameter-"></div>
488 <b>state</b>
489 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
490 <div style="font-size: small">
491 <span style="color: purple">string</span>
492 </div>
493 </td>
494 <td>
495 <ul style="margin: 0; padding: 0"><b>Choices:</b>
496 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
497 <li>replaced</li>
498 <li>overridden</li>
499 <li>deleted</li>
500 </ul>
501 </td>
502 <td>
503 <div>Specifies the type of configuration update to be performed on the device.</div>
504 </td>
505 </tr>
506 </table>
507 <br/>
508
509
510 Notes
511 -----
512
513 .. note::
514 - Supports ``check_mode``.
515 - Tested against Enterprise SONiC Distribution by Dell Technologies.
516
517
518
519 Examples
520 --------
521
522 .. code-block:: yaml
523
524 # Using "deleted" state
525 #
526 # Before state:
527 # -------------
528 # sonic(config-router-ospfv3)# show configuration
529 # !
530 # router ospfv3 vrf Vrf1
531 # area 0.0.0.1 stub no-summary
532 # area 0.0.0.1 filter-list prefix pf1 in
533 # area 0.0.0.1 filter-list prefix pf2 out
534 # area 0.0.0.2 stub no-summary
535 # area 0.0.0.1 range 1::1/64 not-advertise
536 # area 0.0.0.1 range 1::2/64
537 # area 0.0.0.2 range 1::1/64
538 # area 0.0.0.3 range 1::3/24 cost 14
539 # sonic(config-router-ospfv3)#
540
541 - name: "test delete all settings for areas"
542 dellemc.enterprise_sonic.sonic_ospfv3_area:
543 state: deleted
544 config:
545 - area_id: 0.0.0.1
546 vrf_name: Vrf1
547 - area_id: 0.0.0.2
548 vrf_name: Vrf1
549 ranges:
550 - prefix: 1::1/64
551 advertise: true
552 stub:
553 enabled: true
554 no_summary: true
555
556 # After state
557 # -------------
558 # sonic(config-router-ospfv3)# show configuration
559 # !
560 # router ospfv3 vrf Vrf1
561 # area 0.0.0.3 range 1::3/24 cost 14
562 # sonic(config-router-ospfv3)#
563
564
565 # Using "deleted" state
566 # Before state:
567 # -------------
568 # sonic(config-router-ospfv3)# show configuration
569 # !
570 # router ospfv3 vrf Vrf1
571 # area 0.0.0.1 nssa no-summary
572 # area 0.0.0.3 filter-list prefix pf1 in
573 # area 0.0.0.1 nssa
574 # area 0.0.0.4 stub no-summary
575 # area 0.0.0.1 nssa range 1::1/64
576 # area 0.0.0.1 nssa range 1::2/64 cost 20
577 # area 0.0.0.2 range 1::1/64 not-advertise
578 # area 0.0.0.2 range 1::2/64 advertise cost 4
579 # area 0.0.0.2 range 1::3/24 not-advertise
580 # sonic(config-router-ospfv3)#
581
582 - name: "test clear subsections"
583 dellemc.enterprise_sonic.sonic_ospfv3_area:
584 state: deleted
585 config:
586 - area_id: 0.0.0.1
587 vrf_name: Vrf1
588 nssa:
589 enabled: true
590 ranges: []
591 - area_id: 0.0.0.2
592 vrf_name: Vrf1
593 ranges: []
594 - area_id: 4
595 vrf_name: Vrf1
596
597 # After state
598 # -------------
599 # sonic(config-router-ospfv3)# show configuration
600 # !
601 # router ospfv3 vrf Vrf1
602 # area 0.0.0.1 nssa no-summary
603 # area 0.0.0.3 filter-list prefix pf1 in
604 # area 0.0.0.1 nssa
605 # sonic(config-router-ospfv3)#
606
607
608 # Using "deleted" state
609 # Before state:
610 # -------------
611 # sonic# show running-configuration ospfv3
612 # !
613 # router ospfv3 vrf Vrf1
614 # area 0.0.0.1 nssa no-summary
615 # area 0.0.0.1 filter-list prefix pf1 in
616 # area 0.0.0.1 filter-list prefix pf2 out
617 # area 0.0.0.3 filter-list prefix pf1 in
618 # area 0.0.0.1 nssa
619 # area 0.0.0.4 stub no-summary
620 # area 0.0.0.1 nssa range 1::1/64
621 # area 0.0.0.1 nssa range 1::2/64 cost 20
622 # area 0.0.0.2 range 1::1/64 not-advertise
623 # area 0.0.0.2 range 1::2/64 advertise cost 4
624 # area 0.0.0.2 range 1::3/24 not-advertise
625 # router ospfv3
626 # area 0.0.0.1 nssa no-summary
627 # area 0.0.0.1 filter-list prefix pf1 in
628 # area 0.0.0.1 filter-list prefix pf2 out
629 # area 0.0.0.3 filter-list prefix pf1 in
630 # area 0.0.0.1 nssa
631 # area 0.0.0.4 stub no-summary
632 # area 0.0.0.1 nssa range 1::1/64
633 # area 0.0.0.1 nssa range 1::2/64 cost 20
634 # area 0.0.0.2 range 1::1/64 not-advertise
635 # area 0.0.0.2 range 1::2/64 advertise cost 4
636 # area 0.0.0.2 range 1::3/24 not-advertise
637 # sonic#
638
639 - name: "test clear subsections"
640 dellemc.enterprise_sonic.sonic_ospfv3_area:
641 state: deleted
642 config:
643 - area_id: 0.0.0.1
644 vrf_name: Vrf1
645 filter_list_in: pf1
646 filter_list_out: pf2
647 nssa:
648 enabled: true
649 range:
650 - prefix: 1::2/64
651 advertise: true
652 cost: 20
653 - area_id: 0.0.0.2
654 vrf_name: Vrf1
655 range:
656 - prefix: 1::2/64
657 - area_id: 3
658 vrf_name: default
659 - area_id: 4
660 vrf_name: default
661 stub:
662 enabled: true
663 no_summary: true
664
665 # After state
666 # -------------
667 # sonic# show running-configuration ospfv3
668 # !
669 # router ospfv3 vrf Vrf1
670 # area 0.0.0.1 nssa no-summary
671 # area 0.0.0.3 filter-list prefix pf1 in
672 # area 0.0.0.1 nssa
673 # area 0.0.0.4 stub no-summary
674 # area 0.0.0.1 nssa range 1::1/64
675 # area 0.0.0.2 range 1::1/64 not-advertise
676 # area 0.0.0.2 range 1::3/24 not-advertise
677 # router ospfv3
678 # area 0.0.0.1 nssa no-summary
679 # area 0.0.0.1 filter-list prefix pf1 in
680 # area 0.0.0.1 filter-list prefix pf2 out
681 # area 0.0.0.1 nssa
682 # area 0.0.0.4
683 # area 0.0.0.1 nssa range 1::1/64
684 # area 0.0.0.1 nssa range 1::2/64 cost 20
685 # area 0.0.0.2 range 1::1/64 not-advertise
686 # area 0.0.0.2 range 1::2/64 advertise cost 4
687 # area 0.0.0.2 range 1::3/24 not-advertise
688 # sonic#
689
690
691 # Using "merged" state
692 # Before state:
693 # -------------
694 # sonic# show running-configuration ospfv3
695 # !
696 # router ospfv3 vrf Vrf2
697 # !
698 # router ospfv3 vrf Vrf1
699 # sonic#
700
701 - name: merge examples of all settings
702 dellemc.enterprise_sonic.sonic_ospfv3_area:
703 state: merged
704 config:
705 - area_id: 1
706 vrf_name: Vrf1
707 - area_id: 2
708 vrf_name: Vrf1
709 stub:
710 enabled: true
711 no_summary: true
712 - area_id: 3
713 vrf_name: Vrf1
714 filter_list_in: pf1
715 filter_list_out: pf2
716 ranges:
717 - prefix: 1::1/64
718 - prefix: 1::2/64
719 advertise: true
720 cost: 4
721 - prefix: 1::3/24
722 advertise: false
723 - prefix: 1::4/24
724 advertise: true
725 cost: 10
726 - area_id: 4
727 vrf_name: Vrf1
728 - area_id: 5
729 vrf_name: Vrf2
730
731 # After state
732 # -------------
733 # sonic# show running-configuration ospfv3
734 #
735 # outer ospfv3 vrf Vrf1
736 # area 0.0.0.1
737 # area 0.0.0.2 stub no-summary
738 # area 0.0.0.3 filter-list prefix pf1 in
739 # area 0.0.0.3 filter-list prefix pf2 out
740 # area 0.0.0.4
741 # area 0.0.0.3 range 1::1/64
742 # area 0.0.0.3 range 1::2/64 advertise cost 4
743 # area 0.0.0.3 range 1::3/24 not-advertise
744 # area 0.0.0.3 range 1::4/24 advertise cost 10
745 # !
746 # router ospfv3 vrf Vrf2
747 # area 0.0.0.5
748 # sonic#
749
750
751 # Using "merged" state
752 # Before state:
753 # -------------
754 # sonic(config-router-ospfv3)# show configuration
755 # !
756 # router ospfv3 vrf Vrf2
757 # sonic(config-router-ospfv3)# show configuration
758 # !
759 # router ospfv3 vrf Vrf1
760 # sonic(config-router-ospfv3)#
761
762 - name: merge smallest group of settings
763 dellemc.enterprise_sonic.sonic_ospfv3_area:
764 state: merged
765 config:
766 - area_id: 0.0.0.1
767 vrf_name: Vrf1
768 - area_id: 0.0.0.2
769 vrf_name: Vrf1
770 nssa:
771 enabled: true
772 no_summary: true
773 - area_id: 0.0.0.3
774 vrf_name: Vrf1
775 ranges:
776 - prefix: 1::1/64
777 nssa:
778 enabled: true
779 default_originate:
780 enabled: true
781 - area_id: 0.0.0.4
782 vrf_name: Vrf2
783 stub:
784 enabled: true
785 - area_id: 0.0.0.5
786 vrf_name: Vrf2
787 filter_list_in: pf1
788 filter_list_out: pf2
789
790 # After state
791 # -------------
792 # sonic(config-router-ospfv3)# show configuration
793 # !
794 # router ospfv3 vrf Vrf1
795 # area 0.0.0.1
796 # area 0.0.0.2 nssa no-summary
797 # area 0.0.0.3 range 1::1/64
798 # area 0.0.0.3 nssa default-information-originate
799 # sonic(config-router-ospfv3)# router ospfv3 vrf Vrf2
800 # sonic(config-router-ospfv3)# show configuration
801 # !
802 # router ospfv3 vrf Vrf2
803 # area 0.0.0.4 stub
804 # area 0.0.0.5 filter-list prefix pf1 in
805 # area 0.0.0.5 filter-list prefix pf2 out
806 # sonic(config-router-ospfv3)#
807
808
809 # Using "merged" state
810 # Before state:
811 # -------------
812 # sonic(config-router-ospfv3)# show configuration
813 # !
814 # router ospfv3 vrf Vrf1
815 # area 0.0.0.1 stub no-summary
816 # area 0.0.0.1 filter-list prefix pf1 in
817 # area 0.0.0.1 filter-list prefix pf2 out
818 # area 0.0.0.1 range 1::1/64 not-advertise
819 # area 0.0.0.1 range 1::2/64 advertise
820 # sonic(config-router-ospfv3)#
821
822 - name: "test merge all settings"
823 dellemc.enterprise_sonic.sonic_ospfv3_area:
824 state: merged
825 config:
826 - area_id: 0.0.0.1
827 vrf_name: Vrf1
828 filter_list_in: pf2
829 filter_list_out: pf1
830 ranges:
831 - prefix: 1::1/64
832 advertise: true
833 cost: 12
834 - prefix: 1::2/64
835 advertise: false
836 stub:
837 enabled: true
838 no_summary: false
839
840 # After state
841 # -------------
842 # sonic(config-router-ospfv3)# show configuration
843 # !
844 # router ospfv3 vrf Vrf1
845 # area 0.0.0.1 stub
846 # area 0.0.0.1 filter-list prefix pf2 in
847 # area 0.0.0.1 filter-list prefix pf1 out
848 # area 0.0.0.1 range 1::1/64 advertise cost 12
849 # area 0.0.0.1 range 1::2/64 not-advertise
850 # sonic(config-router-ospfv3)#
851
852
853 # Using "replaced" state
854 # Before state:
855 # -------------
856 # sonic# show running-configuration ospfv3
857 # !
858 # router ospfv3 vrf Vrf1
859 # area 0.0.0.1 nssa no-summary
860 # area 0.0.0.1 filter-list prefix pf1 in
861 # area 0.0.0.1 filter-list prefix pf2 out
862 # area 0.0.0.3 filter-list prefix pf1 in
863 # area 0.0.0.1 nssa
864 # area 0.0.0.4 stub no-summary
865 # area 0.0.0.1 nssa range 1::1/64
866 # area 0.0.0.1 nssa range 1::2/64 cost 20
867 # area 0.0.0.2 range 1::1/64 not-advertise
868 # area 0.0.0.2 range 1::2/64 advertise cost 4
869 # area 0.0.0.2 range 1::3/24 not-advertise
870 # router ospfv3
871 # area 0.0.0.1 nssa no-summary
872 # area 0.0.0.1 filter-list prefix pf1 in
873 # area 0.0.0.1 filter-list prefix pf2 out
874 # area 0.0.0.3 filter-list prefix pf1 in
875 # area 0.0.0.1 nssa
876 # area 0.0.0.4 stub no-summary
877 # area 0.0.0.1 nssa range 1::1/64
878 # area 0.0.0.1 nssa range 1::2/64 cost 20
879 # area 0.0.0.2 range 1::1/64 not-advertise
880 # area 0.0.0.2 range 1::2/64 advertise cost 4
881 # area 0.0.0.2 range 1::3/24 not-advertise
882 # sonic#
883
884 - name: "replace areas"
885 dellemc.enterprise_sonic.sonic_ospfv3_area:
886 state: replaced
887 config:
888 - area_id: 0.0.0.1
889 vrf_name: Vrf1
890 - area_id: 0.0.0.5
891 vrf_name: Vrf1
892 nssa:
893 enabled: true
894 default_originate:
895 enabled: true
896 metric: 10
897 metric_type: 1
898 ranges:
899 - prefix: "1::1/64"
900 cost: 15
901 - area_id: 0.0.0.4
902 vrf_name: Vrf1
903 stub:
904 no_summary: true
905 enabled: true
906
907 # After state
908 # -------------
909 # sonic# show running-configuration ospfv3
910 # !
911 # router ospfv3 vrf Vrf1
912 # area 0.0.0.1
913 # area 0.0.0.4 stub no-summary
914 # area 0.0.0.5 nssa nssa default-information-originate metric 10 metric-type 1
915 # area 0.0.0.5 nssa range 1::1/64 cost 15
916 # router ospfv3
917 # area 0.0.0.1 nssa no-summary
918 # area 0.0.0.1 filter-list prefix pf1 in
919 # area 0.0.0.1 filter-list prefix pf2 out
920 # area 0.0.0.3 filter-list prefix pf1 in
921 # area 0.0.0.1 nssa
922 # area 0.0.0.4 stub no-summary
923 # area 0.0.0.1 nssa range 1::1/64
924 # area 0.0.0.1 nssa range 1::2/64 cost 20
925 # area 0.0.0.2 range 1::1/64 not-advertise
926 # area 0.0.0.2 range 1::2/64 advertise cost 4
927 # area 0.0.0.2 range 1::3/24 not-advertise
928 # sonic#
929
930
931 # Using "overridden" state
932 # Before state:
933 # -------------
934 # sonic# show running-configuration ospfv3
935 # !
936 # router ospfv3 vrf Vrf1
937 # area 0.0.0.1 nssa no-summary
938 # area 0.0.0.1 filter-list prefix pf1 in
939 # area 0.0.0.1 filter-list prefix pf2 out
940 # area 0.0.0.3 filter-list prefix pf1 in
941 # area 0.0.0.1 nssa
942 # area 0.0.0.4 stub no-summary
943 # area 0.0.0.1 nssa range 1::1/64
944 # area 0.0.0.1 nssa range 1::2/64 cost 20
945 # area 0.0.0.2 range 1::1/64 not-advertise
946 # area 0.0.0.2 range 1::2/64 advertise cost 4
947 # area 0.0.0.2 range 1::3/24 not-advertise
948 # router ospfv3
949 # area 0.0.0.1 nssa no-summary
950 # area 0.0.0.1 filter-list prefix pf1 in
951 # area 0.0.0.1 filter-list prefix pf2 out
952 # area 0.0.0.3 filter-list prefix pf1 in
953 # area 0.0.0.1 nssa
954 # area 0.0.0.4 stub no-summary
955 # area 0.0.0.1 nssa range 1::1/64
956 # area 0.0.0.1 nssa range 1::2/64 cost 20
957 # area 0.0.0.2 range 1::1/64 not-advertise
958 # area 0.0.0.2 range 1::2/64 advertise cost 4
959 # area 0.0.0.2 range 1::3/24 not-advertise
960 # sonic#
961
962 - name: "override areas"
963 dellemc.enterprise_sonic.sonic_ospfv3_area:
964 state: overridden
965 config:
966 - area_id: 0.0.0.1
967 vrf_name: Vrf1
968 - area_id: 0.0.0.5
969 vrf_name: Vrf1
970 nssa:
971 enabled: true
972 default_originate:
973 enabled: true
974 metric: 10
975 metric_type: 1
976 ranges:
977 - prefix: "1::1/64"
978 cost: 15
979 - area_id: 0.0.0.4
980 vrf_name: Vrf1
981 stub:
982 no_summary: true
983 enabled: true
984
985 # After state
986 # -------------
987 # sonic# show running-configuration ospfv3
988 # !
989 # router ospfv3 vrf Vrf1
990 # area 0.0.0.1
991 # area 0.0.0.4 stub no-summary
992 # area 0.0.0.5 nssa nssa default-information-originate metric 10 metric-type 1
993 # area 0.0.0.5 nssa range 1::1/64 cost 15
994 # router ospfv3
995 # sonic#
996
997
998
999 Return Values
1000 -------------
1001 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:
1002
1003 .. raw:: html
1004
1005 <table border=0 cellpadding=0 class="documentation-table">
1006 <tr>
1007 <th colspan="1">Key</th>
1008 <th>Returned</th>
1009 <th width="100%">Description</th>
1010 </tr>
1011 <tr>
1012 <td colspan="1">
1013 <div class="ansibleOptionAnchor" id="return-"></div>
1014 <b>after</b>
1015 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1016 <div style="font-size: small">
1017 <span style="color: purple">list</span>
1018 </div>
1019 </td>
1020 <td>when changed</td>
1021 <td>
1022 <div>The configuration resulting from model invocation.</div>
1023 <br/>
1024 <div style="font-size: smaller"><b>Sample:</b></div>
1025 <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
1026 of the parameters above.</div>
1027 </td>
1028 </tr>
1029 <tr>
1030 <td colspan="1">
1031 <div class="ansibleOptionAnchor" id="return-"></div>
1032 <b>after_generated</b>
1033 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1034 <div style="font-size: small">
1035 <span style="color: purple">list</span>
1036 </div>
1037 </td>
1038 <td>when <code>check_mode</code></td>
1039 <td>
1040 <div>The generated (calculated) configuration that would be applied by module invocation.</div>
1041 <br/>
1042 <div style="font-size: smaller"><b>Sample:</b></div>
1043 <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
1044 of the parameters above.</div>
1045 </td>
1046 </tr>
1047 <tr>
1048 <td colspan="1">
1049 <div class="ansibleOptionAnchor" id="return-"></div>
1050 <b>before</b>
1051 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1052 <div style="font-size: small">
1053 <span style="color: purple">list</span>
1054 </div>
1055 </td>
1056 <td>always</td>
1057 <td>
1058 <div>The configuration prior to the module invocation.</div>
1059 <br/>
1060 <div style="font-size: smaller"><b>Sample:</b></div>
1061 <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
1062 of the parameters above.</div>
1063 </td>
1064 </tr>
1065 <tr>
1066 <td colspan="1">
1067 <div class="ansibleOptionAnchor" id="return-"></div>
1068 <b>commands</b>
1069 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1070 <div style="font-size: small">
1071 <span style="color: purple">list</span>
1072 </div>
1073 </td>
1074 <td>always</td>
1075 <td>
1076 <div>The set of commands pushed to the remote device.</div>
1077 <br/>
1078 <div style="font-size: smaller"><b>Sample:</b></div>
1079 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{&#x27;config&#x27;: &#x27;...&#x27;, &#x27;state&#x27;: &#x27;...&#x27;}, {&#x27;config&#x27;: &#x27;...&#x27;, &#x27;state&#x27;: &#x27;...&#x27;}]</div>
1080 </td>
1081 </tr>
1082 </table>
1083 <br/><br/>
1084
1085
1086 Status
1087 ------
1088
1089
1090 Authors
1091 ~~~~~~~
1092
1093 - Santhosh kumar T (@santhosh-kt)