Debian Codegraph @

ansible_collections/cisco/ios/plugins/modules/ios_ospfv3.py

raw
1 #!/usr/bin/python
2 #
3 # -*- coding: utf-8 -*-
4 # Copyright 2020 Red Hat
5 # GNU General Public License v3.0+
6 # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
7
8 #############################################
9 # WARNING #
10 #############################################
11 #
12 # This file is auto generated by the resource
13 # module builder playbook.
14 #
15 # Do not edit this file manually.
16 #
17 # Changes to this file will be over written
18 # by the resource module builder.
19 #
20 # Changes should be made in the model used to
21 # generate this file or in the resource module
22 # builder template.
23 #
24 #############################################
25
26 """
27 The module file for ios_ospfv3
28 """
29
30 from __future__ import absolute_import, division, print_function
31
32
33 __metaclass__ = type
34
35
36 DOCUMENTATION = """
37 module: ios_ospfv3
38 short_description: Resource module to configure OSPFv3.
39 description:
40 This module configures and manages the Open Shortest Path First (OSPF)
41 version 3 on IOS platforms.
42 version_added: 1.1.0
43 author: Sumit Jaiswal (@justjais)
44 notes:
45 - Tested against Cisco IOSXE Version 17.3 on CML.
46 - This module works with connection C(network_cli).
47 See U(https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html)
48 options:
49 config:
50 description: A list of configurations for ospfv3.
51 type: dict
52 suboptions:
53 processes:
54 description: List of OSPF instance configurations.
55 type: list
56 elements: dict
57 suboptions:
58 process_id:
59 description: Process ID
60 required: true
61 type: int
62 address_family:
63 description: Enter Address Family command mode
64 type: list
65 elements: dict
66 suboptions:
67 afi:
68 description: Enter Address Family command mode
69 type: str
70 choices:
71 - ipv4
72 - ipv6
73 unicast:
74 description: Address Family modifier
75 type: bool
76 vrf:
77 description: Specify parameters for a VPN Routing/Forwarding instance
78 type: str
79 adjacency:
80 description: Control adjacency formation
81 type: dict
82 suboptions:
83 min_adjacency:
84 description:
85 - Initial number of adjacencies allowed to be forming in an area
86 - Please refer vendor documentation for valid values
87 type: int
88 none:
89 description: No initial
90 type: bool
91 max_adjacency:
92 description:
93 - Maximum number of adjacencies allowed to be forming
94 - Please refer vendor documentation for valid values
95 type: int
96 disable:
97 description: Disable adjacency staggering
98 type: bool
99 areas:
100 description: OSPF area parameters
101 type: list
102 elements: dict
103 suboptions:
104 area_id:
105 description:
106 - OSPF area ID as a decimal value. Please refer vendor documentation
107 of Valid values.
108 - OSPF area ID in IP address format(e.g. A.B.C.D)
109 type: str
110 authentication:
111 description: Authentication parameters
112 type: dict
113 suboptions:
114 key_chain:
115 description: Use a key-chain for cryptographic authentication keys
116 type: str
117 "null":
118 description: Use no authentication
119 type: bool
120 default_cost:
121 description:
122 - Set the summary default-cost of a NSSA/stub area
123 - Stub's advertised external route metric
124 - Note, please refer vendor documentation for respective valid values
125 type: int
126 filter_list:
127 description: Filter networks between OSPFv3 areas
128 type: list
129 elements: dict
130 suboptions:
131 name:
132 description: Name of an IP prefix-list
133 type: str
134 direction:
135 description: The direction to apply on the filter networks sent to and from this area.
136 type: str
137 choices: ["in", "out"]
138 required: true
139 normal:
140 description: Specify a normal area type
141 type: bool
142 nssa:
143 description: Specify a NSSA area
144 type: dict
145 suboptions:
146 set:
147 description: Enable a NSSA area
148 type: bool
149 default_information_originate:
150 description: Originate Type 7 default into NSSA area
151 type: dict
152 suboptions:
153 metric:
154 description: OSPF default metric
155 type: int
156 metric_type:
157 description:
158 - OSPF metric type for default routes
159 - OSPF Link State type
160 type: int
161 choices: [1, 2]
162 nssa_only:
163 description: Limit default advertisement to this NSSA area
164 type: bool
165 no_redistribution:
166 description: No redistribution into this NSSA area
167 type: bool
168 no_summary:
169 description: Do not send summary LSA into NSSA
170 type: bool
171 translate:
172 description:
173 - Translate LSA
174 - Always translate LSAs on this ABR
175 - Suppress forwarding address in translated LSAs
176 type: str
177 choices: ["always", "suppress-fa"]
178 ranges:
179 description: Summarize routes matching address/mask (border routers only)
180 type: list
181 elements: dict
182 suboptions:
183 address:
184 description: IP address to match
185 type: str
186 netmask:
187 description: IP mask for address
188 type: str
189 advertise:
190 description:
191 - Advertise this range (default)
192 - Since, advertise when enabled is not shown in running-config
193 idempotency won't be maintained for the play in the second or
194 next run of the play.
195 type: bool
196 cost:
197 description: User specified metric for this range
198 type: int
199 not_advertise:
200 description: DoNotAdvertise this range
201 type: bool
202 sham_link:
203 description: Define a sham link and its parameters
204 type: dict
205 suboptions:
206 source:
207 description: IPv6 address associated with sham-link source (X:X:X:X::X)
208 type: str
209 destination:
210 description: IPv6 address associated with sham-link destination (X:X:X:X::X)
211 type: str
212 authentication:
213 description: Authentication parameters
214 type: dict
215 suboptions:
216 key_chain:
217 description: Use a key-chain for cryptographic authentication keys
218 type: str
219 "null":
220 description: Use no authentication
221 type: bool
222 cost:
223 description:
224 - Associate a cost with the sham-link
225 - Cost of the sham-link
226 type: int
227 ttl_security:
228 description:
229 - TTL security check
230 - maximum number of hops allowed
231 type: int
232 stub:
233 description:
234 - Specify a stub area
235 - Backbone can not be configured as stub area
236 type: dict
237 suboptions:
238 set:
239 description: Enable a stub area
240 type: bool
241 no_summary:
242 description: Do not send summary LSA into stub area
243 type: bool
244 authentication:
245 description:
246 - Authentication parameters
247 - Authentication operation mode
248 type: dict
249 suboptions:
250 deployment:
251 description: Deployment mode of operation
252 type: bool
253 normal:
254 description: Normal mode of operation
255 type: bool
256 auto_cost:
257 description: Calculate OSPF interface cost according to bandwidth
258 type: dict
259 suboptions:
260 set:
261 description: Enable OSPF auto-cost
262 type: bool
263 reference_bandwidth:
264 description:
265 - Use reference bandwidth method to assign OSPF cost
266 - Note, refer vendor documentation for respective valid values
267 type: int
268 bfd:
269 description: BFD configuration commands
270 type: dict
271 suboptions:
272 all_interfaces:
273 description: Enable BFD on all interfaces
274 type: bool
275 disable:
276 description: Disable BFD on all interfaces
277 type: bool
278 capability:
279 description:
280 - Enable a specific feature
281 - Do not perform PE specific checks
282 type: bool
283 compatible:
284 description: OSPFv3 router compatibility list
285 type: dict
286 suboptions:
287 rfc1583:
288 description: compatible with RFC 1583
289 type: bool
290 rfc1587:
291 description: compatible with RFC 1587
292 type: bool
293 rfc5243:
294 description: supports DBD exchange optimization
295 type: bool
296 default_information:
297 description: Control distribution of default information
298 type: dict
299 suboptions:
300 originate:
301 description: Distribute a default route
302 type: bool
303 always:
304 description: Always advertise default route
305 type: bool
306 metric:
307 description:
308 - OSPF default metric
309 - Note, refer vendor documentation for respective valid values
310 type: int
311 metric_type:
312 description:
313 - OSPF metric type for default routes
314 - Note, please refer vendor documentation for respective valid range
315 type: int
316 route_map:
317 description: Route-map reference name
318 type: str
319 default_metric:
320 description: Set metric of redistributed routes
321 type: int
322 discard_route:
323 description: Enable or disable discard-route installation
324 type: dict
325 suboptions:
326 sham_link:
327 description: Discard route for sham-link routes
328 type: bool
329 external:
330 description: Discard route for summarised redistributed routes
331 type: bool
332 internal:
333 description: Discard route for summarised inter-area routes
334 type: bool
335 distance:
336 description:
337 - Define an administrative distance
338 - Note, please refer vendor documentation for respective valid range
339 type: int
340 distribute_list:
341 description: Filter networks in routing updates
342 type: dict
343 suboptions:
344 acls:
345 description: IP access list
346 type: list
347 elements: dict
348 suboptions:
349 name:
350 description: IP access list name/number
351 type: str
352 required: true
353 direction:
354 description: Filter incoming and outgoing routing updates.
355 type: str
356 required: true
357 choices: ["in", "out"]
358 interface:
359 description:
360 - Interface configuration (GigabitEthernet A/B)
361 - Valid with incoming traffic
362 type: str
363 protocol:
364 description:
365 - Protocol config (bgp 1).
366 - Valid with outgoing traffic
367 type: str
368 prefix:
369 description: Filter prefixes in routing updates
370 type: dict
371 suboptions:
372 name:
373 description: Name of an IP prefix-list
374 type: str
375 required: true
376 gateway_name:
377 description: Gateway name for filtering incoming updates based on gateway
378 type: str
379 direction:
380 description: Filter incoming and outgoing routing updates.
381 type: str
382 required: true
383 choices: ["in", "out"]
384 interface:
385 description:
386 - Interface configuration (GigabitEthernet A/B)
387 - Valid with incoming traffic
388 type: str
389 protocol:
390 description:
391 - Protocol config (bgp 1).
392 - Valid with outgoing traffic
393 type: str
394 route_map:
395 description: Filter prefixes in routing updates
396 type: dict
397 suboptions:
398 name:
399 description: Route-map name
400 type: str
401 required: true
402 event_log:
403 description: Event Logging
404 type: dict
405 suboptions:
406 enable:
407 description: Enable event Logging
408 type: bool
409 one_shot:
410 description: Disable Logging When Log Buffer Becomes Full
411 type: bool
412 pause:
413 description: Pause Event Logging
414 type: bool
415 size:
416 description:
417 - Maximum Number of Events Stored in the Event Log
418 - Note, refer vendor documentation for respective valid values
419 type: int
420 graceful_restart:
421 description:
422 - Graceful-restart options
423 - helper support
424 type: dict
425 suboptions:
426 enable:
427 description: helper support enabled
428 type: bool
429 disable:
430 description: disable helper support
431 type: bool
432 strict_lsa_checking:
433 description: enable helper strict LSA checking
434 type: bool
435 interface_id:
436 description: Source of the interface ID
437 type: dict
438 suboptions:
439 ios_if_index:
440 description: IOS interface number
441 type: bool
442 snmp_if_index:
443 description: SNMP MIB ifIndex
444 type: bool
445 limit:
446 description: Limit a specific OSPF feature
447 type: dict
448 suboptions:
449 dc:
450 description: Demand circuit retransmissions
451 type: dict
452 suboptions:
453 number:
454 description: The maximum number of retransmissions
455 type: int
456 disable:
457 description: Disble the feature
458 type: bool
459 non_dc:
460 description: Non-demand-circuit retransmissions
461 type: dict
462 suboptions:
463 number:
464 description: The maximum number of retransmissions
465 type: int
466 disable:
467 description: Disble the feature
468 type: bool
469 local_rib_criteria:
470 description: Enable or disable usage of local RIB as route criteria
471 type: dict
472 suboptions:
473 enable:
474 description: Enable usage of local RIB as route criteria
475 type: bool
476 forwarding_address:
477 description: Local RIB used to validate external/NSSA forwarding addresses
478 type: bool
479 inter_area_summary:
480 description: Local RIB used as criteria for inter-area summaries
481 type: bool
482 nssa_translation:
483 description: Local RIB used as criteria for NSSA translation
484 type: bool
485 log_adjacency_changes:
486 description: Log changes in adjacency state
487 type: dict
488 suboptions:
489 set:
490 description: Log changes in adjacency state
491 type: bool
492 detail:
493 description: Log all state changes
494 type: bool
495 manet:
496 description: Specify MANET OSPF parameters
497 type: dict
498 suboptions:
499 cache:
500 description: Specify MANET cache sizes
501 type: dict
502 suboptions:
503 acknowledgement:
504 description:
505 - Specify MANET acknowledgement cache size
506 - Maximum number of acknowledgements in cache
507 type: int
508 update:
509 description:
510 - Specify MANET LSA cache size
511 - Maximum number of LSAs in cache
512 type: int
513 hello:
514 description: Unicast Hellos rather than multicast
515 type: dict
516 suboptions:
517 multicast:
518 description: Multicast Hello requests and responses rather than unicast
519 type: bool
520 unicast:
521 description: Unicast Hello requests and responses rather than multicast
522 type: bool
523 peering:
524 description: MANET OSPF Smart Peering
525 type: dict
526 suboptions:
527 set:
528 description: Enable selective peering
529 type: bool
530 disable:
531 description: Disable selective peering
532 type: bool
533 per_interface:
534 description: Select peers per interface rather than per node
535 type: bool
536 redundancy:
537 description:
538 - Redundant paths
539 - Number of redundant OSPF paths
540 type: int
541 willingness:
542 description: Specify and Relay willingness value
543 type: int
544 max_lsa:
545 description: Maximum number of non self-generated LSAs to accept
546 type: dict
547 suboptions:
548 number:
549 description:
550 - Maximum number of non self-generated LSAs to accept
551 - Note, refer vendor documentation for respective valid values
552 type: int
553 threshold_value:
554 description:
555 - Threshold value (%) at which to generate a warning msg
556 - Note, refer vendor documentation for respective valid values
557 type: int
558 ignore_count:
559 description:
560 - Maximum number of times adjacencies can be suppressed
561 - Note, refer vendor documentation for respective valid values
562 type: int
563 ignore_time:
564 description:
565 - Number of minutes during which all adjacencies are suppressed
566 - Note, refer vendor documentation for respective valid values
567 type: int
568 reset_time:
569 description:
570 - Number of minutes after which ignore-count is reset to zero
571 - Note, refer vendor documentation for respective valid values
572 type: int
573 warning_only:
574 description: Only give a warning message when limit is exceeded
575 type: bool
576 max_metric:
577 description:
578 - Set maximum metric
579 - Maximum metric in self-originated router-LSAs
580 type: dict
581 suboptions:
582 disable:
583 description: disable maximum metric in self-originated router-LSAs
584 type: bool
585 external_lsa:
586 description:
587 - Override external-lsa metric with max-metric value
588 - Overriding metric in external-LSAs
589 - Note, refer vendor documentation for respective valid values
590 type: int
591 inter_area_lsas:
592 description:
593 - Override inter-area-lsas metric with max-metric value
594 - Overriding metric in inter-area-LSAs
595 - Note, refer vendor documentation for respective valid values
596 type: int
597 on_startup:
598 description: Set maximum metric temporarily after reboot
599 type: dict
600 suboptions:
601 time:
602 description:
603 - Time, in seconds, router-LSAs are originated with max-metric
604 - Note, please refer vendor documentation for respective valid range
605 type: int
606 wait_for_bgp:
607 description: Let BGP decide when to originate router-LSA with normal metric
608 type: bool
609 stub_prefix_lsa:
610 description: Set maximum metric for stub links in prefix LSAs
611 type: bool
612 maximum_paths:
613 description:
614 - Forward packets over multiple paths
615 - Number of paths
616 type: int
617 passive_interface:
618 description: Suppress routing updates on an interface
619 type: str
620 prefix_suppression:
621 description: Prefix suppression
622 type: dict
623 suboptions:
624 enable:
625 description: Enable prefix suppression
626 type: bool
627 disable:
628 description: Disable prefix suppression
629 type: bool
630 queue_depth:
631 description: Hello/Router process queue depth
632 type: dict
633 suboptions:
634 hello:
635 description: OSPF Hello process queue depth
636 type: dict
637 suboptions:
638 max_packets:
639 description: maximum number of packets in the queue
640 type: int
641 unlimited:
642 description: Unlimited queue depth
643 type: bool
644 update:
645 description: OSPF Router process queue depth
646 type: dict
647 suboptions:
648 max_packets:
649 description: maximum number of packets in the queue
650 type: int
651 unlimited:
652 description: Unlimited queue depth
653 type: bool
654 router_id:
655 description:
656 - Router-id address for this OSPF process
657 - OSPF router-id in IP address format (A.B.C.D)
658 type: str
659 shutdown:
660 description: Shutdown the router process
661 type: dict
662 suboptions:
663 enable:
664 description: Shutdown the router process
665 type: bool
666 disable:
667 description: Disable Shutdown
668 type: bool
669 summary_prefix:
670 description: Configure IP address summaries
671 type: dict
672 suboptions:
673 address:
674 description:
675 - IP summary address (A.B.C.D)
676 - IP prefix <network>/<length> (A.B.C.D/nn)
677 type: str
678 mask:
679 description: IP Summary mask
680 type: str
681 not_advertise:
682 description: Do not advertise or translate
683 type: bool
684 nssa_only:
685 description: Limit summary to NSSA areas
686 type: bool
687 tag:
688 description: Set tag
689 type: int
690 timers:
691 description: Adjust routing timers
692 type: dict
693 suboptions:
694 lsa:
695 description:
696 - OSPF LSA timers, arrival timer
697 - The minimum interval in milliseconds between accepting the same LSA
698 - Note, refer vendor documentation for respective valid values
699 type: int
700 manet:
701 description: OSPF MANET timers
702 type: dict
703 suboptions:
704 cache:
705 description: Specify MANET cache sizes
706 type: dict
707 suboptions:
708 acknowledgement:
709 description: Specify MANET acknowledgement cache size
710 type: int
711 redundancy:
712 description: Specify MANET LSA cache size
713 type: int
714 hello:
715 description:
716 - Unicast Hellos rather than multicast
717 - Unicast Hello requests and responses rather than multicast
718 type: bool
719 peering:
720 description: MANET OSPF Smart Peering
721 type: dict
722 suboptions:
723 set:
724 description: Enable selective peering
725 type: bool
726 per_interface:
727 description: Select peers per interface rather than per node
728 type: bool
729 redundancy:
730 description:
731 - Redundant paths
732 - Number of redundant OSPF paths
733 type: int
734 willingness:
735 description: Specify and Relay willingness value
736 type: int
737 pacing:
738 description: OSPF pacing timers
739 type: dict
740 suboptions:
741 flood:
742 description:
743 - OSPF flood pacing timer
744 - The minimum interval in msec to pace limit flooding on interface
745 - Note, refer vendor documentation for respective valid values
746 type: int
747 lsa_group:
748 description:
749 - OSPF LSA group pacing timer
750 - Interval in sec between group of LSA being refreshed or maxaged
751 - Note, refer vendor documentation for respective valid values
752 type: int
753 retransmission:
754 description:
755 - OSPF retransmission pacing timer
756 - The minimum interval in msec between neighbor retransmissions
757 - Note, refer vendor documentation for respective valid values
758 type: int
759 throttle:
760 description: OSPF throttle timers
761 type: dict
762 suboptions:
763 lsa:
764 description: OSPF LSA throttle timers
765 type: dict
766 suboptions:
767 first_delay:
768 description:
769 - Delay to generate first occurrence of LSA in milliseconds
770 - Note, refer vendor documentation for respective valid values
771 type: int
772 min_delay:
773 description:
774 - Minimum delay between originating the same LSA in milliseconds
775 - Note, refer vendor documentation for respective valid values
776 type: int
777 max_delay:
778 description:
779 - Maximum delay between originating the same LSA in milliseconds
780 - Note, refer vendor documentation for respective valid values
781 type: int
782 spf:
783 description: OSPF SPF throttle timers
784 - Delay between receiving a change to SPF calculation in milliseconds
785 - Note, refer vendor documentation for respective valid values
786 type: dict
787 suboptions:
788 receive_delay:
789 description:
790 - Delay between receiving a change to SPF calculation in milliseconds
791 - Note, refer vendor documentation for respective valid values
792 type: int
793 between_delay:
794 description:
795 - Delay between first and second SPF calculation in milliseconds
796 - Note, refer vendor documentation for respective valid values
797 type: int
798 max_delay:
799 description:
800 - Maximum wait time in milliseconds for SPF calculations
801 - Note, refer vendor documentation for respective valid values
802 type: int
803 adjacency:
804 description: Control adjacency formation
805 type: dict
806 suboptions:
807 min_adjacency:
808 description:
809 - Initial number of adjacencies allowed to be forming in an area
810 - Please refer vendor documentation for valid values
811 type: int
812 max_adjacency:
813 description:
814 - Maximum number of adjacencies allowed to be forming
815 - Please refer vendor documentation for valid values
816 type: int
817 none:
818 description: No initial
819 type: bool
820 areas:
821 description: OSPF area parameters
822 type: list
823 elements: dict
824 suboptions:
825 area_id:
826 description:
827 - OSPF area ID as a decimal value. Please refer vendor documentation
828 of Valid values.
829 - OSPF area ID in IP address format(e.g. A.B.C.D)
830 type: str
831 authentication:
832 description: Authentication parameters
833 type: dict
834 suboptions:
835 key_chain:
836 description: Use a key-chain for cryptographic authentication keys
837 type: str
838 ipsec:
839 description: Use IPsec authentication
840 type: dict
841 suboptions:
842 spi:
843 description: Set the SPI (Security Parameters Index)
844 type: int
845 md5:
846 description: Use MD5 authentication
847 type: int
848 sha1:
849 description: Use SHA-1 authentication
850 type: int
851 hex_string:
852 description: SHA-1 key (40 chars)
853 type: str
854 default_cost:
855 description:
856 - Set the summary default-cost of a NSSA/stub area
857 - Stub's advertised external route metric
858 - Note, please refer vendor documentation for respective valid values
859 type: int
860 nssa:
861 description: Specify a NSSA area
862 type: dict
863 suboptions:
864 set:
865 description: Enable a NSSA area
866 type: bool
867 default_information_originate:
868 description: Originate Type 7 default into NSSA area
869 type: dict
870 suboptions:
871 metric:
872 description: OSPF default metric
873 type: int
874 metric_type:
875 description:
876 - OSPF metric type for default routes
877 - OSPF Link State type
878 type: int
879 choices: [1, 2]
880 nssa_only:
881 description: Limit default advertisement to this NSSA area
882 type: bool
883 no_redistribution:
884 description: No redistribution into this NSSA area
885 type: bool
886 no_summary:
887 description: Do not send summary LSA into NSSA
888 type: bool
889 translate:
890 description:
891 - Translate LSA
892 - Always translate LSAs on this ABR
893 - Suppress forwarding address in translated LSAs
894 type: str
895 choices: ["always", "suppress-fa"]
896 stub:
897 description:
898 - Specify a stub area
899 - Backbone can not be configured as stub area
900 type: dict
901 suboptions:
902 set:
903 description: Enable a stub area
904 type: bool
905 no_summary:
906 description: Do not send summary LSA into stub area
907 type: bool
908 authentication:
909 description:
910 - Authentication parameter mode
911 - Deployment mode of operation
912 type: bool
913 auto_cost:
914 description: Calculate OSPF interface cost according to bandwidth
915 type: dict
916 suboptions:
917 set:
918 description: Enable OSPF auto-cost
919 type: bool
920 reference_bandwidth:
921 description:
922 - Use reference bandwidth method to assign OSPF cost
923 - Note, refer vendor documentation for respective valid values
924 type: int
925 bfd:
926 description:
927 - BFD configuration commands
928 - Enable BFD on all interfaces
929 type: bool
930 compatible:
931 description: OSPFv3 router compatibility list
932 type: dict
933 suboptions:
934 rfc1583:
935 description: compatible with RFC 1583
936 type: bool
937 rfc1587:
938 description: compatible with RFC 1587
939 type: bool
940 rfc5243:
941 description: supports DBD exchange optimization
942 type: bool
943 event_log:
944 description: Event Logging
945 type: dict
946 suboptions:
947 enable:
948 description: Enable event Logging
949 type: bool
950 one_shot:
951 description: Disable Logging When Log Buffer Becomes Full
952 type: bool
953 pause:
954 description: Pause Event Logging
955 type: bool
956 size:
957 description:
958 - Maximum Number of Events Stored in the Event Log
959 - Note, refer vendor documentation for respective valid values
960 type: int
961 graceful_restart:
962 description: Graceful-restart options for helper support
963 type: dict
964 suboptions:
965 disable:
966 description: disable helper support
967 type: bool
968 strict_lsa_checking:
969 description: enable helper strict LSA checking
970 type: bool
971 help:
972 description: Description of the interactive help system
973 type: bool
974 interface_id:
975 description:
976 - Source of the interface ID
977 - SNMP MIB ifIndex
978 type: bool
979 limit:
980 description: Limit a specific OSPF feature and LS update, DBD, and LS request retransmissions
981 type: dict
982 suboptions:
983 dc:
984 description: Demand circuit retransmissions
985 type: dict
986 suboptions:
987 number:
988 description: The maximum number of retransmissions
989 type: int
990 disable:
991 description: Disable the feature
992 type: bool
993 non_dc:
994 description: Non-demand-circuit retransmissions
995 type: dict
996 suboptions:
997 number:
998 description: The maximum number of retransmissions
999 type: int
1000 disable:
1001 description: Disable the feature
1002 type: bool
1003 local_rib_criteria:
1004 description: Enable or disable usage of local RIB as route criteria
1005 type: dict
1006 suboptions:
1007 enable:
1008 description: Enable usage of local RIB as route criteria
1009 type: bool
1010 forwarding_address:
1011 description: Local RIB used to validate external/NSSA forwarding addresses
1012 type: bool
1013 inter_area_summary:
1014 description: Local RIB used as criteria for inter-area summaries
1015 type: bool
1016 nssa_translation:
1017 description: Local RIB used as criteria for NSSA translation
1018 type: bool
1019 log_adjacency_changes:
1020 description: Log changes in adjacency state
1021 type: dict
1022 suboptions:
1023 set:
1024 description: Log changes in adjacency state
1025 type: bool
1026 detail:
1027 description: Log all state changes
1028 type: bool
1029 manet:
1030 description: Specify MANET OSPF parameters
1031 type: dict
1032 suboptions:
1033 cache:
1034 description: Specify MANET cache sizes
1035 type: dict
1036 suboptions:
1037 acknowledgement:
1038 description: Specify MANET acknowledgement cache size
1039 type: int
1040 redundancy:
1041 description: Specify MANET LSA cache size
1042 type: int
1043 hello:
1044 description:
1045 - Unicast Hellos rather than multicast
1046 - Unicast Hello requests and responses rather than multicast
1047 type: bool
1048 peering:
1049 description: MANET OSPF Smart Peering
1050 type: dict
1051 suboptions:
1052 set:
1053 description: Enable selective peering
1054 type: bool
1055 per_interface:
1056 description: Select peers per interface rather than per node
1057 type: bool
1058 redundancy:
1059 description:
1060 - Redundant paths
1061 - Number of redundant OSPF paths
1062 type: int
1063 willingness:
1064 description: Specify and Relay willingness value
1065 type: int
1066 max_lsa:
1067 description: Maximum number of non self-generated LSAs to accept
1068 type: dict
1069 suboptions:
1070 number:
1071 description:
1072 - Maximum number of non self-generated LSAs to accept
1073 - Note, refer vendor documentation for respective valid values
1074 type: int
1075 threshold_value:
1076 description:
1077 - Threshold value (%) at which to generate a warning msg
1078 - Note, refer vendor documentation for respective valid values
1079 type: int
1080 ignore_count:
1081 description:
1082 - Maximum number of times adjacencies can be suppressed
1083 - Note, refer vendor documentation for respective valid values
1084 type: int
1085 ignore_time:
1086 description:
1087 - Number of minutes during which all adjacencies are suppressed
1088 - Note, refer vendor documentation for respective valid values
1089 type: int
1090 reset_time:
1091 description:
1092 - Number of minutes after which ignore-count is reset to zero
1093 - Note, refer vendor documentation for respective valid values
1094 type: int
1095 warning_only:
1096 description: Only give a warning message when limit is exceeded
1097 type: bool
1098 max_metric:
1099 description: Set maximum metric
1100 type: dict
1101 suboptions:
1102 router_lsa:
1103 description: Maximum metric in self-originated router-LSAs
1104 type: bool
1105 required: true
1106 external_lsa:
1107 description:
1108 - Override external-lsa metric with max-metric value
1109 - Overriding metric in external-LSAs
1110 - Note, refer vendor documentation for respective valid values
1111 type: int
1112 include_stub:
1113 description: Set maximum metric for stub links in router-LSAs
1114 type: bool
1115 on_startup:
1116 description: Set maximum metric temporarily after reboot
1117 type: dict
1118 suboptions:
1119 time:
1120 description:
1121 - Time, in seconds, router-LSAs are originated with max-metric
1122 - Note, please refer vendor documentation for respective valid range
1123 type: int
1124 wait_for_bgp:
1125 description: Let BGP decide when to originate router-LSA with normal metric
1126 type: bool
1127 summary_lsa:
1128 description:
1129 - Override summary-lsa metric with max-metric value
1130 - Note, please refer vendor documentation for respective valid range
1131 type: int
1132 passive_interface:
1133 description: Suppress routing updates on an interface
1134 type: str
1135 prefix_suppression:
1136 description: Enable prefix suppression
1137 type: bool
1138 queue_depth:
1139 description: Hello/Router process queue depth
1140 type: dict
1141 suboptions:
1142 hello:
1143 description: OSPF Hello process queue depth
1144 type: dict
1145 suboptions:
1146 max_packets:
1147 description: maximum number of packets in the queue
1148 type: int
1149 unlimited:
1150 description: Unlimited queue depth
1151 type: bool
1152 router_id:
1153 description:
1154 - Router-id address for this OSPF process
1155 - OSPF router-id in IP address format (A.B.C.D)
1156 type: str
1157 shutdown:
1158 description: Shutdown the router process
1159 type: bool
1160 timers:
1161 description: Adjust routing timers
1162 type: dict
1163 suboptions:
1164 lsa:
1165 description:
1166 - OSPF LSA timers, arrival timer
1167 - The minimum interval in milliseconds between accepting the same LSA
1168 - Note, refer vendor documentation for respective valid values
1169 type: int
1170 manet:
1171 description: OSPF MANET timers
1172 type: dict
1173 suboptions:
1174 cache:
1175 description: Specify MANET cache sizes
1176 type: dict
1177 suboptions:
1178 acknowledgement:
1179 description: Specify MANET acknowledgement cache size
1180 type: int
1181 redundancy:
1182 description: Specify MANET LSA cache size
1183 type: int
1184 hello:
1185 description:
1186 - Unicast Hellos rather than multicast
1187 - Unicast Hello requests and responses rather than multicast
1188 type: bool
1189 peering:
1190 description: MANET OSPF Smart Peering
1191 type: dict
1192 suboptions:
1193 set:
1194 description: Enable selective peering
1195 type: bool
1196 per_interface:
1197 description: Select peers per interface rather than per node
1198 type: bool
1199 redundancy:
1200 description:
1201 - Redundant paths
1202 - Number of redundant OSPF paths
1203 type: int
1204 willingness:
1205 description: Specify and Relay willingness value
1206 type: int
1207 pacing:
1208 description: OSPF pacing timers
1209 type: dict
1210 suboptions:
1211 flood:
1212 description:
1213 - OSPF flood pacing timer
1214 - The minimum interval in msec to pace limit flooding on interface
1215 - Note, refer vendor documentation for respective valid values
1216 type: int
1217 lsa_group:
1218 description:
1219 - OSPF LSA group pacing timer
1220 - Interval in sec between group of LSA being refreshed or maxaged
1221 - Note, refer vendor documentation for respective valid values
1222 type: int
1223 retransmission:
1224 description:
1225 - OSPF retransmission pacing timer
1226 - The minimum interval in msec between neighbor retransmissions
1227 - Note, refer vendor documentation for respective valid values
1228 type: int
1229 throttle:
1230 description: OSPF throttle timers
1231 type: dict
1232 suboptions:
1233 lsa:
1234 description: OSPF LSA throttle timers
1235 type: dict
1236 suboptions:
1237 first_delay:
1238 description:
1239 - Delay to generate first occurrence of LSA in milliseconds
1240 - Note, refer vendor documentation for respective valid values
1241 type: int
1242 min_delay:
1243 description:
1244 - Minimum delay between originating the same LSA in milliseconds
1245 - Note, refer vendor documentation for respective valid values
1246 type: int
1247 max_delay:
1248 description:
1249 - Maximum delay between originating the same LSA in milliseconds
1250 - Note, refer vendor documentation for respective valid values
1251 type: int
1252 spf:
1253 description: OSPF SPF throttle timers
1254 - Delay between receiving a change to SPF calculation in milliseconds
1255 - Note, refer vendor documentation for respective valid values
1256 type: dict
1257 suboptions:
1258 receive_delay:
1259 description:
1260 - Delay between receiving a change to SPF calculation in milliseconds
1261 - Note, refer vendor documentation for respective valid values
1262 type: int
1263 between_delay:
1264 description:
1265 - Delay between first and second SPF calculation in milliseconds
1266 - Note, refer vendor documentation for respective valid values
1267 type: int
1268 max_delay:
1269 description:
1270 - Maximum wait time in milliseconds for SPF calculations
1271 - Note, refer vendor documentation for respective valid values
1272 type: int
1273 running_config:
1274 description:
1275 - This option is used only with state I(parsed).
1276 - The value of this option should be the output received from the IOS device by
1277 executing the command B(sh running-config | section ^router ospfv3).
1278 - The state I(parsed) reads the configuration from C(running_config) option and
1279 transforms it into Ansible structured data as per the resource module's argspec
1280 and the value is then returned in the I(parsed) key within the result.
1281 type: str
1282 state:
1283 description:
1284 - The state the configuration should be left in
1285 - The states I(rendered), I(gathered) and I(parsed) does not perform any change
1286 on the device.
1287 - The state I(rendered) will transform the configuration in C(config) option to
1288 platform specific CLI commands which will be returned in the I(rendered) key
1289 within the result. For state I(rendered) active connection to remote host is
1290 not required.
1291 - The state I(gathered) will fetch the running configuration from device and transform
1292 it into structured data in the format as per the resource module argspec and
1293 the value is returned in the I(gathered) key within the result.
1294 - The state I(parsed) reads the configuration from C(running_config) option and
1295 transforms it into JSON format as per the resource module parameters and the
1296 value is returned in the I(parsed) key within the result. The value of C(running_config)
1297 option should be the same format as the output of command I(show running-config
1298 | include ip route|ipv6 route) executed on device. For state I(parsed) active
1299 connection to remote host is not required.
1300 type: str
1301 choices:
1302 - merged
1303 - replaced
1304 - overridden
1305 - deleted
1306 - gathered
1307 - parsed
1308 - rendered
1309 default: merged
1310 """
1311
1312 EXAMPLES = """
1313
1314 # Using merged
1315
1316 # Before state:
1317 # -------------
1318 #
1319 # router-ios#sh running-config | section ^router ospfv3
1320 # router-ios#
1321
1322 - name: Merge provided OSPFV3 configuration
1323 cisco.ios.ios_ospfv3:
1324 config:
1325 processes:
1326 - process_id: 1
1327 max_metric:
1328 router_lsa: true
1329 on_startup:
1330 time: 110
1331 address_family:
1332 - afi: ipv4
1333 unicast: true
1334 vrf: blue
1335 adjacency:
1336 min_adjacency: 50
1337 max_adjacency: 50
1338 areas:
1339 - area_id: 25
1340 nssa:
1341 default_information_originate:
1342 metric: 25
1343 nssa_only: true
1344 areas:
1345 - area_id: "10"
1346 nssa:
1347 default_information_originate:
1348 metric: 10
1349 timers:
1350 throttle:
1351 lsa:
1352 first_delay: 12
1353 min_delay: 14
1354 max_delay: 16
1355 - process_id: 200
1356 address_family:
1357 - afi: ipv4
1358 unicast: true
1359 adjacency:
1360 min_adjacency: 200
1361 max_adjacency: 200
1362 max_metric:
1363 router_lsa: true
1364 on_startup:
1365 time: 100
1366 auto_cost:
1367 reference_bandwidth: 4
1368 state: merged
1369
1370 # Task Output:
1371 # ------------
1372
1373 # before: {}
1374 #
1375 # commands:
1376 # - router ospfv3 1
1377 # - max-metric router-lsa on-startup 110
1378 # - area 10 nssa default-information-originate metric 10
1379 # - address-family ipv4 unicast vrf blue
1380 # - adjacency stagger 50 50
1381 # - area 25 nssa default-information-originate metric 25 nssa-only
1382 # - exit-address-family
1383 # - router ospfv3 200
1384 # - auto-cost reference-bandwidth 4
1385 # - max-metric router-lsa on-startup 100
1386 # - address-family ipv4 unicast
1387 # - adjacency stagger 200 200
1388 # - exit-address-family
1389 #
1390 # after:
1391 # processes:
1392 # - address_family:
1393 # - adjacency:
1394 # max_adjacency: 50
1395 # min_adjacency: 50
1396 # afi: ipv4
1397 # areas:
1398 # - area_id: '25'
1399 # nssa:
1400 # default_information_originate:
1401 # metric: 25
1402 # nssa_only: true
1403 # unicast: true
1404 # vrf: blue
1405 # areas:
1406 # - area_id: '10'
1407 # nssa:
1408 # default_information_originate:
1409 # metric: 10
1410 # max_metric:
1411 # on_startup:
1412 # time: 110
1413 # router_lsa: true
1414 # process_id: 1
1415 # - address_family:
1416 # - adjacency:
1417 # max_adjacency: 200
1418 # min_adjacency: 200
1419 # afi: ipv4
1420 # unicast: true
1421 # auto_cost:
1422 # reference_bandwidth: 4
1423 # max_metric:
1424 # on_startup:
1425 # time: 100
1426 # router_lsa: true
1427 # process_id: 200
1428
1429 # After state:
1430 # -------------
1431 #
1432 # router-ios#sh running-config | section ^router ospfv3
1433 # router ospfv3 1
1434 # max-metric router-lsa on-startup 110
1435 # area 10 nssa default-information-originate metric 10
1436 # !
1437 # address-family ipv4 unicast vrf blue
1438 # adjacency stagger 50 50
1439 # area 25 nssa default-information-originate metric 25 nssa-only
1440 # exit-address-family
1441 # router ospfv3 200
1442 # max-metric router-lsa on-startup 100
1443 # auto-cost reference-bandwidth 4
1444 # !
1445 # address-family ipv4 unicast
1446 # adjacency stagger 200 200
1447 # exit-address-family
1448
1449 # Using deleted
1450
1451 # Before state:
1452 # -------------
1453 #
1454 # router-ios#sh running-config | section ^router ospfv3
1455 # router ospfv3 1
1456 # max-metric router-lsa on-startup 110
1457 # area 10 nssa default-information-originate metric 10
1458 # !
1459 # address-family ipv4 unicast vrf blue
1460 # adjacency stagger 50 50
1461 # area 25 nssa default-information-originate metric 25 nssa-only
1462 # exit-address-family
1463 # router ospfv3 200
1464 # max-metric router-lsa on-startup 100
1465 # auto-cost reference-bandwidth 4
1466 # !
1467 # address-family ipv4 unicast
1468 # adjacency stagger 200 200
1469 # exit-address-family
1470
1471 - name: Delete provided OSPF V3 processes
1472 cisco.ios.ios_ospfv3:
1473 config:
1474 processes:
1475 - process_id: 1
1476 state: deleted
1477
1478 # Task Output:
1479 # ------------
1480
1481 # before:
1482 # processes:
1483 # - address_family:
1484 # - adjacency:
1485 # max_adjacency: 50
1486 # min_adjacency: 50
1487 # afi: ipv4
1488 # areas:
1489 # - area_id: '25'
1490 # nssa:
1491 # default_information_originate:
1492 # metric: 25
1493 # nssa_only: true
1494 # unicast: true
1495 # vrf: blue
1496 # areas:
1497 # - area_id: '10'
1498 # nssa:
1499 # default_information_originate:
1500 # metric: 10
1501 # max_metric:
1502 # on_startup:
1503 # time: 110
1504 # router_lsa: true
1505 # process_id: 1
1506 # - address_family:
1507 # - adjacency:
1508 # max_adjacency: 200
1509 # min_adjacency: 200
1510 # afi: ipv4
1511 # unicast: true
1512 # auto_cost:
1513 # reference_bandwidth: 4
1514 # max_metric:
1515 # on_startup:
1516 # time: 100
1517 # router_lsa: true
1518 # process_id: 200
1519 #
1520 # commands:
1521 # - no router ospfv3 1
1522 #
1523 # parsed:
1524 # processes:
1525 # - address_family:
1526 # - adjacency:
1527 # max_adjacency: 200
1528 # min_adjacency: 200
1529 # afi: ipv4
1530 # unicast: true
1531 # auto_cost:
1532 # reference_bandwidth: 4
1533 # max_metric:
1534 # on_startup:
1535 # time: 100
1536 # router_lsa: true
1537 # process_id: 200
1538 #
1539 # After state:
1540 # ------------
1541 # router-ios#sh running-config | section ^router ospfv3
1542 # router ospfv3 200
1543 # max-metric router-lsa on-startup 100
1544 # auto-cost reference-bandwidth 4
1545 # !
1546 # address-family ipv4 unicast
1547 # adjacency stagger 200 200
1548 # exit-address-family
1549
1550 # Using deleted without any config passed (NOTE: This will delete all OSPFV3 configuration from device)
1551
1552 # Before state:
1553 # -------------
1554 #
1555 # router-ios#sh running-config | section ^router ospfv3
1556 # router ospfv3 1
1557 # max-metric router-lsa on-startup 110
1558 # area 10 nssa default-information-originate metric 10
1559 # !
1560 # address-family ipv4 unicast vrf blue
1561 # adjacency stagger 50 50
1562 # area 25 nssa default-information-originate metric 25 nssa-only
1563 # exit-address-family
1564 # router ospfv3 200
1565 # max-metric router-lsa on-startup 100
1566 # auto-cost reference-bandwidth 4
1567 # !
1568 # address-family ipv4 unicast
1569 # adjacency stagger 200 200
1570 # exit-address-family
1571
1572 - name: Delete all OSPF processes
1573 cisco.ios.ios_ospfv3:
1574 state: deleted
1575
1576 # Task Output:
1577 # ------------
1578
1579 # before:
1580 # processes:
1581 # - address_family:
1582 # - adjacency:
1583 # max_adjacency: 50
1584 # min_adjacency: 50
1585 # afi: ipv4
1586 # areas:
1587 # - area_id: '25'
1588 # nssa:
1589 # default_information_originate:
1590 # metric: 25
1591 # nssa_only: true
1592 # unicast: true
1593 # vrf: blue
1594 # areas:
1595 # - area_id: '10'
1596 # nssa:
1597 # default_information_originate:
1598 # metric: 10
1599 # max_metric:
1600 # on_startup:
1601 # time: 110
1602 # router_lsa: true
1603 # process_id: 1
1604 # - address_family:
1605 # - adjacency:
1606 # max_adjacency: 200
1607 # min_adjacency: 200
1608 # afi: ipv4
1609 # unicast: true
1610 # auto_cost:
1611 # reference_bandwidth: 4
1612 # max_metric:
1613 # on_startup:
1614 # time: 100
1615 # router_lsa: true
1616 # process_id: 200
1617 #
1618 # commands:
1619 # - no router ospfv3 200
1620 # - no router ospfv3 1
1621 #
1622 # after: {}
1623 #
1624 # After state:
1625 # ------------
1626 # router-ios#sh running-config | section ^router ospfv3
1627 # router-ios#
1628
1629
1630 # Using overridden
1631
1632 # Before state:
1633 # -------------
1634 #
1635 # router ospfv3 1
1636 # max-metric router-lsa on-startup 110
1637 # area 10 nssa default-information-originate metric 10
1638 # !
1639 # address-family ipv4 unicast vrf blue
1640 # adjacency stagger 50 50
1641 # area 25 nssa default-information-originate metric 25 nssa-only
1642 # exit-address-family
1643 # router ospfv3 200
1644 # max-metric router-lsa on-startup 100
1645 # auto-cost reference-bandwidth 4
1646 # !
1647 # address-family ipv4 unicast
1648 # adjacency stagger 200 200
1649 # exit-address-family
1650
1651 - name: Override provided OSPFV3 configuration
1652 cisco.ios.ios_ospfv3:
1653 config:
1654 processes:
1655 - process_id: 200
1656 max_metric:
1657 router_lsa: true
1658 on_startup:
1659 time: 200
1660 address_family:
1661 - afi: ipv4
1662 unicast: true
1663 adjacency:
1664 min_adjacency: 50
1665 max_adjacency: 50
1666 areas:
1667 - area_id: 200
1668 nssa:
1669 default_information_originate:
1670 metric: 200
1671 nssa_only: true
1672 areas:
1673 - area_id: "10"
1674 nssa:
1675 default_information_originate:
1676 metric: 10
1677 state: overridden
1678
1679 # Task Output:
1680 # ------------
1681
1682 # before:
1683 # processes:
1684 # - address_family:
1685 # - adjacency:
1686 # max_adjacency: 50
1687 # min_adjacency: 50
1688 # afi: ipv4
1689 # areas:
1690 # - area_id: '25'
1691 # nssa:
1692 # default_information_originate:
1693 # metric: 25
1694 # nssa_only: true
1695 # unicast: true
1696 # vrf: blue
1697 # areas:
1698 # - area_id: '10'
1699 # nssa:
1700 # default_information_originate:
1701 # metric: 10
1702 # max_metric:
1703 # on_startup:
1704 # time: 110
1705 # router_lsa: true
1706 # process_id: 1
1707 # - address_family:
1708 # - adjacency:
1709 # max_adjacency: 200
1710 # min_adjacency: 200
1711 # afi: ipv4
1712 # unicast: true
1713 # auto_cost:
1714 # reference_bandwidth: 4
1715 # max_metric:
1716 # on_startup:
1717 # time: 100
1718 # router_lsa: true
1719 # process_id: 200
1720 #
1721 # commands:
1722 # - no router ospfv3 1
1723 # - router ospfv3 200
1724 # - no auto-cost reference-bandwidth 4
1725 # - max-metric router-lsa on-startup 200
1726 # - area 10 nssa default-information-originate metric 10
1727 # - address-family ipv4 unicast
1728 # - adjacency stagger 50 50
1729 # - area 200 nssa default-information-originate metric 200 nssa-only
1730 # - exit-address-family
1731 #
1732 # after:
1733 # processes:
1734 # - address_family:
1735 # - adjacency:
1736 # max_adjacency: 50
1737 # min_adjacency: 50
1738 # afi: ipv4
1739 # areas:
1740 # - area_id: '200'
1741 # nssa:
1742 # default_information_originate:
1743 # metric: 200
1744 # nssa_only: true
1745 # unicast: true
1746 # areas:
1747 # - area_id: '10'
1748 # nssa:
1749 # default_information_originate:
1750 # metric: 10
1751 # max_metric:
1752 # on_startup:
1753 # time: 200
1754 # router_lsa: true
1755 # process_id: 200
1756
1757 # After state:
1758 # ------------
1759 #
1760 # router-ios#sh running-config | section ^router ospfv3
1761 # router ospfv3 200
1762 # max-metric router-lsa on-startup 200
1763 # area 10 nssa default-information-originate metric 10
1764 # !
1765 # address-family ipv4 unicast
1766 # adjacency stagger 50 50
1767 # area 200 nssa default-information-originate metric 200 nssa-only
1768 # exit-address-family
1769
1770 # Using replaced
1771
1772 # Before state:
1773 # -------------
1774 #
1775 # router-ios#sh running-config | section ^router ospfv3
1776 # router ospfv3 1
1777 # max-metric router-lsa on-startup 110
1778 # area 10 nssa default-information-originate metric 10
1779 # !
1780 # address-family ipv4 unicast vrf blue
1781 # adjacency stagger 50 50
1782 # area 25 nssa default-information-originate metric 25 nssa-only
1783 # exit-address-family
1784 # router ospfv3 200
1785 # max-metric router-lsa on-startup 100
1786 # auto-cost reference-bandwidth 4
1787 # !
1788 # address-family ipv4 unicast
1789 # adjacency stagger 200 200
1790 # exit-address-family
1791
1792 - name: Perform replace with provided configurations.
1793 cisco.ios.ios_ospfv3:
1794 config:
1795 processes:
1796 - process_id: 200
1797 max_metric:
1798 router_lsa: true
1799 on_startup:
1800 time: 200
1801 address_family:
1802 - afi: ipv4
1803 unicast: true
1804 adjacency:
1805 min_adjacency: 50
1806 max_adjacency: 50
1807 areas:
1808 - area_id: 200
1809 nssa:
1810 default_information_originate:
1811 metric: 200
1812 nssa_only: true
1813 areas:
1814 - area_id: "10"
1815 nssa:
1816 default_information_originate:
1817 metric: 10
1818 state: replaced
1819
1820 # Task Output:
1821 # ------------
1822
1823 # before:
1824 # processes:
1825 # - address_family:
1826 # - adjacency:
1827 # max_adjacency: 50
1828 # min_adjacency: 50
1829 # afi: ipv4
1830 # areas:
1831 # - area_id: '25'
1832 # nssa:
1833 # default_information_originate:
1834 # metric: 25
1835 # nssa_only: true
1836 # unicast: true
1837 # vrf: blue
1838 # areas:
1839 # - area_id: '10'
1840 # nssa:
1841 # default_information_originate:
1842 # metric: 10
1843 # max_metric:
1844 # on_startup:
1845 # time: 110
1846 # router_lsa: true
1847 # process_id: 1
1848 # - address_family:
1849 # - adjacency:
1850 # max_adjacency: 200
1851 # min_adjacency: 200
1852 # afi: ipv4
1853 # unicast: true
1854 # auto_cost:
1855 # reference_bandwidth: 4
1856 # max_metric:
1857 # on_startup:
1858 # time: 100
1859 # router_lsa: true
1860 # process_id: 200
1861 #
1862 # commands:
1863 # - router ospfv3 200
1864 # - no auto-cost reference-bandwidth 4
1865 # - max-metric router-lsa on-startup 200
1866 # - area 10 nssa default-information-originate metric 10
1867 # - address-family ipv4 unicast
1868 # - adjacency stagger 50 50
1869 # - area 200 nssa default-information-originate metric 200 nssa-only
1870 # - exit-address-family
1871 #
1872 # after:
1873 # processes:
1874 # - address_family:
1875 # - adjacency:
1876 # max_adjacency: 50
1877 # min_adjacency: 50
1878 # afi: ipv4
1879 # areas:
1880 # - area_id: '25'
1881 # nssa:
1882 # default_information_originate:
1883 # metric: 25
1884 # nssa_only: true
1885 # unicast: true
1886 # vrf: blue
1887 # areas:
1888 # - area_id: '10'
1889 # nssa:
1890 # default_information_originate:
1891 # metric: 10
1892 # max_metric:
1893 # on_startup:
1894 # time: 110
1895 # router_lsa: true
1896 # process_id: 1
1897 # - address_family:
1898 # - afi: ipv4
1899 # areas:
1900 # - area_id: '200'
1901 # nssa:
1902 # default_information_originate:
1903 # metric: 200
1904 # nssa_only: true
1905 # unicast: true
1906 # areas:
1907 # - area_id: '10'
1908 # nssa:
1909 # default_information_originate:
1910 # metric: 10
1911 # max_metric:
1912 # on_startup:
1913 # time: 200
1914 # router_lsa: true
1915 # process_id: 200
1916 #
1917 # After state:
1918 # -------------
1919 # router-ios#sh running-config | section ^router ospfv3
1920 # router ospfv3 1
1921 # max-metric router-lsa on-startup 110
1922 # area 10 nssa default-information-originate metric 10
1923 # !
1924 # address-family ipv4 unicast vrf blue
1925 # adjacency stagger 50 50
1926 # area 25 nssa default-information-originate metric 25 nssa-only
1927 # exit-address-family
1928 # router ospfv3 200
1929 # max-metric router-lsa on-startup 200
1930 # area 10 nssa default-information-originate metric 10
1931 # !
1932 # address-family ipv4 unicast
1933 # adjacency stagger 50 50
1934 # area 200 nssa default-information-originate metric 200 nssa-only
1935 # exit-address-family
1936
1937 # Using Gathered
1938
1939 # Before state:
1940 # -------------
1941 #
1942 # router-ios#sh running-config | section ^router ospfv3
1943 # router ospfv3 1
1944 # max-metric router-lsa on-startup 110
1945 # area 10 nssa default-information-originate metric 10
1946 # !
1947 # address-family ipv4 unicast vrf blue
1948 # adjacency stagger 50 50
1949 # area 25 nssa default-information-originate metric 25 nssa-only
1950 # exit-address-family
1951 # router ospfv3 200
1952 # max-metric router-lsa on-startup 100
1953 # auto-cost reference-bandwidth 4
1954 # !
1955 # address-family ipv4 unicast
1956 # adjacency stagger 200 200
1957 # exit-address-family
1958
1959 - name: Gather OSPFV3 provided configurations
1960 cisco.ios.ios_ospfv3:
1961 config:
1962 state: gathered
1963
1964 # Task Output:
1965 # ------------
1966 #
1967 # parsed:
1968 # processes:
1969 # - address_family:
1970 # - adjacency:
1971 # max_adjacency: 50
1972 # min_adjacency: 50
1973 # afi: ipv4
1974 # areas:
1975 # - area_id: '25'
1976 # nssa:
1977 # default_information_originate:
1978 # metric: 25
1979 # nssa_only: true
1980 # unicast: true
1981 # vrf: blue
1982 # areas:
1983 # - area_id: '10'
1984 # nssa:
1985 # default_information_originate:
1986 # metric: 10
1987 # max_metric:
1988 # on_startup:
1989 # time: 110
1990 # router_lsa: true
1991 # process_id: 1
1992 # - address_family:
1993 # - adjacency:
1994 # max_adjacency: 200
1995 # min_adjacency: 200
1996 # afi: ipv4
1997 # unicast: true
1998 # auto_cost:
1999 # reference_bandwidth: 4
2000 # max_metric:
2001 # on_startup:
2002 # time: 100
2003 # router_lsa: true
2004 # process_id: 200
2005
2006 # After state:
2007 # ------------
2008 #
2009 # router-ios#sh running-config | section ^router ospfv3
2010 # router ospfv3 1
2011 # max-metric router-lsa on-startup 110
2012 # area 10 nssa default-information-originate metric 10
2013 # !
2014 # address-family ipv4 unicast vrf blue
2015 # adjacency stagger 50 50
2016 # area 25 nssa default-information-originate metric 25 nssa-only
2017 # exit-address-family
2018 # router ospfv3 200
2019 # max-metric router-lsa on-startup 100
2020 # auto-cost reference-bandwidth 4
2021 # !
2022 # address-family ipv4 unicast
2023 # adjacency stagger 200 200
2024 # exit-address-family
2025
2026 # Using Rendered
2027
2028 - name: Render the commands for provided configuration
2029 cisco.ios.ios_ospfv3:
2030 config:
2031 processes:
2032 - process_id: 1
2033 max_metric:
2034 router_lsa: true
2035 on_startup:
2036 time: 110
2037 address_family:
2038 - afi: ipv4
2039 unicast: true
2040 vrf: blue
2041 adjacency:
2042 min_adjacency: 50
2043 max_adjacency: 50
2044 areas:
2045 - area_id: 25
2046 nssa:
2047 default_information_originate:
2048 metric: 25
2049 nssa_only: true
2050 areas:
2051 - area_id: "10"
2052 nssa:
2053 default_information_originate:
2054 metric: 10
2055 timers:
2056 throttle:
2057 lsa:
2058 first_delay: 12
2059 min_delay: 14
2060 max_delay: 16
2061 - process_id: 200
2062 address_family:
2063 - afi: ipv4
2064 unicast: true
2065 adjacency:
2066 min_adjacency: 200
2067 max_adjacency: 200
2068 max_metric:
2069 router_lsa: true
2070 on_startup:
2071 time: 100
2072 auto_cost:
2073 reference_bandwidth: 4
2074 state: rendered
2075
2076 # Task Output:
2077 # ------------
2078
2079 # rendered:
2080 # - router ospfv3 1
2081 # - max-metric router-lsa on-startup 110
2082 # - area 10 nssa default-information-originate metric 10
2083 # - address-family ipv4 unicast vrf blue
2084 # - adjacency stagger 50 50
2085 # - area 25 nssa default-information-originate metric 25 nssa-only
2086 # - exit-address-family
2087 # - router ospfv3 200
2088 # - auto-cost reference-bandwidth 4
2089 # - max-metric router-lsa on-startup 100
2090 # - address-family ipv4 unicast
2091 # - adjacency stagger 200 200
2092 # - exit-address-family
2093
2094
2095 # Using Parsed
2096
2097 # File: parsed.cfg
2098 # ----------------
2099 #
2100 # router ospfv3 1
2101 # max-metric router-lsa on-startup 110
2102 # area 10 nssa default-information-originate metric 10
2103 # !
2104 # address-family ipv4 unicast vrf blue
2105 # adjacency stagger 50 50
2106 # area 25 nssa default-information-originate metric 25 nssa-only
2107 # exit-address-family
2108 # router ospfv3 200
2109 # max-metric router-lsa on-startup 100
2110 # auto-cost reference-bandwidth 4
2111 # !
2112 # address-family ipv4 unicast
2113 # adjacency stagger 200 200
2114 # exit-address-family
2115
2116 - name: Parse the provided configuration and display structured ospfv3 facts.
2117 cisco.ios.ios_ospfv3:
2118 running_config: "{{ lookup('file', 'parsed.cfg') }}"
2119 state: parsed
2120
2121 # Task Output:
2122 # ------------
2123 #
2124 # parsed:
2125 # processes:
2126 # - address_family:
2127 # - adjacency:
2128 # max_adjacency: 50
2129 # min_adjacency: 50
2130 # afi: ipv4
2131 # areas:
2132 # - area_id: '25'
2133 # nssa:
2134 # default_information_originate:
2135 # metric: 25
2136 # nssa_only: true
2137 # unicast: true
2138 # vrf: blue
2139 # areas:
2140 # - area_id: '10'
2141 # nssa:
2142 # default_information_originate:
2143 # metric: 10
2144 # max_metric:
2145 # on_startup:
2146 # time: 110
2147 # router_lsa: true
2148 # process_id: 1
2149 # - address_family:
2150 # - adjacency:
2151 # max_adjacency: 200
2152 # min_adjacency: 200
2153 # afi: ipv4
2154 # unicast: true
2155 # auto_cost:
2156 # reference_bandwidth: 4
2157 # max_metric:
2158 # on_startup:
2159 # time: 100
2160 # router_lsa: true
2161 # process_id: 200
2162 """
2163
2164 RETURN = """
2165 before:
2166 description: The configuration prior to the model invocation.
2167 returned: always
2168 sample: >
2169 The configuration returned will always be in the same format
2170 of the parameters above.
2171 type: dict
2172 after:
2173 description: The resulting configuration model invocation.
2174 returned: when changed
2175 sample: >
2176 The configuration returned will always be in the same format
2177 of the parameters above.
2178 type: dict
2179 commands:
2180 description: The set of commands pushed to the remote device.
2181 returned: always
2182 type: list
2183 sample: ['router ospfv3 1', 'address-family ipv4 unicast vrf blue', 'adjacency stagger 50 50']
2184 rendered:
2185 description: The provided configuration in the task rendered in device-native format (offline).
2186 returned: when I(state) is C(rendered)
2187 type: list
2188 sample:
2189 - router ospfv3 1
2190 - max-metric router-lsa on-startup 110
2191 - area 10 nssa default-information-originate metric 10
2192 gathered:
2193 description: Facts about the network resource gathered from the remote device as structured data.
2194 returned: when I(state) is C(gathered)
2195 type: dict
2196 sample: >
2197 This output will always be in the same format as the
2198 module argspec.
2199 parsed:
2200 description: The device native config provided in I(running_config) option parsed into structured data as per module argspec.
2201 returned: when I(state) is C(parsed)
2202 type: dict
2203 sample: >
2204 This output will always be in the same format as the
2205 module argspec.
2206 """
2207
2208
2209 from ansible.module_utils.basic import AnsibleModule
2210
2211 from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospfv3.ospfv3 import (
2212 Ospfv3Args,
2213 )
2214 from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.ospfv3.ospfv3 import (
2215 Ospfv3,
2216 )
2217
2218
2219 def main():
2220 """
2221 Main entry point for module execution
2222 :returns: the result form module invocation
2223 """
2224 required_if = [
2225 ("state", "merged", ("config",)),
2226 ("state", "replaced", ("config",)),
2227 ("state", "overridden", ("config",)),
2228 ("state", "rendered", ("config",)),
2229 ("state", "parsed", ("running_config",)),
2230 ]
2231
2232 mutually_exclusive = [("config", "running_config")]
2233
2234 module = AnsibleModule(
2235 argument_spec=Ospfv3Args.argument_spec,
2236 required_if=required_if,
2237 mutually_exclusive=mutually_exclusive,
2238 supports_check_mode=True,
2239 )
2240
2241 result = Ospfv3(module).execute_module()
2242 module.exit_json(**result)
2243
2244
2245 if __name__ == "__main__":
2246 main()