Debian Codegraph @

ansible_collections/fortinet/fortios/plugins/modules/fortios_system_interface.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3
4 # Copyright: (c) 2022 Fortinet
5 # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 __metaclass__ = type
13
14 ANSIBLE_METADATA = {
15 "status": ["preview"],
16 "supported_by": "community",
17 "metadata_version": "1.1",
18 }
19
20 DOCUMENTATION = """
21 ---
22 module: fortios_system_interface
23 short_description: Configure interfaces in Fortinet's FortiOS and FortiGate.
24 description:
25 - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the
26 user to set and modify system feature and interface category.
27 Examples include all parameters and values need to be adjusted to datasources before usage.
28 Tested with FOS v6.0.0
29 version_added: "2.0.0"
30 author:
31 - Link Zheng (@chillancezen)
32 - Jie Xue (@JieX19)
33 - Hongbin Lu (@fgtdev-hblu)
34 - Frank Shen (@frankshen01)
35 - Miguel Angel Munoz (@mamunozgonzalez)
36 - Nicolas Thomas (@thomnico)
37 notes:
38 - Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
39
40 - The module supports check_mode.
41
42 requirements:
43 - ansible>=2.16
44 options:
45 access_token:
46 description:
47 - Token-based authentication.
48 Generated from GUI of Fortigate.
49 type: str
50 required: false
51 enable_log:
52 description:
53 - Enable/Disable logging for task.
54 type: bool
55 required: false
56 default: false
57 vdom:
58 description:
59 - Virtual domain, among those defined previously. A vdom is a
60 virtual instance of the FortiGate that can be configured and
61 used as a different unit.
62 type: str
63 default: root
64 member_path:
65 type: str
66 description:
67 - Member attribute path to operate on.
68 - Delimited by a slash character if there are more than one attribute.
69 - Parameter marked with member_path is legitimate for doing member operation.
70 member_state:
71 type: str
72 description:
73 - Add or delete a member under specified attribute path.
74 - When member_state is specified, the state option is ignored.
75 choices:
76 - 'present'
77 - 'absent'
78
79 state:
80 description:
81 - Indicates whether to create or remove the object.
82 type: str
83 required: true
84 choices:
85 - 'present'
86 - 'absent'
87 system_interface:
88 description:
89 - Configure interfaces.
90 default: null
91 type: dict
92 suboptions:
93 ac_name:
94 description:
95 - PPPoE server name.
96 type: str
97 aggregate:
98 description:
99 - Aggregate interface.
100 type: str
101 aggregate_type:
102 description:
103 - Type of aggregation.
104 type: str
105 choices:
106 - 'physical'
107 - 'vxlan'
108 algorithm:
109 description:
110 - Frame distribution algorithm.
111 type: str
112 choices:
113 - 'L2'
114 - 'L3'
115 - 'L4'
116 - 'NPU-GRE'
117 - 'Source-MAC'
118 alias:
119 description:
120 - Alias will be displayed with the interface name to make it easier to distinguish.
121 type: str
122 allowaccess:
123 description:
124 - Permitted types of management access to this interface.
125 type: list
126 elements: str
127 choices:
128 - 'ping'
129 - 'https'
130 - 'ssh'
131 - 'snmp'
132 - 'http'
133 - 'telnet'
134 - 'fgfm'
135 - 'radius-acct'
136 - 'probe-response'
137 - 'fabric'
138 - 'ftm'
139 - 'speed-test'
140 - 'scim'
141 - 'capwap'
142 ap_discover:
143 description:
144 - Enable/disable automatic registration of unknown FortiAP devices.
145 type: str
146 choices:
147 - 'enable'
148 - 'disable'
149 arpforward:
150 description:
151 - Enable/disable ARP forwarding.
152 type: str
153 choices:
154 - 'enable'
155 - 'disable'
156 auth_cert:
157 description:
158 - HTTPS server certificate. Source vpn.certificate.local.name.
159 type: str
160 auth_portal_addr:
161 description:
162 - Address of captive portal.
163 type: str
164 auth_type:
165 description:
166 - PPP authentication type to use.
167 type: str
168 choices:
169 - 'auto'
170 - 'pap'
171 - 'chap'
172 - 'mschapv1'
173 - 'mschapv2'
174 auto_auth_extension_device:
175 description:
176 - Enable/disable automatic authorization of dedicated Fortinet extension device on this interface.
177 type: str
178 choices:
179 - 'enable'
180 - 'disable'
181 bandwidth_measure_time:
182 description:
183 - Bandwidth measure time.
184 type: int
185 bfd:
186 description:
187 - Bidirectional Forwarding Detection (BFD) settings.
188 type: str
189 choices:
190 - 'global'
191 - 'enable'
192 - 'disable'
193 bfd_desired_min_tx:
194 description:
195 - BFD desired minimal transmit interval.
196 type: int
197 bfd_detect_mult:
198 description:
199 - BFD detection multiplier.
200 type: int
201 bfd_required_min_rx:
202 description:
203 - BFD required minimal receive interval.
204 type: int
205 broadcast_forticlient_discovery:
206 description:
207 - Enable/disable broadcasting FortiClient discovery messages.
208 type: str
209 choices:
210 - 'enable'
211 - 'disable'
212 broadcast_forward:
213 description:
214 - Enable/disable broadcast forwarding.
215 type: str
216 choices:
217 - 'enable'
218 - 'disable'
219 captive_portal:
220 description:
221 - Enable/disable captive portal.
222 type: int
223 cli_conn_status:
224 description:
225 - CLI connection status.
226 type: int
227 client_options:
228 description:
229 - DHCP client options.
230 type: list
231 elements: dict
232 suboptions:
233 code:
234 description:
235 - DHCP client option code.
236 type: int
237 id:
238 description:
239 - ID. see <a href='#notes'>Notes</a>.
240 required: true
241 type: int
242 ip:
243 description:
244 - DHCP option IPs.
245 type: list
246 elements: str
247 type:
248 description:
249 - DHCP client option type.
250 type: str
251 choices:
252 - 'hex'
253 - 'string'
254 - 'ip'
255 - 'fqdn'
256 value:
257 description:
258 - DHCP client option value.
259 type: str
260 color:
261 description:
262 - Color of icon on the GUI.
263 type: int
264 dedicated_to:
265 description:
266 - Configure interface for single purpose.
267 type: str
268 choices:
269 - 'none'
270 - 'management'
271 default_purdue_level:
272 description:
273 - default purdue level of device detected on this interface.
274 type: str
275 choices:
276 - '1'
277 - '1.5'
278 - '2'
279 - '2.5'
280 - '3'
281 - '3.5'
282 - '4'
283 - '5'
284 - '5.5'
285 defaultgw:
286 description:
287 - Enable to get the gateway IP from the DHCP or PPPoE server.
288 type: str
289 choices:
290 - 'enable'
291 - 'disable'
292 description:
293 description:
294 - Description.
295 type: str
296 detected_peer_mtu:
297 description:
298 - MTU of detected peer (0 - 4294967295).
299 type: int
300 detectprotocol:
301 description:
302 - Protocols used to detect the server.
303 type: list
304 elements: str
305 choices:
306 - 'ping'
307 - 'tcp-echo'
308 - 'udp-echo'
309 detectserver:
310 description:
311 - Gateway"s ping server for this IP.
312 type: str
313 device_access_list:
314 description:
315 - Device access list.
316 type: str
317 device_identification:
318 description:
319 - Enable/disable passively gathering of device identity information about the devices on the network connected to this interface.
320 type: str
321 choices:
322 - 'enable'
323 - 'disable'
324 device_identification_active_scan:
325 description:
326 - Enable/disable active gathering of device identity information about the devices on the network connected to this interface.
327 type: str
328 choices:
329 - 'enable'
330 - 'disable'
331 device_netscan:
332 description:
333 - Enable/disable inclusion of devices detected on this interface in network vulnerability scans.
334 type: str
335 choices:
336 - 'disable'
337 - 'enable'
338 device_user_identification:
339 description:
340 - Enable/disable passive gathering of user identity information about users on this interface.
341 type: str
342 choices:
343 - 'enable'
344 - 'disable'
345 devindex:
346 description:
347 - Device Index.
348 type: int
349 dhcp_broadcast_flag:
350 description:
351 - Enable/disable setting of the broadcast flag in messages sent by the DHCP client .
352 type: str
353 choices:
354 - 'disable'
355 - 'enable'
356 dhcp_classless_route_addition:
357 description:
358 - Enable/disable addition of classless static routes retrieved from DHCP server.
359 type: str
360 choices:
361 - 'enable'
362 - 'disable'
363 dhcp_client_identifier:
364 description:
365 - DHCP client identifier.
366 type: str
367 dhcp_relay_agent_option:
368 description:
369 - Enable/disable DHCP relay agent option.
370 type: str
371 choices:
372 - 'enable'
373 - 'disable'
374 dhcp_relay_allow_no_end_option:
375 description:
376 - Enable/disable relaying DHCP messages with no end option.
377 type: str
378 choices:
379 - 'disable'
380 - 'enable'
381 dhcp_relay_circuit_id:
382 description:
383 - DHCP relay circuit ID.
384 type: str
385 dhcp_relay_interface:
386 description:
387 - Specify outgoing interface to reach server. Source system.interface.name.
388 type: str
389 dhcp_relay_interface_select_method:
390 description:
391 - Specify how to select outgoing interface to reach server.
392 type: str
393 choices:
394 - 'auto'
395 - 'sdwan'
396 - 'specify'
397 dhcp_relay_ip:
398 description:
399 - DHCP relay IP address.
400 type: list
401 elements: str
402 dhcp_relay_link_selection:
403 description:
404 - DHCP relay link selection.
405 type: str
406 dhcp_relay_request_all_server:
407 description:
408 - Enable/disable sending of DHCP requests to all servers.
409 type: str
410 choices:
411 - 'disable'
412 - 'enable'
413 dhcp_relay_service:
414 description:
415 - Enable/disable allowing this interface to act as a DHCP relay.
416 type: str
417 choices:
418 - 'disable'
419 - 'enable'
420 dhcp_relay_source_ip:
421 description:
422 - IP address used by the DHCP relay as its source IP.
423 type: str
424 dhcp_relay_type:
425 description:
426 - DHCP relay type (regular or IPsec).
427 type: str
428 choices:
429 - 'regular'
430 - 'ipsec'
431 dhcp_relay_vrf_select:
432 description:
433 - VRF ID used for connection to server.
434 type: int
435 dhcp_renew_time:
436 description:
437 - DHCP renew time in seconds (300-604800), 0 means use the renew time provided by the server.
438 type: int
439 dhcp_smart_relay:
440 description:
441 - Enable/disable DHCP smart relay.
442 type: str
443 choices:
444 - 'disable'
445 - 'enable'
446 dhcp_snooping_server_list:
447 description:
448 - Configure DHCP server access list.
449 type: list
450 elements: dict
451 suboptions:
452 name:
453 description:
454 - DHCP server name.
455 required: true
456 type: str
457 server_ip:
458 description:
459 - IP address for DHCP server.
460 type: str
461 disc_retry_timeout:
462 description:
463 - Time in seconds to wait before retrying to start a PPPoE discovery, 0 means no timeout.
464 type: int
465 disconnect_threshold:
466 description:
467 - Time in milliseconds to wait before sending a notification that this interface is down or disconnected.
468 type: int
469 distance:
470 description:
471 - Distance for routes learned through PPPoE or DHCP, lower distance indicates preferred route.
472 type: int
473 dns_server_override:
474 description:
475 - Enable/disable use DNS acquired by DHCP or PPPoE.
476 type: str
477 choices:
478 - 'enable'
479 - 'disable'
480 dns_server_protocol:
481 description:
482 - DNS transport protocols.
483 type: list
484 elements: str
485 choices:
486 - 'cleartext'
487 - 'dot'
488 - 'doh'
489 drop_fragment:
490 description:
491 - Enable/disable drop fragment packets.
492 type: str
493 choices:
494 - 'enable'
495 - 'disable'
496 drop_overlapped_fragment:
497 description:
498 - Enable/disable drop overlapped fragment packets.
499 type: str
500 choices:
501 - 'enable'
502 - 'disable'
503 eap_ca_cert:
504 description:
505 - EAP CA certificate name. Source certificate.ca.name.
506 type: str
507 eap_identity:
508 description:
509 - EAP identity.
510 type: str
511 eap_method:
512 description:
513 - EAP method.
514 type: str
515 choices:
516 - 'tls'
517 - 'peap'
518 eap_password:
519 description:
520 - EAP password.
521 type: str
522 eap_supplicant:
523 description:
524 - Enable/disable EAP-Supplicant.
525 type: str
526 choices:
527 - 'enable'
528 - 'disable'
529 eap_user_cert:
530 description:
531 - EAP user certificate name. Source certificate.local.name.
532 type: str
533 egress_cos:
534 description:
535 - Override outgoing CoS in user VLAN tag.
536 type: str
537 choices:
538 - 'disable'
539 - 'cos0'
540 - 'cos1'
541 - 'cos2'
542 - 'cos3'
543 - 'cos4'
544 - 'cos5'
545 - 'cos6'
546 - 'cos7'
547 egress_queues:
548 description:
549 - Configure queues of NP port on egress path.
550 type: dict
551 suboptions:
552 cos0:
553 description:
554 - CoS profile name for CoS 0. Source system.isf-queue-profile.name.
555 type: str
556 cos1:
557 description:
558 - CoS profile name for CoS 1. Source system.isf-queue-profile.name.
559 type: str
560 cos2:
561 description:
562 - CoS profile name for CoS 2. Source system.isf-queue-profile.name.
563 type: str
564 cos3:
565 description:
566 - CoS profile name for CoS 3. Source system.isf-queue-profile.name.
567 type: str
568 cos4:
569 description:
570 - CoS profile name for CoS 4. Source system.isf-queue-profile.name.
571 type: str
572 cos5:
573 description:
574 - CoS profile name for CoS 5. Source system.isf-queue-profile.name.
575 type: str
576 cos6:
577 description:
578 - CoS profile name for CoS 6. Source system.isf-queue-profile.name.
579 type: str
580 cos7:
581 description:
582 - CoS profile name for CoS 7. Source system.isf-queue-profile.name.
583 type: str
584 egress_shaping_profile:
585 description:
586 - Outgoing traffic shaping profile. Source firewall.shaping-profile.profile-name.
587 type: str
588 endpoint_compliance:
589 description:
590 - Enable/disable endpoint compliance enforcement.
591 type: str
592 choices:
593 - 'enable'
594 - 'disable'
595 estimated_downstream_bandwidth:
596 description:
597 - Estimated maximum downstream bandwidth (kbps). Used to estimate link utilization.
598 type: int
599 estimated_upstream_bandwidth:
600 description:
601 - Estimated maximum upstream bandwidth (kbps). Used to estimate link utilization.
602 type: int
603 exclude_signatures:
604 description:
605 - Exclude IOT or OT application signatures.
606 type: list
607 elements: str
608 choices:
609 - 'iot'
610 - 'ot'
611 explicit_ftp_proxy:
612 description:
613 - Enable/disable the explicit FTP proxy on this interface.
614 type: str
615 choices:
616 - 'enable'
617 - 'disable'
618 explicit_web_proxy:
619 description:
620 - Enable/disable the explicit web proxy on this interface.
621 type: str
622 choices:
623 - 'enable'
624 - 'disable'
625 external:
626 description:
627 - Enable/disable identifying the interface as an external interface (which usually means it"s connected to the Internet).
628 type: str
629 choices:
630 - 'enable'
631 - 'disable'
632 fail_action_on_extender:
633 description:
634 - Action on FortiExtender when interface fail.
635 type: str
636 choices:
637 - 'soft-restart'
638 - 'hard-restart'
639 - 'reboot'
640 fail_alert_interfaces:
641 description:
642 - Names of the FortiGate interfaces to which the link failure alert is sent.
643 type: list
644 elements: dict
645 suboptions:
646 name:
647 description:
648 - Names of the non-virtual interface. Source system.interface.name.
649 required: true
650 type: str
651 fail_alert_method:
652 description:
653 - Select link-failed-signal or link-down method to alert about a failed link.
654 type: str
655 choices:
656 - 'link-failed-signal'
657 - 'link-down'
658 fail_detect:
659 description:
660 - Enable/disable fail detection features for this interface.
661 type: str
662 choices:
663 - 'enable'
664 - 'disable'
665 fail_detect_option:
666 description:
667 - Options for detecting that this interface has failed.
668 type: list
669 elements: str
670 choices:
671 - 'detectserver'
672 - 'link-down'
673 fortiheartbeat:
674 description:
675 - Enable/disable FortiHeartBeat (FortiTelemetry on GUI).
676 type: str
677 choices:
678 - 'enable'
679 - 'disable'
680 fortilink:
681 description:
682 - Enable FortiLink to dedicate this interface to manage other Fortinet devices.
683 type: str
684 choices:
685 - 'enable'
686 - 'disable'
687 fortilink_backup_link:
688 description:
689 - FortiLink split interface backup link.
690 type: int
691 fortilink_neighbor_detect:
692 description:
693 - Protocol for FortiGate neighbor discovery.
694 type: str
695 choices:
696 - 'lldp'
697 - 'fortilink'
698 fortilink_split_interface:
699 description:
700 - Enable/disable FortiLink split interface to connect member link to different FortiSwitch in stack for uplink redundancy.
701 type: str
702 choices:
703 - 'enable'
704 - 'disable'
705 fortilink_stacking:
706 description:
707 - Enable/disable FortiLink switch-stacking on this interface.
708 type: str
709 choices:
710 - 'enable'
711 - 'disable'
712 forward_domain:
713 description:
714 - Transparent mode forward domain.
715 type: int
716 forward_error_correction:
717 description:
718 - Configure forward error correction (FEC).
719 type: str
720 choices:
721 - 'none'
722 - 'disable'
723 - 'cl91-rs-fec'
724 - 'cl74-fc-fec'
725 - 'auto'
726 gi_gk:
727 description:
728 - Enable/disable Gi Gatekeeper.
729 type: str
730 choices:
731 - 'enable'
732 - 'disable'
733 gwdetect:
734 description:
735 - Enable/disable detect gateway alive for first.
736 type: str
737 choices:
738 - 'enable'
739 - 'disable'
740 ha_priority:
741 description:
742 - HA election priority for the PING server.
743 type: int
744 icmp_accept_redirect:
745 description:
746 - Enable/disable ICMP accept redirect.
747 type: str
748 choices:
749 - 'enable'
750 - 'disable'
751 icmp_send_redirect:
752 description:
753 - Enable/disable sending of ICMP redirects.
754 type: str
755 choices:
756 - 'enable'
757 - 'disable'
758 ident_accept:
759 description:
760 - Enable/disable authentication for this interface.
761 type: str
762 choices:
763 - 'enable'
764 - 'disable'
765 idle_timeout:
766 description:
767 - PPPoE auto disconnect after idle timeout seconds, 0 means no timeout.
768 type: int
769 ike_saml_server:
770 description:
771 - Configure IKE authentication SAML server. Source user.saml.name.
772 type: str
773 inbandwidth:
774 description:
775 - Bandwidth limit for incoming traffic (0 - 80000000 kbps), 0 means unlimited.
776 type: int
777 ingress_cos:
778 description:
779 - Override incoming CoS in user VLAN tag on VLAN interface or assign a priority VLAN tag on physical interface.
780 type: str
781 choices:
782 - 'disable'
783 - 'cos0'
784 - 'cos1'
785 - 'cos2'
786 - 'cos3'
787 - 'cos4'
788 - 'cos5'
789 - 'cos6'
790 - 'cos7'
791 ingress_shaping_profile:
792 description:
793 - Incoming traffic shaping profile. Source firewall.shaping-profile.profile-name.
794 type: str
795 ingress_spillover_threshold:
796 description:
797 - Ingress Spillover threshold (0 - 16776000 kbps), 0 means unlimited.
798 type: int
799 interconnect_profile:
800 description:
801 - Set interconnect profile.
802 type: str
803 choices:
804 - 'default'
805 - 'profile1'
806 - 'profile2'
807 interface:
808 description:
809 - Interface name. Source system.interface.name.
810 type: str
811 internal:
812 description:
813 - Implicitly created.
814 type: int
815 ip:
816 description:
817 - 'Interface IPv4 address and subnet mask, syntax: X.X.X.X/24.'
818 type: str
819 ip_managed_by_fortiipam:
820 description:
821 - Enable/disable automatic IP address assignment of this interface by FortiIPAM.
822 type: str
823 choices:
824 - 'inherit-global'
825 - 'enable'
826 - 'disable'
827 ipmac:
828 description:
829 - Enable/disable IP/MAC binding.
830 type: str
831 choices:
832 - 'enable'
833 - 'disable'
834 ips_sniffer_mode:
835 description:
836 - Enable/disable the use of this interface as a one-armed sniffer.
837 type: str
838 choices:
839 - 'enable'
840 - 'disable'
841 ipunnumbered:
842 description:
843 - Unnumbered IP used for PPPoE interfaces for which no unique local address is provided.
844 type: str
845 ipv6:
846 description:
847 - IPv6 of interface.
848 type: dict
849 suboptions:
850 autoconf:
851 description:
852 - Enable/disable address auto config.
853 type: str
854 choices:
855 - 'enable'
856 - 'disable'
857 cli_conn6_status:
858 description:
859 - CLI IPv6 connection status.
860 type: int
861 client_options:
862 description:
863 - DHCP6 client options.
864 type: list
865 elements: dict
866 suboptions:
867 code:
868 description:
869 - DHCPv6 option code.
870 type: int
871 id:
872 description:
873 - ID. see <a href='#notes'>Notes</a>.
874 required: true
875 type: int
876 ip6:
877 description:
878 - DHCP option IP6s.
879 type: list
880 elements: str
881 type:
882 description:
883 - DHCPv6 option type.
884 type: str
885 choices:
886 - 'hex'
887 - 'string'
888 - 'ip6'
889 - 'fqdn'
890 value:
891 description:
892 - DHCPv6 option value (hexadecimal value must be even).
893 type: str
894 dhcp6_client_options:
895 description:
896 - DHCPv6 client options.
897 type: list
898 elements: str
899 choices:
900 - 'rapid'
901 - 'iapd'
902 - 'iana'
903 dhcp6_iapd_list:
904 description:
905 - DHCPv6 IA-PD list.
906 type: list
907 elements: dict
908 suboptions:
909 iaid:
910 description:
911 - Identity association identifier. see <a href='#notes'>Notes</a>.
912 required: true
913 type: int
914 prefix_hint:
915 description:
916 - DHCPv6 prefix that will be used as a hint to the upstream DHCPv6 server.
917 type: str
918 prefix_hint_plt:
919 description:
920 - DHCPv6 prefix hint preferred life time (sec), 0 means unlimited lease time.
921 type: int
922 prefix_hint_vlt:
923 description:
924 - DHCPv6 prefix hint valid life time (sec).
925 type: int
926 dhcp6_information_request:
927 description:
928 - Enable/disable DHCPv6 information request.
929 type: str
930 choices:
931 - 'enable'
932 - 'disable'
933 dhcp6_prefix_delegation:
934 description:
935 - Enable/disable DHCPv6 prefix delegation.
936 type: str
937 choices:
938 - 'enable'
939 - 'disable'
940 dhcp6_prefix_hint:
941 description:
942 - DHCPv6 prefix that will be used as a hint to the upstream DHCPv6 server.
943 type: str
944 dhcp6_prefix_hint_plt:
945 description:
946 - DHCPv6 prefix hint preferred life time (sec), 0 means unlimited lease time.
947 type: int
948 dhcp6_prefix_hint_vlt:
949 description:
950 - DHCPv6 prefix hint valid life time (sec).
951 type: int
952 dhcp6_relay_interface_id:
953 description:
954 - DHCP6 relay interface ID.
955 type: str
956 dhcp6_relay_ip:
957 description:
958 - DHCPv6 relay IP address.
959 type: list
960 elements: str
961 dhcp6_relay_service:
962 description:
963 - Enable/disable DHCPv6 relay.
964 type: str
965 choices:
966 - 'disable'
967 - 'enable'
968 dhcp6_relay_source_interface:
969 description:
970 - Enable/disable use of address on this interface as the source address of the relay message.
971 type: str
972 choices:
973 - 'disable'
974 - 'enable'
975 dhcp6_relay_source_ip:
976 description:
977 - IPv6 address used by the DHCP6 relay as its source IP.
978 type: str
979 dhcp6_relay_type:
980 description:
981 - DHCPv6 relay type.
982 type: str
983 choices:
984 - 'regular'
985 icmp6_send_redirect:
986 description:
987 - Enable/disable sending of ICMPv6 redirects.
988 type: str
989 choices:
990 - 'enable'
991 - 'disable'
992 interface_identifier:
993 description:
994 - IPv6 interface identifier.
995 type: str
996 ip6_address:
997 description:
998 - 'Primary IPv6 address prefix. Syntax: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx.'
999 type: str
1000 ip6_adv_rio:
1001 description:
1002 - Enable/disable sending advertisements with route information option.
1003 type: str
1004 choices:
1005 - 'enable'
1006 - 'disable'
1007 ip6_allowaccess:
1008 description:
1009 - Allow management access to the interface.
1010 type: list
1011 elements: str
1012 choices:
1013 - 'ping'
1014 - 'https'
1015 - 'ssh'
1016 - 'snmp'
1017 - 'http'
1018 - 'telnet'
1019 - 'fgfm'
1020 - 'fabric'
1021 - 'scim'
1022 - 'probe-response'
1023 - 'capwap'
1024 ip6_default_life:
1025 description:
1026 - Default life (sec).
1027 type: int
1028 ip6_delegated_prefix_iaid:
1029 description:
1030 - IAID of obtained delegated-prefix from the upstream interface.
1031 type: int
1032 ip6_delegated_prefix_list:
1033 description:
1034 - Advertised IPv6 delegated prefix list.
1035 type: list
1036 elements: dict
1037 suboptions:
1038 autonomous_flag:
1039 description:
1040 - Enable/disable the autonomous flag.
1041 type: str
1042 choices:
1043 - 'enable'
1044 - 'disable'
1045 delegated_prefix_iaid:
1046 description:
1047 - IAID of obtained delegated-prefix from the upstream interface.
1048 type: int
1049 dnssl_service:
1050 description:
1051 - Enable/disable use of domain from delegated prefix for DNSSL.
1052 type: str
1053 choices:
1054 - 'enable'
1055 - 'disable'
1056 onlink_flag:
1057 description:
1058 - Enable/disable the onlink flag.
1059 type: str
1060 choices:
1061 - 'enable'
1062 - 'disable'
1063 prefix_id:
1064 description:
1065 - Prefix ID. see <a href='#notes'>Notes</a>.
1066 required: true
1067 type: int
1068 rdnss:
1069 description:
1070 - Recursive DNS server option.
1071 type: list
1072 elements: str
1073 rdnss_service:
1074 description:
1075 - Recursive DNS service option.
1076 type: str
1077 choices:
1078 - 'delegated'
1079 - 'default'
1080 - 'specify'
1081 subnet:
1082 description:
1083 - Add subnet ID to routing prefix.
1084 type: str
1085 upstream_interface:
1086 description:
1087 - Name of the interface that provides delegated information. Source system.interface.name.
1088 type: str
1089 ip6_dns_server_override:
1090 description:
1091 - Enable/disable using the DNS server acquired by DHCP.
1092 type: str
1093 choices:
1094 - 'enable'
1095 - 'disable'
1096 ip6_dnssl_list:
1097 description:
1098 - Advertised IPv6 DNSS list.
1099 type: list
1100 elements: dict
1101 suboptions:
1102 dnssl_life_time:
1103 description:
1104 - DNS search list time in seconds (0 - 4294967295).
1105 type: int
1106 domain:
1107 description:
1108 - Domain name.
1109 required: true
1110 type: str
1111 ip6_extra_addr:
1112 description:
1113 - Extra IPv6 address prefixes of interface.
1114 type: list
1115 elements: dict
1116 suboptions:
1117 prefix:
1118 description:
1119 - IPv6 address prefix.
1120 required: true
1121 type: str
1122 ip6_hop_limit:
1123 description:
1124 - Hop limit (0 means unspecified).
1125 type: int
1126 ip6_link_mtu:
1127 description:
1128 - IPv6 link MTU.
1129 type: int
1130 ip6_manage_flag:
1131 description:
1132 - Enable/disable the managed flag.
1133 type: str
1134 choices:
1135 - 'enable'
1136 - 'disable'
1137 ip6_max_interval:
1138 description:
1139 - IPv6 maximum interval (4 to 1800 sec).
1140 type: int
1141 ip6_min_interval:
1142 description:
1143 - IPv6 minimum interval (3 to 1350 sec).
1144 type: int
1145 ip6_mode:
1146 description:
1147 - Addressing mode (static, DHCP, delegated).
1148 type: str
1149 choices:
1150 - 'static'
1151 - 'dhcp'
1152 - 'pppoe'
1153 - 'delegated'
1154 ip6_other_flag:
1155 description:
1156 - Enable/disable the other IPv6 flag.
1157 type: str
1158 choices:
1159 - 'enable'
1160 - 'disable'
1161 ip6_prefix_list:
1162 description:
1163 - Advertised prefix list.
1164 type: list
1165 elements: dict
1166 suboptions:
1167 autonomous_flag:
1168 description:
1169 - Enable/disable the autonomous flag.
1170 type: str
1171 choices:
1172 - 'enable'
1173 - 'disable'
1174 dnssl:
1175 description:
1176 - DNS search list option.
1177 type: list
1178 elements: dict
1179 suboptions:
1180 domain:
1181 description:
1182 - Domain name.
1183 required: true
1184 type: str
1185 onlink_flag:
1186 description:
1187 - Enable/disable the onlink flag.
1188 type: str
1189 choices:
1190 - 'enable'
1191 - 'disable'
1192 preferred_life_time:
1193 description:
1194 - Preferred life time (sec).
1195 type: int
1196 prefix:
1197 description:
1198 - IPv6 prefix.
1199 required: true
1200 type: str
1201 rdnss:
1202 description:
1203 - Recursive DNS server option.
1204 type: list
1205 elements: str
1206 valid_life_time:
1207 description:
1208 - Valid life time (sec).
1209 type: int
1210 ip6_prefix_mode:
1211 description:
1212 - Assigning a prefix from DHCP or RA.
1213 type: str
1214 choices:
1215 - 'dhcp6'
1216 - 'ra'
1217 ip6_rdnss_list:
1218 description:
1219 - Advertised IPv6 RDNSS list.
1220 type: list
1221 elements: dict
1222 suboptions:
1223 rdnss:
1224 description:
1225 - Recursive DNS server option.
1226 required: true
1227 type: str
1228 rdnss_life_time:
1229 description:
1230 - Recursive DNS server life time in seconds (0 - 4294967295).
1231 type: int
1232 ip6_reachable_time:
1233 description:
1234 - IPv6 reachable time (milliseconds; 0 means unspecified).
1235 type: int
1236 ip6_retrans_time:
1237 description:
1238 - IPv6 retransmit time (milliseconds; 0 means unspecified).
1239 type: int
1240 ip6_route_list:
1241 description:
1242 - Advertised route list.
1243 type: list
1244 elements: dict
1245 suboptions:
1246 route:
1247 description:
1248 - IPv6 route.
1249 required: true
1250 type: str
1251 route_life_time:
1252 description:
1253 - Route life time in seconds (0 - 65535).
1254 type: int
1255 route_pref:
1256 description:
1257 - Set route preference to the interface .
1258 type: str
1259 choices:
1260 - 'medium'
1261 - 'high'
1262 - 'low'
1263 ip6_route_pref:
1264 description:
1265 - Set route preference to the interface .
1266 type: str
1267 choices:
1268 - 'medium'
1269 - 'high'
1270 - 'low'
1271 ip6_send_adv:
1272 description:
1273 - Enable/disable sending advertisements about the interface.
1274 type: str
1275 choices:
1276 - 'enable'
1277 - 'disable'
1278 ip6_subnet:
1279 description:
1280 - 'Subnet to routing prefix. Syntax: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx.'
1281 type: str
1282 ip6_upstream_interface:
1283 description:
1284 - Interface name providing delegated information. Source system.interface.name.
1285 type: str
1286 nd_cert:
1287 description:
1288 - Neighbor discovery certificate. Source certificate.local.name.
1289 type: str
1290 nd_cga_modifier:
1291 description:
1292 - Neighbor discovery CGA modifier.
1293 type: str
1294 nd_mode:
1295 description:
1296 - Neighbor discovery mode.
1297 type: str
1298 choices:
1299 - 'basic'
1300 - 'SEND-compatible'
1301 nd_security_level:
1302 description:
1303 - Neighbor discovery security level (0 - 7; 0 = least secure).
1304 type: int
1305 nd_timestamp_delta:
1306 description:
1307 - Neighbor discovery timestamp delta value (1 - 3600 sec; ).
1308 type: int
1309 nd_timestamp_fuzz:
1310 description:
1311 - Neighbor discovery timestamp fuzz factor (1 - 60 sec; ).
1312 type: int
1313 ra_send_mtu:
1314 description:
1315 - Enable/disable sending link MTU in RA packet.
1316 type: str
1317 choices:
1318 - 'enable'
1319 - 'disable'
1320 unique_autoconf_addr:
1321 description:
1322 - Enable/disable unique auto config address.
1323 type: str
1324 choices:
1325 - 'enable'
1326 - 'disable'
1327 vrip6_link_local:
1328 description:
1329 - Link-local IPv6 address of virtual router.
1330 type: str
1331 vrrp_virtual_mac6:
1332 description:
1333 - Enable/disable virtual MAC for VRRP.
1334 type: str
1335 choices:
1336 - 'enable'
1337 - 'disable'
1338 vrrp6:
1339 description:
1340 - IPv6 VRRP configuration.
1341 type: list
1342 elements: dict
1343 suboptions:
1344 accept_mode:
1345 description:
1346 - Enable/disable accept mode.
1347 type: str
1348 choices:
1349 - 'enable'
1350 - 'disable'
1351 adv_interval:
1352 description:
1353 - Advertisement interval (250 - 255000 milliseconds).
1354 type: int
1355 ignore_default_route:
1356 description:
1357 - Enable/disable ignoring of default route when checking destination.
1358 type: str
1359 choices:
1360 - 'enable'
1361 - 'disable'
1362 preempt:
1363 description:
1364 - Enable/disable preempt mode.
1365 type: str
1366 choices:
1367 - 'enable'
1368 - 'disable'
1369 priority:
1370 description:
1371 - Priority of the virtual router (1 - 255).
1372 type: int
1373 start_time:
1374 description:
1375 - Startup time (1 - 255 seconds).
1376 type: int
1377 status:
1378 description:
1379 - Enable/disable VRRP.
1380 type: str
1381 choices:
1382 - 'enable'
1383 - 'disable'
1384 vrdst_priority:
1385 description:
1386 - Priority of the virtual router when the virtual router destination becomes unreachable (0 - 254).
1387 type: int
1388 vrdst6:
1389 description:
1390 - Monitor the route to this destination.
1391 type: list
1392 elements: str
1393 vrgrp:
1394 description:
1395 - VRRP group ID (1 - 65535).
1396 type: int
1397 vrid:
1398 description:
1399 - Virtual router identifier (1 - 255). see <a href='#notes'>Notes</a>.
1400 required: true
1401 type: int
1402 vrip6:
1403 description:
1404 - IPv6 address of the virtual router.
1405 type: str
1406 l2forward:
1407 description:
1408 - Enable/disable l2 forwarding.
1409 type: str
1410 choices:
1411 - 'enable'
1412 - 'disable'
1413 lacp_ha_secondary:
1414 description:
1415 - LACP HA secondary member.
1416 type: str
1417 choices:
1418 - 'enable'
1419 - 'disable'
1420 lacp_ha_slave:
1421 description:
1422 - LACP HA slave.
1423 type: str
1424 choices:
1425 - 'enable'
1426 - 'disable'
1427 lacp_mode:
1428 description:
1429 - LACP mode.
1430 type: str
1431 choices:
1432 - 'static'
1433 - 'passive'
1434 - 'active'
1435 lacp_speed:
1436 description:
1437 - How often the interface sends LACP messages.
1438 type: str
1439 choices:
1440 - 'slow'
1441 - 'fast'
1442 lcp_echo_interval:
1443 description:
1444 - Time in seconds between PPPoE Link Control Protocol (LCP) echo requests.
1445 type: int
1446 lcp_max_echo_fails:
1447 description:
1448 - Maximum missed LCP echo messages before disconnect.
1449 type: int
1450 link_up_delay:
1451 description:
1452 - Number of milliseconds to wait before considering a link is up.
1453 type: int
1454 lldp_network_policy:
1455 description:
1456 - LLDP-MED network policy profile. Source system.lldp.network-policy.name.
1457 type: str
1458 lldp_reception:
1459 description:
1460 - Enable/disable Link Layer Discovery Protocol (LLDP) reception.
1461 type: str
1462 choices:
1463 - 'enable'
1464 - 'disable'
1465 - 'vdom'
1466 lldp_transmission:
1467 description:
1468 - Enable/disable Link Layer Discovery Protocol (LLDP) transmission.
1469 type: str
1470 choices:
1471 - 'enable'
1472 - 'disable'
1473 - 'vdom'
1474 macaddr:
1475 description:
1476 - Change the interface"s MAC address.
1477 type: str
1478 managed_device:
1479 description:
1480 - Available when FortiLink is enabled, used for managed devices through FortiLink interface.
1481 type: list
1482 elements: dict
1483 suboptions:
1484 name:
1485 description:
1486 - Managed dev identifier.
1487 required: true
1488 type: str
1489 managed_subnetwork_size:
1490 description:
1491 - Number of IP addresses to be allocated by FortiIPAM and used by this FortiGate unit"s DHCP server settings.
1492 type: str
1493 choices:
1494 - '4'
1495 - '8'
1496 - '16'
1497 - '32'
1498 - '64'
1499 - '128'
1500 - '256'
1501 - '512'
1502 - '1024'
1503 - '2048'
1504 - '4096'
1505 - '8192'
1506 - '16384'
1507 - '32768'
1508 - '65536'
1509 - '131072'
1510 - '262144'
1511 - '524288'
1512 - '1048576'
1513 - '2097152'
1514 - '4194304'
1515 - '8388608'
1516 - '16777216'
1517 management_ip:
1518 description:
1519 - High Availability in-band management IP address of this interface.
1520 type: str
1521 measured_downstream_bandwidth:
1522 description:
1523 - Measured downstream bandwidth (kbps).
1524 type: int
1525 measured_upstream_bandwidth:
1526 description:
1527 - Measured upstream bandwidth (kbps).
1528 type: int
1529 mediatype:
1530 description:
1531 - Select SFP media interface type
1532 type: str
1533 choices:
1534 - 'none'
1535 - 'gmii'
1536 - 'sgmii'
1537 - 'sr'
1538 - 'lr'
1539 - 'cr'
1540 - 'sr2'
1541 - 'lr2'
1542 - 'cr2'
1543 - 'sr4'
1544 - 'lr4'
1545 - 'cr4'
1546 - 'sr8'
1547 - 'lr8'
1548 - 'cr8'
1549 - 'cfp2-sr10'
1550 - 'cfp2-lr4'
1551 member:
1552 description:
1553 - Physical interfaces that belong to the aggregate or redundant interface.
1554 type: list
1555 elements: dict
1556 suboptions:
1557 interface_name:
1558 description:
1559 - Physical interface name. Source system.interface.name.
1560 required: true
1561 type: str
1562 min_links:
1563 description:
1564 - Minimum number of aggregated ports that must be up.
1565 type: int
1566 min_links_down:
1567 description:
1568 - Action to take when less than the configured minimum number of links are active.
1569 type: str
1570 choices:
1571 - 'operational'
1572 - 'administrative'
1573 mirroring_direction:
1574 description:
1575 - Port mirroring direction.
1576 type: str
1577 choices:
1578 - 'rx'
1579 - 'tx'
1580 - 'both'
1581 mirroring_filter:
1582 description:
1583 - Mirroring filter.
1584 type: dict
1585 suboptions:
1586 filter_dport:
1587 description:
1588 - Destinatin port of mirroring filter.
1589 type: int
1590 filter_dstip:
1591 description:
1592 - Destinatin IP and mask of mirroring filter.
1593 type: str
1594 filter_protocol:
1595 description:
1596 - Protocol of mirroring filter.
1597 type: int
1598 filter_sport:
1599 description:
1600 - Source port of mirroring filter.
1601 type: int
1602 filter_srcip:
1603 description:
1604 - Source IP and mask of mirroring filter.
1605 type: str
1606 mirroring_port:
1607 description:
1608 - Mirroring port. Source system.interface.name.
1609 type: str
1610 mode:
1611 description:
1612 - Addressing mode (static, DHCP, PPPoE).
1613 type: str
1614 choices:
1615 - 'static'
1616 - 'dhcp'
1617 - 'pppoe'
1618 monitor_bandwidth:
1619 description:
1620 - Enable monitoring bandwidth on this interface.
1621 type: str
1622 choices:
1623 - 'enable'
1624 - 'disable'
1625 mrru:
1626 description:
1627 - PPP MRRU (296 - 65535).
1628 type: int
1629 mtu:
1630 description:
1631 - MTU value for this interface.
1632 type: int
1633 mtu_override:
1634 description:
1635 - Enable to set a custom MTU for this interface.
1636 type: str
1637 choices:
1638 - 'enable'
1639 - 'disable'
1640 multilink:
1641 description:
1642 - Enable/disable PPP multilink support.
1643 type: str
1644 choices:
1645 - 'enable'
1646 - 'disable'
1647 name:
1648 description:
1649 - Name.
1650 required: true
1651 type: str
1652 ndiscforward:
1653 description:
1654 - Enable/disable NDISC forwarding.
1655 type: str
1656 choices:
1657 - 'enable'
1658 - 'disable'
1659 netbios_forward:
1660 description:
1661 - Enable/disable NETBIOS forwarding.
1662 type: str
1663 choices:
1664 - 'disable'
1665 - 'enable'
1666 netflow_sample_rate:
1667 description:
1668 - NetFlow sample rate. Sample one packet every configured number of packets(1 - 65535).
1669 type: int
1670 netflow_sampler:
1671 description:
1672 - Enable/disable NetFlow on this interface and set the data that NetFlow collects (rx, tx, or both).
1673 type: str
1674 choices:
1675 - 'disable'
1676 - 'tx'
1677 - 'rx'
1678 - 'both'
1679 netflow_sampler_id:
1680 description:
1681 - Netflow sampler ID.
1682 type: int
1683 np_qos_profile:
1684 description:
1685 - NP QoS profile ID.
1686 type: int
1687 outbandwidth:
1688 description:
1689 - Bandwidth limit for outgoing traffic (0 - 80000000 kbps).
1690 type: int
1691 padt_retry_timeout:
1692 description:
1693 - PPPoE Active Discovery Terminate (PADT) used to terminate sessions after an idle time.
1694 type: int
1695 password:
1696 description:
1697 - PPPoE account"s password.
1698 type: str
1699 phy_setting:
1700 description:
1701 - PHY settings
1702 type: dict
1703 suboptions:
1704 signal_ok_threshold:
1705 description:
1706 - Configure the signal strength value at which the FortiGate unit detects that the receiving signal is idle or that data is not
1707 being received. Zero means idle detection is disabled. Higher values mean the signal strength must be higher in order for the
1708 FortiGate unit to consider the interface is not idle (0 - 12).
1709 type: int
1710 ping_serv_status:
1711 description:
1712 - PING server status.
1713 type: int
1714 polling_interval:
1715 description:
1716 - sFlow polling interval in seconds (1 - 255).
1717 type: int
1718 port_mirroring:
1719 description:
1720 - Enable/disable NP port mirroring.
1721 type: str
1722 choices:
1723 - 'disable'
1724 - 'enable'
1725 pppoe_egress_cos:
1726 description:
1727 - CoS in VLAN tag for outgoing PPPoE/PPP packets.
1728 type: str
1729 choices:
1730 - 'cos0'
1731 - 'cos1'
1732 - 'cos2'
1733 - 'cos3'
1734 - 'cos4'
1735 - 'cos5'
1736 - 'cos6'
1737 - 'cos7'
1738 pppoe_unnumbered_negotiate:
1739 description:
1740 - Enable/disable PPPoE unnumbered negotiation.
1741 type: str
1742 choices:
1743 - 'enable'
1744 - 'disable'
1745 pptp_auth_type:
1746 description:
1747 - PPTP authentication type.
1748 type: str
1749 choices:
1750 - 'auto'
1751 - 'pap'
1752 - 'chap'
1753 - 'mschapv1'
1754 - 'mschapv2'
1755 pptp_client:
1756 description:
1757 - Enable/disable PPTP client.
1758 type: str
1759 choices:
1760 - 'enable'
1761 - 'disable'
1762 pptp_password:
1763 description:
1764 - PPTP password.
1765 type: str
1766 pptp_server_ip:
1767 description:
1768 - PPTP server IP address.
1769 type: str
1770 pptp_timeout:
1771 description:
1772 - Idle timer in minutes (0 for disabled).
1773 type: int
1774 pptp_user:
1775 description:
1776 - PPTP user name.
1777 type: str
1778 preserve_session_route:
1779 description:
1780 - Enable/disable preservation of session route when dirty.
1781 type: str
1782 choices:
1783 - 'enable'
1784 - 'disable'
1785 priority:
1786 description:
1787 - Priority of learned routes.
1788 type: int
1789 priority_override:
1790 description:
1791 - Enable/disable fail back to higher priority port once recovered.
1792 type: str
1793 choices:
1794 - 'enable'
1795 - 'disable'
1796 proxy_captive_portal:
1797 description:
1798 - Enable/disable proxy captive portal on this interface.
1799 type: str
1800 choices:
1801 - 'enable'
1802 - 'disable'
1803 reachable_time:
1804 description:
1805 - IPv4 reachable time in milliseconds (30000 - 3600000).
1806 type: int
1807 redundant_interface:
1808 description:
1809 - Redundant interface.
1810 type: str
1811 remote_ip:
1812 description:
1813 - Remote IP address of tunnel.
1814 type: str
1815 replacemsg_override_group:
1816 description:
1817 - Replacement message override group.
1818 type: str
1819 ring_rx:
1820 description:
1821 - RX ring size.
1822 type: int
1823 ring_tx:
1824 description:
1825 - TX ring size.
1826 type: int
1827 role:
1828 description:
1829 - Interface role.
1830 type: str
1831 choices:
1832 - 'lan'
1833 - 'wan'
1834 - 'dmz'
1835 - 'undefined'
1836 sample_direction:
1837 description:
1838 - Data that NetFlow collects (rx, tx, or both).
1839 type: str
1840 choices:
1841 - 'tx'
1842 - 'rx'
1843 - 'both'
1844 sample_rate:
1845 description:
1846 - sFlow sample rate (10 - 99999).
1847 type: int
1848 scan_botnet_connections:
1849 description:
1850 - Enable monitoring or blocking connections to Botnet servers through this interface.
1851 type: str
1852 choices:
1853 - 'disable'
1854 - 'block'
1855 - 'monitor'
1856 secondary_IP:
1857 description:
1858 - Enable/disable adding a secondary IP to this interface.
1859 type: str
1860 choices:
1861 - 'enable'
1862 - 'disable'
1863 secondaryip:
1864 description:
1865 - Second IP address of interface.
1866 type: list
1867 elements: dict
1868 suboptions:
1869 allowaccess:
1870 description:
1871 - Management access settings for the secondary IP address.
1872 type: list
1873 elements: str
1874 choices:
1875 - 'ping'
1876 - 'https'
1877 - 'ssh'
1878 - 'snmp'
1879 - 'http'
1880 - 'telnet'
1881 - 'fgfm'
1882 - 'radius-acct'
1883 - 'probe-response'
1884 - 'fabric'
1885 - 'ftm'
1886 - 'speed-test'
1887 - 'scim'
1888 - 'capwap'
1889 detectprotocol:
1890 description:
1891 - Protocols used to detect the server.
1892 type: list
1893 elements: str
1894 choices:
1895 - 'ping'
1896 - 'tcp-echo'
1897 - 'udp-echo'
1898 detectserver:
1899 description:
1900 - Gateway"s ping server for this IP.
1901 type: str
1902 gwdetect:
1903 description:
1904 - Enable/disable detect gateway alive for first.
1905 type: str
1906 choices:
1907 - 'enable'
1908 - 'disable'
1909 ha_priority:
1910 description:
1911 - HA election priority for the PING server.
1912 type: int
1913 id:
1914 description:
1915 - ID. see <a href='#notes'>Notes</a>.
1916 required: true
1917 type: int
1918 ip:
1919 description:
1920 - Secondary IP address of the interface.
1921 type: str
1922 ping_serv_status:
1923 description:
1924 - PING server status.
1925 type: int
1926 secip_relay_ip:
1927 description:
1928 - DHCP relay IP address.
1929 type: list
1930 elements: str
1931 security_8021x_dynamic_vlan_id:
1932 description:
1933 - VLAN ID for virtual switch.
1934 type: int
1935 security_8021x_master:
1936 description:
1937 - 802.1X master virtual-switch.
1938 type: str
1939 security_8021x_member_mode:
1940 description:
1941 - 802.1X member mode.
1942 type: str
1943 choices:
1944 - 'switch'
1945 - 'disable'
1946 security_8021x_mode:
1947 description:
1948 - 802.1X mode.
1949 type: str
1950 choices:
1951 - 'default'
1952 - 'dynamic-vlan'
1953 - 'fallback'
1954 - 'slave'
1955 security_exempt_list:
1956 description:
1957 - Name of security-exempt-list.
1958 type: str
1959 security_external_logout:
1960 description:
1961 - URL of external authentication logout server.
1962 type: str
1963 security_external_web:
1964 description:
1965 - URL of external authentication web server.
1966 type: str
1967 security_groups:
1968 description:
1969 - User groups that can authenticate with the captive portal.
1970 type: list
1971 elements: dict
1972 suboptions:
1973 name:
1974 description:
1975 - Names of user groups that can authenticate with the captive portal. Source user.group.name.
1976 required: true
1977 type: str
1978 security_ip_auth_bypass:
1979 description:
1980 - Enable/disable IP authentication bypass.
1981 type: str
1982 choices:
1983 - 'enable'
1984 - 'disable'
1985 security_mac_auth_bypass:
1986 description:
1987 - Enable/disable MAC authentication bypass.
1988 type: str
1989 choices:
1990 - 'mac-auth-only'
1991 - 'enable'
1992 - 'disable'
1993 security_mode:
1994 description:
1995 - Turn on captive portal authentication for this interface.
1996 type: str
1997 choices:
1998 - 'none'
1999 - 'captive-portal'
2000 - '802.1X'
2001 security_redirect_url:
2002 description:
2003 - URL redirection after disclaimer/authentication.
2004 type: str
2005 service_name:
2006 description:
2007 - PPPoE service name.
2008 type: str
2009 sflow_sampler:
2010 description:
2011 - Enable/disable sFlow on this interface.
2012 type: str
2013 choices:
2014 - 'enable'
2015 - 'disable'
2016 snmp_index:
2017 description:
2018 - Permanent SNMP Index of the interface.
2019 type: int
2020 speed:
2021 description:
2022 - Interface speed. The default setting and the options available depend on the interface hardware.
2023 type: str
2024 choices:
2025 - 'auto'
2026 - '10full'
2027 - '10half'
2028 - '100full'
2029 - '100half'
2030 - '100auto'
2031 - '1000full'
2032 - '1000auto'
2033 - '10000full'
2034 - '10000auto'
2035 - '40000full'
2036 - '40000auto'
2037 - '2500auto'
2038 - '5000auto'
2039 - '25000full'
2040 - '25000auto'
2041 - '50000full'
2042 - '50000auto'
2043 - '100Gfull'
2044 - '100Gauto'
2045 - '200Gfull'
2046 - '200Gauto'
2047 - '400Gfull'
2048 - '400Gauto'
2049 - '1000half'
2050 spillover_threshold:
2051 description:
2052 - Egress Spillover threshold (0 - 16776000 kbps), 0 means unlimited.
2053 type: int
2054 src_check:
2055 description:
2056 - Enable/disable source IP check.
2057 type: str
2058 choices:
2059 - 'enable'
2060 - 'disable'
2061 status:
2062 description:
2063 - Bring the interface up or shut the interface down.
2064 type: str
2065 choices:
2066 - 'up'
2067 - 'down'
2068 stp:
2069 description:
2070 - Enable/disable STP.
2071 type: str
2072 choices:
2073 - 'disable'
2074 - 'enable'
2075 stp_edge:
2076 description:
2077 - Enable/disable as STP edge port.
2078 type: str
2079 choices:
2080 - 'disable'
2081 - 'enable'
2082 stp_ha_secondary:
2083 description:
2084 - Control STP behavior on HA secondary.
2085 type: str
2086 choices:
2087 - 'disable'
2088 - 'enable'
2089 - 'priority-adjust'
2090 stp_ha_slave:
2091 description:
2092 - Control STP behaviour on HA slave.
2093 type: str
2094 choices:
2095 - 'disable'
2096 - 'enable'
2097 - 'priority-adjust'
2098 stpforward:
2099 description:
2100 - Enable/disable STP forwarding.
2101 type: str
2102 choices:
2103 - 'enable'
2104 - 'disable'
2105 stpforward_mode:
2106 description:
2107 - Configure STP forwarding mode.
2108 type: str
2109 choices:
2110 - 'rpl-all-ext-id'
2111 - 'rpl-bridge-ext-id'
2112 - 'rpl-nothing'
2113 subst:
2114 description:
2115 - Enable to always send packets from this interface to a destination MAC address.
2116 type: str
2117 choices:
2118 - 'enable'
2119 - 'disable'
2120 substitute_dst_mac:
2121 description:
2122 - Destination MAC address that all packets are sent to from this interface.
2123 type: str
2124 sw_algorithm:
2125 description:
2126 - Frame distribution algorithm for switch.
2127 type: str
2128 choices:
2129 - 'l2'
2130 - 'l3'
2131 - 'eh'
2132 swc_first_create:
2133 description:
2134 - Initial create for switch-controller VLANs.
2135 type: int
2136 swc_vlan:
2137 description:
2138 - Creation status for switch-controller VLANs.
2139 type: int
2140 switch:
2141 description:
2142 - Contained in switch.
2143 type: str
2144 switch_controller_access_vlan:
2145 description:
2146 - Block FortiSwitch port-to-port traffic.
2147 type: str
2148 choices:
2149 - 'enable'
2150 - 'disable'
2151 switch_controller_arp_inspection:
2152 description:
2153 - Enable/disable/Monitor FortiSwitch ARP inspection.
2154 type: str
2155 choices:
2156 - 'enable'
2157 - 'disable'
2158 - 'monitor'
2159 switch_controller_dhcp_snooping:
2160 description:
2161 - Switch controller DHCP snooping.
2162 type: str
2163 choices:
2164 - 'enable'
2165 - 'disable'
2166 switch_controller_dhcp_snooping_option82:
2167 description:
2168 - Switch controller DHCP snooping option82.
2169 type: str
2170 choices:
2171 - 'enable'
2172 - 'disable'
2173 switch_controller_dhcp_snooping_verify_mac:
2174 description:
2175 - Switch controller DHCP snooping verify MAC.
2176 type: str
2177 choices:
2178 - 'enable'
2179 - 'disable'
2180 switch_controller_dynamic:
2181 description:
2182 - Integrated FortiLink settings for managed FortiSwitch. Source switch-controller.fortilink-settings.name.
2183 type: str
2184 switch_controller_feature:
2185 description:
2186 - Interface"s purpose when assigning traffic (read only).
2187 type: str
2188 choices:
2189 - 'none'
2190 - 'default-vlan'
2191 - 'quarantine'
2192 - 'rspan'
2193 - 'voice'
2194 - 'video'
2195 - 'nac'
2196 - 'nac-segment'
2197 switch_controller_igmp_snooping:
2198 description:
2199 - Switch controller IGMP snooping.
2200 type: str
2201 choices:
2202 - 'enable'
2203 - 'disable'
2204 switch_controller_igmp_snooping_fast_leave:
2205 description:
2206 - Switch controller IGMP snooping fast-leave.
2207 type: str
2208 choices:
2209 - 'enable'
2210 - 'disable'
2211 switch_controller_igmp_snooping_proxy:
2212 description:
2213 - Switch controller IGMP snooping proxy.
2214 type: str
2215 choices:
2216 - 'enable'
2217 - 'disable'
2218 switch_controller_iot_scanning:
2219 description:
2220 - Enable/disable managed FortiSwitch IoT scanning.
2221 type: str
2222 choices:
2223 - 'enable'
2224 - 'disable'
2225 switch_controller_learning_limit:
2226 description:
2227 - Limit the number of dynamic MAC addresses on this VLAN (1 - 128, 0 = no limit, default).
2228 type: int
2229 switch_controller_mgmt_vlan:
2230 description:
2231 - VLAN to use for FortiLink management purposes.
2232 type: int
2233 switch_controller_nac:
2234 description:
2235 - Integrated FortiLink settings for managed FortiSwitch. Source switch-controller.fortilink-settings.name.
2236 type: str
2237 switch_controller_netflow_collect:
2238 description:
2239 - NetFlow collection and processing.
2240 type: str
2241 choices:
2242 - 'disable'
2243 - 'enable'
2244 switch_controller_offload:
2245 description:
2246 - Enable/disable managed FortiSwitch routing offload.
2247 type: str
2248 choices:
2249 - 'enable'
2250 - 'disable'
2251 switch_controller_offload_gw:
2252 description:
2253 - Enable/disable managed FortiSwitch routing offload gateway.
2254 type: str
2255 choices:
2256 - 'enable'
2257 - 'disable'
2258 switch_controller_offload_ip:
2259 description:
2260 - IP for routing offload on FortiSwitch.
2261 type: str
2262 switch_controller_rspan_mode:
2263 description:
2264 - Stop Layer2 MAC learning and interception of BPDUs and other packets on this interface.
2265 type: str
2266 choices:
2267 - 'disable'
2268 - 'enable'
2269 switch_controller_source_ip:
2270 description:
2271 - Source IP address used in FortiLink over L3 connections.
2272 type: str
2273 choices:
2274 - 'outbound'
2275 - 'fixed'
2276 switch_controller_traffic_policy:
2277 description:
2278 - Switch controller traffic policy for the VLAN. Source switch-controller.traffic-policy.name.
2279 type: str
2280 system_id:
2281 description:
2282 - Define a system ID for the aggregate interface.
2283 type: str
2284 system_id_type:
2285 description:
2286 - Method in which system ID is generated.
2287 type: str
2288 choices:
2289 - 'auto'
2290 - 'user'
2291 tagging:
2292 description:
2293 - Config object tagging.
2294 type: list
2295 elements: dict
2296 suboptions:
2297 category:
2298 description:
2299 - Tag category. Source system.object-tagging.category.
2300 type: str
2301 name:
2302 description:
2303 - Tagging entry name.
2304 required: true
2305 type: str
2306 tags:
2307 description:
2308 - Tags.
2309 type: list
2310 elements: dict
2311 suboptions:
2312 name:
2313 description:
2314 - Tag name. Source system.object-tagging.tags.name.
2315 required: true
2316 type: str
2317 tcp_mss:
2318 description:
2319 - TCP maximum segment size. 0 means do not change segment size.
2320 type: int
2321 telemetry_discover:
2322 description:
2323 - Enable/disable automatic registration of unknown FortiTelemetry agents.
2324 type: str
2325 choices:
2326 - 'enable'
2327 - 'disable'
2328 trunk:
2329 description:
2330 - Enable/disable VLAN trunk.
2331 type: str
2332 choices:
2333 - 'enable'
2334 - 'disable'
2335 trust_ip_1:
2336 description:
2337 - Trusted host for dedicated management traffic (0.0.0.0/24 for all hosts).
2338 type: str
2339 trust_ip_2:
2340 description:
2341 - Trusted host for dedicated management traffic (0.0.0.0/24 for all hosts).
2342 type: str
2343 trust_ip_3:
2344 description:
2345 - Trusted host for dedicated management traffic (0.0.0.0/24 for all hosts).
2346 type: str
2347 trust_ip6_1:
2348 description:
2349 - 'Trusted IPv6 host for dedicated management traffic (::/0 for all hosts).'
2350 type: str
2351 trust_ip6_2:
2352 description:
2353 - 'Trusted IPv6 host for dedicated management traffic (::/0 for all hosts).'
2354 type: str
2355 trust_ip6_3:
2356 description:
2357 - 'Trusted IPv6 host for dedicated management traffic (::/0 for all hosts).'
2358 type: str
2359 type:
2360 description:
2361 - Interface type.
2362 type: str
2363 choices:
2364 - 'physical'
2365 - 'vlan'
2366 - 'aggregate'
2367 - 'redundant'
2368 - 'tunnel'
2369 - 'vdom-link'
2370 - 'loopback'
2371 - 'switch'
2372 - 'vap-switch'
2373 - 'wl-mesh'
2374 - 'fext-wan'
2375 - 'vxlan'
2376 - 'geneve'
2377 - 'switch-vlan'
2378 - 'emac-vlan'
2379 - 'lan-extension'
2380 - 'hdlc'
2381 - 'ssl'
2382 - 'hard-switch'
2383 username:
2384 description:
2385 - Username of the PPPoE account, provided by your ISP.
2386 type: str
2387 vdom:
2388 description:
2389 - Interface is in this virtual domain (VDOM). Source system.vdom.name.
2390 type: str
2391 vindex:
2392 description:
2393 - Switch control interface VLAN ID.
2394 type: int
2395 virtual_mac:
2396 description:
2397 - Change the interface"s virtual MAC address.
2398 type: str
2399 vlan_protocol:
2400 description:
2401 - Ethernet protocol of VLAN.
2402 type: str
2403 choices:
2404 - '8021q'
2405 - '8021ad'
2406 vlanforward:
2407 description:
2408 - Enable/disable traffic forwarding between VLANs on this interface.
2409 type: str
2410 choices:
2411 - 'enable'
2412 - 'disable'
2413 vlanid:
2414 description:
2415 - VLAN ID (1 - 4094).
2416 type: int
2417 vrf:
2418 description:
2419 - Virtual Routing Forwarding ID.
2420 type: int
2421 vrrp:
2422 description:
2423 - VRRP configuration.
2424 type: list
2425 elements: dict
2426 suboptions:
2427 accept_mode:
2428 description:
2429 - Enable/disable accept mode.
2430 type: str
2431 choices:
2432 - 'enable'
2433 - 'disable'
2434 adv_interval:
2435 description:
2436 - Advertisement interval (250 - 255000 milliseconds).
2437 type: int
2438 ignore_default_route:
2439 description:
2440 - Enable/disable ignoring of default route when checking destination.
2441 type: str
2442 choices:
2443 - 'enable'
2444 - 'disable'
2445 preempt:
2446 description:
2447 - Enable/disable preempt mode.
2448 type: str
2449 choices:
2450 - 'enable'
2451 - 'disable'
2452 priority:
2453 description:
2454 - Priority of the virtual router (1 - 255).
2455 type: int
2456 proxy_arp:
2457 description:
2458 - VRRP Proxy ARP configuration.
2459 type: list
2460 elements: dict
2461 suboptions:
2462 id:
2463 description:
2464 - ID. see <a href='#notes'>Notes</a>.
2465 required: true
2466 type: int
2467 ip:
2468 description:
2469 - Set IP addresses of proxy ARP.
2470 type: str
2471 start_time:
2472 description:
2473 - Startup time (1 - 255 seconds).
2474 type: int
2475 status:
2476 description:
2477 - Enable/disable this VRRP configuration.
2478 type: str
2479 choices:
2480 - 'enable'
2481 - 'disable'
2482 version:
2483 description:
2484 - VRRP version.
2485 type: str
2486 choices:
2487 - '2'
2488 - '3'
2489 vrdst:
2490 description:
2491 - Monitor the route to this destination.
2492 type: list
2493 elements: str
2494 vrdst_priority:
2495 description:
2496 - Priority of the virtual router when the virtual router destination becomes unreachable (0 - 254).
2497 type: int
2498 vrgrp:
2499 description:
2500 - VRRP group ID (1 - 65535).
2501 type: int
2502 vrid:
2503 description:
2504 - Virtual router identifier (1 - 255). see <a href='#notes'>Notes</a>.
2505 required: true
2506 type: int
2507 vrip:
2508 description:
2509 - IP address of the virtual router.
2510 type: str
2511 vrrp_virtual_mac:
2512 description:
2513 - Enable/disable use of virtual MAC for VRRP.
2514 type: str
2515 choices:
2516 - 'enable'
2517 - 'disable'
2518 wccp:
2519 description:
2520 - Enable/disable WCCP on this interface. Used for encapsulated WCCP communication between WCCP clients and servers.
2521 type: str
2522 choices:
2523 - 'enable'
2524 - 'disable'
2525 weight:
2526 description:
2527 - Default weight for static routes (if route has no weight configured).
2528 type: int
2529 wins_ip:
2530 description:
2531 - WINS server IP.
2532 type: str
2533 """
2534
2535 EXAMPLES = """
2536 - name: Configure interfaces.
2537 fortinet.fortios.fortios_system_interface:
2538 vdom: "{{ vdom }}"
2539 state: "present"
2540 access_token: "<your_own_value>"
2541 system_interface:
2542 ac_name: "<your_own_value>"
2543 aggregate: "<your_own_value>"
2544 aggregate_type: "physical"
2545 algorithm: "L2"
2546 alias: "<your_own_value>"
2547 allowaccess: "ping"
2548 ap_discover: "enable"
2549 arpforward: "enable"
2550 auth_cert: "<your_own_value> (source vpn.certificate.local.name)"
2551 auth_portal_addr: "<your_own_value>"
2552 auth_type: "auto"
2553 auto_auth_extension_device: "enable"
2554 bandwidth_measure_time: "0"
2555 bfd: "global"
2556 bfd_desired_min_tx: "250"
2557 bfd_detect_mult: "3"
2558 bfd_required_min_rx: "250"
2559 broadcast_forticlient_discovery: "enable"
2560 broadcast_forward: "enable"
2561 captive_portal: "2147483647"
2562 cli_conn_status: "0"
2563 client_options:
2564 -
2565 code: "0"
2566 id: "26"
2567 ip: "<your_own_value>"
2568 type: "hex"
2569 value: "<your_own_value>"
2570 color: "0"
2571 dedicated_to: "none"
2572 default_purdue_level: "1"
2573 defaultgw: "enable"
2574 description: "<your_own_value>"
2575 detected_peer_mtu: "0"
2576 detectprotocol: "ping"
2577 detectserver: "<your_own_value>"
2578 device_access_list: "<your_own_value>"
2579 device_identification: "enable"
2580 device_identification_active_scan: "enable"
2581 device_netscan: "disable"
2582 device_user_identification: "enable"
2583 devindex: "0"
2584 dhcp_broadcast_flag: "disable"
2585 dhcp_classless_route_addition: "enable"
2586 dhcp_client_identifier: "myId_46"
2587 dhcp_relay_agent_option: "enable"
2588 dhcp_relay_allow_no_end_option: "disable"
2589 dhcp_relay_circuit_id: "<your_own_value>"
2590 dhcp_relay_interface: "<your_own_value> (source system.interface.name)"
2591 dhcp_relay_interface_select_method: "auto"
2592 dhcp_relay_ip: "<your_own_value>"
2593 dhcp_relay_link_selection: "<your_own_value>"
2594 dhcp_relay_request_all_server: "disable"
2595 dhcp_relay_service: "disable"
2596 dhcp_relay_source_ip: "<your_own_value>"
2597 dhcp_relay_type: "regular"
2598 dhcp_relay_vrf_select: "-1"
2599 dhcp_renew_time: "0"
2600 dhcp_smart_relay: "disable"
2601 dhcp_snooping_server_list:
2602 -
2603 name: "default_name_62"
2604 server_ip: "<your_own_value>"
2605 disc_retry_timeout: "1"
2606 disconnect_threshold: "0"
2607 distance: "5"
2608 dns_server_override: "enable"
2609 dns_server_protocol: "cleartext"
2610 drop_fragment: "enable"
2611 drop_overlapped_fragment: "enable"
2612 eap_ca_cert: "<your_own_value> (source certificate.ca.name)"
2613 eap_identity: "<your_own_value>"
2614 eap_method: "tls"
2615 eap_password: "<your_own_value>"
2616 eap_supplicant: "enable"
2617 eap_user_cert: "<your_own_value> (source certificate.local.name)"
2618 egress_cos: "disable"
2619 egress_queues:
2620 cos0: "<your_own_value> (source system.isf-queue-profile.name)"
2621 cos1: "<your_own_value> (source system.isf-queue-profile.name)"
2622 cos2: "<your_own_value> (source system.isf-queue-profile.name)"
2623 cos3: "<your_own_value> (source system.isf-queue-profile.name)"
2624 cos4: "<your_own_value> (source system.isf-queue-profile.name)"
2625 cos5: "<your_own_value> (source system.isf-queue-profile.name)"
2626 cos6: "<your_own_value> (source system.isf-queue-profile.name)"
2627 cos7: "<your_own_value> (source system.isf-queue-profile.name)"
2628 egress_shaping_profile: "<your_own_value> (source firewall.shaping-profile.profile-name)"
2629 endpoint_compliance: "enable"
2630 estimated_downstream_bandwidth: "0"
2631 estimated_upstream_bandwidth: "0"
2632 exclude_signatures: "iot"
2633 explicit_ftp_proxy: "enable"
2634 explicit_web_proxy: "enable"
2635 external: "enable"
2636 fail_action_on_extender: "soft-restart"
2637 fail_alert_interfaces:
2638 -
2639 name: "default_name_97 (source system.interface.name)"
2640 fail_alert_method: "link-failed-signal"
2641 fail_detect: "enable"
2642 fail_detect_option: "detectserver"
2643 fortiheartbeat: "enable"
2644 fortilink: "enable"
2645 fortilink_backup_link: "0"
2646 fortilink_neighbor_detect: "lldp"
2647 fortilink_split_interface: "enable"
2648 fortilink_stacking: "enable"
2649 forward_domain: "0"
2650 forward_error_correction: "none"
2651 gi_gk: "enable"
2652 gwdetect: "enable"
2653 ha_priority: "1"
2654 icmp_accept_redirect: "enable"
2655 icmp_send_redirect: "enable"
2656 ident_accept: "enable"
2657 idle_timeout: "0"
2658 ike_saml_server: "<your_own_value> (source user.saml.name)"
2659 inbandwidth: "0"
2660 ingress_cos: "disable"
2661 ingress_shaping_profile: "<your_own_value> (source firewall.shaping-profile.profile-name)"
2662 ingress_spillover_threshold: "0"
2663 interconnect_profile: "default"
2664 interface: "<your_own_value> (source system.interface.name)"
2665 internal: "0"
2666 ip: "<your_own_value>"
2667 ip_managed_by_fortiipam: "inherit-global"
2668 ipmac: "enable"
2669 ips_sniffer_mode: "enable"
2670 ipunnumbered: "<your_own_value>"
2671 ipv6:
2672 autoconf: "enable"
2673 cli_conn6_status: "0"
2674 client_options:
2675 -
2676 code: "0"
2677 id: "134"
2678 ip6: "<your_own_value>"
2679 type: "hex"
2680 value: "<your_own_value>"
2681 dhcp6_client_options: "rapid"
2682 dhcp6_iapd_list:
2683 -
2684 iaid: "<you_own_value>"
2685 prefix_hint: "<your_own_value>"
2686 prefix_hint_plt: "604800"
2687 prefix_hint_vlt: "2592000"
2688 dhcp6_information_request: "enable"
2689 dhcp6_prefix_delegation: "enable"
2690 dhcp6_prefix_hint: "<your_own_value>"
2691 dhcp6_prefix_hint_plt: "604800"
2692 dhcp6_prefix_hint_vlt: "2592000"
2693 dhcp6_relay_interface_id: "<your_own_value>"
2694 dhcp6_relay_ip: "<your_own_value>"
2695 dhcp6_relay_service: "disable"
2696 dhcp6_relay_source_interface: "disable"
2697 dhcp6_relay_source_ip: "<your_own_value>"
2698 dhcp6_relay_type: "regular"
2699 icmp6_send_redirect: "enable"
2700 interface_identifier: "myId_156"
2701 ip6_address: "<your_own_value>"
2702 ip6_adv_rio: "enable"
2703 ip6_allowaccess: "ping"
2704 ip6_default_life: "1800"
2705 ip6_delegated_prefix_iaid: "0"
2706 ip6_delegated_prefix_list:
2707 -
2708 autonomous_flag: "enable"
2709 delegated_prefix_iaid: "0"
2710 dnssl_service: "enable"
2711 onlink_flag: "enable"
2712 prefix_id: "<you_own_value>"
2713 rdnss: "<your_own_value>"
2714 rdnss_service: "delegated"
2715 subnet: "<your_own_value>"
2716 upstream_interface: "<your_own_value> (source system.interface.name)"
2717 ip6_dns_server_override: "enable"
2718 ip6_dnssl_list:
2719 -
2720 dnssl_life_time: "1800"
2721 domain: "<your_own_value>"
2722 ip6_extra_addr:
2723 -
2724 prefix: "<your_own_value>"
2725 ip6_hop_limit: "0"
2726 ip6_link_mtu: "0"
2727 ip6_manage_flag: "enable"
2728 ip6_max_interval: "600"
2729 ip6_min_interval: "198"
2730 ip6_mode: "static"
2731 ip6_other_flag: "enable"
2732 ip6_prefix_list:
2733 -
2734 autonomous_flag: "enable"
2735 dnssl:
2736 -
2737 domain: "<your_own_value>"
2738 onlink_flag: "enable"
2739 preferred_life_time: "604800"
2740 prefix: "<your_own_value>"
2741 rdnss: "<your_own_value>"
2742 valid_life_time: "2592000"
2743 ip6_prefix_mode: "dhcp6"
2744 ip6_rdnss_list:
2745 -
2746 rdnss: "<your_own_value>"
2747 rdnss_life_time: "1800"
2748 ip6_reachable_time: "0"
2749 ip6_retrans_time: "0"
2750 ip6_route_list:
2751 -
2752 route: "<your_own_value>"
2753 route_life_time: "1800"
2754 route_pref: "medium"
2755 ip6_route_pref: "medium"
2756 ip6_send_adv: "enable"
2757 ip6_subnet: "<your_own_value>"
2758 ip6_upstream_interface: "<your_own_value> (source system.interface.name)"
2759 nd_cert: "<your_own_value> (source certificate.local.name)"
2760 nd_cga_modifier: "<your_own_value>"
2761 nd_mode: "basic"
2762 nd_security_level: "0"
2763 nd_timestamp_delta: "300"
2764 nd_timestamp_fuzz: "1"
2765 ra_send_mtu: "enable"
2766 unique_autoconf_addr: "enable"
2767 vrip6_link_local: "<your_own_value>"
2768 vrrp_virtual_mac6: "enable"
2769 vrrp6:
2770 -
2771 accept_mode: "enable"
2772 adv_interval: "1000"
2773 ignore_default_route: "enable"
2774 preempt: "enable"
2775 priority: "100"
2776 start_time: "3"
2777 status: "enable"
2778 vrdst_priority: "0"
2779 vrdst6: "<your_own_value>"
2780 vrgrp: "0"
2781 vrid: "<you_own_value>"
2782 vrip6: "<your_own_value>"
2783 l2forward: "enable"
2784 lacp_ha_secondary: "enable"
2785 lacp_ha_slave: "enable"
2786 lacp_mode: "static"
2787 lacp_speed: "slow"
2788 lcp_echo_interval: "5"
2789 lcp_max_echo_fails: "3"
2790 link_up_delay: "50"
2791 lldp_network_policy: "<your_own_value> (source system.lldp.network-policy.name)"
2792 lldp_reception: "enable"
2793 lldp_transmission: "enable"
2794 macaddr: "<your_own_value>"
2795 managed_device:
2796 -
2797 name: "default_name_244"
2798 managed_subnetwork_size: "4"
2799 management_ip: "<your_own_value>"
2800 measured_downstream_bandwidth: "0"
2801 measured_upstream_bandwidth: "0"
2802 mediatype: "none"
2803 member:
2804 -
2805 interface_name: "<your_own_value> (source system.interface.name)"
2806 min_links: "1"
2807 min_links_down: "operational"
2808 mirroring_direction: "rx"
2809 mirroring_filter:
2810 filter_dport: "0"
2811 filter_dstip: "<your_own_value>"
2812 filter_protocol: "0"
2813 filter_sport: "0"
2814 filter_srcip: "<your_own_value>"
2815 mirroring_port: "<your_own_value> (source system.interface.name)"
2816 mode: "static"
2817 monitor_bandwidth: "enable"
2818 mrru: "1500"
2819 mtu: "1500"
2820 mtu_override: "enable"
2821 multilink: "enable"
2822 name: "default_name_268"
2823 ndiscforward: "enable"
2824 netbios_forward: "disable"
2825 netflow_sample_rate: "1"
2826 netflow_sampler: "disable"
2827 netflow_sampler_id: "0"
2828 np_qos_profile: "0"
2829 outbandwidth: "0"
2830 padt_retry_timeout: "1"
2831 password: "<your_own_value>"
2832 phy_setting:
2833 signal_ok_threshold: "0"
2834 ping_serv_status: "0"
2835 polling_interval: "20"
2836 port_mirroring: "disable"
2837 pppoe_egress_cos: "cos0"
2838 pppoe_unnumbered_negotiate: "enable"
2839 pptp_auth_type: "auto"
2840 pptp_client: "enable"
2841 pptp_password: "<your_own_value>"
2842 pptp_server_ip: "<your_own_value>"
2843 pptp_timeout: "0"
2844 pptp_user: "<your_own_value>"
2845 preserve_session_route: "enable"
2846 priority: "1"
2847 priority_override: "enable"
2848 proxy_captive_portal: "enable"
2849 reachable_time: "30000"
2850 redundant_interface: "<your_own_value>"
2851 remote_ip: "<your_own_value>"
2852 replacemsg_override_group: "<your_own_value>"
2853 ring_rx: "0"
2854 ring_tx: "0"
2855 role: "lan"
2856 sample_direction: "tx"
2857 sample_rate: "2000"
2858 scan_botnet_connections: "disable"
2859 secondary_IP: "enable"
2860 secondaryip:
2861 -
2862 allowaccess: "ping"
2863 detectprotocol: "ping"
2864 detectserver: "<your_own_value>"
2865 gwdetect: "enable"
2866 ha_priority: "1"
2867 id: "312"
2868 ip: "<your_own_value>"
2869 ping_serv_status: "0"
2870 secip_relay_ip: "<your_own_value>"
2871 security_8021x_dynamic_vlan_id: "0"
2872 security_8021x_master: "<your_own_value>"
2873 security_8021x_member_mode: "switch"
2874 security_8021x_mode: "default"
2875 security_exempt_list: "<your_own_value>"
2876 security_external_logout: "<your_own_value>"
2877 security_external_web: "<your_own_value>"
2878 security_groups:
2879 -
2880 name: "default_name_324 (source user.group.name)"
2881 security_ip_auth_bypass: "enable"
2882 security_mac_auth_bypass: "mac-auth-only"
2883 security_mode: "none"
2884 security_redirect_url: "<your_own_value>"
2885 service_name: "<your_own_value>"
2886 sflow_sampler: "enable"
2887 snmp_index: "0"
2888 speed: "auto"
2889 spillover_threshold: "0"
2890 src_check: "enable"
2891 status: "up"
2892 stp: "disable"
2893 stp_edge: "disable"
2894 stp_ha_secondary: "disable"
2895 stp_ha_slave: "disable"
2896 stpforward: "enable"
2897 stpforward_mode: "rpl-all-ext-id"
2898 subst: "enable"
2899 substitute_dst_mac: "<your_own_value>"
2900 sw_algorithm: "l2"
2901 swc_first_create: "0"
2902 swc_vlan: "0"
2903 switch: "<your_own_value>"
2904 switch_controller_access_vlan: "enable"
2905 switch_controller_arp_inspection: "enable"
2906 switch_controller_dhcp_snooping: "enable"
2907 switch_controller_dhcp_snooping_option82: "enable"
2908 switch_controller_dhcp_snooping_verify_mac: "enable"
2909 switch_controller_dynamic: "<your_own_value> (source switch-controller.fortilink-settings.name)"
2910 switch_controller_feature: "none"
2911 switch_controller_igmp_snooping: "enable"
2912 switch_controller_igmp_snooping_fast_leave: "enable"
2913 switch_controller_igmp_snooping_proxy: "enable"
2914 switch_controller_iot_scanning: "enable"
2915 switch_controller_learning_limit: "0"
2916 switch_controller_mgmt_vlan: "4094"
2917 switch_controller_nac: "<your_own_value> (source switch-controller.fortilink-settings.name)"
2918 switch_controller_netflow_collect: "disable"
2919 switch_controller_offload: "enable"
2920 switch_controller_offload_gw: "enable"
2921 switch_controller_offload_ip: "<your_own_value>"
2922 switch_controller_rspan_mode: "disable"
2923 switch_controller_source_ip: "outbound"
2924 switch_controller_traffic_policy: "<your_own_value> (source switch-controller.traffic-policy.name)"
2925 system_id: "<your_own_value>"
2926 system_id_type: "auto"
2927 tagging:
2928 -
2929 category: "<your_own_value> (source system.object-tagging.category)"
2930 name: "default_name_373"
2931 tags:
2932 -
2933 name: "default_name_375 (source system.object-tagging.tags.name)"
2934 tcp_mss: "0"
2935 telemetry_discover: "enable"
2936 trunk: "enable"
2937 trust_ip_1: "<your_own_value>"
2938 trust_ip_2: "<your_own_value>"
2939 trust_ip_3: "<your_own_value>"
2940 trust_ip6_1: "<your_own_value>"
2941 trust_ip6_2: "<your_own_value>"
2942 trust_ip6_3: "<your_own_value>"
2943 type: "physical"
2944 username: "<your_own_value>"
2945 vdom: "<your_own_value> (source system.vdom.name)"
2946 vindex: "0"
2947 virtual_mac: "<your_own_value>"
2948 vlan_protocol: "8021q"
2949 vlanforward: "enable"
2950 vlanid: "0"
2951 vrf: "0"
2952 vrrp:
2953 -
2954 accept_mode: "enable"
2955 adv_interval: "1000"
2956 ignore_default_route: "enable"
2957 preempt: "enable"
2958 priority: "100"
2959 proxy_arp:
2960 -
2961 id: "401"
2962 ip: "<your_own_value>"
2963 start_time: "3"
2964 status: "enable"
2965 version: "2"
2966 vrdst: "<your_own_value>"
2967 vrdst_priority: "0"
2968 vrgrp: "0"
2969 vrid: "<you_own_value>"
2970 vrip: "<your_own_value>"
2971 vrrp_virtual_mac: "enable"
2972 wccp: "enable"
2973 weight: "0"
2974 wins_ip: "<your_own_value>"
2975 """
2976
2977 RETURN = """
2978 build:
2979 description: Build number of the fortigate image
2980 returned: always
2981 type: str
2982 sample: '1547'
2983 http_method:
2984 description: Last method used to provision the content into FortiGate
2985 returned: always
2986 type: str
2987 sample: 'PUT'
2988 http_status:
2989 description: Last result given by FortiGate on last operation applied
2990 returned: always
2991 type: str
2992 sample: "200"
2993 mkey:
2994 description: Master key (id) used in the last call to FortiGate
2995 returned: success
2996 type: str
2997 sample: "id"
2998 name:
2999 description: Name of the table used to fulfill the request
3000 returned: always
3001 type: str
3002 sample: "urlfilter"
3003 path:
3004 description: Path of the table used to fulfill the request
3005 returned: always
3006 type: str
3007 sample: "webfilter"
3008 revision:
3009 description: Internal revision number
3010 returned: always
3011 type: str
3012 sample: "17.0.2.10658"
3013 serial:
3014 description: Serial number of the unit
3015 returned: always
3016 type: str
3017 sample: "FGVMEVYYQT3AB5352"
3018 status:
3019 description: Indication of the operation's result
3020 returned: always
3021 type: str
3022 sample: "success"
3023 vdom:
3024 description: Virtual domain used
3025 returned: always
3026 type: str
3027 sample: "root"
3028 version:
3029 description: Version of the FortiGate
3030 returned: always
3031 type: str
3032 sample: "v5.6.3"
3033 """
3034 from ansible.module_utils.basic import AnsibleModule
3035 from ansible.module_utils.connection import Connection
3036 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.fortios import (
3037 FortiOSHandler,
3038 )
3039 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.fortios import (
3040 check_legacy_fortiosapi,
3041 )
3042 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.fortios import (
3043 schema_to_module_spec,
3044 )
3045 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.fortios import (
3046 check_schema_versioning,
3047 )
3048 from ansible_collections.fortinet.fortios.plugins.module_utils.fortimanager.common import (
3049 FAIL_SOCKET_MSG,
3050 )
3051 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.data_post_processor import (
3052 remove_invalid_fields,
3053 )
3054 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.comparison import (
3055 is_same_comparison,
3056 )
3057 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.comparison import (
3058 serialize,
3059 )
3060 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.comparison import (
3061 find_current_values,
3062 )
3063 from ansible_collections.fortinet.fortios.plugins.module_utils.fortios.comparison import (
3064 unify_data_format,
3065 )
3066
3067
3068 def filter_system_interface_data(json):
3069 option_list = [
3070 "ac_name",
3071 "aggregate",
3072 "aggregate_type",
3073 "algorithm",
3074 "alias",
3075 "allowaccess",
3076 "ap_discover",
3077 "arpforward",
3078 "auth_cert",
3079 "auth_portal_addr",
3080 "auth_type",
3081 "auto_auth_extension_device",
3082 "bandwidth_measure_time",
3083 "bfd",
3084 "bfd_desired_min_tx",
3085 "bfd_detect_mult",
3086 "bfd_required_min_rx",
3087 "broadcast_forticlient_discovery",
3088 "broadcast_forward",
3089 "captive_portal",
3090 "cli_conn_status",
3091 "client_options",
3092 "color",
3093 "dedicated_to",
3094 "default_purdue_level",
3095 "defaultgw",
3096 "description",
3097 "detected_peer_mtu",
3098 "detectprotocol",
3099 "detectserver",
3100 "device_access_list",
3101 "device_identification",
3102 "device_identification_active_scan",
3103 "device_netscan",
3104 "device_user_identification",
3105 "devindex",
3106 "dhcp_broadcast_flag",
3107 "dhcp_classless_route_addition",
3108 "dhcp_client_identifier",
3109 "dhcp_relay_agent_option",
3110 "dhcp_relay_allow_no_end_option",
3111 "dhcp_relay_circuit_id",
3112 "dhcp_relay_interface",
3113 "dhcp_relay_interface_select_method",
3114 "dhcp_relay_ip",
3115 "dhcp_relay_link_selection",
3116 "dhcp_relay_request_all_server",
3117 "dhcp_relay_service",
3118 "dhcp_relay_source_ip",
3119 "dhcp_relay_type",
3120 "dhcp_relay_vrf_select",
3121 "dhcp_renew_time",
3122 "dhcp_smart_relay",
3123 "dhcp_snooping_server_list",
3124 "disc_retry_timeout",
3125 "disconnect_threshold",
3126 "distance",
3127 "dns_server_override",
3128 "dns_server_protocol",
3129 "drop_fragment",
3130 "drop_overlapped_fragment",
3131 "eap_ca_cert",
3132 "eap_identity",
3133 "eap_method",
3134 "eap_password",
3135 "eap_supplicant",
3136 "eap_user_cert",
3137 "egress_cos",
3138 "egress_queues",
3139 "egress_shaping_profile",
3140 "endpoint_compliance",
3141 "estimated_downstream_bandwidth",
3142 "estimated_upstream_bandwidth",
3143 "exclude_signatures",
3144 "explicit_ftp_proxy",
3145 "explicit_web_proxy",
3146 "external",
3147 "fail_action_on_extender",
3148 "fail_alert_interfaces",
3149 "fail_alert_method",
3150 "fail_detect",
3151 "fail_detect_option",
3152 "fortiheartbeat",
3153 "fortilink",
3154 "fortilink_backup_link",
3155 "fortilink_neighbor_detect",
3156 "fortilink_split_interface",
3157 "fortilink_stacking",
3158 "forward_domain",
3159 "forward_error_correction",
3160 "gi_gk",
3161 "gwdetect",
3162 "ha_priority",
3163 "icmp_accept_redirect",
3164 "icmp_send_redirect",
3165 "ident_accept",
3166 "idle_timeout",
3167 "ike_saml_server",
3168 "inbandwidth",
3169 "ingress_cos",
3170 "ingress_shaping_profile",
3171 "ingress_spillover_threshold",
3172 "interconnect_profile",
3173 "interface",
3174 "internal",
3175 "ip",
3176 "ip_managed_by_fortiipam",
3177 "ipmac",
3178 "ips_sniffer_mode",
3179 "ipunnumbered",
3180 "ipv6",
3181 "l2forward",
3182 "lacp_ha_secondary",
3183 "lacp_ha_slave",
3184 "lacp_mode",
3185 "lacp_speed",
3186 "lcp_echo_interval",
3187 "lcp_max_echo_fails",
3188 "link_up_delay",
3189 "lldp_network_policy",
3190 "lldp_reception",
3191 "lldp_transmission",
3192 "macaddr",
3193 "managed_device",
3194 "managed_subnetwork_size",
3195 "management_ip",
3196 "measured_downstream_bandwidth",
3197 "measured_upstream_bandwidth",
3198 "mediatype",
3199 "member",
3200 "min_links",
3201 "min_links_down",
3202 "mirroring_direction",
3203 "mirroring_filter",
3204 "mirroring_port",
3205 "mode",
3206 "monitor_bandwidth",
3207 "mrru",
3208 "mtu",
3209 "mtu_override",
3210 "multilink",
3211 "name",
3212 "ndiscforward",
3213 "netbios_forward",
3214 "netflow_sample_rate",
3215 "netflow_sampler",
3216 "netflow_sampler_id",
3217 "np_qos_profile",
3218 "outbandwidth",
3219 "padt_retry_timeout",
3220 "password",
3221 "phy_setting",
3222 "ping_serv_status",
3223 "polling_interval",
3224 "port_mirroring",
3225 "pppoe_egress_cos",
3226 "pppoe_unnumbered_negotiate",
3227 "pptp_auth_type",
3228 "pptp_client",
3229 "pptp_password",
3230 "pptp_server_ip",
3231 "pptp_timeout",
3232 "pptp_user",
3233 "preserve_session_route",
3234 "priority",
3235 "priority_override",
3236 "proxy_captive_portal",
3237 "reachable_time",
3238 "redundant_interface",
3239 "remote_ip",
3240 "replacemsg_override_group",
3241 "ring_rx",
3242 "ring_tx",
3243 "role",
3244 "sample_direction",
3245 "sample_rate",
3246 "scan_botnet_connections",
3247 "secondary_IP",
3248 "secondaryip",
3249 "security_8021x_dynamic_vlan_id",
3250 "security_8021x_master",
3251 "security_8021x_member_mode",
3252 "security_8021x_mode",
3253 "security_exempt_list",
3254 "security_external_logout",
3255 "security_external_web",
3256 "security_groups",
3257 "security_ip_auth_bypass",
3258 "security_mac_auth_bypass",
3259 "security_mode",
3260 "security_redirect_url",
3261 "service_name",
3262 "sflow_sampler",
3263 "snmp_index",
3264 "speed",
3265 "spillover_threshold",
3266 "src_check",
3267 "status",
3268 "stp",
3269 "stp_edge",
3270 "stp_ha_secondary",
3271 "stp_ha_slave",
3272 "stpforward",
3273 "stpforward_mode",
3274 "subst",
3275 "substitute_dst_mac",
3276 "sw_algorithm",
3277 "swc_first_create",
3278 "swc_vlan",
3279 "switch",
3280 "switch_controller_access_vlan",
3281 "switch_controller_arp_inspection",
3282 "switch_controller_dhcp_snooping",
3283 "switch_controller_dhcp_snooping_option82",
3284 "switch_controller_dhcp_snooping_verify_mac",
3285 "switch_controller_dynamic",
3286 "switch_controller_feature",
3287 "switch_controller_igmp_snooping",
3288 "switch_controller_igmp_snooping_fast_leave",
3289 "switch_controller_igmp_snooping_proxy",
3290 "switch_controller_iot_scanning",
3291 "switch_controller_learning_limit",
3292 "switch_controller_mgmt_vlan",
3293 "switch_controller_nac",
3294 "switch_controller_netflow_collect",
3295 "switch_controller_offload",
3296 "switch_controller_offload_gw",
3297 "switch_controller_offload_ip",
3298 "switch_controller_rspan_mode",
3299 "switch_controller_source_ip",
3300 "switch_controller_traffic_policy",
3301 "system_id",
3302 "system_id_type",
3303 "tagging",
3304 "tcp_mss",
3305 "telemetry_discover",
3306 "trunk",
3307 "trust_ip_1",
3308 "trust_ip_2",
3309 "trust_ip_3",
3310 "trust_ip6_1",
3311 "trust_ip6_2",
3312 "trust_ip6_3",
3313 "type",
3314 "username",
3315 "vdom",
3316 "vindex",
3317 "virtual_mac",
3318 "vlan_protocol",
3319 "vlanforward",
3320 "vlanid",
3321 "vrf",
3322 "vrrp",
3323 "vrrp_virtual_mac",
3324 "wccp",
3325 "weight",
3326 "wins_ip",
3327 ]
3328
3329 json = remove_invalid_fields(json)
3330 dictionary = {}
3331
3332 for attribute in option_list:
3333 if attribute in json and json[attribute] is not None:
3334 dictionary[attribute] = json[attribute]
3335
3336 return dictionary
3337
3338
3339 def flatten_single_path(data, path, index):
3340 if (
3341 not data
3342 or index == len(path)
3343 or path[index] not in data
3344 or (not data[path[index]] and not isinstance(data[path[index]], list))
3345 ):
3346 return
3347
3348 if index == len(path) - 1:
3349 data[path[index]] = " ".join(str(elem) for elem in data[path[index]])
3350 if len(data[path[index]]) == 0:
3351 data[path[index]] = None
3352 elif isinstance(data[path[index]], list):
3353 for value in data[path[index]]:
3354 flatten_single_path(value, path, index + 1)
3355 else:
3356 flatten_single_path(data[path[index]], path, index + 1)
3357
3358
3359 def flatten_multilists_attributes(data):
3360 multilist_attrs = [
3361 ["client_options", "ip"],
3362 ["dhcp_relay_ip"],
3363 ["allowaccess"],
3364 ["detectprotocol"],
3365 ["fail_detect_option"],
3366 ["dns_server_protocol"],
3367 ["exclude_signatures"],
3368 ["vrrp", "vrdst"],
3369 ["secondaryip", "secip_relay_ip"],
3370 ["secondaryip", "allowaccess"],
3371 ["secondaryip", "detectprotocol"],
3372 ["ipv6", "client_options", "ip6"],
3373 ["ipv6", "ip6_allowaccess"],
3374 ["ipv6", "ip6_prefix_list", "rdnss"],
3375 ["ipv6", "ip6_delegated_prefix_list", "rdnss"],
3376 ["ipv6", "dhcp6_relay_ip"],
3377 ["ipv6", "vrrp6", "vrdst6"],
3378 ["ipv6", "dhcp6_client_options"],
3379 ]
3380
3381 for attr in multilist_attrs:
3382 flatten_single_path(data, attr, 0)
3383
3384 return data
3385
3386
3387 def underscore_to_hyphen(data):
3388 new_data = None
3389 if isinstance(data, list):
3390 new_data = []
3391 for i, elem in enumerate(data):
3392 new_data.append(underscore_to_hyphen(elem))
3393 elif isinstance(data, dict):
3394 new_data = {}
3395 for k, v in data.items():
3396 new_data[k.replace("_", "-")] = underscore_to_hyphen(v)
3397 else:
3398 return data
3399 return new_data
3400
3401
3402 def system_interface(data, fos, check_mode=False):
3403
3404 state = None
3405 vdom = data["vdom"]
3406 parameters = None
3407 state = data.get("state", None)
3408 system_interface_data = data["system_interface"]
3409
3410 filtered_data = filter_system_interface_data(system_interface_data)
3411 filtered_data = flatten_multilists_attributes(filtered_data)
3412 converted_data = underscore_to_hyphen(filtered_data)
3413
3414 # check_mode starts from here
3415 if check_mode:
3416 diff = {
3417 "before": "",
3418 "after": filtered_data,
3419 }
3420 mkeyname = fos.get_mkeyname(None, None)
3421 mkey = fos.get_mkey("system", "interface", filtered_data, vdom=vdom)
3422 current_data = fos.get(
3423 "system", "interface", vdom=vdom, mkey=mkey, parameters=parameters
3424 )
3425 is_existed = (
3426 current_data
3427 and current_data.get("http_status") == 200
3428 and (
3429 mkeyname
3430 and isinstance(current_data.get("results"), list)
3431 and len(current_data["results"]) > 0
3432 or not mkeyname
3433 and current_data["results"] # global object response
3434 )
3435 )
3436
3437 # 2. if it exists and the state is 'present' then compare current settings with desired
3438 if state == "present" or state is True or state is None:
3439 # for non global modules, mkeyname must exist and it's a new module when mkey is None
3440 if mkeyname is not None and mkey is None:
3441 return False, True, filtered_data, diff
3442
3443 # if mkey exists then compare each other
3444 # record exits and they're matched or not
3445 copied_filtered_data = filtered_data.copy()
3446 copied_filtered_data.pop(mkeyname, None)
3447 unified_filtered_data = unify_data_format(copied_filtered_data)
3448
3449 current_data_results = current_data.get("results", {})
3450 current_config = (
3451 current_data_results[0]
3452 if mkeyname
3453 and isinstance(current_data_results, list)
3454 and len(current_data_results) > 0
3455 else current_data_results
3456 )
3457 if is_existed:
3458 unified_current_values = find_current_values(
3459 unified_filtered_data,
3460 unify_data_format(current_config),
3461 )
3462
3463 is_same = is_same_comparison(
3464 serialize(unified_current_values), serialize(unified_filtered_data)
3465 )
3466
3467 return (
3468 False,
3469 not is_same,
3470 filtered_data,
3471 {"before": unified_current_values, "after": unified_filtered_data},
3472 )
3473
3474 # record does not exist
3475 return False, True, filtered_data, diff
3476
3477 if state == "absent":
3478 if mkey is None:
3479 return (
3480 False,
3481 False,
3482 filtered_data,
3483 {"before": current_data["results"][0], "after": ""},
3484 )
3485
3486 if is_existed:
3487 return (
3488 False,
3489 True,
3490 filtered_data,
3491 {"before": current_data["results"][0], "after": ""},
3492 )
3493 return False, False, filtered_data, {}
3494
3495 return True, False, {"reason: ": "Must provide state parameter"}, {}
3496 # pass post processed data to member operations
3497 # no need to do underscore_to_hyphen since do_member_operation handles it by itself
3498 data_copy = data.copy()
3499 data_copy["system_interface"] = filtered_data
3500 fos.do_member_operation(
3501 "system",
3502 "interface",
3503 data_copy,
3504 )
3505
3506 if state == "present" or state is True:
3507 return fos.set(
3508 "system", "interface", data=converted_data, vdom=vdom, parameters=parameters
3509 )
3510
3511 elif state == "absent":
3512 return fos.delete(
3513 "system",
3514 "interface",
3515 mkey=converted_data["name"],
3516 vdom=vdom,
3517 parameters=parameters,
3518 )
3519 else:
3520 fos._module.fail_json(msg="state must be present or absent!")
3521
3522
3523 def is_successful_status(resp):
3524 return (
3525 "status" in resp
3526 and resp["status"] == "success"
3527 or "http_status" in resp
3528 and resp["http_status"] == 200
3529 or "http_method" in resp
3530 and resp["http_method"] == "DELETE"
3531 and resp["http_status"] == 404
3532 )
3533
3534
3535 def fortios_system(data, fos, check_mode):
3536
3537 if data["system_interface"]:
3538 resp = system_interface(data, fos, check_mode)
3539 else:
3540 fos._module.fail_json(msg="missing task body: %s" % ("system_interface"))
3541 if isinstance(resp, tuple) and len(resp) == 4:
3542 return resp
3543 return (
3544 not is_successful_status(resp),
3545 is_successful_status(resp)
3546 and (resp["revision_changed"] if "revision_changed" in resp else True),
3547 resp,
3548 {},
3549 )
3550
3551
3552 versioned_schema = {
3553 "type": "list",
3554 "elements": "dict",
3555 "children": {
3556 "name": {"v_range": [["v6.0.0", ""]], "type": "string", "required": True},
3557 "vdom": {"v_range": [["v6.0.0", ""]], "type": "string"},
3558 "vrf": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3559 "fortilink": {
3560 "v_range": [["v6.0.0", ""]],
3561 "type": "string",
3562 "options": [{"value": "enable"}, {"value": "disable"}],
3563 },
3564 "switch_controller_source_ip": {
3565 "v_range": [["v6.4.4", ""]],
3566 "type": "string",
3567 "options": [{"value": "outbound"}, {"value": "fixed"}],
3568 },
3569 "mode": {
3570 "v_range": [["v6.0.0", ""]],
3571 "type": "string",
3572 "options": [{"value": "static"}, {"value": "dhcp"}, {"value": "pppoe"}],
3573 },
3574 "client_options": {
3575 "type": "list",
3576 "elements": "dict",
3577 "children": {
3578 "id": {
3579 "v_range": [["v6.4.0", ""]],
3580 "type": "integer",
3581 "required": True,
3582 },
3583 "code": {"v_range": [["v6.4.0", ""]], "type": "integer"},
3584 "type": {
3585 "v_range": [["v6.4.0", ""]],
3586 "type": "string",
3587 "options": [
3588 {"value": "hex"},
3589 {"value": "string"},
3590 {"value": "ip"},
3591 {"value": "fqdn"},
3592 ],
3593 },
3594 "value": {"v_range": [["v6.4.0", ""]], "type": "string"},
3595 "ip": {
3596 "v_range": [["v6.4.0", ""]],
3597 "type": "list",
3598 "multiple_values": True,
3599 "elements": "str",
3600 },
3601 },
3602 "v_range": [["v6.4.0", ""]],
3603 },
3604 "distance": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3605 "priority": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3606 "dhcp_relay_interface_select_method": {
3607 "v_range": [["v6.2.0", "v6.2.0"], ["v6.2.5", "v6.4.0"], ["v6.4.4", ""]],
3608 "type": "string",
3609 "options": [{"value": "auto"}, {"value": "sdwan"}, {"value": "specify"}],
3610 },
3611 "dhcp_relay_interface": {
3612 "v_range": [["v6.2.0", "v6.2.0"], ["v6.2.5", "v6.4.0"], ["v6.4.4", ""]],
3613 "type": "string",
3614 },
3615 "dhcp_relay_vrf_select": {"v_range": [["v7.6.1", ""]], "type": "integer"},
3616 "dhcp_broadcast_flag": {
3617 "v_range": [["v7.4.0", ""]],
3618 "type": "string",
3619 "options": [{"value": "disable"}, {"value": "enable"}],
3620 },
3621 "dhcp_relay_service": {
3622 "v_range": [["v6.0.0", ""]],
3623 "type": "string",
3624 "options": [{"value": "disable"}, {"value": "enable"}],
3625 },
3626 "dhcp_relay_ip": {
3627 "v_range": [["v6.0.0", ""]],
3628 "type": "list",
3629 "multiple_values": True,
3630 "elements": "str",
3631 },
3632 "dhcp_relay_source_ip": {"v_range": [["v7.4.1", ""]], "type": "string"},
3633 "dhcp_relay_circuit_id": {"v_range": [["v7.4.1", ""]], "type": "string"},
3634 "dhcp_relay_link_selection": {"v_range": [["v7.0.4", ""]], "type": "string"},
3635 "dhcp_relay_request_all_server": {
3636 "v_range": [["v7.0.0", ""]],
3637 "type": "string",
3638 "options": [{"value": "disable"}, {"value": "enable"}],
3639 },
3640 "dhcp_relay_allow_no_end_option": {
3641 "v_range": [["v7.4.4", ""]],
3642 "type": "string",
3643 "options": [{"value": "disable"}, {"value": "enable"}],
3644 },
3645 "dhcp_relay_type": {
3646 "v_range": [["v6.0.0", ""]],
3647 "type": "string",
3648 "options": [{"value": "regular"}, {"value": "ipsec"}],
3649 },
3650 "dhcp_smart_relay": {
3651 "v_range": [["v7.4.0", ""]],
3652 "type": "string",
3653 "options": [{"value": "disable"}, {"value": "enable"}],
3654 },
3655 "dhcp_relay_agent_option": {
3656 "v_range": [["v6.0.0", ""]],
3657 "type": "string",
3658 "options": [{"value": "enable"}, {"value": "disable"}],
3659 },
3660 "dhcp_classless_route_addition": {
3661 "v_range": [["v7.0.1", ""]],
3662 "type": "string",
3663 "options": [{"value": "enable"}, {"value": "disable"}],
3664 },
3665 "management_ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
3666 "ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
3667 "allowaccess": {
3668 "v_range": [["v6.0.0", ""]],
3669 "type": "list",
3670 "options": [
3671 {"value": "ping"},
3672 {"value": "https"},
3673 {"value": "ssh"},
3674 {"value": "snmp"},
3675 {"value": "http"},
3676 {"value": "telnet"},
3677 {"value": "fgfm"},
3678 {"value": "radius-acct"},
3679 {"value": "probe-response"},
3680 {"value": "fabric", "v_range": [["v6.2.0", ""]]},
3681 {"value": "ftm"},
3682 {"value": "speed-test", "v_range": [["v7.0.1", ""]]},
3683 {"value": "scim", "v_range": [["v7.6.0", ""]]},
3684 {"value": "capwap", "v_range": [["v6.0.0", "v6.0.11"]]},
3685 ],
3686 "multiple_values": True,
3687 "elements": "str",
3688 },
3689 "gwdetect": {
3690 "v_range": [["v6.0.0", ""]],
3691 "type": "string",
3692 "options": [{"value": "enable"}, {"value": "disable"}],
3693 },
3694 "detectserver": {"v_range": [["v6.0.0", ""]], "type": "string"},
3695 "detectprotocol": {
3696 "v_range": [["v6.0.0", ""]],
3697 "type": "list",
3698 "options": [
3699 {"value": "ping"},
3700 {"value": "tcp-echo"},
3701 {"value": "udp-echo"},
3702 ],
3703 "multiple_values": True,
3704 "elements": "str",
3705 },
3706 "ha_priority": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3707 "fail_detect": {
3708 "v_range": [["v6.0.0", ""]],
3709 "type": "string",
3710 "options": [{"value": "enable"}, {"value": "disable"}],
3711 },
3712 "fail_detect_option": {
3713 "v_range": [["v6.0.0", ""]],
3714 "type": "list",
3715 "options": [{"value": "detectserver"}, {"value": "link-down"}],
3716 "multiple_values": True,
3717 "elements": "str",
3718 },
3719 "fail_alert_method": {
3720 "v_range": [["v6.0.0", ""]],
3721 "type": "string",
3722 "options": [{"value": "link-failed-signal"}, {"value": "link-down"}],
3723 },
3724 "fail_action_on_extender": {
3725 "v_range": [["v6.0.0", ""]],
3726 "type": "string",
3727 "options": [
3728 {"value": "soft-restart"},
3729 {"value": "hard-restart"},
3730 {"value": "reboot"},
3731 ],
3732 },
3733 "fail_alert_interfaces": {
3734 "type": "list",
3735 "elements": "dict",
3736 "children": {
3737 "name": {
3738 "v_range": [["v6.0.0", ""]],
3739 "type": "string",
3740 "required": True,
3741 }
3742 },
3743 "v_range": [["v6.0.0", ""]],
3744 },
3745 "dhcp_client_identifier": {"v_range": [["v6.0.0", ""]], "type": "string"},
3746 "dhcp_renew_time": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3747 "ipunnumbered": {"v_range": [["v6.0.0", ""]], "type": "string"},
3748 "username": {"v_range": [["v6.0.0", ""]], "type": "string"},
3749 "pppoe_egress_cos": {
3750 "v_range": [["v7.6.0", ""]],
3751 "type": "string",
3752 "options": [
3753 {"value": "cos0"},
3754 {"value": "cos1"},
3755 {"value": "cos2"},
3756 {"value": "cos3"},
3757 {"value": "cos4"},
3758 {"value": "cos5"},
3759 {"value": "cos6"},
3760 {"value": "cos7"},
3761 ],
3762 },
3763 "pppoe_unnumbered_negotiate": {
3764 "v_range": [["v6.0.0", ""]],
3765 "type": "string",
3766 "options": [{"value": "enable"}, {"value": "disable"}],
3767 },
3768 "password": {"v_range": [["v6.0.0", ""]], "type": "string"},
3769 "idle_timeout": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3770 "multilink": {
3771 "v_range": [["v7.6.5", ""]],
3772 "type": "string",
3773 "options": [{"value": "enable"}, {"value": "disable"}],
3774 },
3775 "mrru": {"v_range": [["v7.6.5", ""]], "type": "integer"},
3776 "disc_retry_timeout": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3777 "padt_retry_timeout": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3778 "service_name": {"v_range": [["v6.0.0", ""]], "type": "string"},
3779 "ac_name": {"v_range": [["v6.0.0", ""]], "type": "string"},
3780 "lcp_echo_interval": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3781 "lcp_max_echo_fails": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3782 "defaultgw": {
3783 "v_range": [["v6.0.0", ""]],
3784 "type": "string",
3785 "options": [{"value": "enable"}, {"value": "disable"}],
3786 },
3787 "dns_server_override": {
3788 "v_range": [["v6.0.0", ""]],
3789 "type": "string",
3790 "options": [{"value": "enable"}, {"value": "disable"}],
3791 },
3792 "dns_server_protocol": {
3793 "v_range": [["v7.0.4", ""]],
3794 "type": "list",
3795 "options": [{"value": "cleartext"}, {"value": "dot"}, {"value": "doh"}],
3796 "multiple_values": True,
3797 "elements": "str",
3798 },
3799 "auth_type": {
3800 "v_range": [["v6.0.0", ""]],
3801 "type": "string",
3802 "options": [
3803 {"value": "auto"},
3804 {"value": "pap"},
3805 {"value": "chap"},
3806 {"value": "mschapv1"},
3807 {"value": "mschapv2"},
3808 ],
3809 },
3810 "pptp_client": {
3811 "v_range": [["v6.0.0", ""]],
3812 "type": "string",
3813 "options": [{"value": "enable"}, {"value": "disable"}],
3814 },
3815 "pptp_user": {"v_range": [["v6.0.0", ""]], "type": "string"},
3816 "pptp_password": {"v_range": [["v6.0.0", ""]], "type": "string"},
3817 "pptp_server_ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
3818 "pptp_auth_type": {
3819 "v_range": [["v6.0.0", ""]],
3820 "type": "string",
3821 "options": [
3822 {"value": "auto"},
3823 {"value": "pap"},
3824 {"value": "chap"},
3825 {"value": "mschapv1"},
3826 {"value": "mschapv2"},
3827 ],
3828 },
3829 "pptp_timeout": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3830 "arpforward": {
3831 "v_range": [["v6.0.0", ""]],
3832 "type": "string",
3833 "options": [{"value": "enable"}, {"value": "disable"}],
3834 },
3835 "ndiscforward": {
3836 "v_range": [["v6.0.0", ""]],
3837 "type": "string",
3838 "options": [{"value": "enable"}, {"value": "disable"}],
3839 },
3840 "broadcast_forward": {
3841 "v_range": [["v6.0.0", ""]],
3842 "type": "string",
3843 "options": [{"value": "enable"}, {"value": "disable"}],
3844 },
3845 "bfd": {
3846 "v_range": [["v6.0.0", ""]],
3847 "type": "string",
3848 "options": [{"value": "global"}, {"value": "enable"}, {"value": "disable"}],
3849 },
3850 "bfd_desired_min_tx": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3851 "bfd_detect_mult": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3852 "bfd_required_min_rx": {"v_range": [["v6.0.0", ""]], "type": "integer"},
3853 "l2forward": {
3854 "v_range": [["v6.0.0", ""]],
3855 "type": "string",
3856 "options": [{"value": "enable"}, {"value": "disable"}],
3857 },
3858 "icmp_send_redirect": {
3859 "v_range": [["v6.0.0", ""]],
3860 "type": "string",
3861 "options": [{"value": "enable"}, {"value": "disable"}],
3862 },
3863 "icmp_accept_redirect": {
3864 "v_range": [["v6.0.0", ""]],
3865 "type": "string",
3866 "options": [{"value": "enable"}, {"value": "disable"}],
3867 },
3868 "reachable_time": {"v_range": [["v7.0.4", ""]], "type": "integer"},
3869 "vlanforward": {
3870 "v_range": [["v6.0.0", ""]],
3871 "type": "string",
3872 "options": [{"value": "enable"}, {"value": "disable"}],
3873 },
3874 "stpforward": {
3875 "v_range": [["v6.0.0", ""]],
3876 "type": "string",
3877 "options": [{"value": "enable"}, {"value": "disable"}],
3878 },
3879 "stpforward_mode": {
3880 "v_range": [["v6.0.0", ""]],
3881 "type": "string",
3882 "options": [
3883 {"value": "rpl-all-ext-id"},
3884 {"value": "rpl-bridge-ext-id"},
3885 {"value": "rpl-nothing"},
3886 ],
3887 },
3888 "ips_sniffer_mode": {
3889 "v_range": [["v6.0.0", ""]],
3890 "type": "string",
3891 "options": [{"value": "enable"}, {"value": "disable"}],
3892 },
3893 "ident_accept": {
3894 "v_range": [["v6.0.0", ""]],
3895 "type": "string",
3896 "options": [{"value": "enable"}, {"value": "disable"}],
3897 },
3898 "ipmac": {
3899 "v_range": [["v6.0.0", ""]],
3900 "type": "string",
3901 "options": [{"value": "enable"}, {"value": "disable"}],
3902 },
3903 "subst": {
3904 "v_range": [["v6.0.0", ""]],
3905 "type": "string",
3906 "options": [{"value": "enable"}, {"value": "disable"}],
3907 },
3908 "macaddr": {"v_range": [["v6.0.0", ""]], "type": "string"},
3909 "virtual_mac": {"v_range": [["v7.6.0", ""]], "type": "string"},
3910 "substitute_dst_mac": {"v_range": [["v6.0.0", ""]], "type": "string"},
3911 "speed": {
3912 "v_range": [["v6.0.0", ""]],
3913 "type": "string",
3914 "options": [
3915 {"value": "auto"},
3916 {"value": "10full"},
3917 {"value": "10half"},
3918 {"value": "100full"},
3919 {"value": "100half"},
3920 {"value": "100auto", "v_range": [["v7.4.2", "v7.4.2"], ["v7.6.4", ""]]},
3921 {"value": "1000full"},
3922 {"value": "1000auto"},
3923 {"value": "10000full"},
3924 {"value": "10000auto"},
3925 {"value": "40000full"},
3926 {"value": "40000auto", "v_range": [["v7.4.0", ""]]},
3927 {"value": "2500auto", "v_range": [["v7.4.2", "v7.4.2"]]},
3928 {"value": "5000auto", "v_range": [["v7.4.2", "v7.4.2"]]},
3929 {"value": "25000full", "v_range": [["v7.4.2", "v7.4.2"]]},
3930 {"value": "25000auto", "v_range": [["v7.4.2", "v7.4.2"]]},
3931 {"value": "50000full", "v_range": [["v7.4.2", "v7.4.2"]]},
3932 {"value": "50000auto", "v_range": [["v7.4.2", "v7.4.2"]]},
3933 {
3934 "value": "100Gfull",
3935 "v_range": [
3936 ["v6.0.0", "v6.2.7"],
3937 ["v6.4.1", "v7.0.12"],
3938 ["v7.2.1", "v7.2.4"],
3939 ["v7.4.2", "v7.4.2"],
3940 ],
3941 },
3942 {"value": "100Gauto", "v_range": [["v7.4.2", "v7.4.2"]]},
3943 {"value": "200Gfull", "v_range": [["v7.4.2", "v7.4.2"]]},
3944 {"value": "200Gauto", "v_range": [["v7.4.2", "v7.4.2"]]},
3945 {"value": "400Gfull", "v_range": [["v7.4.2", "v7.4.2"]]},
3946 {"value": "400Gauto", "v_range": [["v7.4.2", "v7.4.2"]]},
3947 {"value": "1000half", "v_range": [["v6.0.0", "v7.0.3"]]},
3948 ],
3949 },
3950 "status": {
3951 "v_range": [["v6.0.0", ""]],
3952 "type": "string",
3953 "options": [{"value": "up"}, {"value": "down"}],
3954 },
3955 "netbios_forward": {
3956 "v_range": [["v6.0.0", ""]],
3957 "type": "string",
3958 "options": [{"value": "disable"}, {"value": "enable"}],
3959 },
3960 "wins_ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
3961 "type": {
3962 "v_range": [["v6.0.0", ""]],
3963 "type": "string",
3964 "options": [
3965 {"value": "physical"},
3966 {"value": "vlan"},
3967 {"value": "aggregate"},
3968 {"value": "redundant"},
3969 {"value": "tunnel"},
3970 {"value": "vdom-link"},
3971 {"value": "loopback"},
3972 {"value": "switch"},
3973 {"value": "vap-switch"},
3974 {"value": "wl-mesh"},
3975 {"value": "fext-wan"},
3976 {"value": "vxlan"},
3977 {"value": "geneve", "v_range": [["v6.2.0", ""]]},
3978 {"value": "switch-vlan"},
3979 {"value": "emac-vlan"},
3980 {"value": "lan-extension", "v_range": [["v7.0.2", ""]]},
3981 {"value": "hdlc", "v_range": [["v6.0.0", "v7.6.3"]]},
3982 {"value": "ssl", "v_range": [["v7.0.0", "v7.6.3"]]},
3983 {
3984 "value": "hard-switch",
3985 "v_range": [
3986 ["v6.0.0", "v6.2.7"],
3987 ["v6.4.1", "v7.0.12"],
3988 ["v7.2.1", "v7.2.4"],
3989 ["v7.4.2", "v7.4.2"],
3990 ],
3991 },
3992 ],
3993 },
3994 "dedicated_to": {
3995 "v_range": [["v6.0.0", ""]],
3996 "type": "string",
3997 "options": [{"value": "none"}, {"value": "management"}],
3998 },
3999 "trust_ip_1": {"v_range": [["v6.0.0", ""]], "type": "string"},
4000 "trust_ip_2": {"v_range": [["v6.0.0", ""]], "type": "string"},
4001 "trust_ip_3": {"v_range": [["v6.0.0", ""]], "type": "string"},
4002 "trust_ip6_1": {"v_range": [["v6.0.0", ""]], "type": "string"},
4003 "trust_ip6_2": {"v_range": [["v6.0.0", ""]], "type": "string"},
4004 "trust_ip6_3": {"v_range": [["v6.0.0", ""]], "type": "string"},
4005 "wccp": {
4006 "v_range": [["v6.0.0", ""]],
4007 "type": "string",
4008 "options": [{"value": "enable"}, {"value": "disable"}],
4009 },
4010 "netflow_sampler": {
4011 "v_range": [["v6.0.0", ""]],
4012 "type": "string",
4013 "options": [
4014 {"value": "disable"},
4015 {"value": "tx"},
4016 {"value": "rx"},
4017 {"value": "both"},
4018 ],
4019 },
4020 "netflow_sample_rate": {"v_range": [["v7.6.0", ""]], "type": "integer"},
4021 "netflow_sampler_id": {"v_range": [["v7.6.0", ""]], "type": "integer"},
4022 "sflow_sampler": {
4023 "v_range": [["v6.0.0", ""]],
4024 "type": "string",
4025 "options": [{"value": "enable"}, {"value": "disable"}],
4026 },
4027 "drop_fragment": {
4028 "v_range": [["v6.0.0", ""]],
4029 "type": "string",
4030 "options": [{"value": "enable"}, {"value": "disable"}],
4031 },
4032 "src_check": {
4033 "v_range": [["v6.0.0", ""]],
4034 "type": "string",
4035 "options": [{"value": "enable"}, {"value": "disable"}],
4036 },
4037 "sample_rate": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4038 "polling_interval": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4039 "sample_direction": {
4040 "v_range": [["v6.0.0", ""]],
4041 "type": "string",
4042 "options": [{"value": "tx"}, {"value": "rx"}, {"value": "both"}],
4043 },
4044 "explicit_web_proxy": {
4045 "v_range": [["v6.0.0", ""]],
4046 "type": "string",
4047 "options": [{"value": "enable"}, {"value": "disable"}],
4048 },
4049 "explicit_ftp_proxy": {
4050 "v_range": [["v6.0.0", ""]],
4051 "type": "string",
4052 "options": [{"value": "enable"}, {"value": "disable"}],
4053 },
4054 "proxy_captive_portal": {
4055 "v_range": [["v6.0.0", ""]],
4056 "type": "string",
4057 "options": [{"value": "enable"}, {"value": "disable"}],
4058 },
4059 "tcp_mss": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4060 "inbandwidth": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4061 "outbandwidth": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4062 "egress_shaping_profile": {"v_range": [["v6.0.0", ""]], "type": "string"},
4063 "ingress_shaping_profile": {"v_range": [["v6.2.0", ""]], "type": "string"},
4064 "spillover_threshold": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4065 "ingress_spillover_threshold": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4066 "weight": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4067 "interface": {"v_range": [["v6.0.0", ""]], "type": "string"},
4068 "external": {
4069 "v_range": [["v6.0.0", ""]],
4070 "type": "string",
4071 "options": [{"value": "enable"}, {"value": "disable"}],
4072 },
4073 "mtu_override": {
4074 "v_range": [["v6.0.0", ""]],
4075 "type": "string",
4076 "options": [{"value": "enable"}, {"value": "disable"}],
4077 },
4078 "mtu": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4079 "vlan_protocol": {
4080 "v_range": [["v6.4.0", ""]],
4081 "type": "string",
4082 "options": [{"value": "8021q"}, {"value": "8021ad"}],
4083 },
4084 "vlanid": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4085 "gi_gk": {
4086 "v_range": [["v6.0.0", "v7.0.8"], ["v7.2.0", "v7.2.4"], ["v7.4.3", ""]],
4087 "type": "string",
4088 "options": [{"value": "enable"}, {"value": "disable"}],
4089 },
4090 "forward_domain": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4091 "remote_ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
4092 "member": {
4093 "type": "list",
4094 "elements": "dict",
4095 "children": {
4096 "interface_name": {
4097 "v_range": [["v6.0.0", ""]],
4098 "type": "string",
4099 "required": True,
4100 }
4101 },
4102 "v_range": [["v6.0.0", ""]],
4103 },
4104 "lacp_mode": {
4105 "v_range": [["v6.0.0", ""]],
4106 "type": "string",
4107 "options": [{"value": "static"}, {"value": "passive"}, {"value": "active"}],
4108 },
4109 "lacp_ha_secondary": {
4110 "v_range": [["v7.2.1", ""]],
4111 "type": "string",
4112 "options": [{"value": "enable"}, {"value": "disable"}],
4113 },
4114 "system_id_type": {
4115 "v_range": [["v7.0.2", ""]],
4116 "type": "string",
4117 "options": [{"value": "auto"}, {"value": "user"}],
4118 },
4119 "system_id": {"v_range": [["v7.0.2", ""]], "type": "string"},
4120 "lacp_speed": {
4121 "v_range": [["v6.0.0", ""]],
4122 "type": "string",
4123 "options": [{"value": "slow"}, {"value": "fast"}],
4124 },
4125 "min_links": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4126 "min_links_down": {
4127 "v_range": [["v6.0.0", ""]],
4128 "type": "string",
4129 "options": [{"value": "operational"}, {"value": "administrative"}],
4130 },
4131 "algorithm": {
4132 "v_range": [["v6.0.0", ""]],
4133 "type": "string",
4134 "options": [
4135 {"value": "L2"},
4136 {"value": "L3"},
4137 {"value": "L4"},
4138 {"value": "NPU-GRE", "v_range": [["v7.6.4", ""]]},
4139 {"value": "Source-MAC", "v_range": [["v7.2.1", ""]]},
4140 ],
4141 },
4142 "link_up_delay": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4143 "aggregate_type": {
4144 "v_range": [["v7.2.1", ""]],
4145 "type": "string",
4146 "options": [{"value": "physical"}, {"value": "vxlan"}],
4147 },
4148 "priority_override": {
4149 "v_range": [["v6.0.0", ""]],
4150 "type": "string",
4151 "options": [{"value": "enable"}, {"value": "disable"}],
4152 },
4153 "sw_algorithm": {
4154 "v_range": [["v7.2.0", "v7.2.0"], ["v7.4.0", "v7.4.1"], ["v7.4.3", ""]],
4155 "type": "string",
4156 "options": [{"value": "l2"}, {"value": "l3"}, {"value": "eh"}],
4157 },
4158 "description": {"v_range": [["v6.0.0", ""]], "type": "string"},
4159 "alias": {"v_range": [["v6.0.0", ""]], "type": "string"},
4160 "security_mode": {
4161 "v_range": [["v6.0.0", ""]],
4162 "type": "string",
4163 "options": [
4164 {"value": "none"},
4165 {"value": "captive-portal"},
4166 {"value": "802.1X"},
4167 ],
4168 },
4169 "security_mac_auth_bypass": {
4170 "v_range": [["v6.0.0", ""]],
4171 "type": "string",
4172 "options": [
4173 {"value": "mac-auth-only", "v_range": [["v6.2.0", ""]]},
4174 {"value": "enable"},
4175 {"value": "disable"},
4176 ],
4177 },
4178 "security_ip_auth_bypass": {
4179 "v_range": [["v7.6.0", ""]],
4180 "type": "string",
4181 "options": [{"value": "enable"}, {"value": "disable"}],
4182 },
4183 "security_external_web": {"v_range": [["v6.0.0", ""]], "type": "string"},
4184 "security_external_logout": {"v_range": [["v6.0.0", ""]], "type": "string"},
4185 "replacemsg_override_group": {"v_range": [["v6.0.0", ""]], "type": "string"},
4186 "security_redirect_url": {"v_range": [["v6.0.0", ""]], "type": "string"},
4187 "auth_cert": {"v_range": [["v7.0.4", ""]], "type": "string"},
4188 "auth_portal_addr": {"v_range": [["v7.0.4", ""]], "type": "string"},
4189 "security_exempt_list": {"v_range": [["v6.0.0", ""]], "type": "string"},
4190 "security_groups": {
4191 "type": "list",
4192 "elements": "dict",
4193 "children": {
4194 "name": {
4195 "v_range": [["v6.0.0", ""]],
4196 "type": "string",
4197 "required": True,
4198 }
4199 },
4200 "v_range": [["v6.0.0", ""]],
4201 },
4202 "ike_saml_server": {"v_range": [["v7.2.0", ""]], "type": "string"},
4203 "device_identification": {
4204 "v_range": [["v6.0.0", ""]],
4205 "type": "string",
4206 "options": [{"value": "enable"}, {"value": "disable"}],
4207 },
4208 "exclude_signatures": {
4209 "v_range": [["v7.6.1", ""]],
4210 "type": "list",
4211 "options": [{"value": "iot"}, {"value": "ot"}],
4212 "multiple_values": True,
4213 "elements": "str",
4214 },
4215 "device_user_identification": {
4216 "v_range": [["v6.0.0", ""]],
4217 "type": "string",
4218 "options": [{"value": "enable"}, {"value": "disable"}],
4219 },
4220 "lldp_reception": {
4221 "v_range": [["v6.2.0", ""]],
4222 "type": "string",
4223 "options": [{"value": "enable"}, {"value": "disable"}, {"value": "vdom"}],
4224 },
4225 "lldp_transmission": {
4226 "v_range": [["v6.0.0", ""]],
4227 "type": "string",
4228 "options": [{"value": "enable"}, {"value": "disable"}, {"value": "vdom"}],
4229 },
4230 "lldp_network_policy": {"v_range": [["v6.2.0", ""]], "type": "string"},
4231 "estimated_upstream_bandwidth": {
4232 "v_range": [["v6.0.0", ""]],
4233 "type": "integer",
4234 },
4235 "estimated_downstream_bandwidth": {
4236 "v_range": [["v6.0.0", ""]],
4237 "type": "integer",
4238 },
4239 "measured_upstream_bandwidth": {"v_range": [["v6.4.0", ""]], "type": "integer"},
4240 "measured_downstream_bandwidth": {
4241 "v_range": [["v6.4.0", ""]],
4242 "type": "integer",
4243 },
4244 "bandwidth_measure_time": {"v_range": [["v6.4.0", ""]], "type": "integer"},
4245 "monitor_bandwidth": {
4246 "v_range": [["v6.4.0", ""]],
4247 "type": "string",
4248 "options": [{"value": "enable"}, {"value": "disable"}],
4249 },
4250 "vrrp_virtual_mac": {
4251 "v_range": [["v6.0.0", ""]],
4252 "type": "string",
4253 "options": [{"value": "enable"}, {"value": "disable"}],
4254 },
4255 "vrrp": {
4256 "type": "list",
4257 "elements": "dict",
4258 "children": {
4259 "vrid": {
4260 "v_range": [["v6.0.0", ""]],
4261 "type": "integer",
4262 "required": True,
4263 },
4264 "version": {
4265 "v_range": [["v6.0.0", ""]],
4266 "type": "string",
4267 "options": [{"value": "2"}, {"value": "3"}],
4268 },
4269 "vrgrp": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4270 "vrip": {"v_range": [["v6.0.0", ""]], "type": "string"},
4271 "priority": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4272 "adv_interval": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4273 "start_time": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4274 "preempt": {
4275 "v_range": [["v6.0.0", ""]],
4276 "type": "string",
4277 "options": [{"value": "enable"}, {"value": "disable"}],
4278 },
4279 "accept_mode": {
4280 "v_range": [["v6.0.0", ""]],
4281 "type": "string",
4282 "options": [{"value": "enable"}, {"value": "disable"}],
4283 },
4284 "vrdst": {
4285 "v_range": [["v6.0.0", ""]],
4286 "type": "list",
4287 "multiple_values": True,
4288 "elements": "str",
4289 },
4290 "vrdst_priority": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4291 "ignore_default_route": {
4292 "v_range": [["v6.0.0", ""]],
4293 "type": "string",
4294 "options": [{"value": "enable"}, {"value": "disable"}],
4295 },
4296 "status": {
4297 "v_range": [["v6.0.0", ""]],
4298 "type": "string",
4299 "options": [{"value": "enable"}, {"value": "disable"}],
4300 },
4301 "proxy_arp": {
4302 "type": "list",
4303 "elements": "dict",
4304 "children": {
4305 "id": {
4306 "v_range": [["v6.0.0", ""]],
4307 "type": "integer",
4308 "required": True,
4309 },
4310 "ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
4311 },
4312 "v_range": [["v6.0.0", ""]],
4313 },
4314 },
4315 "v_range": [["v6.0.0", ""]],
4316 },
4317 "phy_setting": {
4318 "v_range": [["v7.6.5", ""]],
4319 "type": "dict",
4320 "children": {
4321 "signal_ok_threshold": {"v_range": [["v7.6.5", ""]], "type": "integer"}
4322 },
4323 },
4324 "role": {
4325 "v_range": [["v6.0.0", ""]],
4326 "type": "string",
4327 "options": [
4328 {"value": "lan"},
4329 {"value": "wan"},
4330 {"value": "dmz"},
4331 {"value": "undefined"},
4332 ],
4333 },
4334 "snmp_index": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4335 "secondary_IP": {
4336 "v_range": [["v6.0.0", ""]],
4337 "type": "string",
4338 "options": [{"value": "enable"}, {"value": "disable"}],
4339 },
4340 "secondaryip": {
4341 "type": "list",
4342 "elements": "dict",
4343 "children": {
4344 "id": {
4345 "v_range": [["v6.0.0", ""]],
4346 "type": "integer",
4347 "required": True,
4348 },
4349 "ip": {"v_range": [["v6.0.0", ""]], "type": "string"},
4350 "secip_relay_ip": {
4351 "v_range": [["v7.4.0", ""]],
4352 "type": "list",
4353 "multiple_values": True,
4354 "elements": "str",
4355 },
4356 "allowaccess": {
4357 "v_range": [["v6.0.0", ""]],
4358 "type": "list",
4359 "options": [
4360 {"value": "ping"},
4361 {"value": "https"},
4362 {"value": "ssh"},
4363 {"value": "snmp"},
4364 {"value": "http"},
4365 {"value": "telnet"},
4366 {"value": "fgfm"},
4367 {"value": "radius-acct"},
4368 {"value": "probe-response"},
4369 {"value": "fabric", "v_range": [["v6.2.0", ""]]},
4370 {"value": "ftm"},
4371 {"value": "speed-test", "v_range": [["v7.0.1", ""]]},
4372 {"value": "scim", "v_range": [["v7.6.0", ""]]},
4373 {"value": "capwap", "v_range": [["v6.0.0", "v6.0.11"]]},
4374 ],
4375 "multiple_values": True,
4376 "elements": "str",
4377 },
4378 "gwdetect": {
4379 "v_range": [["v6.0.0", ""]],
4380 "type": "string",
4381 "options": [{"value": "enable"}, {"value": "disable"}],
4382 },
4383 "detectserver": {"v_range": [["v6.0.0", ""]], "type": "string"},
4384 "detectprotocol": {
4385 "v_range": [["v6.0.0", ""]],
4386 "type": "list",
4387 "options": [
4388 {"value": "ping"},
4389 {"value": "tcp-echo"},
4390 {"value": "udp-echo"},
4391 ],
4392 "multiple_values": True,
4393 "elements": "str",
4394 },
4395 "ha_priority": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4396 "ping_serv_status": {
4397 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
4398 "type": "integer",
4399 },
4400 },
4401 "v_range": [["v6.0.0", ""]],
4402 },
4403 "preserve_session_route": {
4404 "v_range": [["v6.0.0", ""]],
4405 "type": "string",
4406 "options": [{"value": "enable"}, {"value": "disable"}],
4407 },
4408 "auto_auth_extension_device": {
4409 "v_range": [["v6.0.0", ""]],
4410 "type": "string",
4411 "options": [{"value": "enable"}, {"value": "disable"}],
4412 },
4413 "ap_discover": {
4414 "v_range": [["v6.0.0", ""]],
4415 "type": "string",
4416 "options": [{"value": "enable"}, {"value": "disable"}],
4417 },
4418 "telemetry_discover": {
4419 "v_range": [["v7.6.3", ""]],
4420 "type": "string",
4421 "options": [{"value": "enable"}, {"value": "disable"}],
4422 },
4423 "fortilink_neighbor_detect": {
4424 "v_range": [["v6.2.0", ""]],
4425 "type": "string",
4426 "options": [{"value": "lldp"}, {"value": "fortilink"}],
4427 },
4428 "ip_managed_by_fortiipam": {
4429 "v_range": [["v6.4.0", ""]],
4430 "type": "string",
4431 "options": [
4432 {"value": "inherit-global", "v_range": [["v7.4.0", ""]]},
4433 {"value": "enable"},
4434 {"value": "disable"},
4435 ],
4436 },
4437 "managed_subnetwork_size": {
4438 "v_range": [["v6.4.0", ""]],
4439 "type": "string",
4440 "options": [
4441 {"value": "4", "v_range": [["v7.6.3", ""]]},
4442 {"value": "8", "v_range": [["v7.6.3", ""]]},
4443 {"value": "16", "v_range": [["v7.6.3", ""]]},
4444 {"value": "32", "v_range": [["v7.0.2", ""]]},
4445 {"value": "64", "v_range": [["v7.0.2", ""]]},
4446 {"value": "128", "v_range": [["v7.0.2", ""]]},
4447 {"value": "256"},
4448 {"value": "512"},
4449 {"value": "1024"},
4450 {"value": "2048"},
4451 {"value": "4096"},
4452 {"value": "8192"},
4453 {"value": "16384"},
4454 {"value": "32768"},
4455 {"value": "65536"},
4456 {"value": "131072", "v_range": [["v7.6.3", ""]]},
4457 {"value": "262144", "v_range": [["v7.6.3", ""]]},
4458 {"value": "524288", "v_range": [["v7.6.3", ""]]},
4459 {"value": "1048576", "v_range": [["v7.6.3", ""]]},
4460 {"value": "2097152", "v_range": [["v7.6.3", ""]]},
4461 {"value": "4194304", "v_range": [["v7.6.3", ""]]},
4462 {"value": "8388608", "v_range": [["v7.6.3", ""]]},
4463 {"value": "16777216", "v_range": [["v7.6.3", ""]]},
4464 ],
4465 },
4466 "fortilink_split_interface": {
4467 "v_range": [["v6.0.0", ""]],
4468 "type": "string",
4469 "options": [{"value": "enable"}, {"value": "disable"}],
4470 },
4471 "internal": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4472 "switch_controller_access_vlan": {
4473 "v_range": [["v6.0.0", ""]],
4474 "type": "string",
4475 "options": [{"value": "enable"}, {"value": "disable"}],
4476 },
4477 "switch_controller_traffic_policy": {
4478 "v_range": [["v6.2.0", ""]],
4479 "type": "string",
4480 },
4481 "switch_controller_rspan_mode": {
4482 "v_range": [["v6.2.0", ""]],
4483 "type": "string",
4484 "options": [{"value": "disable"}, {"value": "enable"}],
4485 },
4486 "switch_controller_netflow_collect": {
4487 "v_range": [["v7.2.1", ""]],
4488 "type": "string",
4489 "options": [{"value": "disable"}, {"value": "enable"}],
4490 },
4491 "switch_controller_mgmt_vlan": {"v_range": [["v6.4.0", ""]], "type": "integer"},
4492 "switch_controller_igmp_snooping": {
4493 "v_range": [["v6.0.0", ""]],
4494 "type": "string",
4495 "options": [{"value": "enable"}, {"value": "disable"}],
4496 },
4497 "switch_controller_igmp_snooping_proxy": {
4498 "v_range": [["v6.2.0", ""]],
4499 "type": "string",
4500 "options": [{"value": "enable"}, {"value": "disable"}],
4501 },
4502 "switch_controller_igmp_snooping_fast_leave": {
4503 "v_range": [["v6.2.0", ""]],
4504 "type": "string",
4505 "options": [{"value": "enable"}, {"value": "disable"}],
4506 },
4507 "switch_controller_dhcp_snooping": {
4508 "v_range": [["v6.0.0", ""]],
4509 "type": "string",
4510 "options": [{"value": "enable"}, {"value": "disable"}],
4511 },
4512 "switch_controller_dhcp_snooping_verify_mac": {
4513 "v_range": [["v6.0.0", ""]],
4514 "type": "string",
4515 "options": [{"value": "enable"}, {"value": "disable"}],
4516 },
4517 "switch_controller_dhcp_snooping_option82": {
4518 "v_range": [["v6.0.0", ""]],
4519 "type": "string",
4520 "options": [{"value": "enable"}, {"value": "disable"}],
4521 },
4522 "dhcp_snooping_server_list": {
4523 "type": "list",
4524 "elements": "dict",
4525 "children": {
4526 "name": {
4527 "v_range": [["v7.0.1", ""]],
4528 "type": "string",
4529 "required": True,
4530 },
4531 "server_ip": {"v_range": [["v7.0.1", ""]], "type": "string"},
4532 },
4533 "v_range": [["v7.0.1", ""]],
4534 },
4535 "switch_controller_arp_inspection": {
4536 "v_range": [["v6.0.0", ""]],
4537 "type": "string",
4538 "options": [
4539 {"value": "enable"},
4540 {"value": "disable"},
4541 {"value": "monitor", "v_range": [["v7.4.4", ""]]},
4542 ],
4543 },
4544 "switch_controller_learning_limit": {
4545 "v_range": [["v6.0.0", ""]],
4546 "type": "integer",
4547 },
4548 "switch_controller_nac": {"v_range": [["v6.4.0", ""]], "type": "string"},
4549 "switch_controller_dynamic": {"v_range": [["v7.0.0", ""]], "type": "string"},
4550 "switch_controller_feature": {
4551 "v_range": [["v6.4.0", ""]],
4552 "type": "string",
4553 "options": [
4554 {"value": "none"},
4555 {"value": "default-vlan"},
4556 {"value": "quarantine"},
4557 {"value": "rspan"},
4558 {"value": "voice"},
4559 {"value": "video"},
4560 {"value": "nac"},
4561 {"value": "nac-segment", "v_range": [["v7.0.1", ""]]},
4562 ],
4563 },
4564 "switch_controller_iot_scanning": {
4565 "v_range": [["v6.4.4", ""]],
4566 "type": "string",
4567 "options": [{"value": "enable"}, {"value": "disable"}],
4568 },
4569 "switch_controller_offload": {
4570 "v_range": [["v7.4.1", ""]],
4571 "type": "string",
4572 "options": [{"value": "enable"}, {"value": "disable"}],
4573 },
4574 "switch_controller_offload_ip": {"v_range": [["v7.4.1", ""]], "type": "string"},
4575 "switch_controller_offload_gw": {
4576 "v_range": [["v7.4.1", ""]],
4577 "type": "string",
4578 "options": [{"value": "enable"}, {"value": "disable"}],
4579 },
4580 "color": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4581 "tagging": {
4582 "type": "list",
4583 "elements": "dict",
4584 "children": {
4585 "name": {
4586 "v_range": [["v6.0.0", ""]],
4587 "type": "string",
4588 "required": True,
4589 },
4590 "category": {"v_range": [["v6.0.0", ""]], "type": "string"},
4591 "tags": {
4592 "type": "list",
4593 "elements": "dict",
4594 "children": {
4595 "name": {
4596 "v_range": [["v6.0.0", ""]],
4597 "type": "string",
4598 "required": True,
4599 }
4600 },
4601 "v_range": [["v6.0.0", ""]],
4602 },
4603 },
4604 "v_range": [["v6.0.0", ""]],
4605 },
4606 "egress_queues": {
4607 "v_range": [
4608 ["v6.4.0", "v6.4.0"],
4609 ["v7.2.0", "v7.2.0"],
4610 ["v7.4.0", "v7.4.1"],
4611 ["v7.4.3", ""],
4612 ],
4613 "type": "dict",
4614 "children": {
4615 "cos0": {
4616 "v_range": [
4617 ["v6.4.0", "v6.4.0"],
4618 ["v7.2.0", "v7.2.0"],
4619 ["v7.4.0", "v7.4.1"],
4620 ["v7.4.3", ""],
4621 ],
4622 "type": "string",
4623 },
4624 "cos1": {
4625 "v_range": [
4626 ["v6.4.0", "v6.4.0"],
4627 ["v7.2.0", "v7.2.0"],
4628 ["v7.4.0", "v7.4.1"],
4629 ["v7.4.3", ""],
4630 ],
4631 "type": "string",
4632 },
4633 "cos2": {
4634 "v_range": [
4635 ["v6.4.0", "v6.4.0"],
4636 ["v7.2.0", "v7.2.0"],
4637 ["v7.4.0", "v7.4.1"],
4638 ["v7.4.3", ""],
4639 ],
4640 "type": "string",
4641 },
4642 "cos3": {
4643 "v_range": [
4644 ["v6.4.0", "v6.4.0"],
4645 ["v7.2.0", "v7.2.0"],
4646 ["v7.4.0", "v7.4.1"],
4647 ["v7.4.3", ""],
4648 ],
4649 "type": "string",
4650 },
4651 "cos4": {
4652 "v_range": [
4653 ["v6.4.0", "v6.4.0"],
4654 ["v7.2.0", "v7.2.0"],
4655 ["v7.4.0", "v7.4.1"],
4656 ["v7.4.3", ""],
4657 ],
4658 "type": "string",
4659 },
4660 "cos5": {
4661 "v_range": [
4662 ["v6.4.0", "v6.4.0"],
4663 ["v7.2.0", "v7.2.0"],
4664 ["v7.4.0", "v7.4.1"],
4665 ["v7.4.3", ""],
4666 ],
4667 "type": "string",
4668 },
4669 "cos6": {
4670 "v_range": [
4671 ["v6.4.0", "v6.4.0"],
4672 ["v7.2.0", "v7.2.0"],
4673 ["v7.4.0", "v7.4.1"],
4674 ["v7.4.3", ""],
4675 ],
4676 "type": "string",
4677 },
4678 "cos7": {
4679 "v_range": [
4680 ["v6.4.0", "v6.4.0"],
4681 ["v7.2.0", "v7.2.0"],
4682 ["v7.4.0", "v7.4.1"],
4683 ["v7.4.3", ""],
4684 ],
4685 "type": "string",
4686 },
4687 },
4688 },
4689 "ingress_cos": {
4690 "v_range": [
4691 ["v6.4.0", "v6.4.0"],
4692 ["v7.2.0", "v7.2.0"],
4693 ["v7.4.0", "v7.4.1"],
4694 ["v7.4.3", ""],
4695 ],
4696 "type": "string",
4697 "options": [
4698 {"value": "disable"},
4699 {"value": "cos0"},
4700 {"value": "cos1"},
4701 {"value": "cos2"},
4702 {"value": "cos3"},
4703 {"value": "cos4"},
4704 {"value": "cos5"},
4705 {"value": "cos6"},
4706 {"value": "cos7"},
4707 ],
4708 },
4709 "egress_cos": {
4710 "v_range": [
4711 ["v6.4.0", "v6.4.0"],
4712 ["v7.2.0", "v7.2.0"],
4713 ["v7.4.0", "v7.4.1"],
4714 ["v7.4.3", ""],
4715 ],
4716 "type": "string",
4717 "options": [
4718 {"value": "disable"},
4719 {"value": "cos0"},
4720 {"value": "cos1"},
4721 {"value": "cos2"},
4722 {"value": "cos3"},
4723 {"value": "cos4"},
4724 {"value": "cos5"},
4725 {"value": "cos6"},
4726 {"value": "cos7"},
4727 ],
4728 },
4729 "eap_supplicant": {
4730 "v_range": [["v7.2.0", ""]],
4731 "type": "string",
4732 "options": [{"value": "enable"}, {"value": "disable"}],
4733 },
4734 "eap_method": {
4735 "v_range": [["v7.2.0", ""]],
4736 "type": "string",
4737 "options": [{"value": "tls"}, {"value": "peap"}],
4738 },
4739 "eap_identity": {"v_range": [["v7.2.0", ""]], "type": "string"},
4740 "eap_password": {"v_range": [["v7.2.0", ""]], "type": "string"},
4741 "eap_ca_cert": {"v_range": [["v7.2.0", ""]], "type": "string"},
4742 "eap_user_cert": {"v_range": [["v7.2.0", ""]], "type": "string"},
4743 "default_purdue_level": {
4744 "v_range": [["v7.4.0", ""]],
4745 "type": "string",
4746 "options": [
4747 {"value": "1"},
4748 {"value": "1.5"},
4749 {"value": "2"},
4750 {"value": "2.5"},
4751 {"value": "3"},
4752 {"value": "3.5"},
4753 {"value": "4"},
4754 {"value": "5"},
4755 {"value": "5.5"},
4756 ],
4757 },
4758 "ipv6": {
4759 "v_range": [["v6.0.0", ""]],
4760 "type": "dict",
4761 "children": {
4762 "ip6_mode": {
4763 "v_range": [["v6.0.0", ""]],
4764 "type": "string",
4765 "options": [
4766 {"value": "static"},
4767 {"value": "dhcp"},
4768 {"value": "pppoe"},
4769 {"value": "delegated"},
4770 ],
4771 },
4772 "client_options": {
4773 "type": "list",
4774 "elements": "dict",
4775 "children": {
4776 "id": {
4777 "v_range": [["v7.6.0", ""]],
4778 "type": "integer",
4779 "required": True,
4780 },
4781 "code": {"v_range": [["v7.6.0", ""]], "type": "integer"},
4782 "type": {
4783 "v_range": [["v7.6.0", ""]],
4784 "type": "string",
4785 "options": [
4786 {"value": "hex"},
4787 {"value": "string"},
4788 {"value": "ip6"},
4789 {"value": "fqdn"},
4790 ],
4791 },
4792 "value": {"v_range": [["v7.6.0", ""]], "type": "string"},
4793 "ip6": {
4794 "v_range": [["v7.6.0", ""]],
4795 "type": "list",
4796 "multiple_values": True,
4797 "elements": "str",
4798 },
4799 },
4800 "v_range": [["v7.6.0", ""]],
4801 },
4802 "nd_mode": {
4803 "v_range": [["v6.0.0", ""]],
4804 "type": "string",
4805 "options": [{"value": "basic"}, {"value": "SEND-compatible"}],
4806 },
4807 "nd_cert": {"v_range": [["v6.0.0", ""]], "type": "string"},
4808 "nd_security_level": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4809 "nd_timestamp_delta": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4810 "nd_timestamp_fuzz": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4811 "nd_cga_modifier": {"v_range": [["v6.0.0", ""]], "type": "string"},
4812 "ip6_dns_server_override": {
4813 "v_range": [["v6.0.0", ""]],
4814 "type": "string",
4815 "options": [{"value": "enable"}, {"value": "disable"}],
4816 },
4817 "ip6_address": {"v_range": [["v6.0.0", ""]], "type": "string"},
4818 "ip6_extra_addr": {
4819 "type": "list",
4820 "elements": "dict",
4821 "children": {
4822 "prefix": {
4823 "v_range": [["v6.0.0", ""]],
4824 "type": "string",
4825 "required": True,
4826 }
4827 },
4828 "v_range": [["v6.0.0", ""]],
4829 },
4830 "ip6_allowaccess": {
4831 "v_range": [["v6.0.0", ""]],
4832 "type": "list",
4833 "options": [
4834 {"value": "ping"},
4835 {"value": "https"},
4836 {"value": "ssh"},
4837 {"value": "snmp"},
4838 {"value": "http"},
4839 {"value": "telnet"},
4840 {"value": "fgfm"},
4841 {"value": "fabric", "v_range": [["v6.2.0", ""]]},
4842 {"value": "scim", "v_range": [["v7.6.4", ""]]},
4843 {"value": "probe-response", "v_range": [["v7.6.5", ""]]},
4844 {"value": "capwap", "v_range": [["v6.0.0", "v6.0.11"]]},
4845 ],
4846 "multiple_values": True,
4847 "elements": "str",
4848 },
4849 "ip6_send_adv": {
4850 "v_range": [["v6.0.0", ""]],
4851 "type": "string",
4852 "options": [{"value": "enable"}, {"value": "disable"}],
4853 },
4854 "icmp6_send_redirect": {
4855 "v_range": [["v6.4.4", ""]],
4856 "type": "string",
4857 "options": [{"value": "enable"}, {"value": "disable"}],
4858 },
4859 "ip6_manage_flag": {
4860 "v_range": [["v6.0.0", ""]],
4861 "type": "string",
4862 "options": [{"value": "enable"}, {"value": "disable"}],
4863 },
4864 "ip6_other_flag": {
4865 "v_range": [["v6.0.0", ""]],
4866 "type": "string",
4867 "options": [{"value": "enable"}, {"value": "disable"}],
4868 },
4869 "ip6_max_interval": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4870 "ip6_min_interval": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4871 "ip6_link_mtu": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4872 "ra_send_mtu": {
4873 "v_range": [["v7.0.0", ""]],
4874 "type": "string",
4875 "options": [{"value": "enable"}, {"value": "disable"}],
4876 },
4877 "ip6_reachable_time": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4878 "ip6_retrans_time": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4879 "ip6_default_life": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4880 "ip6_hop_limit": {"v_range": [["v6.0.0", ""]], "type": "integer"},
4881 "ip6_adv_rio": {
4882 "v_range": [["v7.6.1", ""]],
4883 "type": "string",
4884 "options": [{"value": "enable"}, {"value": "disable"}],
4885 },
4886 "ip6_route_pref": {
4887 "v_range": [["v7.6.1", ""]],
4888 "type": "string",
4889 "options": [
4890 {"value": "medium"},
4891 {"value": "high"},
4892 {"value": "low"},
4893 ],
4894 },
4895 "ip6_route_list": {
4896 "type": "list",
4897 "elements": "dict",
4898 "children": {
4899 "route": {
4900 "v_range": [["v7.6.1", ""]],
4901 "type": "string",
4902 "required": True,
4903 },
4904 "route_pref": {
4905 "v_range": [["v7.6.1", ""]],
4906 "type": "string",
4907 "options": [
4908 {"value": "medium"},
4909 {"value": "high"},
4910 {"value": "low"},
4911 ],
4912 },
4913 "route_life_time": {
4914 "v_range": [["v7.6.1", ""]],
4915 "type": "integer",
4916 },
4917 },
4918 "v_range": [["v7.6.1", ""]],
4919 },
4920 "autoconf": {
4921 "v_range": [["v6.0.0", ""]],
4922 "type": "string",
4923 "options": [{"value": "enable"}, {"value": "disable"}],
4924 },
4925 "unique_autoconf_addr": {
4926 "v_range": [["v6.4.0", ""]],
4927 "type": "string",
4928 "options": [{"value": "enable"}, {"value": "disable"}],
4929 },
4930 "interface_identifier": {"v_range": [["v6.4.0", ""]], "type": "string"},
4931 "ip6_prefix_mode": {
4932 "v_range": [["v7.0.0", ""]],
4933 "type": "string",
4934 "options": [{"value": "dhcp6"}, {"value": "ra"}],
4935 },
4936 "ip6_delegated_prefix_iaid": {
4937 "v_range": [["v7.0.2", ""]],
4938 "type": "integer",
4939 },
4940 "ip6_upstream_interface": {
4941 "v_range": [["v6.0.0", ""]],
4942 "type": "string",
4943 },
4944 "ip6_subnet": {"v_range": [["v6.0.0", ""]], "type": "string"},
4945 "ip6_prefix_list": {
4946 "type": "list",
4947 "elements": "dict",
4948 "children": {
4949 "prefix": {
4950 "v_range": [["v6.0.0", ""]],
4951 "type": "string",
4952 "required": True,
4953 },
4954 "autonomous_flag": {
4955 "v_range": [["v6.0.0", ""]],
4956 "type": "string",
4957 "options": [{"value": "enable"}, {"value": "disable"}],
4958 },
4959 "onlink_flag": {
4960 "v_range": [["v6.0.0", ""]],
4961 "type": "string",
4962 "options": [{"value": "enable"}, {"value": "disable"}],
4963 },
4964 "valid_life_time": {
4965 "v_range": [["v6.0.0", ""]],
4966 "type": "integer",
4967 },
4968 "preferred_life_time": {
4969 "v_range": [["v6.0.0", ""]],
4970 "type": "integer",
4971 },
4972 "rdnss": {
4973 "v_range": [["v6.0.0", "v7.6.0"]],
4974 "type": "list",
4975 "multiple_values": True,
4976 "elements": "str",
4977 },
4978 "dnssl": {
4979 "type": "list",
4980 "elements": "dict",
4981 "children": {
4982 "domain": {
4983 "v_range": [["v6.0.0", "v7.6.0"]],
4984 "type": "string",
4985 "required": True,
4986 }
4987 },
4988 "v_range": [["v6.0.0", "v7.6.0"]],
4989 },
4990 },
4991 "v_range": [["v6.0.0", ""]],
4992 },
4993 "ip6_rdnss_list": {
4994 "type": "list",
4995 "elements": "dict",
4996 "children": {
4997 "rdnss": {
4998 "v_range": [["v7.6.1", ""]],
4999 "type": "string",
5000 "required": True,
5001 },
5002 "rdnss_life_time": {
5003 "v_range": [["v7.6.1", ""]],
5004 "type": "integer",
5005 },
5006 },
5007 "v_range": [["v7.6.1", ""]],
5008 },
5009 "ip6_dnssl_list": {
5010 "type": "list",
5011 "elements": "dict",
5012 "children": {
5013 "domain": {
5014 "v_range": [["v7.6.1", ""]],
5015 "type": "string",
5016 "required": True,
5017 },
5018 "dnssl_life_time": {
5019 "v_range": [["v7.6.1", ""]],
5020 "type": "integer",
5021 },
5022 },
5023 "v_range": [["v7.6.1", ""]],
5024 },
5025 "ip6_delegated_prefix_list": {
5026 "type": "list",
5027 "elements": "dict",
5028 "children": {
5029 "prefix_id": {
5030 "v_range": [["v6.0.0", ""]],
5031 "type": "integer",
5032 "required": True,
5033 },
5034 "upstream_interface": {
5035 "v_range": [["v6.0.0", ""]],
5036 "type": "string",
5037 },
5038 "delegated_prefix_iaid": {
5039 "v_range": [["v7.0.2", ""]],
5040 "type": "integer",
5041 },
5042 "autonomous_flag": {
5043 "v_range": [["v6.0.0", ""]],
5044 "type": "string",
5045 "options": [{"value": "enable"}, {"value": "disable"}],
5046 },
5047 "onlink_flag": {
5048 "v_range": [["v6.0.0", ""]],
5049 "type": "string",
5050 "options": [{"value": "enable"}, {"value": "disable"}],
5051 },
5052 "subnet": {"v_range": [["v6.0.0", ""]], "type": "string"},
5053 "rdnss_service": {
5054 "v_range": [["v6.0.0", ""]],
5055 "type": "string",
5056 "options": [
5057 {"value": "delegated"},
5058 {"value": "default"},
5059 {"value": "specify"},
5060 ],
5061 },
5062 "rdnss": {
5063 "v_range": [["v6.0.0", ""]],
5064 "type": "list",
5065 "multiple_values": True,
5066 "elements": "str",
5067 },
5068 "dnssl_service": {
5069 "v_range": [["v7.6.5", ""]],
5070 "type": "string",
5071 "options": [{"value": "enable"}, {"value": "disable"}],
5072 },
5073 },
5074 "v_range": [["v6.0.0", ""]],
5075 },
5076 "dhcp6_relay_service": {
5077 "v_range": [["v6.0.0", ""]],
5078 "type": "string",
5079 "options": [{"value": "disable"}, {"value": "enable"}],
5080 },
5081 "dhcp6_relay_type": {
5082 "v_range": [["v6.0.0", ""]],
5083 "type": "string",
5084 "options": [{"value": "regular"}],
5085 },
5086 "dhcp6_relay_source_interface": {
5087 "v_range": [["v7.2.4", ""]],
5088 "type": "string",
5089 "options": [{"value": "disable"}, {"value": "enable"}],
5090 },
5091 "dhcp6_relay_ip": {
5092 "v_range": [["v6.0.0", ""]],
5093 "type": "list",
5094 "multiple_values": True,
5095 "elements": "str",
5096 },
5097 "dhcp6_relay_source_ip": {
5098 "v_range": [["v7.4.1", ""]],
5099 "type": "string",
5100 },
5101 "dhcp6_relay_interface_id": {
5102 "v_range": [["v7.4.1", ""]],
5103 "type": "string",
5104 },
5105 "dhcp6_prefix_delegation": {
5106 "v_range": [["v6.0.0", ""]],
5107 "type": "string",
5108 "options": [{"value": "enable"}, {"value": "disable"}],
5109 },
5110 "dhcp6_information_request": {
5111 "v_range": [["v6.0.0", ""]],
5112 "type": "string",
5113 "options": [{"value": "enable"}, {"value": "disable"}],
5114 },
5115 "dhcp6_iapd_list": {
5116 "type": "list",
5117 "elements": "dict",
5118 "children": {
5119 "iaid": {
5120 "v_range": [["v7.0.2", ""]],
5121 "type": "integer",
5122 "required": True,
5123 },
5124 "prefix_hint": {"v_range": [["v7.0.2", ""]], "type": "string"},
5125 "prefix_hint_plt": {
5126 "v_range": [["v7.0.2", ""]],
5127 "type": "integer",
5128 },
5129 "prefix_hint_vlt": {
5130 "v_range": [["v7.0.2", ""]],
5131 "type": "integer",
5132 },
5133 },
5134 "v_range": [["v7.0.2", ""]],
5135 },
5136 "vrrp_virtual_mac6": {
5137 "v_range": [["v6.0.0", ""]],
5138 "type": "string",
5139 "options": [{"value": "enable"}, {"value": "disable"}],
5140 },
5141 "vrip6_link_local": {"v_range": [["v6.0.0", ""]], "type": "string"},
5142 "vrrp6": {
5143 "type": "list",
5144 "elements": "dict",
5145 "children": {
5146 "vrid": {
5147 "v_range": [["v6.0.0", ""]],
5148 "type": "integer",
5149 "required": True,
5150 },
5151 "vrgrp": {"v_range": [["v6.0.0", ""]], "type": "integer"},
5152 "vrip6": {"v_range": [["v6.0.0", ""]], "type": "string"},
5153 "priority": {"v_range": [["v6.0.0", ""]], "type": "integer"},
5154 "adv_interval": {
5155 "v_range": [["v6.0.0", ""]],
5156 "type": "integer",
5157 },
5158 "start_time": {"v_range": [["v6.0.0", ""]], "type": "integer"},
5159 "preempt": {
5160 "v_range": [["v6.0.0", ""]],
5161 "type": "string",
5162 "options": [{"value": "enable"}, {"value": "disable"}],
5163 },
5164 "accept_mode": {
5165 "v_range": [["v6.0.0", ""]],
5166 "type": "string",
5167 "options": [{"value": "enable"}, {"value": "disable"}],
5168 },
5169 "vrdst6": {
5170 "v_range": [["v6.0.0", ""]],
5171 "type": "list",
5172 "multiple_values": True,
5173 "elements": "str",
5174 },
5175 "vrdst_priority": {
5176 "v_range": [["v7.6.0", ""]],
5177 "type": "integer",
5178 },
5179 "ignore_default_route": {
5180 "v_range": [["v7.4.2", ""]],
5181 "type": "string",
5182 "options": [{"value": "enable"}, {"value": "disable"}],
5183 },
5184 "status": {
5185 "v_range": [["v6.0.0", ""]],
5186 "type": "string",
5187 "options": [{"value": "enable"}, {"value": "disable"}],
5188 },
5189 },
5190 "v_range": [["v6.0.0", ""]],
5191 },
5192 "dhcp6_client_options": {
5193 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5194 "type": "list",
5195 "options": [
5196 {"value": "rapid"},
5197 {"value": "iapd"},
5198 {"value": "iana"},
5199 ],
5200 "multiple_values": True,
5201 "elements": "str",
5202 },
5203 "cli_conn6_status": {
5204 "v_range": [["v7.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5205 "type": "integer",
5206 },
5207 "dhcp6_prefix_hint": {
5208 "v_range": [["v6.0.0", "v7.0.1"]],
5209 "type": "string",
5210 },
5211 "dhcp6_prefix_hint_plt": {
5212 "v_range": [["v6.0.0", "v7.0.1"]],
5213 "type": "integer",
5214 },
5215 "dhcp6_prefix_hint_vlt": {
5216 "v_range": [["v6.0.0", "v7.0.1"]],
5217 "type": "integer",
5218 },
5219 },
5220 },
5221 "drop_overlapped_fragment": {
5222 "v_range": [["v6.0.0", "v7.6.2"]],
5223 "type": "string",
5224 "options": [{"value": "enable"}, {"value": "disable"}],
5225 },
5226 "ring_rx": {"v_range": [], "type": "integer"},
5227 "ring_tx": {"v_range": [], "type": "integer"},
5228 "swc_first_create": {"v_range": [["v6.4.4", "v7.6.0"]], "type": "integer"},
5229 "mediatype": {
5230 "v_range": [
5231 ["v6.0.0", "v6.2.7"],
5232 ["v6.4.1", "v7.0.12"],
5233 ["v7.2.1", "v7.2.4"],
5234 ["v7.4.2", "v7.4.2"],
5235 ],
5236 "type": "string",
5237 "options": [
5238 {"value": "none", "v_range": [["v7.4.2", "v7.4.2"]]},
5239 {"value": "gmii", "v_range": [["v7.4.2", "v7.4.2"]]},
5240 {"value": "sgmii", "v_range": [["v7.4.2", "v7.4.2"]]},
5241 {"value": "sr", "v_range": [["v7.4.2", "v7.4.2"]]},
5242 {"value": "lr", "v_range": [["v7.4.2", "v7.4.2"]]},
5243 {"value": "cr", "v_range": [["v7.4.2", "v7.4.2"]]},
5244 {"value": "sr2", "v_range": [["v7.4.2", "v7.4.2"]]},
5245 {"value": "lr2", "v_range": [["v7.4.2", "v7.4.2"]]},
5246 {"value": "cr2", "v_range": [["v7.4.2", "v7.4.2"]]},
5247 {"value": "sr4", "v_range": [["v7.4.2", "v7.4.2"]]},
5248 {"value": "lr4", "v_range": [["v7.4.2", "v7.4.2"]]},
5249 {"value": "cr4", "v_range": [["v7.4.2", "v7.4.2"]]},
5250 {"value": "sr8", "v_range": [["v7.4.2", "v7.4.2"]]},
5251 {"value": "lr8", "v_range": [["v7.4.2", "v7.4.2"]]},
5252 {"value": "cr8", "v_range": [["v7.4.2", "v7.4.2"]]},
5253 {
5254 "value": "cfp2-sr10",
5255 "v_range": [
5256 ["v6.0.0", "v6.2.7"],
5257 ["v6.4.1", "v7.0.12"],
5258 ["v7.2.1", "v7.2.4"],
5259 ],
5260 },
5261 {
5262 "value": "cfp2-lr4",
5263 "v_range": [
5264 ["v6.0.0", "v6.2.7"],
5265 ["v6.4.1", "v7.0.12"],
5266 ["v7.2.1", "v7.2.4"],
5267 ],
5268 },
5269 ],
5270 },
5271 "trunk": {
5272 "v_range": [["v7.4.2", "v7.4.2"]],
5273 "type": "string",
5274 "options": [{"value": "enable"}, {"value": "disable"}],
5275 },
5276 "security_8021x_mode": {
5277 "v_range": [["v7.4.2", "v7.4.2"]],
5278 "type": "string",
5279 "options": [
5280 {"value": "default"},
5281 {"value": "dynamic-vlan"},
5282 {"value": "fallback"},
5283 {"value": "slave"},
5284 ],
5285 },
5286 "security_8021x_master": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "string"},
5287 "security_8021x_dynamic_vlan_id": {
5288 "v_range": [["v7.4.2", "v7.4.2"]],
5289 "type": "integer",
5290 },
5291 "security_8021x_member_mode": {
5292 "v_range": [["v7.4.2", "v7.4.2"]],
5293 "type": "string",
5294 "options": [{"value": "switch"}, {"value": "disable"}],
5295 },
5296 "stp": {
5297 "v_range": [
5298 ["v6.0.0", "v6.2.7"],
5299 ["v6.4.1", "v7.0.12"],
5300 ["v7.2.1", "v7.2.4"],
5301 ["v7.4.2", "v7.4.2"],
5302 ],
5303 "type": "string",
5304 "options": [{"value": "disable"}, {"value": "enable"}],
5305 },
5306 "stp_ha_secondary": {
5307 "v_range": [
5308 ["v7.0.0", "v7.0.12"],
5309 ["v7.2.1", "v7.2.4"],
5310 ["v7.4.2", "v7.4.2"],
5311 ],
5312 "type": "string",
5313 "options": [
5314 {"value": "disable"},
5315 {"value": "enable"},
5316 {"value": "priority-adjust"},
5317 ],
5318 },
5319 "stp_edge": {
5320 "v_range": [["v7.4.2", "v7.4.2"]],
5321 "type": "string",
5322 "options": [{"value": "disable"}, {"value": "enable"}],
5323 },
5324 "forward_error_correction": {
5325 "v_range": [["v7.4.2", "v7.4.2"]],
5326 "type": "string",
5327 "options": [
5328 {"value": "none"},
5329 {"value": "disable"},
5330 {"value": "cl91-rs-fec"},
5331 {"value": "cl74-fc-fec"},
5332 {"value": "auto"},
5333 ],
5334 },
5335 "interconnect_profile": {
5336 "v_range": [["v7.4.2", "v7.4.2"]],
5337 "type": "string",
5338 "options": [
5339 {"value": "default"},
5340 {"value": "profile1"},
5341 {"value": "profile2"},
5342 ],
5343 },
5344 "np_qos_profile": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "integer"},
5345 "port_mirroring": {
5346 "v_range": [["v7.4.2", "v7.4.2"]],
5347 "type": "string",
5348 "options": [{"value": "disable"}, {"value": "enable"}],
5349 },
5350 "mirroring_direction": {
5351 "v_range": [["v7.4.2", "v7.4.2"]],
5352 "type": "string",
5353 "options": [{"value": "rx"}, {"value": "tx"}, {"value": "both"}],
5354 },
5355 "mirroring_port": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "string"},
5356 "mirroring_filter": {
5357 "v_range": [["v7.4.2", "v7.4.2"]],
5358 "type": "dict",
5359 "children": {
5360 "filter_srcip": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "string"},
5361 "filter_dstip": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "string"},
5362 "filter_sport": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "integer"},
5363 "filter_dport": {"v_range": [["v7.4.2", "v7.4.2"]], "type": "integer"},
5364 "filter_protocol": {
5365 "v_range": [["v7.4.2", "v7.4.2"]],
5366 "type": "integer",
5367 },
5368 },
5369 },
5370 "disconnect_threshold": {"v_range": [["v6.0.0", "v7.4.0"]], "type": "integer"},
5371 "cli_conn_status": {
5372 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5373 "type": "integer",
5374 },
5375 "ping_serv_status": {
5376 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5377 "type": "integer",
5378 },
5379 "detected_peer_mtu": {
5380 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5381 "type": "integer",
5382 },
5383 "lacp_ha_slave": {
5384 "v_range": [["v6.0.0", "v7.2.0"]],
5385 "type": "string",
5386 "options": [{"value": "enable"}, {"value": "disable"}],
5387 },
5388 "aggregate": {
5389 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5390 "type": "string",
5391 },
5392 "redundant_interface": {
5393 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5394 "type": "string",
5395 },
5396 "devindex": {
5397 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5398 "type": "integer",
5399 },
5400 "vindex": {
5401 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5402 "type": "integer",
5403 },
5404 "switch": {
5405 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5406 "type": "string",
5407 },
5408 "fortilink_backup_link": {
5409 "v_range": [["v6.0.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5410 "type": "integer",
5411 },
5412 "swc_vlan": {
5413 "v_range": [["v6.4.0", "v7.0.5"], ["v7.2.0", "v7.2.0"]],
5414 "type": "integer",
5415 },
5416 "stp_ha_slave": {
5417 "v_range": [["v6.0.0", "v6.2.7"], ["v6.4.1", "v6.4.4"]],
5418 "type": "string",
5419 "options": [
5420 {"value": "disable"},
5421 {"value": "enable"},
5422 {"value": "priority-adjust"},
5423 ],
5424 },
5425 "fortilink_stacking": {
5426 "v_range": [["v6.0.0", "v6.4.4"]],
5427 "type": "string",
5428 "options": [{"value": "enable"}, {"value": "disable"}],
5429 },
5430 "broadcast_forticlient_discovery": {
5431 "v_range": [["v6.0.0", "v6.2.7"]],
5432 "type": "string",
5433 "options": [{"value": "enable"}, {"value": "disable"}],
5434 },
5435 "captive_portal": {
5436 "v_range": [["v6.0.0", "v6.0.11"], ["v6.2.3", "v6.2.3"]],
5437 "type": "integer",
5438 },
5439 "device_identification_active_scan": {
5440 "v_range": [["v6.0.0", "v6.0.11"], ["v6.2.3", "v6.2.3"]],
5441 "type": "string",
5442 "options": [{"value": "enable"}, {"value": "disable"}],
5443 },
5444 "device_access_list": {
5445 "v_range": [["v6.0.0", "v6.0.11"], ["v6.2.3", "v6.2.3"]],
5446 "type": "string",
5447 },
5448 "scan_botnet_connections": {
5449 "v_range": [["v6.0.0", "v6.0.11"]],
5450 "type": "string",
5451 "options": [{"value": "disable"}, {"value": "block"}, {"value": "monitor"}],
5452 },
5453 "managed_device": {
5454 "type": "list",
5455 "elements": "dict",
5456 "children": {
5457 "name": {
5458 "v_range": [["v6.0.0", "v6.0.11"]],
5459 "type": "string",
5460 "required": True,
5461 }
5462 },
5463 "v_range": [["v6.0.0", "v6.0.11"]],
5464 },
5465 "device_netscan": {
5466 "v_range": [["v6.0.0", "v6.0.11"]],
5467 "type": "string",
5468 "options": [{"value": "disable"}, {"value": "enable"}],
5469 },
5470 "fortiheartbeat": {
5471 "v_range": [["v6.0.0", "v6.0.11"]],
5472 "type": "string",
5473 "options": [{"value": "enable"}, {"value": "disable"}],
5474 },
5475 "endpoint_compliance": {
5476 "v_range": [["v6.0.0", "v6.0.11"]],
5477 "type": "string",
5478 "options": [{"value": "enable"}, {"value": "disable"}],
5479 },
5480 },
5481 "v_range": [["v6.0.0", ""]],
5482 }
5483
5484
5485 def main():
5486 module_spec = schema_to_module_spec(versioned_schema)
5487 mkeyname = "name"
5488 fields = {
5489 "access_token": {"required": False, "type": "str", "no_log": True},
5490 "enable_log": {"required": False, "type": "bool", "default": False},
5491 "vdom": {"required": False, "type": "str", "default": "root"},
5492 "member_path": {"required": False, "type": "str"},
5493 "member_state": {
5494 "type": "str",
5495 "required": False,
5496 "choices": ["present", "absent"],
5497 },
5498 "state": {"required": True, "type": "str", "choices": ["present", "absent"]},
5499 "system_interface": {
5500 "required": False,
5501 "type": "dict",
5502 "default": None,
5503 "options": {},
5504 },
5505 }
5506 for attribute_name in module_spec["options"]:
5507 fields["system_interface"]["options"][attribute_name] = module_spec["options"][
5508 attribute_name
5509 ]
5510 if mkeyname and mkeyname == attribute_name:
5511 fields["system_interface"]["options"][attribute_name]["required"] = True
5512
5513 module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
5514 check_legacy_fortiosapi(module)
5515
5516 is_error = False
5517 has_changed = False
5518 result = None
5519 diff = None
5520
5521 versions_check_result = None
5522 if module._socket_path:
5523 connection = Connection(module._socket_path)
5524 if "access_token" in module.params:
5525 connection.set_custom_option("access_token", module.params["access_token"])
5526
5527 if "enable_log" in module.params:
5528 connection.set_custom_option("enable_log", module.params["enable_log"])
5529 else:
5530 connection.set_custom_option("enable_log", False)
5531 fos = FortiOSHandler(connection, module, mkeyname, admin_passwd_header=False)
5532 versions_check_result = check_schema_versioning(
5533 fos, versioned_schema, "system_interface"
5534 )
5535
5536 is_error, has_changed, result, diff = fortios_system(
5537 module.params, fos, module.check_mode
5538 )
5539
5540 else:
5541 module.fail_json(**FAIL_SOCKET_MSG)
5542
5543 if versions_check_result and versions_check_result["matched"] is False:
5544 module.warn(
5545 "Ansible has detected version mismatch between FortOS system and your playbook, see more details by specifying option -vvv"
5546 )
5547
5548 if not is_error:
5549 if versions_check_result and versions_check_result["matched"] is False:
5550 module.exit_json(
5551 changed=has_changed,
5552 version_check_warning=versions_check_result,
5553 meta=result,
5554 diff=diff,
5555 )
5556 else:
5557 module.exit_json(changed=has_changed, meta=result, diff=diff)
5558 else:
5559 if versions_check_result and versions_check_result["matched"] is False:
5560 module.fail_json(
5561 msg="Error in repo",
5562 version_check_warning=versions_check_result,
5563 meta=result,
5564 )
5565 else:
5566 module.fail_json(msg="Error in repo", meta=result)
5567
5568
5569 if __name__ == "__main__":
5570 main()