From ac4b031cc091c0ee1564730eebf6763d8cb27a15 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 16 Jan 2018 23:03:29 +0100 Subject: [PATCH] ACI: Fix parameters and aliases in documentation (#34959) --- .../network/aci/aci_aaa_user_certificate.py | 2 +- lib/ansible/modules/network/aci/aci_aep.py | 1 + lib/ansible/modules/network/aci/aci_ap.py | 3 ++- lib/ansible/modules/network/aci/aci_bd.py | 2 +- lib/ansible/modules/network/aci/aci_bd_subnet.py | 8 ++++++++ .../modules/network/aci/aci_contract_subject.py | 1 + .../network/aci/aci_contract_subject_to_filter.py | 1 + .../network/aci/aci_domain_to_encap_pool.py | 12 ++++++------ .../modules/network/aci/aci_domain_to_vlan_pool.py | 14 +++++++------- .../modules/network/aci/aci_encap_pool_range.py | 8 +++++++- lib/ansible/modules/network/aci/aci_epg.py | 2 +- .../modules/network/aci/aci_epg_to_domain.py | 2 +- .../network/aci/aci_vlan_pool_encap_block.py | 7 ++++++- lib/ansible/modules/network/aci/aci_vrf.py | 1 + 14 files changed, 44 insertions(+), 20 deletions(-) diff --git a/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py b/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py index ff07943092..7565be9d85 100644 --- a/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py +++ b/lib/ansible/modules/network/aci/aci_aaa_user_certificate.py @@ -109,7 +109,7 @@ ACI_MAPPING = dict( def main(): argument_spec = aci_argument_spec argument_spec.update( - certificate=dict(type='str', aliases=['certificate_data', 'data']), + certificate=dict(type='str', aliases=['cert_data', 'certificate_data']), certificate_name=dict(type='str', aliases=['cert_name']), state=dict(type='str', default='present', choices=['absent', 'present', 'query']), user=dict(type='str', required=True), diff --git a/lib/ansible/modules/network/aci/aci_aep.py b/lib/ansible/modules/network/aci/aci_aep.py index 9f11ff6fc9..26350219a2 100644 --- a/lib/ansible/modules/network/aci/aci_aep.py +++ b/lib/ansible/modules/network/aci/aci_aep.py @@ -33,6 +33,7 @@ options: description: description: - Description for the AEP. + aliases: [ descr ] infra_vlan: description: - Enable infrastructure VLAN. diff --git a/lib/ansible/modules/network/aci/aci_ap.py b/lib/ansible/modules/network/aci/aci_ap.py index dd9db2dd3a..e4160f7754 100644 --- a/lib/ansible/modules/network/aci/aci_ap.py +++ b/lib/ansible/modules/network/aci/aci_ap.py @@ -36,9 +36,10 @@ options: - The name of the application network profile. required: yes aliases: [ app_profile, app_profile_name, name ] - descr: + description: description: - Description for the AP. + aliases: [ descr ] state: description: - Use C(present) or C(absent) for adding or removing. diff --git a/lib/ansible/modules/network/aci/aci_bd.py b/lib/ansible/modules/network/aci/aci_bd.py index 3c1e95d15b..ce811bc785 100644 --- a/lib/ansible/modules/network/aci/aci_bd.py +++ b/lib/ansible/modules/network/aci/aci_bd.py @@ -113,8 +113,8 @@ options: mac_address: description: - The MAC Address to assign to the C(bd) instead of using the default. - choices: [ mac ] default: 00:22:BD:F8:19:FF + aliases: [ mac ] version_added: '2.5' multi_dest: description: diff --git a/lib/ansible/modules/network/aci/aci_bd_subnet.py b/lib/ansible/modules/network/aci/aci_bd_subnet.py index ecd552516e..98754031e9 100644 --- a/lib/ansible/modules/network/aci/aci_bd_subnet.py +++ b/lib/ansible/modules/network/aci/aci_bd_subnet.py @@ -30,9 +30,11 @@ options: bd: description: - The name of the Bridge Domain. + aliases: [ bd_name ] description: description: - The description for the Subnet. + aliases: [ descr ] enable_vip: description: - Determines if the Subnet should be treated as a VIP; used when the BD is extended to multiple sites. @@ -98,6 +100,12 @@ options: description: - The name of the Tenant. aliases: [ tenant_name ] + state: + description: + - Use C(present) or C(absent) for adding or removing. + - Use C(query) for listing an object or multiple objects. + choices: [ absent, present, query ] + default: present extends_documentation_fragment: aci ''' diff --git a/lib/ansible/modules/network/aci/aci_contract_subject.py b/lib/ansible/modules/network/aci/aci_contract_subject.py index 9ff89a77ea..72047e12a0 100755 --- a/lib/ansible/modules/network/aci/aci_contract_subject.py +++ b/lib/ansible/modules/network/aci/aci_contract_subject.py @@ -61,6 +61,7 @@ options: description: description: - Description for the contract subject. + aliases: [ descr ] consumer_match: description: - The match criteria across consumers. diff --git a/lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py b/lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py index 74b68d8b08..2e04935d4b 100644 --- a/lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py +++ b/lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py @@ -34,6 +34,7 @@ options: filter: description: - The name of the Filter to bind to the Subject. + aliases: [ filter_name ] log: description: - Determines if the binding should be set to log. diff --git a/lib/ansible/modules/network/aci/aci_domain_to_encap_pool.py b/lib/ansible/modules/network/aci/aci_domain_to_encap_pool.py index 76b8a2fa9c..818eab3fcd 100644 --- a/lib/ansible/modules/network/aci/aci_domain_to_encap_pool.py +++ b/lib/ansible/modules/network/aci/aci_domain_to_encap_pool.py @@ -26,6 +26,12 @@ notes: - The C(domain) and C(encap_pool) parameters should exist before using this module. The M(aci_domain) and M(aci_encap_pool) can be used for these. options: + allocation_mode: + description: + - The method used for allocating encaps to resources. + - Only vlan and vsan support allocation modes. + choices: [ dynamic, static] + aliases: [ mode ] domain: description: - Name of the domain being associated with the Encap Pool. @@ -38,12 +44,6 @@ options: description: - The name of the pool. aliases: [ pool_name ] - pool_allocation_mode: - description: - - The method used for allocating encaps to resources. - - Only vlan and vsan support allocation modes. - aliases: [ mode ] - choices: [ dynamic, static] pool_type: description: - The encap type of C(pool). diff --git a/lib/ansible/modules/network/aci/aci_domain_to_vlan_pool.py b/lib/ansible/modules/network/aci/aci_domain_to_vlan_pool.py index 696f533655..4c183a3093 100755 --- a/lib/ansible/modules/network/aci/aci_domain_to_vlan_pool.py +++ b/lib/ansible/modules/network/aci/aci_domain_to_vlan_pool.py @@ -26,6 +26,12 @@ notes: - The C(domain) and C(vlan_pool) parameters should exist before using this module. The M(aci_domain) and M(aci_vlan_pool) can be used for these. options: + allocation_mode: + description: + - The method used for allocating VLANs to resources. + choices: [ dynamic, static] + required: yes + aliases: [ mode ] domain: description: - Name of the domain being associated with the VLAN Pool. @@ -38,12 +44,6 @@ options: description: - The name of the pool. aliases: [ pool_name, vlan_pool ] - pool_allocation_mode: - description: - - The method used for allocating VLANs to resources. - aliases: [ mode ] - choices: [ dynamic, static] - required: yes state: description: - Use C(present) or C(absent) for adding or removing. @@ -141,7 +141,7 @@ def main(): argument_spec.update( domain=dict(type='str', aliases=['domain_name', 'domain_profile']), domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm']), - pool=dict(type='str', aliases=['pool_name']), + pool=dict(type='str', aliases=['pool_name', 'vlan_pool']), pool_allocation_mode=dict(type='str', required=True, aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']), state=dict(type='str', default='present', choices=['absent', 'present', 'query']), vm_provider=dict(type='str', choices=['microsoft', 'openstack', 'redhat', 'vmware']), diff --git a/lib/ansible/modules/network/aci/aci_encap_pool_range.py b/lib/ansible/modules/network/aci/aci_encap_pool_range.py index 7a8314d872..5d764d4224 100644 --- a/lib/ansible/modules/network/aci/aci_encap_pool_range.py +++ b/lib/ansible/modules/network/aci/aci_encap_pool_range.py @@ -28,8 +28,8 @@ options: description: - The method used for allocating encaps to resources. - Only vlan and vsan support allocation modes. - aliases: [ mode ] choices: [ dynamic, inherit, static] + aliases: [ mode ] description: description: - Description for the pool range. @@ -38,6 +38,12 @@ options: description: - The name of the pool that the range should be assigned to. aliases: [ pool_name ] + pool_allocation_mode: + description: + - The method used for allocating encaps to resources. + - Only vlan and vsan support allocation modes. + choices: [ dynamic, static] + aliases: [ pool_mode ] pool_type: description: - The encap type of C(pool). diff --git a/lib/ansible/modules/network/aci/aci_epg.py b/lib/ansible/modules/network/aci/aci_epg.py index 5831b887f5..214c99c6b8 100644 --- a/lib/ansible/modules/network/aci/aci_epg.py +++ b/lib/ansible/modules/network/aci/aci_epg.py @@ -33,7 +33,7 @@ options: description: - Name of an existing application network profile, that will contain the EPGs. required: yes - aliases: [ app_proifle, app_profile_name ] + aliases: [ app_profile, app_profile_name ] epg: description: - Name of the end point group. diff --git a/lib/ansible/modules/network/aci/aci_epg_to_domain.py b/lib/ansible/modules/network/aci/aci_epg_to_domain.py index 2e2d53a4b1..ddc5f998c2 100644 --- a/lib/ansible/modules/network/aci/aci_epg_to_domain.py +++ b/lib/ansible/modules/network/aci/aci_epg_to_domain.py @@ -64,7 +64,7 @@ options: epg: description: - Name of the end point group. - aliases: [ epg_name ] + aliases: [ epg_name, name ] netflow: description: - Determines if netflow should be enabled. diff --git a/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py b/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py index e64bf3ae22..6b9a2788d3 100644 --- a/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py +++ b/lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py @@ -40,6 +40,11 @@ options: description: - The name of the pool that the encap block should be assigned to. aliases: [ pool_name ] + pool_allocation_mode: + description: + - The method used for allocating encaps to resources. + choices: [ dynamic, static] + aliases: [ pool_mode ] block_end: description: - The end of encap block. @@ -47,7 +52,7 @@ options: block_name: description: - The name to give to the encap block. - aliases: [ name, range ] + aliases: [ name ] block_start: description: - The start of the encap block. diff --git a/lib/ansible/modules/network/aci/aci_vrf.py b/lib/ansible/modules/network/aci/aci_vrf.py index 765ea7f710..d194ca26f8 100644 --- a/lib/ansible/modules/network/aci/aci_vrf.py +++ b/lib/ansible/modules/network/aci/aci_vrf.py @@ -45,6 +45,7 @@ options: description: description: - The description for the VRF. + aliases: [ descr ] state: description: - Use C(present) or C(absent) for adding or removing.