mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Compare arg+aliases between docs and argument_spec (#34809)
* compare arg+aliases between docs and argument_spec * Add some special handling for the network modules provider options that also appear in the top level arg spec * Fix error code for bigip_hostname * Address merge conflicts due to changes in f5 modules * Update validate-modules ignore based off a clean execution * Address merge conflicts * Address renamed module * Address recent changes to modules * Add ignore for ucs_ip_pool * Update aci modules to get more reliable documentation comparison, but not mutating the module_utils aci_argument_spec * Update ignore.txt after recent aci updates * Add extra guard to ensure we handle provider special only for network modules * Address additional changes to modules
This commit is contained in:
parent
8d733dbdf0
commit
a352d43824
52 changed files with 843 additions and 72 deletions
|
@ -61,18 +61,19 @@ except ImportError:
|
|||
HAS_XMLJSON_COBRA = False
|
||||
|
||||
|
||||
aci_argument_spec = dict(
|
||||
hostname=dict(type='str', required=True, aliases=['host']),
|
||||
username=dict(type='str', default='admin', aliases=['user']),
|
||||
password=dict(type='str', no_log=True),
|
||||
private_key=dict(type='path', aliases=['cert_key']), # Beware, this is not the same as client_key !
|
||||
certificate_name=dict(type='str', aliases=['cert_name']), # Beware, this is not the same as client_cert !
|
||||
protocol=dict(type='str', removed_in_version='2.6'), # Deprecated in v2.6
|
||||
timeout=dict(type='int', default=30),
|
||||
use_proxy=dict(type='bool', default=True),
|
||||
use_ssl=dict(type='bool', default=True),
|
||||
validate_certs=dict(type='bool', default=True),
|
||||
)
|
||||
def aci_argument_spec():
|
||||
return dict(
|
||||
hostname=dict(type='str', required=True, aliases=['host']),
|
||||
username=dict(type='str', default='admin', aliases=['user']),
|
||||
password=dict(type='str', no_log=True),
|
||||
private_key=dict(type='path', aliases=['cert_key']), # Beware, this is not the same as client_key !
|
||||
certificate_name=dict(type='str', aliases=['cert_name']), # Beware, this is not the same as client_cert !
|
||||
protocol=dict(type='str', removed_in_version='2.6'), # Deprecated in v2.6
|
||||
timeout=dict(type='int', default=30),
|
||||
use_proxy=dict(type='bool', default=True),
|
||||
use_ssl=dict(type='bool', default=True),
|
||||
validate_certs=dict(type='bool', default=True),
|
||||
)
|
||||
|
||||
'''
|
||||
URL_MAPPING = dict(
|
||||
|
|
|
@ -107,7 +107,7 @@ ACI_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
certificate=dict(type='str', aliases=['cert_data', 'certificate_data']),
|
||||
certificate_name=dict(type='str', aliases=['cert_name']),
|
||||
|
|
|
@ -124,7 +124,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update({
|
||||
'leaf_interface_profile': dict(type='str', aliases=['leaf_interface_profile_name']),
|
||||
'access_port_selector': dict(type='str', aliases=['name', 'access_port_selector_name']),
|
||||
|
|
|
@ -95,7 +95,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
aep=dict(type='str', aliases=['name', 'aep_name']), # not required for querying all AEPs
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -68,7 +68,7 @@ VM_PROVIDER_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
aep=dict(type='str', aliases=['aep_name']),
|
||||
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
|
||||
|
|
|
@ -95,7 +95,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
tenant=dict(type='str', aliases=['tenant_name']), # tenant not required for querying all APs
|
||||
ap=dict(type='str', aliases=['app_profile', 'app_profile_name', 'name']),
|
||||
|
|
|
@ -213,7 +213,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
arp_flooding=dict(choices=['no', 'yes']),
|
||||
bd=dict(type='str', aliases=['bd_name', 'name']),
|
||||
|
|
|
@ -211,7 +211,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
bd=dict(type='str', aliases=['bd_name']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -57,7 +57,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
bd=dict(type='str', aliases=['bd_name', 'bridge_domain']),
|
||||
l3out=dict(type='str'),
|
||||
|
|
|
@ -145,7 +145,7 @@ except ImportError:
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
compare_export_policy=dict(type='str'),
|
||||
compare_snapshot=dict(type='str'),
|
||||
|
|
|
@ -109,7 +109,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
export_policy=dict(type='str', aliases=['name']),
|
||||
|
|
|
@ -89,7 +89,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
contract=dict(type='str', required=False, aliases=['contract_name', 'name']), # Not required for querying all objects
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for querying all objects
|
||||
|
|
|
@ -137,7 +137,7 @@ MATCH_MAPPING = dict(all='All', at_least_one='AtleastOne', at_most_one='AtmostOn
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
contract=dict(type='str', aliases=['contract_name']),
|
||||
subject=dict(type='str', aliases=['contract_subject', 'name', 'subject_name']),
|
||||
|
|
|
@ -82,7 +82,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
contract=dict(type='str', aliases=['contract_name']),
|
||||
filter=dict(type='str', aliases=['filter_name']),
|
||||
|
|
|
@ -144,7 +144,7 @@ VSWITCH_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
dscp=dict(type='str',
|
||||
choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42', 'AF43',
|
||||
|
|
|
@ -90,7 +90,7 @@ POOL_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
|
||||
domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm']),
|
||||
|
|
|
@ -137,7 +137,7 @@ VM_PROVIDER_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
|
||||
domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm']),
|
||||
|
|
|
@ -114,7 +114,7 @@ ACI_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
allocation_mode=dict(type='str', aliases=['mode'], choices=['dynamic', 'static']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -147,7 +147,7 @@ ACI_POOL_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
allocation_mode=dict(type='str', aliases=['mode'], choices=['dynamic', 'inherit', 'static']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -159,7 +159,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
epg=dict(type='str', aliases=['name', 'epg_name']),
|
||||
bd=dict(type='str', aliases=['bd_name', 'bridge_domain']),
|
||||
|
|
|
@ -70,7 +70,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
monitoring_policy=dict(type='str', required=False, aliases=['name']), # Not required for querying all objects
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for querying all objects
|
||||
|
|
|
@ -79,7 +79,7 @@ PROVIDER_MATCH_MAPPING = {"all": "All", "at_least_one": "AtleastOne", "at_most_o
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
ap=dict(type='str', aliases=['app_profile', 'app_profile_name']),
|
||||
epg=dict(type='str', aliases=['epg_name']),
|
||||
|
|
|
@ -113,7 +113,7 @@ VM_PROVIDER_MAPPING = dict(
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
allow_useg=dict(type='str', choices=['encap', 'useg']),
|
||||
ap=dict(type='str', aliases=['app_profile', 'app_profile_name']),
|
||||
|
|
|
@ -96,7 +96,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
filter=dict(type='str', required=False, aliases=['name', 'filter_name']), # Not required for querying all objects
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for querying all objects
|
||||
|
|
|
@ -138,7 +138,7 @@ ICMP6_MAPPING = dict(dst_unreachable='dst-unreach', echo_request='echo-req', ech
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
arp_flag=dict(type='str', choices=VALID_ARP_FLAGS),
|
||||
description=dict(type='str'),
|
||||
|
|
|
@ -69,7 +69,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
source=dict(type='str', aliases=['name', 'source_name']), # Not required for querying all objects
|
||||
polling_interval=dict(type='int'),
|
||||
|
|
|
@ -84,7 +84,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
leaf_interface_profile=dict(type='str', aliases=['name', 'leaf_interface_profile_name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -80,7 +80,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
leaf_profile=dict(type='str', aliases=['leaf_profile_name']),
|
||||
interface_selector=dict(type='str', aliases=['name', 'interface_selector_name', 'interface_profile_name']),
|
||||
|
|
|
@ -65,7 +65,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
fc_policy=dict(type='str', required=False, aliases=['name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -77,7 +77,7 @@ QINQ_MAPPING = dict(core='corePort', disabled='disabled', edge='edgePort')
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
l2_policy=dict(type='str', required=False, aliases=['name']), # Not required for querying all policies
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -73,7 +73,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
lldp_policy=dict(type='str', require=False, aliases=['name']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -65,7 +65,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
mcp=dict(type='str', required=False, aliases=['mcp_interface', 'name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -120,7 +120,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
port_channel=dict(type='str', required=False, aliases=['name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -64,7 +64,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
port_security=dict(type='str', required=False, aliases=['name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -73,7 +73,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
rtp=dict(type='str', required=False, aliases=['name', 'rtp_name']), # Not required for querying all objects
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for quering all objects
|
||||
|
|
|
@ -295,7 +295,7 @@ def aci_response(result, rawoutput, rest_type='xml'):
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
path=dict(type='str', required=True, aliases=['uri']),
|
||||
method=dict(type='str', default='get', choices=['delete', 'get', 'post'], aliases=['action']),
|
||||
|
|
|
@ -117,7 +117,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update({
|
||||
'description': dict(type='str'),
|
||||
'leaf_profile': dict(type='str', aliases=['leaf_profile_name']),
|
||||
|
|
|
@ -76,7 +76,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
leaf_profile=dict(type='str', aliases=['name', 'leaf_profile_name']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -74,7 +74,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
taboo_contract=dict(type='str', required=False, aliases=['name']), # Not required for querying all contracts
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for querying all contracts
|
||||
|
|
|
@ -83,7 +83,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
tenant=dict(type='str', required=False, aliases=['name', 'tenant_name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -66,7 +66,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
action_rule=dict(type='str', required=False, aliases=['action_rule_name', 'name']), # Not required for querying all objects
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for querying all objects
|
||||
|
|
|
@ -128,7 +128,7 @@ BOUNCE_TRIG_MAPPING = dict(coop='protocol', rarp='rarp-flood')
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
tenant=dict(type='str', aliases=['tenant_name']), # not required for querying all EPRs
|
||||
epr_policy=dict(type='str', aliases=['epr_name', 'name']),
|
||||
|
|
|
@ -68,7 +68,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
dst_group=dict(type='str', required=False, aliases=['name']), # Not required for querying all objects
|
||||
tenant=dict(type='str', required=False, aliases=['tenant_name']), # Not required for querying all objects
|
||||
|
|
|
@ -75,7 +75,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
admin_state=dict(type='str', choices=['enabled', 'disabled']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -68,7 +68,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
dst_group=dict(type='str'),
|
||||
|
|
|
@ -90,7 +90,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
allocation_mode=dict(type='str', aliases=['mode'], choices=['dynamic', 'static']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -122,7 +122,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
allocation_mode=dict(type='str', aliases=['mode'], choices=['dynamic', 'inherit', 'static']),
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
|
|
|
@ -101,7 +101,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
|
||||
def main():
|
||||
argument_spec = aci_argument_spec
|
||||
argument_spec = aci_argument_spec()
|
||||
argument_spec.update(
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
method=dict(type='str', choices=['delete', 'get', 'post'], aliases=['action'], removed_in_version='2.6'), # Deprecated starting from v2.6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue