Debian Codegraph @

ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_switchcontroller_managedswitch.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3 # Copyright 2019-2024 Fortinet, Inc.
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 __metaclass__ = type
7
8 ANSIBLE_METADATA = {'status': ['preview'],
9 'supported_by': 'community',
10 'metadata_version': '1.1'}
11
12 DOCUMENTATION = '''
13 ---
14 module: fmgr_switchcontroller_managedswitch
15 short_description: Configure FortiSwitch devices that are managed by this FortiGate.
16 version_added: "2.0.0"
17 extends_documentation_fragment:
18 - fortinet.fortimanager.general
19 - fortinet.fortimanager.general.full_crud
20 options:
21 revision_note:
22 description: The change note that can be specified when an object is created or updated.
23 type: str
24 adom:
25 description: The parameter (adom) in requested url.
26 type: str
27 required: true
28 switchcontroller_managedswitch:
29 description: The top level parameters set.
30 required: false
31 type: dict
32 suboptions:
33 _platform:
34 type: str
35 description: Platform.
36 description:
37 type: str
38 description: Description.
39 name:
40 type: str
41 description: Managed-switch name.
42 ports:
43 type: list
44 elements: dict
45 description: Ports.
46 suboptions:
47 allowed_vlans:
48 aliases: ['allowed-vlans']
49 type: raw
50 description: (list or str) Configure switch port tagged vlans
51 allowed_vlans_all:
52 aliases: ['allowed-vlans-all']
53 type: str
54 description: Enable/disable all defined vlans on this port.
55 choices: ['disable', 'enable']
56 arp_inspection_trust:
57 aliases: ['arp-inspection-trust']
58 type: str
59 description: Trusted or untrusted dynamic ARP inspection.
60 choices: ['untrusted', 'trusted']
61 bundle:
62 type: str
63 description: Enable/disable Link Aggregation Group
64 choices: ['disable', 'enable']
65 description:
66 type: str
67 description: Description for port.
68 dhcp_snoop_option82_trust:
69 aliases: ['dhcp-snoop-option82-trust']
70 type: str
71 description: Enable/disable allowance of DHCP with option-82 on untrusted interface.
72 choices: ['disable', 'enable']
73 dhcp_snooping:
74 aliases: ['dhcp-snooping']
75 type: str
76 description: Trusted or untrusted DHCP-snooping interface.
77 choices: ['trusted', 'untrusted']
78 discard_mode:
79 aliases: ['discard-mode']
80 type: str
81 description: Configure discard mode for port.
82 choices: ['none', 'all-untagged', 'all-tagged']
83 edge_port:
84 aliases: ['edge-port']
85 type: str
86 description: Enable/disable this interface as an edge port, bridging connections between workstations and/or computers.
87 choices: ['disable', 'enable']
88 igmp_snooping:
89 aliases: ['igmp-snooping']
90 type: str
91 description: Set IGMP snooping mode for the physical port interface.
92 choices: ['disable', 'enable']
93 igmps_flood_reports:
94 aliases: ['igmps-flood-reports']
95 type: str
96 description: Enable/disable flooding of IGMP reports to this interface when igmp-snooping enabled.
97 choices: ['disable', 'enable']
98 igmps_flood_traffic:
99 aliases: ['igmps-flood-traffic']
100 type: str
101 description: Enable/disable flooding of IGMP snooping traffic to this interface.
102 choices: ['disable', 'enable']
103 lacp_speed:
104 aliases: ['lacp-speed']
105 type: str
106 description: End Link Aggregation Control Protocol
107 choices: ['slow', 'fast']
108 learning_limit:
109 aliases: ['learning-limit']
110 type: int
111 description: Limit the number of dynamic MAC addresses on this Port
112 lldp_profile:
113 aliases: ['lldp-profile']
114 type: str
115 description: LLDP port TLV profile.
116 lldp_status:
117 aliases: ['lldp-status']
118 type: str
119 description: LLDP transmit and receive status.
120 choices: ['disable', 'rx-only', 'tx-only', 'tx-rx']
121 loop_guard:
122 aliases: ['loop-guard']
123 type: str
124 description: Enable/disable loop-guard on this interface, an STP optimization used to prevent network loops.
125 choices: ['disabled', 'enabled']
126 loop_guard_timeout:
127 aliases: ['loop-guard-timeout']
128 type: int
129 description: Loop-guard timeout
130 max_bundle:
131 aliases: ['max-bundle']
132 type: int
133 description: Maximum size of LAG bundle
134 mclag:
135 type: str
136 description: Enable/disable multi-chassis link aggregation
137 choices: ['disable', 'enable']
138 member_withdrawal_behavior:
139 aliases: ['member-withdrawal-behavior']
140 type: str
141 description: Port behavior after it withdraws because of loss of control packets.
142 choices: ['forward', 'block']
143 members:
144 type: raw
145 description: (list) Aggregated LAG bundle interfaces.
146 min_bundle:
147 aliases: ['min-bundle']
148 type: int
149 description: Minimum size of LAG bundle
150 mode:
151 type: str
152 description: LACP mode
153 choices: ['static', 'lacp-passive', 'lacp-active']
154 poe_pre_standard_detection:
155 aliases: ['poe-pre-standard-detection']
156 type: str
157 description: Enable/disable PoE pre-standard detection.
158 choices: ['disable', 'enable']
159 poe_status:
160 aliases: ['poe-status']
161 type: str
162 description: Enable/disable PoE status.
163 choices: ['disable', 'enable']
164 port_name:
165 aliases: ['port-name']
166 type: str
167 description: Switch port name.
168 port_owner:
169 aliases: ['port-owner']
170 type: str
171 description: Switch port name.
172 port_security_policy:
173 aliases: ['port-security-policy']
174 type: str
175 description: Switch controller authentication policy to apply to this managed switch from available options.
176 port_selection_criteria:
177 aliases: ['port-selection-criteria']
178 type: str
179 description: Algorithm for aggregate port selection.
180 choices: ['src-mac', 'dst-mac', 'src-dst-mac', 'src-ip', 'dst-ip',
181 'src-dst-ip']
182 qos_policy:
183 aliases: ['qos-policy']
184 type: str
185 description: Switch controller QoS policy from available options.
186 sample_direction:
187 aliases: ['sample-direction']
188 type: str
189 description: SFlow sample direction.
190 choices: ['rx', 'tx', 'both']
191 sflow_counter_interval:
192 aliases: ['sflow-counter-interval']
193 type: int
194 description: SFlow sampler counter polling interval
195 sflow_sample_rate:
196 aliases: ['sflow-sample-rate']
197 type: int
198 description: SFlow sampler sample rate
199 sflow_sampler:
200 aliases: ['sflow-sampler']
201 type: str
202 description: Enable/disable sFlow protocol on this interface.
203 choices: ['disabled', 'enabled']
204 stp_bpdu_guard:
205 aliases: ['stp-bpdu-guard']
206 type: str
207 description: Enable/disable STP BPDU guard on this interface.
208 choices: ['disabled', 'enabled']
209 stp_bpdu_guard_timeout:
210 aliases: ['stp-bpdu-guard-timeout']
211 type: int
212 description: BPDU Guard disabling protection
213 stp_root_guard:
214 aliases: ['stp-root-guard']
215 type: str
216 description: Enable/disable STP root guard on this interface.
217 choices: ['disabled', 'enabled']
218 stp_state:
219 aliases: ['stp-state']
220 type: str
221 description: Enable/disable Spanning Tree Protocol
222 choices: ['disabled', 'enabled']
223 type:
224 type: str
225 description: Interface type
226 choices: ['physical', 'trunk']
227 untagged_vlans:
228 aliases: ['untagged-vlans']
229 type: raw
230 description: (list or str) Configure switch port untagged vlans
231 vlan:
232 type: str
233 description: Assign switch ports to a VLAN.
234 export_to_pool_flag:
235 aliases: ['export-to-pool-flag']
236 type: int
237 description: Switch controller export port to pool-list.
238 mac_addr:
239 aliases: ['mac-addr']
240 type: str
241 description: Port/Trunk MAC.
242 packet_sample_rate:
243 aliases: ['packet-sample-rate']
244 type: int
245 description: Packet sampling rate
246 packet_sampler:
247 aliases: ['packet-sampler']
248 type: str
249 description: Enable/disable packet sampling on this interface.
250 choices: ['disabled', 'enabled']
251 sticky_mac:
252 aliases: ['sticky-mac']
253 type: str
254 description: Enable or disable sticky-mac on the interface.
255 choices: ['disable', 'enable']
256 storm_control_policy:
257 aliases: ['storm-control-policy']
258 type: str
259 description: Switch controller storm control policy from available options.
260 dot1x_enable:
261 aliases: ['dot1x-enable']
262 type: str
263 description: Dot1x enable.
264 choices: ['disable', 'enable']
265 max_miss_heartbeats:
266 aliases: ['max-miss-heartbeats']
267 type: int
268 description: Maximum tolerant missed heartbeats.
269 access_mode:
270 aliases: ['access-mode']
271 type: str
272 description: Access mode of the port.
273 choices: ['normal', 'nac', 'dynamic', 'static']
274 ip_source_guard:
275 aliases: ['ip-source-guard']
276 type: str
277 description: Enable/disable IP source guard.
278 choices: ['disable', 'enable']
279 mclag_icl_port:
280 aliases: ['mclag-icl-port']
281 type: int
282 description: Mclag icl port.
283 p2p_port:
284 aliases: ['p2p-port']
285 type: int
286 description: P2p port.
287 aggregator_mode:
288 aliases: ['aggregator-mode']
289 type: str
290 description: LACP member select mode.
291 choices: ['bandwidth', 'count']
292 rpvst_port:
293 aliases: ['rpvst-port']
294 type: str
295 description: Enable/disable inter-operability with rapid PVST on this interface.
296 choices: ['disabled', 'enabled']
297 flow_control:
298 aliases: ['flow-control']
299 type: str
300 description: Flow control direction.
301 choices: ['disable', 'tx', 'rx', 'both']
302 media_type:
303 aliases: ['media-type']
304 type: str
305 description: Media type.
306 pause_meter:
307 aliases: ['pause-meter']
308 type: int
309 description: Configure ingress pause metering rate, in kbps
310 pause_meter_resume:
311 aliases: ['pause-meter-resume']
312 type: str
313 description: Resume threshold for resuming traffic on ingress port.
314 choices: ['25%', '50%', '75%']
315 trunk_member:
316 aliases: ['trunk-member']
317 type: int
318 description: Trunk member.
319 fec_capable:
320 aliases: ['fec-capable']
321 type: int
322 description: FEC capable.
323 fec_state:
324 aliases: ['fec-state']
325 type: str
326 description: State of forward error correction.
327 choices: ['disabled', 'cl74', 'cl91', 'detect-by-module']
328 matched_dpp_intf_tags:
329 aliases: ['matched-dpp-intf-tags']
330 type: str
331 description: Matched interface tags in the dynamic port policy.
332 matched_dpp_policy:
333 aliases: ['matched-dpp-policy']
334 type: str
335 description: Matched child policy in the dynamic port policy.
336 port_policy:
337 aliases: ['port-policy']
338 type: str
339 description: Switch controller dynamic port policy from available options.
340 status:
341 type: str
342 description: Switch port admin status
343 choices: ['down', 'up']
344 dsl_profile:
345 aliases: ['dsl-profile']
346 type: str
347 description: DSL policy configuration.
348 flap_duration:
349 aliases: ['flap-duration']
350 type: int
351 description: Period over which flap events are calculated
352 flap_rate:
353 aliases: ['flap-rate']
354 type: int
355 description: Number of stage change events needed within flap-duration.
356 flap_timeout:
357 aliases: ['flap-timeout']
358 type: int
359 description: Flap guard disabling protection
360 flapguard:
361 type: str
362 description: Enable/disable flap guard.
363 choices: ['disable', 'enable']
364 interface_tags:
365 aliases: ['interface-tags']
366 type: raw
367 description: (list or str) Tag
368 poe_max_power:
369 aliases: ['poe-max-power']
370 type: str
371 description: Poe max power.
372 poe_standard:
373 aliases: ['poe-standard']
374 type: str
375 description: Poe standard.
376 igmp_snooping_flood_reports:
377 aliases: ['igmp-snooping-flood-reports']
378 type: str
379 description: Enable/disable flooding of IGMP reports to this interface when igmp-snooping enabled.
380 choices: ['disable', 'enable']
381 mcast_snooping_flood_traffic:
382 aliases: ['mcast-snooping-flood-traffic']
383 type: str
384 description: Enable/disable flooding of IGMP snooping traffic to this interface.
385 choices: ['disable', 'enable']
386 link_status:
387 aliases: ['link-status']
388 type: str
389 description: Link status.
390 choices: ['down', 'up']
391 poe_mode_bt_cabable:
392 aliases: ['poe-mode-bt-cabable']
393 type: int
394 description: PoE mode IEEE 802.
395 poe_port_mode:
396 aliases: ['poe-port-mode']
397 type: str
398 description: Configure PoE port mode.
399 choices: ['ieee802-3af', 'ieee802-3at', 'ieee802-3bt']
400 poe_port_power:
401 aliases: ['poe-port-power']
402 type: str
403 description: Configure PoE port power.
404 choices: ['normal', 'perpetual', 'perpetual-fast']
405 poe_port_priority:
406 aliases: ['poe-port-priority']
407 type: str
408 description: Configure PoE port priority.
409 choices: ['critical-priority', 'high-priority', 'low-priority',
410 'medium-priority']
411 acl_group:
412 aliases: ['acl-group']
413 type: raw
414 description: (list) ACL groups on this port.
415 dhcp_snoop_option82_override:
416 aliases: ['dhcp-snoop-option82-override']
417 type: list
418 elements: dict
419 description: Dhcp snoop option82 override.
420 suboptions:
421 circuit_id:
422 aliases: ['circuit-id']
423 type: str
424 description: Circuit ID string.
425 remote_id:
426 aliases: ['remote-id']
427 type: str
428 description: Remote ID string.
429 vlan_name:
430 aliases: ['vlan-name']
431 type: str
432 description: DHCP snooping option 82 VLAN.
433 fortiswitch_acls:
434 aliases: ['fortiswitch-acls']
435 type: raw
436 description: (list) ACLs on this port.
437 isl_peer_device_sn:
438 aliases: ['isl-peer-device-sn']
439 type: str
440 description: Isl peer device sn.
441 authenticated_port:
442 aliases: ['authenticated-port']
443 type: int
444 description: Authenticated port.
445 encrypted_port:
446 aliases: ['encrypted-port']
447 type: int
448 description: Encrypted port.
449 ptp_status:
450 aliases: ['ptp-status']
451 type: str
452 description: Enable/disable PTP policy on this FortiSwitch port.
453 choices: ['disable', 'enable']
454 restricted_auth_port:
455 aliases: ['restricted-auth-port']
456 type: int
457 description: Restricted auth port.
458 allow_arp_monitor:
459 aliases: ['allow-arp-monitor']
460 type: str
461 description: Enable/Disable allow ARP monitor.
462 choices: ['disable', 'enable']
463 export_to:
464 aliases: ['export-to']
465 type: raw
466 description: (list) Export managed-switch port to a tenant VDOM.
467 export_to_pool:
468 aliases: ['export-to-pool']
469 type: raw
470 description: (list) Switch controller export port to pool-list.
471 fallback_port:
472 aliases: ['fallback-port']
473 type: str
474 description: LACP fallback port.
475 fgt_peer_device_name:
476 aliases: ['fgt-peer-device-name']
477 type: str
478 description: Fgt peer device name.
479 fgt_peer_port_name:
480 aliases: ['fgt-peer-port-name']
481 type: str
482 description: Fgt peer port name.
483 fiber_port:
484 aliases: ['fiber-port']
485 type: int
486 description: Fiber port.
487 flags:
488 type: int
489 description: Flags.
490 fortilink_port:
491 aliases: ['fortilink-port']
492 type: int
493 description: Fortilink port.
494 isl_local_trunk_name:
495 aliases: ['isl-local-trunk-name']
496 type: str
497 description: Isl local trunk name.
498 isl_peer_device_name:
499 aliases: ['isl-peer-device-name']
500 type: str
501 description: Isl peer device name.
502 isl_peer_port_name:
503 aliases: ['isl-peer-port-name']
504 type: str
505 description: Isl peer port name.
506 poe_capable:
507 aliases: ['poe-capable']
508 type: int
509 description: PoE capable.
510 port_number:
511 aliases: ['port-number']
512 type: int
513 description: Port number.
514 port_prefix_type:
515 aliases: ['port-prefix-type']
516 type: int
517 description: Port prefix type.
518 ptp_policy:
519 aliases: ['ptp-policy']
520 type: raw
521 description: (list) PTP policy configuration.
522 speed:
523 type: str
524 description: Switch port speed; default and available settings depend on hardware.
525 choices: ['auto', '10full', '10half', '100full', '100half', '1000full',
526 '10000full', '1000auto', '40000full', '1000fiber', '10000',
527 '40000', 'auto-module', '100FX-half', '100FX-full',
528 '100000full', '2500full', '25000full', '50000full', '40000auto',
529 '10000cr', '10000sr', '100000sr4', '100000cr4', '25000cr4',
530 '25000sr4', '5000full', '2500auto', '5000auto',
531 '1000full-fiber', '40000sr4', '40000cr4', '25000cr', '25000sr',
532 '50000cr', '50000sr', 'sgmii-auto']
533 speed_mask:
534 aliases: ['speed-mask']
535 type: int
536 description: Switch port speed mask.
537 stacking_port:
538 aliases: ['stacking-port']
539 type: int
540 description: Stacking port.
541 switch_id:
542 aliases: ['switch-id']
543 type: str
544 description: Switch id.
545 virtual_port:
546 aliases: ['virtual-port']
547 type: int
548 description: Virtualized switch port.
549 export_tags:
550 aliases: ['export-tags']
551 type: raw
552 description: (list) Configure export tag
553 log_mac_event:
554 aliases: ['log-mac-event']
555 type: str
556 description: Enable/disable logging for dynamic MAC address events.
557 choices: ['disable', 'enable']
558 pd_capable:
559 aliases: ['pd-capable']
560 type: int
561 description: Powered device capable.
562 qnq:
563 type: raw
564 description: (list) '802.'
565 switch_id:
566 aliases: ['switch-id']
567 type: str
568 description: Managed-switch id.
569 required: true
570 override_snmp_community:
571 aliases: ['override-snmp-community']
572 type: str
573 description: Enable/disable overriding the global SNMP communities.
574 choices: ['disable', 'enable']
575 override_snmp_sysinfo:
576 aliases: ['override-snmp-sysinfo']
577 type: str
578 description: Enable/disable overriding the global SNMP system information.
579 choices: ['disable', 'enable']
580 override_snmp_trap_threshold:
581 aliases: ['override-snmp-trap-threshold']
582 type: str
583 description: Enable/disable overriding the global SNMP trap threshold values.
584 choices: ['disable', 'enable']
585 override_snmp_user:
586 aliases: ['override-snmp-user']
587 type: str
588 description: Enable/disable overriding the global SNMP users.
589 choices: ['disable', 'enable']
590 poe_detection_type:
591 aliases: ['poe-detection-type']
592 type: int
593 description: Poe detection type.
594 remote_log:
595 aliases: ['remote-log']
596 type: list
597 elements: dict
598 description: Remote log.
599 suboptions:
600 csv:
601 type: str
602 description: Enable/disable comma-separated value
603 choices: ['disable', 'enable']
604 facility:
605 type: str
606 description: Facility to log to remote syslog server.
607 choices: ['kernel', 'user', 'mail', 'daemon', 'auth', 'syslog', 'lpr',
608 'news', 'uucp', 'cron', 'authpriv', 'ftp', 'ntp', 'audit',
609 'alert', 'clock', 'local0', 'local1', 'local2', 'local3',
610 'local4', 'local5', 'local6', 'local7']
611 name:
612 type: str
613 description: Remote log name.
614 port:
615 type: int
616 description: Remote syslog server listening port.
617 server:
618 type: str
619 description: IPv4 address of the remote syslog server.
620 severity:
621 type: str
622 description: Severity of logs to be transferred to remote log server.
623 choices: ['emergency', 'alert', 'critical', 'error', 'warning',
624 'notification', 'information', 'debug']
625 status:
626 type: str
627 description: Enable/disable logging by FortiSwitch device to a remote syslog server.
628 choices: ['disable', 'enable']
629 snmp_community:
630 aliases: ['snmp-community']
631 type: list
632 elements: dict
633 description: Snmp community.
634 suboptions:
635 events:
636 type: list
637 elements: str
638 description: SNMP notifications
639 choices: ['cpu-high', 'mem-low', 'log-full', 'intf-ip', 'ent-conf-change',
640 'l2mac']
641 hosts:
642 type: list
643 elements: dict
644 description: Hosts.
645 suboptions:
646 id:
647 type: int
648 description: Host entry ID.
649 ip:
650 type: str
651 description: IPv4 address of the SNMP manager
652 id:
653 type: int
654 description: SNMP community ID.
655 name:
656 type: str
657 description: SNMP community name.
658 query_v1_port:
659 aliases: ['query-v1-port']
660 type: int
661 description: SNMP v1 query port
662 query_v1_status:
663 aliases: ['query-v1-status']
664 type: str
665 description: Enable/disable SNMP v1 queries.
666 choices: ['disable', 'enable']
667 query_v2c_port:
668 aliases: ['query-v2c-port']
669 type: int
670 description: SNMP v2c query port
671 query_v2c_status:
672 aliases: ['query-v2c-status']
673 type: str
674 description: Enable/disable SNMP v2c queries.
675 choices: ['disable', 'enable']
676 status:
677 type: str
678 description: Enable/disable this SNMP community.
679 choices: ['disable', 'enable']
680 trap_v1_lport:
681 aliases: ['trap-v1-lport']
682 type: int
683 description: SNMP v2c trap local port
684 trap_v1_rport:
685 aliases: ['trap-v1-rport']
686 type: int
687 description: SNMP v2c trap remote port
688 trap_v1_status:
689 aliases: ['trap-v1-status']
690 type: str
691 description: Enable/disable SNMP v1 traps.
692 choices: ['disable', 'enable']
693 trap_v2c_lport:
694 aliases: ['trap-v2c-lport']
695 type: int
696 description: SNMP v2c trap local port
697 trap_v2c_rport:
698 aliases: ['trap-v2c-rport']
699 type: int
700 description: SNMP v2c trap remote port
701 trap_v2c_status:
702 aliases: ['trap-v2c-status']
703 type: str
704 description: Enable/disable SNMP v2c traps.
705 choices: ['disable', 'enable']
706 snmp_user:
707 aliases: ['snmp-user']
708 type: list
709 elements: dict
710 description: Snmp user.
711 suboptions:
712 auth_proto:
713 aliases: ['auth-proto']
714 type: str
715 description: Authentication protocol.
716 choices: ['md5', 'sha', 'sha1', 'sha256', 'sha384', 'sha512', 'sha224']
717 auth_pwd:
718 aliases: ['auth-pwd']
719 type: raw
720 description: (list) Password for authentication protocol.
721 name:
722 type: str
723 description: SNMP user name.
724 priv_proto:
725 aliases: ['priv-proto']
726 type: str
727 description: Privacy
728 choices: ['des', 'aes', 'aes128', 'aes192', 'aes256', 'aes192c', 'aes256c']
729 priv_pwd:
730 aliases: ['priv-pwd']
731 type: raw
732 description: (list) Password for privacy
733 queries:
734 type: str
735 description: Enable/disable SNMP queries for this user.
736 choices: ['disable', 'enable']
737 query_port:
738 aliases: ['query-port']
739 type: int
740 description: SNMPv3 query port
741 security_level:
742 aliases: ['security-level']
743 type: str
744 description: Security level for message authentication and encryption.
745 choices: ['no-auth-no-priv', 'auth-no-priv', 'auth-priv']
746 mclag_igmp_snooping_aware:
747 aliases: ['mclag-igmp-snooping-aware']
748 type: str
749 description: Enable/disable MCLAG IGMP-snooping awareness.
750 choices: ['disable', 'enable']
751 ip_source_guard:
752 aliases: ['ip-source-guard']
753 type: list
754 elements: dict
755 description: Ip source guard.
756 suboptions:
757 binding_entry:
758 aliases: ['binding-entry']
759 type: list
760 elements: dict
761 description: Binding entry.
762 suboptions:
763 entry_name:
764 aliases: ['entry-name']
765 type: str
766 description: Configure binding pair.
767 ip:
768 type: str
769 description: Source IP for this rule.
770 mac:
771 type: str
772 description: MAC address for this rule.
773 description:
774 type: str
775 description: Description.
776 port:
777 type: str
778 description: Ingress interface to which source guard is bound.
779 l3_discovered:
780 aliases: ['l3-discovered']
781 type: int
782 description: L3 discovered.
783 qos_drop_policy:
784 aliases: ['qos-drop-policy']
785 type: str
786 description: Set QoS drop-policy.
787 choices: ['taildrop', 'random-early-detection']
788 qos_red_probability:
789 aliases: ['qos-red-probability']
790 type: int
791 description: Set QoS RED/WRED drop probability.
792 switch_dhcp_opt43_key:
793 aliases: ['switch-dhcp_opt43_key']
794 type: str
795 description: DHCP option43 key.
796 tdr_supported:
797 aliases: ['tdr-supported']
798 type: str
799 description: Tdr supported.
800 custom_command:
801 aliases: ['custom-command']
802 type: list
803 elements: dict
804 description: Custom command.
805 suboptions:
806 command_entry:
807 aliases: ['command-entry']
808 type: str
809 description: List of FortiSwitch commands.
810 command_name:
811 aliases: ['command-name']
812 type: str
813 description: Names of commands to be pushed to this FortiSwitch device, as configured under config switch-controller custom-com...
814 firmware_provision:
815 aliases: ['firmware-provision']
816 type: str
817 description: Enable/disable provisioning of firmware to FortiSwitches on join connection.
818 choices: ['disable', 'enable']
819 firmware_provision_version:
820 aliases: ['firmware-provision-version']
821 type: str
822 description: Firmware version to provision to this FortiSwitch on bootup
823 dhcp_server_access_list:
824 aliases: ['dhcp-server-access-list']
825 type: str
826 description: DHCP snooping server access list.
827 choices: ['disable', 'enable', 'global']
828 firmware_provision_latest:
829 aliases: ['firmware-provision-latest']
830 type: str
831 description: Enable/disable one-time automatic provisioning of the latest firmware version.
832 choices: ['disable', 'once']
833 dhcp_snooping_static_client:
834 aliases: ['dhcp-snooping-static-client']
835 type: list
836 elements: dict
837 description: Dhcp snooping static client.
838 suboptions:
839 ip:
840 type: str
841 description: Client static IP address.
842 mac:
843 type: str
844 description: Client MAC address.
845 name:
846 type: str
847 description: Client name.
848 port:
849 type: str
850 description: Interface name.
851 vlan:
852 type: str
853 description: VLAN name.
854 ptp_profile:
855 aliases: ['ptp-profile']
856 type: str
857 description: PTP profile configuration.
858 ptp_status:
859 aliases: ['ptp-status']
860 type: str
861 description: Enable/disable PTP profile on this FortiSwitch.
862 choices: ['disable', 'enable']
863 route_offload:
864 aliases: ['route-offload']
865 type: str
866 description: Enable/disable route offload on this FortiSwitch.
867 choices: ['disable', 'enable']
868 route_offload_mclag:
869 aliases: ['route-offload-mclag']
870 type: str
871 description: Enable/disable route offload MCLAG on this FortiSwitch.
872 choices: ['disable', 'enable']
873 route_offload_router:
874 aliases: ['route-offload-router']
875 type: list
876 elements: dict
877 description: Route offload router.
878 suboptions:
879 router_ip:
880 aliases: ['router-ip']
881 type: str
882 description: Router IP address.
883 vlan_name:
884 aliases: ['vlan-name']
885 type: str
886 description: VLAN name.
887 mgmt_mode:
888 aliases: ['mgmt-mode']
889 type: int
890 description: FortiLink management mode.
891 purdue_level:
892 aliases: ['purdue-level']
893 type: str
894 description: Purdue Level of this FortiSwitch.
895 choices: ['1', '2', '3', '4', '5', '1.5', '2.5', '3.5', '5.5']
896 radius_nas_ip:
897 aliases: ['radius-nas-ip']
898 type: str
899 description: NAS-IP address.
900 radius_nas_ip_override:
901 aliases: ['radius-nas-ip-override']
902 type: str
903 description: Use locally defined NAS-IP.
904 choices: ['disable', 'enable']
905 tunnel_discovered:
906 aliases: ['tunnel-discovered']
907 type: int
908 description: Tunnel discovered.
909 vlan:
910 type: list
911 elements: dict
912 description: Vlan.
913 suboptions:
914 assignment_priority:
915 aliases: ['assignment-priority']
916 type: int
917 description: '802.'
918 vlan_name:
919 aliases: ['vlan-name']
920 type: str
921 description: VLAN name.
922 802_1X_settings:
923 aliases: ['802-1X-settings']
924 type: dict
925 description: 802 1X settings.
926 suboptions:
927 link_down_auth:
928 aliases: ['link-down-auth']
929 type: str
930 description: Authentication state to set if a link is down.
931 choices: ['set-unauth', 'no-action']
932 local_override:
933 aliases: ['local-override']
934 type: str
935 description: Enable to override global 802.
936 choices: ['disable', 'enable']
937 mab_reauth:
938 aliases: ['mab-reauth']
939 type: str
940 description: Enable or disable MAB reauthentication settings.
941 choices: ['disable', 'enable']
942 mac_called_station_delimiter:
943 aliases: ['mac-called-station-delimiter']
944 type: str
945 description: MAC called station delimiter
946 choices: ['hyphen', 'single-hyphen', 'colon', 'none']
947 mac_calling_station_delimiter:
948 aliases: ['mac-calling-station-delimiter']
949 type: str
950 description: MAC calling station delimiter
951 choices: ['hyphen', 'single-hyphen', 'colon', 'none']
952 mac_case:
953 aliases: ['mac-case']
954 type: str
955 description: MAC case
956 choices: ['uppercase', 'lowercase']
957 mac_password_delimiter:
958 aliases: ['mac-password-delimiter']
959 type: str
960 description: MAC authentication password delimiter
961 choices: ['hyphen', 'single-hyphen', 'colon', 'none']
962 mac_username_delimiter:
963 aliases: ['mac-username-delimiter']
964 type: str
965 description: MAC authentication username delimiter
966 choices: ['hyphen', 'single-hyphen', 'colon', 'none']
967 max_reauth_attempt:
968 aliases: ['max-reauth-attempt']
969 type: int
970 description: Maximum number of authentication attempts
971 reauth_period:
972 aliases: ['reauth-period']
973 type: int
974 description: Reauthentication time interval
975 tx_period:
976 aliases: ['tx-period']
977 type: int
978 description: '802.'
979 access_profile:
980 aliases: ['access-profile']
981 type: raw
982 description: (list) FortiSwitch access profile.
983 delayed_restart_trigger:
984 aliases: ['delayed-restart-trigger']
985 type: int
986 description: Delayed restart triggered for this FortiSwitch.
987 directly_connected:
988 aliases: ['directly-connected']
989 type: int
990 description: Directly connected.
991 dynamic_capability:
992 aliases: ['dynamic-capability']
993 type: str
994 description: List of features this FortiSwitch supports
995 dynamically_discovered:
996 aliases: ['dynamically-discovered']
997 type: int
998 description: Dynamically discovered.
999 flow_identity:
1000 aliases: ['flow-identity']
1001 type: str
1002 description: Flow-tracking netflow ipfix switch identity in hex format
1003 fsw_wan1_admin:
1004 aliases: ['fsw-wan1-admin']
1005 type: str
1006 description: FortiSwitch WAN1 admin status; enable to authorize the FortiSwitch as a managed switch.
1007 choices: ['disable', 'enable', 'discovered']
1008 fsw_wan1_peer:
1009 aliases: ['fsw-wan1-peer']
1010 type: raw
1011 description: (list) FortiSwitch WAN1 peer port.
1012 fsw_wan2_admin:
1013 aliases: ['fsw-wan2-admin']
1014 type: str
1015 description: FortiSwitch WAN2 admin status; enable to authorize the FortiSwitch as a managed switch.
1016 choices: ['disable', 'enable', 'discovered']
1017 fsw_wan2_peer:
1018 aliases: ['fsw-wan2-peer']
1019 type: str
1020 description: FortiSwitch WAN2 peer port.
1021 igmp_snooping:
1022 aliases: ['igmp-snooping']
1023 type: dict
1024 description: Igmp snooping.
1025 suboptions:
1026 aging_time:
1027 aliases: ['aging-time']
1028 type: int
1029 description: Maximum time to retain a multicast snooping entry for which no packets have been seen
1030 flood_unknown_multicast:
1031 aliases: ['flood-unknown-multicast']
1032 type: str
1033 description: Enable/disable unknown multicast flooding.
1034 choices: ['disable', 'enable']
1035 local_override:
1036 aliases: ['local-override']
1037 type: str
1038 description: Enable/disable overriding the global IGMP snooping configuration.
1039 choices: ['disable', 'enable']
1040 vlans:
1041 type: list
1042 elements: dict
1043 description: Vlans.
1044 suboptions:
1045 proxy:
1046 type: str
1047 description: IGMP snooping proxy for the VLAN interface.
1048 choices: ['disable', 'enable', 'global']
1049 querier:
1050 type: str
1051 description: Enable/disable IGMP snooping querier for the VLAN interface.
1052 choices: ['disable', 'enable']
1053 querier_addr:
1054 aliases: ['querier-addr']
1055 type: str
1056 description: IGMP snooping querier address.
1057 version:
1058 type: int
1059 description: IGMP snooping querying version.
1060 vlan_name:
1061 aliases: ['vlan-name']
1062 type: raw
1063 description: (list) List of FortiSwitch VLANs.
1064 max_allowed_trunk_members:
1065 aliases: ['max-allowed-trunk-members']
1066 type: int
1067 description: FortiSwitch maximum allowed trunk members.
1068 mirror:
1069 type: list
1070 elements: dict
1071 description: Mirror.
1072 suboptions:
1073 dst:
1074 type: str
1075 description: Destination port.
1076 name:
1077 type: str
1078 description: Mirror name.
1079 src_egress:
1080 aliases: ['src-egress']
1081 type: raw
1082 description: (list) Source egress interfaces.
1083 src_ingress:
1084 aliases: ['src-ingress']
1085 type: raw
1086 description: (list) Source ingress interfaces.
1087 status:
1088 type: str
1089 description: Active/inactive mirror configuration.
1090 choices: ['inactive', 'active']
1091 switching_packet:
1092 aliases: ['switching-packet']
1093 type: str
1094 description: Enable/disable switching functionality when mirroring.
1095 choices: ['disable', 'enable']
1096 owner_vdom:
1097 aliases: ['owner-vdom']
1098 type: str
1099 description: VDOM which owner of port belongs to.
1100 poe_pre_standard_detection:
1101 aliases: ['poe-pre-standard-detection']
1102 type: str
1103 description: Enable/disable PoE pre-standard detection.
1104 choices: ['disable', 'enable']
1105 pre_provisioned:
1106 aliases: ['pre-provisioned']
1107 type: int
1108 description: Pre-provisioned managed switch.
1109 sn:
1110 type: str
1111 description: Managed-switch serial number.
1112 snmp_sysinfo:
1113 aliases: ['snmp-sysinfo']
1114 type: dict
1115 description: Snmp sysinfo.
1116 suboptions:
1117 contact_info:
1118 aliases: ['contact-info']
1119 type: str
1120 description: Contact information.
1121 description:
1122 type: str
1123 description: System description.
1124 engine_id:
1125 aliases: ['engine-id']
1126 type: str
1127 description: Local SNMP engine ID string
1128 location:
1129 type: str
1130 description: System location.
1131 status:
1132 type: str
1133 description: Enable/disable SNMP.
1134 choices: ['disable', 'enable']
1135 snmp_trap_threshold:
1136 aliases: ['snmp-trap-threshold']
1137 type: dict
1138 description: Snmp trap threshold.
1139 suboptions:
1140 trap_high_cpu_threshold:
1141 aliases: ['trap-high-cpu-threshold']
1142 type: int
1143 description: CPU usage when trap is sent.
1144 trap_log_full_threshold:
1145 aliases: ['trap-log-full-threshold']
1146 type: int
1147 description: Log disk usage when trap is sent.
1148 trap_low_memory_threshold:
1149 aliases: ['trap-low-memory-threshold']
1150 type: int
1151 description: Memory usage when trap is sent.
1152 staged_image_version:
1153 aliases: ['staged-image-version']
1154 type: str
1155 description: Staged image version for FortiSwitch.
1156 static_mac:
1157 aliases: ['static-mac']
1158 type: list
1159 elements: dict
1160 description: Static mac.
1161 suboptions:
1162 description:
1163 type: str
1164 description: Description.
1165 id:
1166 type: int
1167 description: ID.
1168 interface:
1169 type: str
1170 description: Interface name.
1171 mac:
1172 type: str
1173 description: MAC address.
1174 type:
1175 type: str
1176 description: Type.
1177 choices: ['static', 'sticky']
1178 vlan:
1179 type: raw
1180 description: (list) Vlan.
1181 storm_control:
1182 aliases: ['storm-control']
1183 type: dict
1184 description: Storm control.
1185 suboptions:
1186 broadcast:
1187 type: str
1188 description: Enable/disable storm control to drop broadcast traffic.
1189 choices: ['disable', 'enable']
1190 local_override:
1191 aliases: ['local-override']
1192 type: str
1193 description: Enable to override global FortiSwitch storm control settings for this FortiSwitch.
1194 choices: ['disable', 'enable']
1195 rate:
1196 type: int
1197 description: Rate in packets per second at which storm control drops excess traffic
1198 unknown_multicast:
1199 aliases: ['unknown-multicast']
1200 type: str
1201 description: Enable/disable storm control to drop unknown multicast traffic.
1202 choices: ['disable', 'enable']
1203 unknown_unicast:
1204 aliases: ['unknown-unicast']
1205 type: str
1206 description: Enable/disable storm control to drop unknown unicast traffic.
1207 choices: ['disable', 'enable']
1208 burst_size_level:
1209 aliases: ['burst-size-level']
1210 type: int
1211 description: Increase level to handle bursty traffic
1212 stp_instance:
1213 aliases: ['stp-instance']
1214 type: list
1215 elements: dict
1216 description: Stp instance.
1217 suboptions:
1218 id:
1219 type: str
1220 description: Instance ID.
1221 priority:
1222 type: str
1223 description: Priority.
1224 choices: ['0', '4096', '8192', '12288', '12328', '16384', '20480',
1225 '24576', '28672', '32768', '36864', '40960', '45056', '49152',
1226 '53248', '57344', '61440']
1227 stp_settings:
1228 aliases: ['stp-settings']
1229 type: dict
1230 description: Stp settings.
1231 suboptions:
1232 forward_time:
1233 aliases: ['forward-time']
1234 type: int
1235 description: Period of time a port is in listening and learning state
1236 hello_time:
1237 aliases: ['hello-time']
1238 type: int
1239 description: Period of time between successive STP frame Bridge Protocol Data Units
1240 local_override:
1241 aliases: ['local-override']
1242 type: str
1243 description: Enable to configure local STP settings that override global STP settings.
1244 choices: ['disable', 'enable']
1245 max_age:
1246 aliases: ['max-age']
1247 type: int
1248 description: Maximum time before a bridge port saves its configuration BPDU information
1249 max_hops:
1250 aliases: ['max-hops']
1251 type: int
1252 description: Maximum number of hops between the root bridge and the furthest bridge
1253 name:
1254 type: str
1255 description: Name of local STP settings configuration.
1256 pending_timer:
1257 aliases: ['pending-timer']
1258 type: int
1259 description: Pending time
1260 revision:
1261 type: int
1262 description: STP revision number
1263 status:
1264 type: str
1265 description: Enable/disable STP.
1266 choices: ['disable', 'enable']
1267 switch_device_tag:
1268 aliases: ['switch-device-tag']
1269 type: str
1270 description: User definable label/tag.
1271 switch_log:
1272 aliases: ['switch-log']
1273 type: dict
1274 description: Switch log.
1275 suboptions:
1276 local_override:
1277 aliases: ['local-override']
1278 type: str
1279 description: Enable to configure local logging settings that override global logging settings.
1280 choices: ['disable', 'enable']
1281 severity:
1282 type: str
1283 description: Severity of FortiSwitch logs that are added to the FortiGate event log.
1284 choices: ['emergency', 'alert', 'critical', 'error', 'warning',
1285 'notification', 'information', 'debug']
1286 status:
1287 type: str
1288 description: Enable/disable adding FortiSwitch logs to the FortiGate event log.
1289 choices: ['disable', 'enable']
1290 switch_profile:
1291 aliases: ['switch-profile']
1292 type: raw
1293 description: (list) FortiSwitch profile.
1294 type:
1295 type: str
1296 description: Indication of switch type, physical or virtual.
1297 choices: ['physical', 'virtual']
1298 version:
1299 type: int
1300 description: FortiSwitch version.
1301 poe_lldp_detection:
1302 aliases: ['poe-lldp-detection']
1303 type: str
1304 description: Enable/disable PoE LLDP detection.
1305 choices: ['disable', 'enable']
1306 router_static:
1307 aliases: ['router-static']
1308 type: list
1309 elements: dict
1310 description: Router static.
1311 suboptions:
1312 blackhole:
1313 type: str
1314 description: Enable/disable blackhole on this route.
1315 choices: ['disable', 'enable']
1316 comment:
1317 type: str
1318 description: Comment.
1319 device:
1320 type: raw
1321 description: (list) Gateway out interface.
1322 distance:
1323 type: int
1324 description: Administrative distance for the route
1325 dst:
1326 type: raw
1327 description: (list) Destination ip and mask for this route.
1328 dynamic_gateway:
1329 aliases: ['dynamic-gateway']
1330 type: str
1331 description: Enable/disable dynamic gateway.
1332 choices: ['disable', 'enable']
1333 gateway:
1334 type: str
1335 description: Gateway ip for this route.
1336 id:
1337 type: int
1338 description: Entry sequence number.
1339 status:
1340 type: str
1341 description: Enable/disable route status.
1342 choices: ['disable', 'enable']
1343 switch_id:
1344 aliases: ['switch-id']
1345 type: raw
1346 description: (list) Switch ID.
1347 vrf:
1348 type: raw
1349 description: (list) VRF for this route.
1350 router_vrf:
1351 aliases: ['router-vrf']
1352 type: list
1353 elements: dict
1354 description: Router vrf.
1355 suboptions:
1356 name:
1357 type: str
1358 description: VRF entry name.
1359 switch_id:
1360 aliases: ['switch-id']
1361 type: raw
1362 description: (list) Switch ID.
1363 vrfid:
1364 type: int
1365 description: VRF ID.
1366 system_dhcp_server:
1367 aliases: ['system-dhcp-server']
1368 type: list
1369 elements: dict
1370 description: System dhcp server.
1371 suboptions:
1372 default_gateway:
1373 aliases: ['default-gateway']
1374 type: str
1375 description: Default gateway IP address assigned by the DHCP server.
1376 dns_server1:
1377 aliases: ['dns-server1']
1378 type: str
1379 description: DNS server 1.
1380 dns_server2:
1381 aliases: ['dns-server2']
1382 type: str
1383 description: DNS server 2.
1384 dns_server3:
1385 aliases: ['dns-server3']
1386 type: str
1387 description: DNS server 3.
1388 dns_service:
1389 aliases: ['dns-service']
1390 type: str
1391 description: Options for assigning DNS servers to DHCP clients.
1392 choices: ['default', 'specify', 'local']
1393 id:
1394 type: int
1395 description: ID.
1396 interface:
1397 type: raw
1398 description: (list) DHCP server can assign IP configurations to clients connected to this interface.
1399 ip_range:
1400 aliases: ['ip-range']
1401 type: list
1402 elements: dict
1403 description: Ip range.
1404 suboptions:
1405 end_ip:
1406 aliases: ['end-ip']
1407 type: str
1408 description: End of IP range.
1409 id:
1410 type: int
1411 description: ID.
1412 start_ip:
1413 aliases: ['start-ip']
1414 type: str
1415 description: Start of IP range.
1416 lease_time:
1417 aliases: ['lease-time']
1418 type: int
1419 description: Lease time in seconds, 0 means unlimited.
1420 netmask:
1421 type: str
1422 description: Netmask assigned by the DHCP server.
1423 ntp_server1:
1424 aliases: ['ntp-server1']
1425 type: str
1426 description: NTP server 1.
1427 ntp_server2:
1428 aliases: ['ntp-server2']
1429 type: str
1430 description: NTP server 2.
1431 ntp_server3:
1432 aliases: ['ntp-server3']
1433 type: str
1434 description: NTP server 3.
1435 ntp_service:
1436 aliases: ['ntp-service']
1437 type: str
1438 description: Options for assigning Network Time Protocol
1439 choices: ['default', 'specify', 'local']
1440 options:
1441 type: list
1442 elements: dict
1443 description: Options.
1444 suboptions:
1445 code:
1446 type: int
1447 description: DHCP option code.
1448 id:
1449 type: int
1450 description: ID.
1451 ip:
1452 type: str
1453 description: DHCP option IPs.
1454 type:
1455 type: str
1456 description: DHCP option type.
1457 choices: ['hex', 'string', 'ip', 'fqdn']
1458 value:
1459 type: str
1460 description: DHCP option value.
1461 status:
1462 type: str
1463 description: Enable/disable this DHCP configuration.
1464 choices: ['disable', 'enable']
1465 switch_id:
1466 aliases: ['switch-id']
1467 type: raw
1468 description: (list) Switch ID.
1469 system_interface:
1470 aliases: ['system-interface']
1471 type: list
1472 elements: dict
1473 description: System interface.
1474 suboptions:
1475 allowaccess:
1476 type: list
1477 elements: str
1478 description: Permitted types of management access to this interface.
1479 choices: ['https', 'ping', 'ssh', 'snmp', 'http', 'telnet', 'radius-acct']
1480 interface:
1481 type: raw
1482 description: (list) Interface name.
1483 ip:
1484 type: raw
1485 description: (list) IP and mask for this interface.
1486 mode:
1487 type: str
1488 description: Interface addressing mode.
1489 choices: ['static', 'dhcp']
1490 name:
1491 type: str
1492 description: Interface name.
1493 status:
1494 type: str
1495 description: Enable/disable interface status.
1496 choices: ['disable', 'enable']
1497 switch_id:
1498 aliases: ['switch-id']
1499 type: raw
1500 description: (list) Switch ID.
1501 type:
1502 type: str
1503 description: Interface type.
1504 choices: ['physical', 'vlan']
1505 vlan:
1506 type: raw
1507 description: (list) VLAN name.
1508 vrf:
1509 type: raw
1510 description: (list) VRF for this route.
1511 max_poe_budget:
1512 aliases: ['max-poe-budget']
1513 type: int
1514 description: Max poe budget.
1515 '''
1516
1517 EXAMPLES = '''
1518 - name: Example playbook (generated based on argument schema)
1519 hosts: fortimanagers
1520 connection: httpapi
1521 gather_facts: false
1522 tasks:
1523 - name: Configure FortiSwitch devices that are managed by this FortiGate.
1524 fortinet.fortimanager.fmgr_switchcontroller_managedswitch:
1525 # workspace_locking_adom: <global or your adom name>
1526 adom: <your own value>
1527 state: present # <value in [present, absent]>
1528 switchcontroller_managedswitch:
1529 switch_id: "your value" # Required variable, string
1530 # _platform: <string>
1531 # description: <string>
1532 # name: <string>
1533 # ports:
1534 # - allowed_vlans: <list or string>
1535 # allowed_vlans_all: <value in [disable, enable]>
1536 # arp_inspection_trust: <value in [untrusted, trusted]>
1537 # bundle: <value in [disable, enable]>
1538 # description: <string>
1539 # dhcp_snoop_option82_trust: <value in [disable, enable]>
1540 # dhcp_snooping: <value in [trusted, untrusted]>
1541 # discard_mode: <value in [none, all-untagged, all-tagged]>
1542 # edge_port: <value in [disable, enable]>
1543 # igmp_snooping: <value in [disable, enable]>
1544 # igmps_flood_reports: <value in [disable, enable]>
1545 # igmps_flood_traffic: <value in [disable, enable]>
1546 # lacp_speed: <value in [slow, fast]>
1547 # learning_limit: <integer>
1548 # lldp_profile: <string>
1549 # lldp_status: <value in [disable, rx-only, tx-only, ...]>
1550 # loop_guard: <value in [disabled, enabled]>
1551 # loop_guard_timeout: <integer>
1552 # max_bundle: <integer>
1553 # mclag: <value in [disable, enable]>
1554 # member_withdrawal_behavior: <value in [forward, block]>
1555 # members: <list or string>
1556 # min_bundle: <integer>
1557 # mode: <value in [static, lacp-passive, lacp-active]>
1558 # poe_pre_standard_detection: <value in [disable, enable]>
1559 # poe_status: <value in [disable, enable]>
1560 # port_name: <string>
1561 # port_owner: <string>
1562 # port_security_policy: <string>
1563 # port_selection_criteria: <value in [src-mac, dst-mac, src-dst-mac, ...]>
1564 # qos_policy: <string>
1565 # sample_direction: <value in [rx, tx, both]>
1566 # sflow_counter_interval: <integer>
1567 # sflow_sample_rate: <integer>
1568 # sflow_sampler: <value in [disabled, enabled]>
1569 # stp_bpdu_guard: <value in [disabled, enabled]>
1570 # stp_bpdu_guard_timeout: <integer>
1571 # stp_root_guard: <value in [disabled, enabled]>
1572 # stp_state: <value in [disabled, enabled]>
1573 # type: <value in [physical, trunk]>
1574 # untagged_vlans: <list or string>
1575 # vlan: <string>
1576 # export_to_pool_flag: <integer>
1577 # mac_addr: <string>
1578 # packet_sample_rate: <integer>
1579 # packet_sampler: <value in [disabled, enabled]>
1580 # sticky_mac: <value in [disable, enable]>
1581 # storm_control_policy: <string>
1582 # dot1x_enable: <value in [disable, enable]>
1583 # max_miss_heartbeats: <integer>
1584 # access_mode: <value in [normal, nac, dynamic, ...]>
1585 # ip_source_guard: <value in [disable, enable]>
1586 # mclag_icl_port: <integer>
1587 # p2p_port: <integer>
1588 # aggregator_mode: <value in [bandwidth, count]>
1589 # rpvst_port: <value in [disabled, enabled]>
1590 # flow_control: <value in [disable, tx, rx, ...]>
1591 # media_type: <string>
1592 # pause_meter: <integer>
1593 # pause_meter_resume: <value in [25%, 50%, 75%]>
1594 # trunk_member: <integer>
1595 # fec_capable: <integer>
1596 # fec_state: <value in [disabled, cl74, cl91, ...]>
1597 # matched_dpp_intf_tags: <string>
1598 # matched_dpp_policy: <string>
1599 # port_policy: <string>
1600 # status: <value in [down, up]>
1601 # dsl_profile: <string>
1602 # flap_duration: <integer>
1603 # flap_rate: <integer>
1604 # flap_timeout: <integer>
1605 # flapguard: <value in [disable, enable]>
1606 # interface_tags: <list or string>
1607 # poe_max_power: <string>
1608 # poe_standard: <string>
1609 # igmp_snooping_flood_reports: <value in [disable, enable]>
1610 # mcast_snooping_flood_traffic: <value in [disable, enable]>
1611 # link_status: <value in [down, up]>
1612 # poe_mode_bt_cabable: <integer>
1613 # poe_port_mode: <value in [ieee802-3af, ieee802-3at, ieee802-3bt]>
1614 # poe_port_power: <value in [normal, perpetual, perpetual-fast]>
1615 # poe_port_priority: <value in [critical-priority, high-priority, low-priority, ...]>
1616 # acl_group: <list or string>
1617 # dhcp_snoop_option82_override:
1618 # - circuit_id: <string>
1619 # remote_id: <string>
1620 # vlan_name: <string>
1621 # fortiswitch_acls: <list or integer>
1622 # isl_peer_device_sn: <string>
1623 # authenticated_port: <integer>
1624 # encrypted_port: <integer>
1625 # ptp_status: <value in [disable, enable]>
1626 # restricted_auth_port: <integer>
1627 # allow_arp_monitor: <value in [disable, enable]>
1628 # export_to: <list or string>
1629 # export_to_pool: <list or string>
1630 # fallback_port: <string>
1631 # fgt_peer_device_name: <string>
1632 # fgt_peer_port_name: <string>
1633 # fiber_port: <integer>
1634 # flags: <integer>
1635 # fortilink_port: <integer>
1636 # isl_local_trunk_name: <string>
1637 # isl_peer_device_name: <string>
1638 # isl_peer_port_name: <string>
1639 # poe_capable: <integer>
1640 # port_number: <integer>
1641 # port_prefix_type: <integer>
1642 # ptp_policy: <list or string>
1643 # speed: <value in [auto, 10full, 10half, ...]>
1644 # speed_mask: <integer>
1645 # stacking_port: <integer>
1646 # switch_id: <string>
1647 # virtual_port: <integer>
1648 # export_tags: <list or string>
1649 # log_mac_event: <value in [disable, enable]>
1650 # pd_capable: <integer>
1651 # qnq: <list or string>
1652 # override_snmp_community: <value in [disable, enable]>
1653 # override_snmp_sysinfo: <value in [disable, enable]>
1654 # override_snmp_trap_threshold: <value in [disable, enable]>
1655 # override_snmp_user: <value in [disable, enable]>
1656 # poe_detection_type: <integer>
1657 # remote_log:
1658 # - csv: <value in [disable, enable]>
1659 # facility: <value in [kernel, user, mail, ...]>
1660 # name: <string>
1661 # port: <integer>
1662 # server: <string>
1663 # severity: <value in [emergency, alert, critical, ...]>
1664 # status: <value in [disable, enable]>
1665 # snmp_community:
1666 # - events: ["cpu-high", "mem-low", "log-full", "intf-ip", "ent-conf-change", "l2mac"]
1667 # hosts:
1668 # - id: <integer>
1669 # ip: <string>
1670 # id: <integer>
1671 # name: <string>
1672 # query_v1_port: <integer>
1673 # query_v1_status: <value in [disable, enable]>
1674 # query_v2c_port: <integer>
1675 # query_v2c_status: <value in [disable, enable]>
1676 # status: <value in [disable, enable]>
1677 # trap_v1_lport: <integer>
1678 # trap_v1_rport: <integer>
1679 # trap_v1_status: <value in [disable, enable]>
1680 # trap_v2c_lport: <integer>
1681 # trap_v2c_rport: <integer>
1682 # trap_v2c_status: <value in [disable, enable]>
1683 # snmp_user:
1684 # - auth_proto: <value in [md5, sha, sha1, ...]>
1685 # auth_pwd: <list or string>
1686 # name: <string>
1687 # priv_proto: <value in [des, aes, aes128, ...]>
1688 # priv_pwd: <list or string>
1689 # queries: <value in [disable, enable]>
1690 # query_port: <integer>
1691 # security_level: <value in [no-auth-no-priv, auth-no-priv, auth-priv]>
1692 # mclag_igmp_snooping_aware: <value in [disable, enable]>
1693 # ip_source_guard:
1694 # - binding_entry:
1695 # - entry_name: <string>
1696 # ip: <string>
1697 # mac: <string>
1698 # description: <string>
1699 # port: <string>
1700 # l3_discovered: <integer>
1701 # qos_drop_policy: <value in [taildrop, random-early-detection]>
1702 # qos_red_probability: <integer>
1703 # switch_dhcp_opt43_key: <string>
1704 # tdr_supported: <string>
1705 # custom_command:
1706 # - command_entry: <string>
1707 # command_name: <string>
1708 # firmware_provision: <value in [disable, enable]>
1709 # firmware_provision_version: <string>
1710 # dhcp_server_access_list: <value in [disable, enable, global]>
1711 # firmware_provision_latest: <value in [disable, once]>
1712 # dhcp_snooping_static_client:
1713 # - ip: <string>
1714 # mac: <string>
1715 # name: <string>
1716 # port: <string>
1717 # vlan: <string>
1718 # ptp_profile: <string>
1719 # ptp_status: <value in [disable, enable]>
1720 # route_offload: <value in [disable, enable]>
1721 # route_offload_mclag: <value in [disable, enable]>
1722 # route_offload_router:
1723 # - router_ip: <string>
1724 # vlan_name: <string>
1725 # mgmt_mode: <integer>
1726 # purdue_level: <value in [1, 2, 3, ...]>
1727 # radius_nas_ip: <string>
1728 # radius_nas_ip_override: <value in [disable, enable]>
1729 # tunnel_discovered: <integer>
1730 # vlan:
1731 # - assignment_priority: <integer>
1732 # vlan_name: <string>
1733 # 802_1X_settings:
1734 # link_down_auth: <value in [set-unauth, no-action]>
1735 # local_override: <value in [disable, enable]>
1736 # mab_reauth: <value in [disable, enable]>
1737 # mac_called_station_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
1738 # mac_calling_station_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
1739 # mac_case: <value in [uppercase, lowercase]>
1740 # mac_password_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
1741 # mac_username_delimiter: <value in [hyphen, single-hyphen, colon, ...]>
1742 # max_reauth_attempt: <integer>
1743 # reauth_period: <integer>
1744 # tx_period: <integer>
1745 # access_profile: <list or string>
1746 # delayed_restart_trigger: <integer>
1747 # directly_connected: <integer>
1748 # dynamic_capability: <string>
1749 # dynamically_discovered: <integer>
1750 # flow_identity: <string>
1751 # fsw_wan1_admin: <value in [disable, enable, discovered]>
1752 # fsw_wan1_peer: <list or string>
1753 # fsw_wan2_admin: <value in [disable, enable, discovered]>
1754 # fsw_wan2_peer: <string>
1755 # igmp_snooping:
1756 # aging_time: <integer>
1757 # flood_unknown_multicast: <value in [disable, enable]>
1758 # local_override: <value in [disable, enable]>
1759 # vlans:
1760 # - proxy: <value in [disable, enable, global]>
1761 # querier: <value in [disable, enable]>
1762 # querier_addr: <string>
1763 # version: <integer>
1764 # vlan_name: <list or string>
1765 # max_allowed_trunk_members: <integer>
1766 # mirror:
1767 # - dst: <string>
1768 # name: <string>
1769 # src_egress: <list or string>
1770 # src_ingress: <list or string>
1771 # status: <value in [inactive, active]>
1772 # switching_packet: <value in [disable, enable]>
1773 # owner_vdom: <string>
1774 # poe_pre_standard_detection: <value in [disable, enable]>
1775 # pre_provisioned: <integer>
1776 # sn: <string>
1777 # snmp_sysinfo:
1778 # contact_info: <string>
1779 # description: <string>
1780 # engine_id: <string>
1781 # location: <string>
1782 # status: <value in [disable, enable]>
1783 # snmp_trap_threshold:
1784 # trap_high_cpu_threshold: <integer>
1785 # trap_log_full_threshold: <integer>
1786 # trap_low_memory_threshold: <integer>
1787 # staged_image_version: <string>
1788 # static_mac:
1789 # - description: <string>
1790 # id: <integer>
1791 # interface: <string>
1792 # mac: <string>
1793 # type: <value in [static, sticky]>
1794 # vlan: <list or string>
1795 # storm_control:
1796 # broadcast: <value in [disable, enable]>
1797 # local_override: <value in [disable, enable]>
1798 # rate: <integer>
1799 # unknown_multicast: <value in [disable, enable]>
1800 # unknown_unicast: <value in [disable, enable]>
1801 # burst_size_level: <integer>
1802 # stp_instance:
1803 # - id: <string>
1804 # priority: <value in [0, 4096, 8192, ...]>
1805 # stp_settings:
1806 # forward_time: <integer>
1807 # hello_time: <integer>
1808 # local_override: <value in [disable, enable]>
1809 # max_age: <integer>
1810 # max_hops: <integer>
1811 # name: <string>
1812 # pending_timer: <integer>
1813 # revision: <integer>
1814 # status: <value in [disable, enable]>
1815 # switch_device_tag: <string>
1816 # switch_log:
1817 # local_override: <value in [disable, enable]>
1818 # severity: <value in [emergency, alert, critical, ...]>
1819 # status: <value in [disable, enable]>
1820 # switch_profile: <list or string>
1821 # type: <value in [physical, virtual]>
1822 # version: <integer>
1823 # poe_lldp_detection: <value in [disable, enable]>
1824 # router_static:
1825 # - blackhole: <value in [disable, enable]>
1826 # comment: <string>
1827 # device: <list or string>
1828 # distance: <integer>
1829 # dst: <list or string>
1830 # dynamic_gateway: <value in [disable, enable]>
1831 # gateway: <string>
1832 # id: <integer>
1833 # status: <value in [disable, enable]>
1834 # switch_id: <list or string>
1835 # vrf: <list or string>
1836 # router_vrf:
1837 # - name: <string>
1838 # switch_id: <list or string>
1839 # vrfid: <integer>
1840 # system_dhcp_server:
1841 # - default_gateway: <string>
1842 # dns_server1: <string>
1843 # dns_server2: <string>
1844 # dns_server3: <string>
1845 # dns_service: <value in [default, specify, local]>
1846 # id: <integer>
1847 # interface: <list or string>
1848 # ip_range:
1849 # - end_ip: <string>
1850 # id: <integer>
1851 # start_ip: <string>
1852 # lease_time: <integer>
1853 # netmask: <string>
1854 # ntp_server1: <string>
1855 # ntp_server2: <string>
1856 # ntp_server3: <string>
1857 # ntp_service: <value in [default, specify, local]>
1858 # options:
1859 # - code: <integer>
1860 # id: <integer>
1861 # ip: <string>
1862 # type: <value in [hex, string, ip, ...]>
1863 # value: <string>
1864 # status: <value in [disable, enable]>
1865 # switch_id: <list or string>
1866 # system_interface:
1867 # - allowaccess: ["https", "ping", "ssh", "snmp", "http", "telnet", "radius-acct"]
1868 # interface: <list or string>
1869 # ip: <list or string>
1870 # mode: <value in [static, dhcp]>
1871 # name: <string>
1872 # status: <value in [disable, enable]>
1873 # switch_id: <list or string>
1874 # type: <value in [physical, vlan]>
1875 # vlan: <list or string>
1876 # vrf: <list or string>
1877 # max_poe_budget: <integer>
1878 '''
1879
1880 RETURN = '''
1881 meta:
1882 description: The result of the request.
1883 type: dict
1884 returned: always
1885 contains:
1886 request_url:
1887 description: The full url requested.
1888 returned: always
1889 type: str
1890 sample: /sys/login/user
1891 response_code:
1892 description: The status of api request.
1893 returned: always
1894 type: int
1895 sample: 0
1896 response_data:
1897 description: The api response.
1898 type: list
1899 returned: always
1900 response_message:
1901 description: The descriptive message of the api response.
1902 type: str
1903 returned: always
1904 sample: OK.
1905 system_information:
1906 description: The information of the target system.
1907 type: dict
1908 returned: always
1909 rc:
1910 description: The status the request.
1911 type: int
1912 returned: always
1913 sample: 0
1914 version_check_warning:
1915 description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
1916 type: list
1917 returned: complex
1918 '''
1919 from ansible.module_utils.basic import AnsibleModule
1920 from ansible.module_utils.connection import Connection
1921 from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass
1922 from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec
1923
1924
1925 def main():
1926 urls_list = [
1927 '/pm/config/adom/{adom}/obj/switch-controller/managed-switch',
1928 '/pm/config/global/obj/switch-controller/managed-switch'
1929 ]
1930 module_arg_spec = {
1931 'adom': {'required': True, 'type': 'str'},
1932 'revision_note': {'type': 'str'},
1933 'switchcontroller_managedswitch': {
1934 'type': 'dict', 'v_range': [['6.0.0', '']],
1935 'options': {
1936 '_platform': {'type': 'str'},
1937 'description': {'type': 'str'},
1938 'name': {'type': 'str'},
1939 'ports': {
1940 'type': 'list',
1941 'options': {
1942 'allowed-vlans': {'type': 'raw'},
1943 'allowed-vlans-all': {'choices': ['disable', 'enable'], 'type': 'str'},
1944 'arp-inspection-trust': {'choices': ['untrusted', 'trusted'], 'type': 'str'},
1945 'bundle': {'choices': ['disable', 'enable'], 'type': 'str'},
1946 'description': {'type': 'str'},
1947 'dhcp-snoop-option82-trust': {'choices': ['disable', 'enable'], 'type': 'str'},
1948 'dhcp-snooping': {'choices': ['trusted', 'untrusted'], 'type': 'str'},
1949 'discard-mode': {'choices': ['none', 'all-untagged', 'all-tagged'], 'type': 'str'},
1950 'edge-port': {'choices': ['disable', 'enable'], 'type': 'str'},
1951 'igmp-snooping': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'},
1952 'igmps-flood-reports': {'choices': ['disable', 'enable'], 'type': 'str'},
1953 'igmps-flood-traffic': {'choices': ['disable', 'enable'], 'type': 'str'},
1954 'lacp-speed': {'choices': ['slow', 'fast'], 'type': 'str'},
1955 'learning-limit': {'type': 'int'},
1956 'lldp-profile': {'type': 'str'},
1957 'lldp-status': {'choices': ['disable', 'rx-only', 'tx-only', 'tx-rx'], 'type': 'str'},
1958 'loop-guard': {'choices': ['disabled', 'enabled'], 'type': 'str'},
1959 'loop-guard-timeout': {'type': 'int'},
1960 'max-bundle': {'type': 'int'},
1961 'mclag': {'choices': ['disable', 'enable'], 'type': 'str'},
1962 'member-withdrawal-behavior': {'choices': ['forward', 'block'], 'type': 'str'},
1963 'members': {'type': 'raw'},
1964 'min-bundle': {'type': 'int'},
1965 'mode': {'choices': ['static', 'lacp-passive', 'lacp-active'], 'type': 'str'},
1966 'poe-pre-standard-detection': {'choices': ['disable', 'enable'], 'type': 'str'},
1967 'poe-status': {'choices': ['disable', 'enable'], 'type': 'str'},
1968 'port-name': {'type': 'str'},
1969 'port-owner': {'type': 'str'},
1970 'port-security-policy': {'type': 'str'},
1971 'port-selection-criteria': {'choices': ['src-mac', 'dst-mac', 'src-dst-mac', 'src-ip', 'dst-ip', 'src-dst-ip'], 'type': 'str'},
1972 'qos-policy': {'type': 'str'},
1973 'sample-direction': {'choices': ['rx', 'tx', 'both'], 'type': 'str'},
1974 'sflow-counter-interval': {'type': 'int'},
1975 'sflow-sample-rate': {'v_range': [['6.0.0', '7.2.1']], 'type': 'int'},
1976 'sflow-sampler': {'v_range': [['6.0.0', '7.2.1']], 'choices': ['disabled', 'enabled'], 'type': 'str'},
1977 'stp-bpdu-guard': {'choices': ['disabled', 'enabled'], 'type': 'str'},
1978 'stp-bpdu-guard-timeout': {'type': 'int'},
1979 'stp-root-guard': {'choices': ['disabled', 'enabled'], 'type': 'str'},
1980 'stp-state': {'choices': ['disabled', 'enabled'], 'type': 'str'},
1981 'type': {'choices': ['physical', 'trunk'], 'type': 'str'},
1982 'untagged-vlans': {'type': 'raw'},
1983 'vlan': {'type': 'str'},
1984 'export-to-pool-flag': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
1985 'mac-addr': {'v_range': [['6.2.1', '6.2.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
1986 'packet-sample-rate': {'v_range': [['6.2.0', '']], 'type': 'int'},
1987 'packet-sampler': {'v_range': [['6.2.0', '']], 'choices': ['disabled', 'enabled'], 'type': 'str'},
1988 'sticky-mac': {'v_range': [['6.2.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1989 'storm-control-policy': {'v_range': [['6.2.0', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
1990 'dot1x-enable': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'},
1991 'max-miss-heartbeats': {'v_range': [['6.2.0', '6.2.13']], 'type': 'int'},
1992 'access-mode': {'v_range': [['6.4.0', '']], 'choices': ['normal', 'nac', 'dynamic', 'static'], 'type': 'str'},
1993 'ip-source-guard': {'v_range': [['6.4.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1994 'mclag-icl-port': {'v_range': [['6.4.0', '']], 'type': 'int'},
1995 'p2p-port': {'v_range': [['6.4.0', '']], 'type': 'int'},
1996 'aggregator-mode': {'v_range': [['6.4.2', '']], 'choices': ['bandwidth', 'count'], 'type': 'str'},
1997 'rpvst-port': {'v_range': [['6.4.2', '']], 'choices': ['disabled', 'enabled'], 'type': 'str'},
1998 'flow-control': {'v_range': [['6.4.3', '']], 'choices': ['disable', 'tx', 'rx', 'both'], 'type': 'str'},
1999 'media-type': {'v_range': [['6.4.3', '']], 'type': 'str'},
2000 'pause-meter': {'v_range': [['6.4.3', '']], 'type': 'int'},
2001 'pause-meter-resume': {'v_range': [['6.4.3', '']], 'choices': ['25%', '50%', '75%'], 'type': 'str'},
2002 'trunk-member': {'v_range': [['6.2.7', '6.2.13'], ['6.4.3', '']], 'type': 'int'},
2003 'fec-capable': {'v_range': [['7.0.0', '']], 'type': 'int'},
2004 'fec-state': {'v_range': [['7.0.0', '']], 'choices': ['disabled', 'cl74', 'cl91', 'detect-by-module'], 'type': 'str'},
2005 'matched-dpp-intf-tags': {'v_range': [['7.0.0', '']], 'type': 'str'},
2006 'matched-dpp-policy': {'v_range': [['7.0.0', '']], 'type': 'str'},
2007 'port-policy': {'v_range': [['7.0.0', '7.0.4'], ['7.2.0', '']], 'type': 'str'},
2008 'status': {'v_range': [['6.4.6', '']], 'choices': ['down', 'up'], 'type': 'str'},
2009 'dsl-profile': {'v_range': [['7.0.2', '']], 'type': 'str'},
2010 'flap-duration': {'v_range': [['7.2.0', '']], 'type': 'int'},
2011 'flap-rate': {'v_range': [['7.2.0', '']], 'type': 'int'},
2012 'flap-timeout': {'v_range': [['7.2.0', '']], 'type': 'int'},
2013 'flapguard': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2014 'interface-tags': {'v_range': [['7.0.2', '']], 'type': 'raw'},
2015 'poe-max-power': {'v_range': [['7.0.1', '']], 'type': 'str'},
2016 'poe-standard': {'v_range': [['7.0.1', '']], 'type': 'str'},
2017 'igmp-snooping-flood-reports': {'v_range': [['7.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2018 'mcast-snooping-flood-traffic': {'v_range': [['7.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2019 'link-status': {'v_range': [['7.2.2', '']], 'choices': ['down', 'up'], 'type': 'str'},
2020 'poe-mode-bt-cabable': {'v_range': [['7.2.2', '']], 'type': 'int'},
2021 'poe-port-mode': {'v_range': [['7.2.2', '']], 'choices': ['ieee802-3af', 'ieee802-3at', 'ieee802-3bt'], 'type': 'str'},
2022 'poe-port-power': {'v_range': [['7.2.2', '']], 'choices': ['normal', 'perpetual', 'perpetual-fast'], 'type': 'str'},
2023 'poe-port-priority': {
2024 'v_range': [['7.2.2', '']],
2025 'choices': ['critical-priority', 'high-priority', 'low-priority', 'medium-priority'],
2026 'type': 'str'
2027 },
2028 'acl-group': {'v_range': [['7.4.0', '']], 'type': 'raw'},
2029 'dhcp-snoop-option82-override': {
2030 'v_range': [['7.4.0', '']],
2031 'type': 'list',
2032 'options': {
2033 'circuit-id': {'v_range': [['7.4.0', '']], 'type': 'str'},
2034 'remote-id': {'v_range': [['7.4.0', '']], 'type': 'str'},
2035 'vlan-name': {'v_range': [['7.4.0', '']], 'type': 'str'}
2036 },
2037 'elements': 'dict'
2038 },
2039 'fortiswitch-acls': {'v_range': [['7.4.0', '']], 'type': 'raw'},
2040 'isl-peer-device-sn': {'v_range': [['7.4.0', '']], 'type': 'str'},
2041 'authenticated-port': {'v_range': [['7.4.1', '']], 'type': 'int'},
2042 'encrypted-port': {'v_range': [['7.4.1', '']], 'type': 'int'},
2043 'ptp-status': {'v_range': [['7.4.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2044 'restricted-auth-port': {'v_range': [['7.4.1', '']], 'type': 'int'},
2045 'allow-arp-monitor': {'v_range': [['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2046 'export-to': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2047 'export-to-pool': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2048 'fallback-port': {'v_range': [['7.4.3', '']], 'type': 'str'},
2049 'fgt-peer-device-name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2050 'fgt-peer-port-name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2051 'fiber-port': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2052 'flags': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2053 'fortilink-port': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2054 'isl-local-trunk-name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2055 'isl-peer-device-name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2056 'isl-peer-port-name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2057 'poe-capable': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2058 'port-number': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2059 'port-prefix-type': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2060 'ptp-policy': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2061 'speed': {
2062 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2063 'choices': [
2064 'auto', '10full', '10half', '100full', '100half', '1000full', '10000full', '1000auto', '40000full', '1000fiber', '10000',
2065 '40000', 'auto-module', '100FX-half', '100FX-full', '100000full', '2500full', '25000full', '50000full', '40000auto',
2066 '10000cr', '10000sr', '100000sr4', '100000cr4', '25000cr4', '25000sr4', '5000full', '2500auto', '5000auto',
2067 '1000full-fiber', '40000sr4', '40000cr4', '25000cr', '25000sr', '50000cr', '50000sr', 'sgmii-auto'
2068 ],
2069 'type': 'str'
2070 },
2071 'speed-mask': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2072 'stacking-port': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2073 'switch-id': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2074 'virtual-port': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2075 'export-tags': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2076 'log-mac-event': {'v_range': [['7.6.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2077 'pd-capable': {'v_range': [['7.4.4', '']], 'type': 'int'},
2078 'qnq': {'v_range': [['7.6.0', '']], 'type': 'raw'}
2079 },
2080 'elements': 'dict'
2081 },
2082 'switch-id': {'required': True, 'type': 'str'},
2083 'override-snmp-community': {'v_range': [['6.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2084 'override-snmp-sysinfo': {'v_range': [['6.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2085 'override-snmp-trap-threshold': {'v_range': [['6.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2086 'override-snmp-user': {'v_range': [['6.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2087 'poe-detection-type': {'v_range': [['6.2.0', '']], 'type': 'int'},
2088 'remote-log': {
2089 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2090 'type': 'list',
2091 'options': {
2092 'csv': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2093 'facility': {
2094 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2095 'choices': [
2096 'kernel', 'user', 'mail', 'daemon', 'auth', 'syslog', 'lpr', 'news', 'uucp', 'cron', 'authpriv', 'ftp', 'ntp', 'audit',
2097 'alert', 'clock', 'local0', 'local1', 'local2', 'local3', 'local4', 'local5', 'local6', 'local7'
2098 ],
2099 'type': 'str'
2100 },
2101 'name': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2102 'port': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2103 'server': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2104 'severity': {
2105 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2106 'choices': ['emergency', 'alert', 'critical', 'error', 'warning', 'notification', 'information', 'debug'],
2107 'type': 'str'
2108 },
2109 'status': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
2110 },
2111 'elements': 'dict'
2112 },
2113 'snmp-community': {
2114 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2115 'type': 'list',
2116 'options': {
2117 'events': {
2118 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2119 'type': 'list',
2120 'choices': ['cpu-high', 'mem-low', 'log-full', 'intf-ip', 'ent-conf-change', 'l2mac'],
2121 'elements': 'str'
2122 },
2123 'hosts': {
2124 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2125 'type': 'list',
2126 'options': {
2127 'id': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2128 'ip': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'}
2129 },
2130 'elements': 'dict'
2131 },
2132 'id': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2133 'name': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2134 'query-v1-port': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2135 'query-v1-status': {
2136 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2137 'choices': ['disable', 'enable'],
2138 'type': 'str'
2139 },
2140 'query-v2c-port': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2141 'query-v2c-status': {
2142 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2143 'choices': ['disable', 'enable'],
2144 'type': 'str'
2145 },
2146 'status': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2147 'trap-v1-lport': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2148 'trap-v1-rport': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2149 'trap-v1-status': {
2150 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2151 'choices': ['disable', 'enable'],
2152 'type': 'str'
2153 },
2154 'trap-v2c-lport': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2155 'trap-v2c-rport': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2156 'trap-v2c-status': {
2157 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2158 'choices': ['disable', 'enable'],
2159 'type': 'str'
2160 }
2161 },
2162 'elements': 'dict'
2163 },
2164 'snmp-user': {
2165 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2166 'type': 'list',
2167 'options': {
2168 'auth-proto': {
2169 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2170 'choices': ['md5', 'sha', 'sha1', 'sha256', 'sha384', 'sha512', 'sha224'],
2171 'type': 'str'
2172 },
2173 'auth-pwd': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2174 'name': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2175 'priv-proto': {
2176 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2177 'choices': ['des', 'aes', 'aes128', 'aes192', 'aes256', 'aes192c', 'aes256c'],
2178 'type': 'str'
2179 },
2180 'priv-pwd': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2181 'queries': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2182 'query-port': {'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2183 'security-level': {
2184 'v_range': [['6.2.1', '6.2.3'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2185 'choices': ['no-auth-no-priv', 'auth-no-priv', 'auth-priv'],
2186 'type': 'str'
2187 }
2188 },
2189 'elements': 'dict'
2190 },
2191 'mclag-igmp-snooping-aware': {'v_range': [['6.2.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2192 'ip-source-guard': {
2193 'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2194 'type': 'list',
2195 'options': {
2196 'binding-entry': {
2197 'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']],
2198 'type': 'list',
2199 'options': {
2200 'entry-name': {'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2201 'ip': {'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2202 'mac': {'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'}
2203 },
2204 'elements': 'dict'
2205 },
2206 'description': {'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2207 'port': {'v_range': [['6.4.0', '6.4.1'], ['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'}
2208 },
2209 'elements': 'dict'
2210 },
2211 'l3-discovered': {'v_range': [['6.4.0', '']], 'type': 'int'},
2212 'qos-drop-policy': {'v_range': [['6.4.0', '']], 'choices': ['taildrop', 'random-early-detection'], 'type': 'str'},
2213 'qos-red-probability': {'v_range': [['6.4.0', '']], 'type': 'int'},
2214 'switch-dhcp_opt43_key': {'v_range': [['6.4.0', '']], 'no_log': True, 'type': 'str'},
2215 'tdr-supported': {'v_range': [['6.4.3', '']], 'type': 'str'},
2216 'custom-command': {
2217 'v_range': [['7.0.0', '']],
2218 'type': 'list',
2219 'options': {'command-entry': {'v_range': [['7.0.0', '']], 'type': 'str'}, 'command-name': {'v_range': [['7.0.0', '']], 'type': 'str'}},
2220 'elements': 'dict'
2221 },
2222 'firmware-provision': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2223 'firmware-provision-version': {'v_range': [['7.0.0', '']], 'type': 'str'},
2224 'dhcp-server-access-list': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'enable', 'global'], 'type': 'str'},
2225 'firmware-provision-latest': {'v_range': [['7.0.3', '']], 'choices': ['disable', 'once'], 'type': 'str'},
2226 'dhcp-snooping-static-client': {
2227 'v_range': [['7.2.2', '']],
2228 'type': 'list',
2229 'options': {
2230 'ip': {'v_range': [['7.2.2', '']], 'type': 'str'},
2231 'mac': {'v_range': [['7.2.2', '']], 'type': 'str'},
2232 'name': {'v_range': [['7.2.2', '']], 'type': 'str'},
2233 'port': {'v_range': [['7.2.2', '']], 'type': 'str'},
2234 'vlan': {'v_range': [['7.2.2', '']], 'type': 'str'}
2235 },
2236 'elements': 'dict'
2237 },
2238 'ptp-profile': {'v_range': [['7.4.1', '']], 'type': 'str'},
2239 'ptp-status': {'v_range': [['7.4.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2240 'route-offload': {'v_range': [['7.4.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2241 'route-offload-mclag': {'v_range': [['7.4.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2242 'route-offload-router': {
2243 'v_range': [['7.4.1', '']],
2244 'type': 'list',
2245 'options': {'router-ip': {'v_range': [['7.4.1', '']], 'type': 'str'}, 'vlan-name': {'v_range': [['7.4.1', '']], 'type': 'str'}},
2246 'elements': 'dict'
2247 },
2248 'mgmt-mode': {'v_range': [['7.4.2', '']], 'type': 'int'},
2249 'purdue-level': {'v_range': [['7.4.2', '']], 'choices': ['1', '2', '3', '4', '5', '1.5', '2.5', '3.5', '5.5'], 'type': 'str'},
2250 'radius-nas-ip': {'v_range': [['7.2.6', '7.2.12'], ['7.4.2', '']], 'type': 'str'},
2251 'radius-nas-ip-override': {'v_range': [['7.2.6', '7.2.12'], ['7.4.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2252 'tunnel-discovered': {'v_range': [['7.4.2', '']], 'type': 'int'},
2253 'vlan': {
2254 'v_range': [['7.4.2', '']],
2255 'type': 'list',
2256 'options': {
2257 'assignment-priority': {'v_range': [['7.4.2', '']], 'type': 'int'},
2258 'vlan-name': {'v_range': [['7.4.2', '']], 'type': 'str'}
2259 },
2260 'elements': 'dict'
2261 },
2262 '802-1X-settings': {
2263 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2264 'type': 'dict',
2265 'options': {
2266 'link-down-auth': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['set-unauth', 'no-action'], 'type': 'str'},
2267 'local-override': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2268 'mab-reauth': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2269 'mac-called-station-delimiter': {
2270 'v_range': [['7.4.3', '']],
2271 'choices': ['hyphen', 'single-hyphen', 'colon', 'none'],
2272 'type': 'str'
2273 },
2274 'mac-calling-station-delimiter': {
2275 'v_range': [['7.4.3', '']],
2276 'choices': ['hyphen', 'single-hyphen', 'colon', 'none'],
2277 'type': 'str'
2278 },
2279 'mac-case': {'v_range': [['7.4.3', '']], 'choices': ['uppercase', 'lowercase'], 'type': 'str'},
2280 'mac-password-delimiter': {'v_range': [['7.4.3', '']], 'choices': ['hyphen', 'single-hyphen', 'colon', 'none'], 'type': 'str'},
2281 'mac-username-delimiter': {'v_range': [['7.4.3', '']], 'choices': ['hyphen', 'single-hyphen', 'colon', 'none'], 'type': 'str'},
2282 'max-reauth-attempt': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2283 'reauth-period': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2284 'tx-period': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'}
2285 }
2286 },
2287 'access-profile': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2288 'delayed-restart-trigger': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2289 'directly-connected': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2290 'dynamic-capability': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2291 'dynamically-discovered': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2292 'flow-identity': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2293 'fsw-wan1-admin': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable', 'discovered'], 'type': 'str'},
2294 'fsw-wan1-peer': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2295 'fsw-wan2-admin': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable', 'discovered'], 'type': 'str'},
2296 'fsw-wan2-peer': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2297 'igmp-snooping': {
2298 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2299 'type': 'dict',
2300 'options': {
2301 'aging-time': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2302 'flood-unknown-multicast': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2303 'local-override': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2304 'vlans': {
2305 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2306 'type': 'list',
2307 'options': {
2308 'proxy': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable', 'global'], 'type': 'str'},
2309 'querier': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2310 'querier-addr': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2311 'version': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2312 'vlan-name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'}
2313 },
2314 'elements': 'dict'
2315 }
2316 }
2317 },
2318 'max-allowed-trunk-members': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2319 'mirror': {
2320 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2321 'type': 'list',
2322 'options': {
2323 'dst': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2324 'name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2325 'src-egress': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2326 'src-ingress': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2327 'status': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['inactive', 'active'], 'type': 'str'},
2328 'switching-packet': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
2329 },
2330 'elements': 'dict'
2331 },
2332 'owner-vdom': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2333 'poe-pre-standard-detection': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2334 'pre-provisioned': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2335 'sn': {'v_range': [['7.4.3', '']], 'type': 'str'},
2336 'snmp-sysinfo': {
2337 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2338 'type': 'dict',
2339 'options': {
2340 'contact-info': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2341 'description': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2342 'engine-id': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2343 'location': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2344 'status': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
2345 }
2346 },
2347 'snmp-trap-threshold': {
2348 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2349 'type': 'dict',
2350 'options': {
2351 'trap-high-cpu-threshold': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2352 'trap-log-full-threshold': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2353 'trap-low-memory-threshold': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'}
2354 }
2355 },
2356 'staged-image-version': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2357 'static-mac': {
2358 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2359 'type': 'list',
2360 'options': {
2361 'description': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2362 'id': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2363 'interface': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2364 'mac': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2365 'type': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['static', 'sticky'], 'type': 'str'},
2366 'vlan': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'}
2367 },
2368 'elements': 'dict'
2369 },
2370 'storm-control': {
2371 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2372 'type': 'dict',
2373 'options': {
2374 'broadcast': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2375 'local-override': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2376 'rate': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2377 'unknown-multicast': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2378 'unknown-unicast': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2379 'burst-size-level': {'v_range': [['7.6.4', '']], 'type': 'int'}
2380 }
2381 },
2382 'stp-instance': {
2383 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2384 'type': 'list',
2385 'options': {
2386 'id': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2387 'priority': {
2388 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2389 'choices': [
2390 '0', '4096', '8192', '12288', '12328', '16384', '20480', '24576', '28672', '32768', '36864', '40960', '45056', '49152',
2391 '53248', '57344', '61440'
2392 ],
2393 'type': 'str'
2394 }
2395 },
2396 'elements': 'dict'
2397 },
2398 'stp-settings': {
2399 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2400 'type': 'dict',
2401 'options': {
2402 'forward-time': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2403 'hello-time': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2404 'local-override': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2405 'max-age': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2406 'max-hops': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2407 'name': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2408 'pending-timer': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2409 'revision': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2410 'status': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
2411 }
2412 },
2413 'switch-device-tag': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'str'},
2414 'switch-log': {
2415 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2416 'type': 'dict',
2417 'options': {
2418 'local-override': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2419 'severity': {
2420 'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']],
2421 'choices': ['emergency', 'alert', 'critical', 'error', 'warning', 'notification', 'information', 'debug'],
2422 'type': 'str'
2423 },
2424 'status': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
2425 }
2426 },
2427 'switch-profile': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'raw'},
2428 'type': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'choices': ['physical', 'virtual'], 'type': 'str'},
2429 'version': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '']], 'type': 'int'},
2430 'poe-lldp-detection': {'v_range': [['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'},
2431 'router-static': {
2432 'v_range': [['7.6.4', '']],
2433 'type': 'list',
2434 'options': {
2435 'blackhole': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2436 'comment': {'v_range': [['7.6.4', '']], 'type': 'str'},
2437 'device': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2438 'distance': {'v_range': [['7.6.4', '']], 'type': 'int'},
2439 'dst': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2440 'dynamic-gateway': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2441 'gateway': {'v_range': [['7.6.4', '']], 'type': 'str'},
2442 'id': {'v_range': [['7.6.4', '']], 'type': 'int'},
2443 'status': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2444 'switch-id': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2445 'vrf': {'v_range': [['7.6.4', '']], 'type': 'raw'}
2446 },
2447 'elements': 'dict'
2448 },
2449 'router-vrf': {
2450 'v_range': [['7.6.4', '']],
2451 'type': 'list',
2452 'options': {
2453 'name': {'v_range': [['7.6.4', '']], 'type': 'str'},
2454 'switch-id': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2455 'vrfid': {'v_range': [['7.6.4', '']], 'type': 'int'}
2456 },
2457 'elements': 'dict'
2458 },
2459 'system-dhcp-server': {
2460 'v_range': [['7.6.4', '']],
2461 'type': 'list',
2462 'options': {
2463 'default-gateway': {'v_range': [['7.6.4', '']], 'type': 'str'},
2464 'dns-server1': {'v_range': [['7.6.4', '']], 'type': 'str'},
2465 'dns-server2': {'v_range': [['7.6.4', '']], 'type': 'str'},
2466 'dns-server3': {'v_range': [['7.6.4', '']], 'type': 'str'},
2467 'dns-service': {'v_range': [['7.6.4', '']], 'choices': ['default', 'specify', 'local'], 'type': 'str'},
2468 'id': {'v_range': [['7.6.4', '']], 'type': 'int'},
2469 'interface': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2470 'ip-range': {
2471 'v_range': [['7.6.4', '']],
2472 'type': 'list',
2473 'options': {
2474 'end-ip': {'v_range': [['7.6.4', '']], 'type': 'str'},
2475 'id': {'v_range': [['7.6.4', '']], 'type': 'int'},
2476 'start-ip': {'v_range': [['7.6.4', '']], 'type': 'str'}
2477 },
2478 'elements': 'dict'
2479 },
2480 'lease-time': {'v_range': [['7.6.4', '']], 'type': 'int'},
2481 'netmask': {'v_range': [['7.6.4', '']], 'type': 'str'},
2482 'ntp-server1': {'v_range': [['7.6.4', '']], 'type': 'str'},
2483 'ntp-server2': {'v_range': [['7.6.4', '']], 'type': 'str'},
2484 'ntp-server3': {'v_range': [['7.6.4', '']], 'type': 'str'},
2485 'ntp-service': {'v_range': [['7.6.4', '']], 'choices': ['default', 'specify', 'local'], 'type': 'str'},
2486 'options': {
2487 'v_range': [['7.6.4', '']],
2488 'type': 'list',
2489 'options': {
2490 'code': {'v_range': [['7.6.4', '']], 'type': 'int'},
2491 'id': {'v_range': [['7.6.4', '']], 'type': 'int'},
2492 'ip': {'v_range': [['7.6.4', '']], 'type': 'str'},
2493 'type': {'v_range': [['7.6.4', '']], 'choices': ['hex', 'string', 'ip', 'fqdn'], 'type': 'str'},
2494 'value': {'v_range': [['7.6.4', '']], 'type': 'str'}
2495 },
2496 'elements': 'dict'
2497 },
2498 'status': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2499 'switch-id': {'v_range': [['7.6.4', '']], 'type': 'raw'}
2500 },
2501 'elements': 'dict'
2502 },
2503 'system-interface': {
2504 'v_range': [['7.6.4', '']],
2505 'type': 'list',
2506 'options': {
2507 'allowaccess': {
2508 'v_range': [['7.6.4', '']],
2509 'type': 'list',
2510 'choices': ['https', 'ping', 'ssh', 'snmp', 'http', 'telnet', 'radius-acct'],
2511 'elements': 'str'
2512 },
2513 'interface': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2514 'ip': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2515 'mode': {'v_range': [['7.6.4', '']], 'choices': ['static', 'dhcp'], 'type': 'str'},
2516 'name': {'v_range': [['7.6.4', '']], 'type': 'str'},
2517 'status': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
2518 'switch-id': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2519 'type': {'v_range': [['7.6.4', '']], 'choices': ['physical', 'vlan'], 'type': 'str'},
2520 'vlan': {'v_range': [['7.6.4', '']], 'type': 'raw'},
2521 'vrf': {'v_range': [['7.6.4', '']], 'type': 'raw'}
2522 },
2523 'elements': 'dict'
2524 },
2525 'max-poe-budget': {'v_range': [['7.6.5', '']], 'type': 'int'}
2526 }
2527 }
2528 }
2529
2530 module_option_spec = get_module_arg_spec('full crud')
2531 module_arg_spec.update(module_option_spec)
2532 check_galaxy_version(module_arg_spec)
2533 module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'switchcontroller_managedswitch'),
2534 supports_check_mode=True)
2535 if not module._socket_path:
2536 module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
2537 connection = Connection(module._socket_path)
2538 fmgr = NAPIManager('full crud', module_arg_spec, urls_list,
2539 'switch-id', 'data', module, connection)
2540 fmgr.process_crud()
2541 module.exit_json(meta=module.params)
2542
2543
2544 if __name__ == '__main__':
2545 main()