diff --git a/lib/ansible/modules/network/fortios/fortios_user_adgrp.py b/lib/ansible/modules/network/fortios/fortios_user_adgrp.py index 4dbc1727ee6..7bc281d5088 100644 --- a/lib/ansible/modules/network/fortios/fortios_user_adgrp.py +++ b/lib/ansible/modules/network/fortios/fortios_user_adgrp.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent name: description: - Name. @@ -227,7 +240,12 @@ def underscore_to_hyphen(data): def user_adgrp(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['user_adgrp'] and data['user_adgrp']: + state = data['user_adgrp']['state'] + else: + state = True user_adgrp_data = data['user_adgrp'] filtered_data = underscore_to_hyphen(filter_user_adgrp_data(user_adgrp_data)) @@ -267,11 +285,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "user_adgrp": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "name": {"required": True, "type": "str"}, "server_name": {"required": False, "type": "str"} diff --git a/lib/ansible/modules/network/fortios/fortios_user_radius.py b/lib/ansible/modules/network/fortios/fortios_user_radius.py index a6913f146b8..90e135a0be3 100644 --- a/lib/ansible/modules/network/fortios/fortios_user_radius.py +++ b/lib/ansible/modules/network/fortios/fortios_user_radius.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent accounting_server: description: - Additional accounting servers. @@ -589,7 +602,12 @@ def underscore_to_hyphen(data): def user_radius(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['user_radius'] and data['user_radius']: + state = data['user_radius']['state'] + else: + state = True user_radius_data = data['user_radius'] filtered_data = underscore_to_hyphen(filter_user_radius_data(user_radius_data)) @@ -629,11 +647,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "user_radius": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "accounting_server": {"required": False, "type": "list", "options": { "id": {"required": True, "type": "int"}, diff --git a/lib/ansible/modules/network/fortios/fortios_user_tacacsplus.py b/lib/ansible/modules/network/fortios/fortios_user_tacacsplus.py index 085e1867379..08c646de181 100644 --- a/lib/ansible/modules/network/fortios/fortios_user_tacacsplus.py +++ b/lib/ansible/modules/network/fortios/fortios_user_tacacsplus.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent authen_type: description: - Allowed authentication protocols/methods. @@ -284,7 +297,12 @@ def underscore_to_hyphen(data): def user_tacacsplus(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['user_tacacsplus'] and data['user_tacacsplus']: + state = data['user_tacacsplus']['state'] + else: + state = True user_tacacsplus_data = data['user_tacacsplus'] filtered_data = underscore_to_hyphen(filter_user_tacacsplus_data(user_tacacsplus_data)) @@ -324,11 +342,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "user_tacacsplus": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "authen_type": {"required": False, "type": "str", "choices": ["mschap", "chap", "pap", "ascii", "auto"]}, diff --git a/lib/ansible/modules/network/fortios/fortios_voip_profile.py b/lib/ansible/modules/network/fortios/fortios_voip_profile.py index 1a54492474e..1009629a575 100644 --- a/lib/ansible/modules/network/fortios/fortios_voip_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_voip_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent comment: description: - Comment. @@ -1018,7 +1031,12 @@ def underscore_to_hyphen(data): def voip_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['voip_profile'] and data['voip_profile']: + state = data['voip_profile']['state'] + else: + state = True voip_profile_data = data['voip_profile'] filtered_data = underscore_to_hyphen(filter_voip_profile_data(voip_profile_data)) @@ -1058,11 +1076,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "voip_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "comment": {"required": False, "type": "str"}, "name": {"required": True, "type": "str"}, "sccp": {"required": False, "type": "dict", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_concentrator.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_concentrator.py index 856f689829b..600edf0fd16 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_concentrator.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_concentrator.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent member: description: - Names of up to 3 VPN tunnels to add to the concentrator. @@ -243,7 +256,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_concentrator(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_concentrator'] and data['vpn_ipsec_concentrator']: + state = data['vpn_ipsec_concentrator']['state'] + else: + state = True vpn_ipsec_concentrator_data = data['vpn_ipsec_concentrator'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_concentrator_data(vpn_ipsec_concentrator_data)) @@ -283,11 +301,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_concentrator": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "member": {"required": False, "type": "list", "options": { "name": {"required": True, "type": "str"} diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_forticlient.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_forticlient.py index 5461557dceb..8d7f48f2f80 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_forticlient.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_forticlient.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent phase2name: description: - Phase 2 tunnel name that you defined in the FortiClient dialup configuration. Source vpn.ipsec.phase2.name vpn.ipsec.phase2-interface @@ -242,7 +255,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_forticlient(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_forticlient'] and data['vpn_ipsec_forticlient']: + state = data['vpn_ipsec_forticlient']['state'] + else: + state = True vpn_ipsec_forticlient_data = data['vpn_ipsec_forticlient'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_forticlient_data(vpn_ipsec_forticlient_data)) @@ -282,11 +300,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_forticlient": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "phase2name": {"required": False, "type": "str"}, "realm": {"required": True, "type": "str"}, "status": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey.py index 5e0612fa61b..56200378a7b 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent authentication: description: - Authentication algorithm. Must be the same for both ends of the tunnel. @@ -280,7 +293,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_manualkey(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_manualkey'] and data['vpn_ipsec_manualkey']: + state = data['vpn_ipsec_manualkey']['state'] + else: + state = True vpn_ipsec_manualkey_data = data['vpn_ipsec_manualkey'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_manualkey_data(vpn_ipsec_manualkey_data)) @@ -320,11 +338,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_manualkey": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "authentication": {"required": False, "type": "str", "choices": ["null", "md5", "sha1", "sha256", "sha384", "sha512"]}, diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey_interface.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey_interface.py index c8dad491c12..9a49eb6acd1 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey_interface.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_manualkey_interface.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent addr_type: description: - IP version to use for IP packets. @@ -307,7 +320,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_manualkey_interface(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_manualkey_interface'] and data['vpn_ipsec_manualkey_interface']: + state = data['vpn_ipsec_manualkey_interface']['state'] + else: + state = True vpn_ipsec_manualkey_interface_data = data['vpn_ipsec_manualkey_interface'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_manualkey_interface_data(vpn_ipsec_manualkey_interface_data)) @@ -347,11 +365,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_manualkey_interface": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "addr_type": {"required": False, "type": "str", "choices": ["4", "6"]}, "auth_alg": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1.py index de060c3a090..df838c88f9b 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent acct_verify: description: - Enable/disable verification of RADIUS accounting record. @@ -983,7 +996,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_phase1(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_phase1'] and data['vpn_ipsec_phase1']: + state = data['vpn_ipsec_phase1']['state'] + else: + state = True vpn_ipsec_phase1_data = data['vpn_ipsec_phase1'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_phase1_data(vpn_ipsec_phase1_data)) @@ -1023,11 +1041,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_phase1": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "acct_verify": {"required": False, "type": "str", "choices": ["enable", "disable"]}, "add_gw_route": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1_interface.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1_interface.py index c63002ceea7..3cf19f05b1b 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1_interface.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1_interface.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent acct_verify: description: - Enable/disable verification of RADIUS accounting record. @@ -1175,7 +1188,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_phase1_interface(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_phase1_interface'] and data['vpn_ipsec_phase1_interface']: + state = data['vpn_ipsec_phase1_interface']['state'] + else: + state = True vpn_ipsec_phase1_interface_data = data['vpn_ipsec_phase1_interface'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_phase1_interface_data(vpn_ipsec_phase1_interface_data)) @@ -1215,11 +1233,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_phase1_interface": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "acct_verify": {"required": False, "type": "str", "choices": ["enable", "disable"]}, "add_gw_route": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2.py index 10ffad9be13..685c72aed96 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent add_route: description: - Enable/disable automatic route addition. @@ -517,7 +530,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_phase2(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_phase2'] and data['vpn_ipsec_phase2']: + state = data['vpn_ipsec_phase2']['state'] + else: + state = True vpn_ipsec_phase2_data = data['vpn_ipsec_phase2'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_phase2_data(vpn_ipsec_phase2_data)) @@ -557,11 +575,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_phase2": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "add_route": {"required": False, "type": "str", "choices": ["phase1", "enable", "disable"]}, "auto_negotiate": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2_interface.py b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2_interface.py index 8f4158b5dc2..643252e4d5d 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2_interface.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase2_interface.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent add_route: description: - Enable/disable automatic route addition. @@ -526,7 +539,12 @@ def underscore_to_hyphen(data): def vpn_ipsec_phase2_interface(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ipsec_phase2_interface'] and data['vpn_ipsec_phase2_interface']: + state = data['vpn_ipsec_phase2_interface']['state'] + else: + state = True vpn_ipsec_phase2_interface_data = data['vpn_ipsec_phase2_interface'] filtered_data = underscore_to_hyphen(filter_vpn_ipsec_phase2_interface_data(vpn_ipsec_phase2_interface_data)) @@ -566,11 +584,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ipsec_phase2_interface": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "add_route": {"required": False, "type": "str", "choices": ["phase1", "enable", "disable"]}, "auto_discovery_forwarder": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_vpn_ssl_web_portal.py b/lib/ansible/modules/network/fortios/fortios_vpn_ssl_web_portal.py index 96749e61579..784b8053f91 100644 --- a/lib/ansible/modules/network/fortios/fortios_vpn_ssl_web_portal.py +++ b/lib/ansible/modules/network/fortios/fortios_vpn_ssl_web_portal.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent allow_user_access: description: - Allow user access to SSL-VPN applications. @@ -964,7 +977,12 @@ def underscore_to_hyphen(data): def vpn_ssl_web_portal(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['vpn_ssl_web_portal'] and data['vpn_ssl_web_portal']: + state = data['vpn_ssl_web_portal']['state'] + else: + state = True vpn_ssl_web_portal_data = data['vpn_ssl_web_portal'] filtered_data = underscore_to_hyphen(filter_vpn_ssl_web_portal_data(vpn_ssl_web_portal_data)) @@ -1004,11 +1022,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "vpn_ssl_web_portal": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "allow_user_access": {"required": False, "type": "str", "choices": ["web", "ftp", "smb", "telnet", "ssh", "vnc", diff --git a/lib/ansible/modules/network/fortios/fortios_waf_profile.py b/lib/ansible/modules/network/fortios/fortios_waf_profile.py index f80a816798f..78d5c8e8369 100644 --- a/lib/ansible/modules/network/fortios/fortios_waf_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_waf_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent address_list: description: - Black address list and white address list. @@ -1341,7 +1354,12 @@ def underscore_to_hyphen(data): def waf_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['waf_profile'] and data['waf_profile']: + state = data['waf_profile']['state'] + else: + state = True waf_profile_data = data['waf_profile'] filtered_data = underscore_to_hyphen(filter_waf_profile_data(waf_profile_data)) @@ -1381,11 +1399,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "waf_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "address_list": {"required": False, "type": "dict", "options": { "blocked_address": {"required": False, "type": "list", diff --git a/lib/ansible/modules/network/fortios/fortios_wanopt_profile.py b/lib/ansible/modules/network/fortios/fortios_wanopt_profile.py index 06740ae6da1..2250a206390 100644 --- a/lib/ansible/modules/network/fortios/fortios_wanopt_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_wanopt_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent auth_group: description: - Optionally add an authentication group to restrict access to the WAN Optimization tunnel to peers in the authentication group. Source @@ -589,7 +602,12 @@ def underscore_to_hyphen(data): def wanopt_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['wanopt_profile'] and data['wanopt_profile']: + state = data['wanopt_profile']['state'] + else: + state = True wanopt_profile_data = data['wanopt_profile'] filtered_data = underscore_to_hyphen(filter_wanopt_profile_data(wanopt_profile_data)) @@ -629,11 +647,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "wanopt_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "auth_group": {"required": False, "type": "str"}, "cifs": {"required": False, "type": "dict", "options": { diff --git a/lib/ansible/modules/network/fortios/fortios_web_proxy_profile.py b/lib/ansible/modules/network/fortios/fortios_web_proxy_profile.py index 8c12d33baf0..22d9366e6f3 100644 --- a/lib/ansible/modules/network/fortios/fortios_web_proxy_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_web_proxy_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent header_client_ip: description: - "Action to take on the HTTP client-IP header in forwarded requests: forwards (pass), adds, or removes the HTTP header." @@ -337,7 +350,12 @@ def underscore_to_hyphen(data): def web_proxy_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['web_proxy_profile'] and data['web_proxy_profile']: + state = data['web_proxy_profile']['state'] + else: + state = True web_proxy_profile_data = data['web_proxy_profile'] filtered_data = underscore_to_hyphen(filter_web_proxy_profile_data(web_proxy_profile_data)) @@ -377,11 +395,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "web_proxy_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "header_client_ip": {"required": False, "type": "str", "choices": ["pass", "add", "remove"]}, "header_front_end_https": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_content.py b/lib/ansible/modules/network/fortios/fortios_webfilter_content.py index 9ea812e2b4d..ebedc137f74 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_content.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_content.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent comment: description: - Optional comments. @@ -290,7 +303,12 @@ def underscore_to_hyphen(data): def webfilter_content(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_content'] and data['webfilter_content']: + state = data['webfilter_content']['state'] + else: + state = True webfilter_content_data = data['webfilter_content'] filtered_data = underscore_to_hyphen(filter_webfilter_content_data(webfilter_content_data)) @@ -330,11 +348,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_content": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "comment": {"required": False, "type": "str"}, "entries": {"required": False, "type": "list", "options": { diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_content_header.py b/lib/ansible/modules/network/fortios/fortios_webfilter_content_header.py index 0d253ebcc25..6f340ff59bb 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_content_header.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_content_header.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent comment: description: - Optional comments. @@ -260,7 +273,12 @@ def underscore_to_hyphen(data): def webfilter_content_header(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_content_header'] and data['webfilter_content_header']: + state = data['webfilter_content_header']['state'] + else: + state = True webfilter_content_header_data = data['webfilter_content_header'] filtered_data = underscore_to_hyphen(filter_webfilter_content_header_data(webfilter_content_header_data)) @@ -300,11 +318,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_content_header": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "comment": {"required": False, "type": "str"}, "entries": {"required": False, "type": "list", "options": { diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_cat.py b/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_cat.py index e862a3be4d8..94200d79adb 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_cat.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_cat.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent desc: description: - Local category description. @@ -235,7 +248,12 @@ def underscore_to_hyphen(data): def webfilter_ftgd_local_cat(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_ftgd_local_cat'] and data['webfilter_ftgd_local_cat']: + state = data['webfilter_ftgd_local_cat']['state'] + else: + state = True webfilter_ftgd_local_cat_data = data['webfilter_ftgd_local_cat'] filtered_data = underscore_to_hyphen(filter_webfilter_ftgd_local_cat_data(webfilter_ftgd_local_cat_data)) @@ -275,11 +293,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_ftgd_local_cat": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "desc": {"required": True, "type": "str"}, "id": {"required": False, "type": "int"}, "status": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_rating.py b/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_rating.py index b44d0efb6af..ee0cac6b5d0 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_rating.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_ftgd_local_rating.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent rating: description: - Local rating. @@ -235,7 +248,12 @@ def underscore_to_hyphen(data): def webfilter_ftgd_local_rating(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_ftgd_local_rating'] and data['webfilter_ftgd_local_rating']: + state = data['webfilter_ftgd_local_rating']['state'] + else: + state = True webfilter_ftgd_local_rating_data = data['webfilter_ftgd_local_rating'] filtered_data = underscore_to_hyphen(filter_webfilter_ftgd_local_rating_data(webfilter_ftgd_local_rating_data)) @@ -275,11 +293,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_ftgd_local_rating": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "rating": {"required": False, "type": "str"}, "status": {"required": False, "type": "str", "choices": ["enable", "disable"]}, diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_override.py b/lib/ansible/modules/network/fortios/fortios_webfilter_override.py index 42233c95f9d..1de2eb01a2c 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_override.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_override.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent expires: description: - "Override expiration date and time, from 5 minutes to 365 from now (format: yyyy/mm/dd hh:mm:ss)." @@ -283,7 +296,12 @@ def underscore_to_hyphen(data): def webfilter_override(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_override'] and data['webfilter_override']: + state = data['webfilter_override']['state'] + else: + state = True webfilter_override_data = data['webfilter_override'] filtered_data = underscore_to_hyphen(filter_webfilter_override_data(webfilter_override_data)) @@ -323,11 +341,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_override": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "expires": {"required": False, "type": "str"}, "id": {"required": True, "type": "int"}, "initiator": {"required": False, "type": "str"}, diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_profile.py b/lib/ansible/modules/network/fortios/fortios_webfilter_profile.py index 7bb2df36c2e..9a33fb4cc5e 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent comment: description: - Optional comments. @@ -874,7 +887,12 @@ def underscore_to_hyphen(data): def webfilter_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_profile'] and data['webfilter_profile']: + state = data['webfilter_profile']['state'] + else: + state = True webfilter_profile_data = data['webfilter_profile'] filtered_data = underscore_to_hyphen(filter_webfilter_profile_data(webfilter_profile_data)) @@ -914,11 +932,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "comment": {"required": False, "type": "str"}, "extended_log": {"required": False, "type": "str", "choices": ["enable", "disable"]}, diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_search_engine.py b/lib/ansible/modules/network/fortios/fortios_webfilter_search_engine.py index 0af1b014227..ab5e5cac6ea 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_search_engine.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_search_engine.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent charset: description: - Search engine charset. @@ -261,7 +274,12 @@ def underscore_to_hyphen(data): def webfilter_search_engine(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_search_engine'] and data['webfilter_search_engine']: + state = data['webfilter_search_engine']['state'] + else: + state = True webfilter_search_engine_data = data['webfilter_search_engine'] filtered_data = underscore_to_hyphen(filter_webfilter_search_engine_data(webfilter_search_engine_data)) @@ -301,11 +319,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_search_engine": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "charset": {"required": False, "type": "str", "choices": ["utf-8", "gb2312"]}, "hostname": {"required": False, "type": "str"}, diff --git a/lib/ansible/modules/network/fortios/fortios_webfilter_urlfilter.py b/lib/ansible/modules/network/fortios/fortios_webfilter_urlfilter.py index 9f4c59a9ecc..76196811ee9 100644 --- a/lib/ansible/modules/network/fortios/fortios_webfilter_urlfilter.py +++ b/lib/ansible/modules/network/fortios/fortios_webfilter_urlfilter.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent comment: description: - Optional comments. @@ -327,7 +340,12 @@ def underscore_to_hyphen(data): def webfilter_urlfilter(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['webfilter_urlfilter'] and data['webfilter_urlfilter']: + state = data['webfilter_urlfilter']['state'] + else: + state = True webfilter_urlfilter_data = data['webfilter_urlfilter'] filtered_data = underscore_to_hyphen(filter_webfilter_urlfilter_data(webfilter_urlfilter_data)) @@ -367,11 +385,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "webfilter_urlfilter": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "comment": {"required": False, "type": "str"}, "entries": {"required": False, "type": "list", "options": { diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_3gpp_cellular.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_3gpp_cellular.py index 731f26f8890..e5b0d2d3ff8 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_3gpp_cellular.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_3gpp_cellular.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and anqp_3gpp_cellular category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_ip_address_type.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_ip_address_type.py index 8a13fe09857..14ddb9270ad 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_ip_address_type.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_ip_address_type.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and anqp_ip_address_type category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_network_auth_type.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_network_auth_type.py index 73816393009..b98219b998e 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_network_auth_type.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_network_auth_type.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and anqp_network_auth_type category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py index 208d264a6c9..6dfa42bd36b 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and anqp_roaming_consortium category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_venue_name.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_venue_name.py index 4c728430d19..f4793ef444c 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_venue_name.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_venue_name.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and anqp_venue_name category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_conn_capability.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_conn_capability.py index 24f674a0414..32d9f8bb4cb 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_conn_capability.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_conn_capability.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and h2qp_conn_capability category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_operator_name.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_operator_name.py index a9db13a6133..cbe38684af9 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_operator_name.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_operator_name.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and h2qp_operator_name category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py index b79b4ca8f3b..865f97739bf 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and h2qp_osu_provider category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_wan_metric.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_wan_metric.py index e5375d9bd74..3022a91c38e 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_wan_metric.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_wan_metric.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and h2qp_wan_metric category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_icon.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_icon.py index a87a45fc71b..18a438831dc 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_icon.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_icon.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and icon category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_qos_map.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_qos_map.py index 21eb0954aa7..e275db40ef2 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_qos_map.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_qos_map.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller_hotspot20 feature and qos_map category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_inter_controller.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_inter_controller.py index 90caf83726a..c35817e253a 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_inter_controller.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_inter_controller.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller feature and inter_controller category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_qos_profile.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_qos_profile.py index 621f2efbb67..4640d6d85ad 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_qos_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_qos_profile.py @@ -29,7 +29,7 @@ description: - This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify wireless_controller feature and qos_profile category. Examples include all parameters and values need to be adjusted to datasources before usage. - Tested with FOS v6.0.4 + Tested with FOS v6.0.5 version_added: "2.9" author: - Miguel Angel Munoz (@mamunozgonzalez) diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_utm_profile.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_utm_profile.py index aef19b7b8d6..7b82c96010b 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_utm_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_utm_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent antivirus_profile: description: - AntiVirus profile name. Source antivirus.profile.name. @@ -266,7 +279,12 @@ def underscore_to_hyphen(data): def wireless_controller_utm_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['wireless_controller_utm_profile'] and data['wireless_controller_utm_profile']: + state = data['wireless_controller_utm_profile']['state'] + else: + state = True wireless_controller_utm_profile_data = data['wireless_controller_utm_profile'] filtered_data = underscore_to_hyphen(filter_wireless_controller_utm_profile_data(wireless_controller_utm_profile_data)) @@ -306,11 +324,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "wireless_controller_utm_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "antivirus_profile": {"required": False, "type": "str"}, "application_list": {"required": False, "type": "str"}, "comment": {"required": False, "type": "str"}, diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_vap.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_vap.py index 52a3972e858..54fd9a40a77 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_vap.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_vap.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent acct_interim_interval: description: - WiFi RADIUS accounting interim interval (60 - 86400 sec). @@ -1152,7 +1165,12 @@ def underscore_to_hyphen(data): def wireless_controller_vap(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['wireless_controller_vap'] and data['wireless_controller_vap']: + state = data['wireless_controller_vap']['state'] + else: + state = True wireless_controller_vap_data = data['wireless_controller_vap'] filtered_data = underscore_to_hyphen(filter_wireless_controller_vap_data(wireless_controller_vap_data)) @@ -1192,11 +1210,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "wireless_controller_vap": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "acct_interim_interval": {"required": False, "type": "int"}, "alias": {"required": False, "type": "str"}, "auth": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_wids_profile.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_wids_profile.py index f643128cdfa..4bf3951e3cf 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_wids_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_wids_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent ap_auto_suppress: description: - Enable/disable on-wire rogue AP auto-suppression . @@ -547,7 +560,12 @@ def underscore_to_hyphen(data): def wireless_controller_wids_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['wireless_controller_wids_profile'] and data['wireless_controller_wids_profile']: + state = data['wireless_controller_wids_profile']['state'] + else: + state = True wireless_controller_wids_profile_data = data['wireless_controller_wids_profile'] filtered_data = underscore_to_hyphen(filter_wireless_controller_wids_profile_data(wireless_controller_wids_profile_data)) @@ -587,11 +605,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "wireless_controller_wids_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "ap_auto_suppress": {"required": False, "type": "str", "choices": ["enable", "disable"]}, "ap_bgscan_disable_day": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp.py index e19fed38703..aad60890afb 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent admin: description: - Configure how the FortiGate operating as a wireless controller discovers and manages this WTP, AP or FortiAP. @@ -881,7 +894,12 @@ def underscore_to_hyphen(data): def wireless_controller_wtp(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['wireless_controller_wtp'] and data['wireless_controller_wtp']: + state = data['wireless_controller_wtp']['state'] + else: + state = True wireless_controller_wtp_data = data['wireless_controller_wtp'] filtered_data = underscore_to_hyphen(filter_wireless_controller_wtp_data(wireless_controller_wtp_data)) @@ -921,11 +939,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "wireless_controller_wtp": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "admin": {"required": False, "type": "str", "choices": ["discovered", "disable", "enable"]}, "allowaccess": {"required": False, "type": "str", diff --git a/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp_profile.py b/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp_profile.py index d5a9ac1e178..9b1d5286f4e 100644 --- a/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp_profile.py +++ b/lib/ansible/modules/network/fortios/fortios_wireless_controller_wtp_profile.py @@ -76,8 +76,10 @@ options: state: description: - Indicates whether to create or remove the object. + This attribute was present already in previous version in a deeper level. + It has been moved out to this outer level. type: str - required: true + required: false choices: - present - absent @@ -88,6 +90,17 @@ options: default: null type: dict suboptions: + state: + description: + - B(Deprecated) + - Starting with Ansible 2.9 we recommend using the top-level 'state' parameter. + - HORIZONTALLINE + - Indicates whether to create or remove the object. + type: str + required: false + choices: + - present + - absent allowaccess: description: - Control management access to the managed WTP, FortiAP, or AP. Separate entries with a space. @@ -1575,7 +1588,12 @@ def underscore_to_hyphen(data): def wireless_controller_wtp_profile(data, fos): vdom = data['vdom'] - state = data['state'] + if 'state' in data and data['state']: + state = data['state'] + elif 'state' in data['wireless_controller_wtp_profile'] and data['wireless_controller_wtp_profile']: + state = data['wireless_controller_wtp_profile']['state'] + else: + state = True wireless_controller_wtp_profile_data = data['wireless_controller_wtp_profile'] filtered_data = underscore_to_hyphen(filter_wireless_controller_wtp_profile_data(wireless_controller_wtp_profile_data)) @@ -1615,11 +1633,13 @@ def main(): "vdom": {"required": False, "type": "str", "default": "root"}, "https": {"required": False, "type": "bool", "default": True}, "ssl_verify": {"required": False, "type": "bool", "default": True}, - "state": {"required": True, "type": "str", + "state": {"required": False, "type": "str", "choices": ["present", "absent"]}, "wireless_controller_wtp_profile": { "required": False, "type": "dict", "default": None, "options": { + "state": {"required": False, "type": "str", + "choices": ["present", "absent"]}, "allowaccess": {"required": False, "type": "str", "choices": ["telnet", "http", "https", "ssh"]},