From 2960f5feacc14525c422603ed907326464b46dfe Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 17 Aug 2017 02:27:42 +0200 Subject: [PATCH] Rename ACI modules according to new conventions (#28306) As discussed in full at https://github.com/datacenter/aci-ansible we desired a better naming convention for ACI modules before they ship with Ansible v2.4 The result is summarized in this PR. The modules now also include the classes from the object model, as well as a link to the documentation. --- lib/ansible/modules/network/aci/aci_aep.py | 7 +++- .../network/aci/{aci_anp.py => aci_ap.py} | 39 ++++++++++--------- .../aci/{aci_bridge_domain.py => aci_bd.py} | 14 ++++--- .../aci/{aci_subnet.py => aci_bd_subnet.py} | 17 ++++---- ...bd_l3out_binding.py => aci_bd_to_l3out.py} | 11 ++++-- .../modules/network/aci/aci_contract.py | 13 +++++-- ...g.py => aci_contract_subject_to_filter.py} | 9 +++-- lib/ansible/modules/network/aci/aci_epg.py | 8 ++-- ...policy.py => aci_epg_monitoring_policy.py} | 11 ++++-- ...ract_binding.py => aci_epg_to_contract.py} | 11 ++++-- ...domain_binding.py => aci_epg_to_domain.py} | 10 +++-- lib/ansible/modules/network/aci/aci_filter.py | 7 +++- .../modules/network/aci/aci_filter_entry.py | 8 ++-- ...aci_fc_policy.py => aci_intf_policy_fc.py} | 12 +++--- ...aci_l2_policy.py => aci_intf_policy_l2.py} | 10 +++-- ...lldp_policy.py => aci_intf_policy_lldp.py} | 10 +++-- .../{aci_mcp.py => aci_intf_policy_mcp.py} | 8 ++-- ...nel.py => aci_intf_policy_port_channel.py} | 10 +++-- ...ty.py => aci_intf_policy_port_security.py} | 10 +++-- ...olicy.py => aci_l3out_route_tag_policy.py} | 13 ++++--- lib/ansible/modules/network/aci/aci_rest.py | 3 ++ .../modules/network/aci/aci_taboo_contract.py | 11 ++++-- lib/ansible/modules/network/aci/aci_tenant.py | 4 +- ...e.py => aci_tenant_action_rule_profile.py} | 13 ++++--- ..._group.py => aci_tenant_span_dst_group.py} | 17 ++++---- .../aci/{aci_context.py => aci_vrf.py} | 21 +++++----- 26 files changed, 188 insertions(+), 119 deletions(-) rename lib/ansible/modules/network/aci/{aci_anp.py => aci_ap.py} (82%) rename lib/ansible/modules/network/aci/{aci_bridge_domain.py => aci_bd.py} (96%) mode change 100755 => 100644 rename lib/ansible/modules/network/aci/{aci_subnet.py => aci_bd_subnet.py} (94%) rename lib/ansible/modules/network/aci/{aci_bd_l3out_binding.py => aci_bd_to_l3out.py} (89%) rename lib/ansible/modules/network/aci/{aci_subject_filter_binding.py => aci_contract_subject_to_filter.py} (92%) rename lib/ansible/modules/network/aci/{aci_monitoring_policy.py => aci_epg_monitoring_policy.py} (92%) rename lib/ansible/modules/network/aci/{aci_epg_contract_binding.py => aci_epg_to_contract.py} (91%) rename lib/ansible/modules/network/aci/{aci_epg_domain_binding.py => aci_epg_to_domain.py} (94%) rename lib/ansible/modules/network/aci/{aci_fc_policy.py => aci_intf_policy_fc.py} (91%) rename lib/ansible/modules/network/aci/{aci_l2_policy.py => aci_intf_policy_l2.py} (94%) rename lib/ansible/modules/network/aci/{aci_lldp_policy.py => aci_intf_policy_lldp.py} (93%) rename lib/ansible/modules/network/aci/{aci_mcp.py => aci_intf_policy_mcp.py} (94%) rename lib/ansible/modules/network/aci/{aci_port_channel.py => aci_intf_policy_port_channel.py} (94%) rename lib/ansible/modules/network/aci/{aci_port_security.py => aci_intf_policy_port_security.py} (91%) rename lib/ansible/modules/network/aci/{aci_route_tag_policy.py => aci_l3out_route_tag_policy.py} (90%) rename lib/ansible/modules/network/aci/{aci_action_rule_profile.py => aci_tenant_action_rule_profile.py} (89%) mode change 100755 => 100644 rename lib/ansible/modules/network/aci/{aci_span_dst_group.py => aci_tenant_span_dst_group.py} (85%) rename lib/ansible/modules/network/aci/{aci_context.py => aci_vrf.py} (90%) diff --git a/lib/ansible/modules/network/aci/aci_aep.py b/lib/ansible/modules/network/aci/aci_aep.py index c2fe7bfbaa5..dd724a7a113 100644 --- a/lib/ansible/modules/network/aci/aci_aep.py +++ b/lib/ansible/modules/network/aci/aci_aep.py @@ -13,9 +13,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: aci_aep -short_description: Manage Attachable Access Entity Profile on Cisco ACI fabrics +short_description: Manage attachable Access Entity Profile (AEP) on Cisco ACI fabrics (infra:AttEntityP) description: -- Connect to external virtual and physical domains by using Attachable Access Entity Profiles on Cisco ACI fabrics. +- Connect to external virtual and physical domains by using + attachable Access Entity Profiles (AEP) on Cisco ACI fabrics. +- More information from the internal APIC class + I(infra:AttEntityP) at U(https://developer.cisco.com/media/mim-ref/MO-infraAttEntityP.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) diff --git a/lib/ansible/modules/network/aci/aci_anp.py b/lib/ansible/modules/network/aci/aci_ap.py similarity index 82% rename from lib/ansible/modules/network/aci/aci_anp.py rename to lib/ansible/modules/network/aci/aci_ap.py index edf5f530fab..3cf5b002ea6 100644 --- a/lib/ansible/modules/network/aci/aci_anp.py +++ b/lib/ansible/modules/network/aci/aci_ap.py @@ -12,11 +12,16 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_anp -short_description: Manage top level application network profile objects on Cisco ACI fabrics +module: aci_ap +short_description: Manage top level Application Profile (AP) objects on Cisco ACI fabrics (fv:Ap) description: -- Manage top level application network profile objects on Cisco ACI fabrics -- This modules does not manage EPGs, see M(aci_epg) to do this. +- Manage top level Application Profile (AP) objects on Cisco ACI fabrics +- More information from the internal APIC class + I(fv:Ap) at U(https://developer.cisco.com/media/mim-ref/MO-fvAp.html). +notes: +- This module does not manage EPGs, see M(aci_epg) to do this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,8 +29,6 @@ author: version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ -notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. options: tenant: description: @@ -36,10 +39,10 @@ options: description: - The name of the application network profile. required: yes - aliases: [ app_profile_name, name ] + aliases: [ ap, app_profile_name, name ] descr: description: - - Description for the ANP. + - Description for the AP. state: description: - Use C(present) or C(absent) for adding or removing. @@ -50,8 +53,8 @@ extends_documentation_fragment: aci ''' EXAMPLES = r''' -- name: Add a new ANP - aci_anp: +- name: Add a new AP + aci_ap: hostname: apic username: admin password: SomeSecretPassword @@ -60,8 +63,8 @@ EXAMPLES = r''' description: default ap state: present -- name: Remove an ANP - aci_anp: +- name: Remove an AP + aci_ap: hostname: apic username: admin password: SomeSecretPassword @@ -69,8 +72,8 @@ EXAMPLES = r''' app_profile: default state: absent -- name: Query an ANP - aci_anp: +- name: Query an AP + aci_ap: hostname: apic username: admin password: SomeSecretPassword @@ -78,8 +81,8 @@ EXAMPLES = r''' app_profile: default state: query -- name: Query all ANPs - aci_anp: +- name: Query all APs + aci_ap: hostname: apic username: admin password: SomeSecretPassword @@ -97,8 +100,8 @@ from ansible.module_utils.basic import AnsibleModule def main(): argument_spec = aci_argument_spec argument_spec.update( - tenant=dict(type='str', aliases=['tenant_name']), # tenant not required for querying all anps - app_profile=dict(type='str', aliases=['app_profile_name', 'name']), + tenant=dict(type='str', aliases=['tenant_name']), # tenant not required for querying all APs + app_profile=dict(type='str', aliases=['ap', 'app_profile_name', 'name']), description=dict(type='str', aliases=['descr'], required=False), state=dict(type='str', default='present', choices=['absent', 'present', 'query']), method=dict(type='str', choices=['delete', 'get', 'post'], aliases=['action'], removed_in_version='2.6'), # Deprecated starting from v2.6 diff --git a/lib/ansible/modules/network/aci/aci_bridge_domain.py b/lib/ansible/modules/network/aci/aci_bd.py old mode 100755 new mode 100644 similarity index 96% rename from lib/ansible/modules/network/aci/aci_bridge_domain.py rename to lib/ansible/modules/network/aci/aci_bd.py index f5f8716c688..7ff172c8a64 --- a/lib/ansible/modules/network/aci/aci_bridge_domain.py +++ b/lib/ansible/modules/network/aci/aci_bd.py @@ -10,13 +10,14 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} - DOCUMENTATION = r''' --- -module: aci_bridge_domain -short_description: Manage Bridge Domains on Cisco ACI Fabrics +module: aci_bd +short_description: Manage Bridge Domains (BD) on Cisco ACI Fabrics (fv:BD) description: -- Manages Bridge Domains on Cisco ACI Fabrics. +- Manages Bridge Domains (BD) on Cisco ACI Fabrics. +- More information from the internal APIC class + I(fv:BD) at U(https://developer.cisco.com/media/mim-ref/MO-fvBD.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -25,7 +26,8 @@ requirements: - ACI Fabric 1.0(3f)+ version_added: '2.4' notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: arp_flooding: description: @@ -125,7 +127,7 @@ options: EXAMPLES = r''' - name: Add Bridge Domain - aci_bridge_domain: + aci_bd: action: "{{ action }}" tenant: "{{ tenant }}" bd: "{{ bd }}" diff --git a/lib/ansible/modules/network/aci/aci_subnet.py b/lib/ansible/modules/network/aci/aci_bd_subnet.py similarity index 94% rename from lib/ansible/modules/network/aci/aci_subnet.py rename to lib/ansible/modules/network/aci/aci_bd_subnet.py index 687b10f04fc..850e211a174 100644 --- a/lib/ansible/modules/network/aci/aci_subnet.py +++ b/lib/ansible/modules/network/aci/aci_bd_subnet.py @@ -11,10 +11,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community'} DOCUMENTATION = r''' -module: aci_subnet -short_description: Manage subnets on Cisco ACI fabrics +--- +module: aci_bd_subnet +short_description: Manage Subnets on Cisco ACI fabrics (fv:Subnet) description: -- Manage subnets on Cisco ACI fabrics. +- Manage Subnets on Cisco ACI fabrics. +- More information from the internal APIC class + I(fv:Subnet) at U(https://developer.cisco.com/media/mim-ref/MO-fvSubnet.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -23,10 +26,10 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The gateway parameter is the root key used to access the Subnet (not name), so the gateway - is required when the state is 'absent' or 'present'. -- The tenant and bridge domain used must exist before using this module in your playbook. - The M(aci_tenant) module and M(aci_bridge_domain) can be used for these. +- The C(gateway) parameter is the root key used to access the Subnet (not name), so the C(gateway) + is required when the state is C(absent) or C(present). +- The C(tenant) and C(bd) used must exist before using this module in your playbook. + The M(aci_tenant) module and M(aci_bd) can be used for these. options: bd: description: diff --git a/lib/ansible/modules/network/aci/aci_bd_l3out_binding.py b/lib/ansible/modules/network/aci/aci_bd_to_l3out.py similarity index 89% rename from lib/ansible/modules/network/aci/aci_bd_l3out_binding.py rename to lib/ansible/modules/network/aci/aci_bd_to_l3out.py index 77e0b0595a8..edfac3d05b2 100644 --- a/lib/ansible/modules/network/aci/aci_bd_l3out_binding.py +++ b/lib/ansible/modules/network/aci/aci_bd_to_l3out.py @@ -11,10 +11,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community'} DOCUMENTATION = r''' -module: aci_bd_l3out_binding -short_description: Manage Bridge Domain to L3 Out Bindings on Cisco ACI fabrics +--- +module: aci_bd_to_l3out +short_description: Bind Bridge Domain to L3 Out on Cisco ACI fabrics (fv:RsBDToOut) description: -- Manage Bridge Domain to L3 Out Bindings on Cisco ACI fabrics. +- Bind Bridge Domain to L3 Out on Cisco ACI fabrics. +- More information from the internal APIC class + I(fv:RsBDToOut) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsBDToOut.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,7 +27,7 @@ requirements: - ACI Fabric 1.0(3f)+ notes: - The C(bd) and C(l3out) parameters should exist before using this module. - The M(aci_bridge_domain) and M(aci_l3out) can be used for these. + The M(aci_bd) and M(aci_l3out) can be used for these. options: bd: description: diff --git a/lib/ansible/modules/network/aci/aci_contract.py b/lib/ansible/modules/network/aci/aci_contract.py index ab0d78e821d..419d1b9728d 100644 --- a/lib/ansible/modules/network/aci/aci_contract.py +++ b/lib/ansible/modules/network/aci/aci_contract.py @@ -11,11 +11,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community'} DOCUMENTATION = r''' +--- module: aci_contract -short_description: Manage contract resources on Cisco ACI fabrics +short_description: Manage contract resources on Cisco ACI fabrics (vz:BrCP) description: -- Manage contract resources on Cisco ACI fabrics. -- This does not include subjects although subjects can be removed using this module. +- Manage Contract resources on Cisco ACI fabrics. +- More information from the internal APIC class + I(vz:BrCP) at U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,7 +26,10 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- This module does not manage Contract Subjects, see M(aci_contract_subject) to do this. + Contract Subjects can still be removed using this module. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: contract: description: diff --git a/lib/ansible/modules/network/aci/aci_subject_filter_binding.py b/lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py similarity index 92% rename from lib/ansible/modules/network/aci/aci_subject_filter_binding.py rename to lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py index 8f44f64db4a..fd44625ffec 100644 --- a/lib/ansible/modules/network/aci/aci_subject_filter_binding.py +++ b/lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py @@ -11,10 +11,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community'} DOCUMENTATION = r''' -module: aci_subject_filter_binding -short_description: Manage filters belonging to contracts on Cisco ACI fabrics +--- +module: aci_contract_subject_to_filter +short_description: Bind Contract Subjects to Filters on Cisco ACI fabrics (vz:RsSubjFiltAtt) description: -- Manage Contract Subject to Filter Bindings on Cisco ACI fabrics. +- Bind Contract Subjects to Filters on Cisco ACI fabrics. +- More information from the internal APIC class + I(vz:RsSubjFiltAtt) at U(https://developer.cisco.com/media/mim-ref/MO-vzRsSubjFiltAtt.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) diff --git a/lib/ansible/modules/network/aci/aci_epg.py b/lib/ansible/modules/network/aci/aci_epg.py index 2cf0f8a17a2..905e774658d 100644 --- a/lib/ansible/modules/network/aci/aci_epg.py +++ b/lib/ansible/modules/network/aci/aci_epg.py @@ -13,9 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: aci_epg -short_description: Manage end point groups on Cisco ACI fabrics +short_description: Manage End Point Groups (EPG) on Cisco ACI fabrics (fv:AEPg) description: -- Manage end point groups on Cisco ACI fabrics. +- Manage End Point Groups (EPG) on Cisco ACI fabrics. +- More information from the internal APIC class + I(fv:AEPg) at U(https://developer.cisco.com/media/mim-ref/MO-fvAEPg.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -25,7 +27,7 @@ requirements: - ACI Fabric 1.0(3f)+ notes: - The C(tenant) and C(app_profile) used must exist before using this module in your playbook. - The M(aci_tenant) and M(aci_anp) modules can be used for this. + The M(aci_tenant) and M(aci_ap) modules can be used for this. options: tenant: description: diff --git a/lib/ansible/modules/network/aci/aci_monitoring_policy.py b/lib/ansible/modules/network/aci/aci_epg_monitoring_policy.py similarity index 92% rename from lib/ansible/modules/network/aci/aci_monitoring_policy.py rename to lib/ansible/modules/network/aci/aci_epg_monitoring_policy.py index ad31ece9eca..c3da811cced 100644 --- a/lib/ansible/modules/network/aci/aci_monitoring_policy.py +++ b/lib/ansible/modules/network/aci/aci_epg_monitoring_policy.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_monitoring_policy -short_description: Manage monitoring policies on Cisco ACI fabrics +module: aci_epg_monitoring_policy +short_description: Manage monitoring policies on Cisco ACI fabrics (mon:EPGPol) description: - Manage monitoring policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(mon:EPGPol) at U(https://developer.cisco.com/media/mim-ref/MO-monEPGPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,7 +26,8 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: monitoring_policy: description: @@ -51,7 +54,7 @@ extends_documentation_fragment: aci # FIXME: Add more, better examples EXAMPLES = r''' -- aci_monitoring_policy: +- aci_epg_monitoring_policy: hostname: '{{ hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_epg_contract_binding.py b/lib/ansible/modules/network/aci/aci_epg_to_contract.py similarity index 91% rename from lib/ansible/modules/network/aci/aci_epg_contract_binding.py rename to lib/ansible/modules/network/aci/aci_epg_to_contract.py index fe03fe4e5b2..64adad02c1e 100644 --- a/lib/ansible/modules/network/aci/aci_epg_contract_binding.py +++ b/lib/ansible/modules/network/aci/aci_epg_to_contract.py @@ -12,10 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_epg_contract_binding -short_description: Manage EPG to Contract bindings on Cisco ACI fabrics +module: aci_epg_to_contract +short_description: Bind EPGs to Contracts on Cisco ACI fabrics (fv:RsCons and fvRsProv) description: -- Manage EPG to Contract bindings on Cisco ACI fabrics. +- Bind EPGs to Contracts on Cisco ACI fabrics. +- More information from the internal APIC classes + I(fv:RsCons) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsCons.html) and + I(fv:RsProv) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsProv.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -25,7 +28,7 @@ requirements: - ACI Fabric 1.0(3f)+ notes: - The C(tenant), C(app_profile), C(EPG), and C(Contract) used must exist before using this module in your playbook. - The M(aci_tenant), M(aci_anp), M(aci_epg), and M(aci_contract) modules can be used for this. + The M(aci_tenant), M(aci_ap), M(aci_epg), and M(aci_contract) modules can be used for this. options: app_profile: description: diff --git a/lib/ansible/modules/network/aci/aci_epg_domain_binding.py b/lib/ansible/modules/network/aci/aci_epg_to_domain.py similarity index 94% rename from lib/ansible/modules/network/aci/aci_epg_domain_binding.py rename to lib/ansible/modules/network/aci/aci_epg_to_domain.py index 4d74c430c43..c1bab70180e 100644 --- a/lib/ansible/modules/network/aci/aci_epg_domain_binding.py +++ b/lib/ansible/modules/network/aci/aci_epg_to_domain.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_epg_domain_binding -short_description: Manage EPG to Domain bindings on Cisco ACI fabrics +module: aci_epg_to_domain +short_description: Bind EPGs to Domains on Cisco ACI fabrics (fv:RsDomAtt) description: -- Manage EPG to Physical and Virtual Domains on Cisco ACI fabrics. +- Bind EPGs to Physical and Virtual Domains on Cisco ACI fabrics. +- More information from the internal APIC class + I(fv:RsDomAtt) at U(https://developer.cisco.com/media/mim-ref/MO-fvRsDomAtt.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -25,7 +27,7 @@ requirements: - ACI Fabric 1.0(3f)+ notes: - The C(tenant), C(app_profile), C(epg), and C(domain) used must exist before using this module in your playbook. - The M(aci_tenant) M(aci_anp), M(aci_epg) M(aci_domain) modules can be used for this. + The M(aci_tenant) M(aci_ap), M(aci_epg) M(aci_domain) modules can be used for this. options: allow_useg: description: diff --git a/lib/ansible/modules/network/aci/aci_filter.py b/lib/ansible/modules/network/aci/aci_filter.py index 0460092deb5..ef8c3f1ff9c 100644 --- a/lib/ansible/modules/network/aci/aci_filter.py +++ b/lib/ansible/modules/network/aci/aci_filter.py @@ -13,9 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: aci_filter -short_description: Manages top level filter objects on Cisco ACI fabrics +short_description: Manages top level filter objects on Cisco ACI fabrics (vz:Filter) description: - Manages top level filter objects on Cisco ACI fabrics. +- More information from the internal APIC class + I(vz:Filter) at U(https://developer.cisco.com/media/mim-ref/MO-vzFilter.html). - This modules does not manage filter entries, see M(aci_filter_entry) for this functionality. author: - Swetha Chunduri (@schunduri) @@ -25,7 +27,8 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: filter: description: diff --git a/lib/ansible/modules/network/aci/aci_filter_entry.py b/lib/ansible/modules/network/aci/aci_filter_entry.py index b115f64dfc0..e1505871f77 100644 --- a/lib/ansible/modules/network/aci/aci_filter_entry.py +++ b/lib/ansible/modules/network/aci/aci_filter_entry.py @@ -13,9 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: aci_filter_entry -short_description: Manage filter entries on Cisco ACI fabrics +short_description: Manage filter entries on Cisco ACI fabrics (vz:Entry) description: - Manage filter entries for a filter on Cisco ACI fabrics. +- More information from the internal APIC class + I(vz:Entry) at U(https://developer.cisco.com/media/mim-ref/MO-vzEntry.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,8 +26,8 @@ version_added: '2.4' requirements: - Tested with ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. -- The filter used must exist before using this module in your playbook. The M(aci_filter) module can be used for this. +- The C(tenant) and C(filter) used must exist before using this module in your playbook. + The M(aci_tenant) and M(aci_filter) modules can be used for this. options: arp_flag: description: diff --git a/lib/ansible/modules/network/aci/aci_fc_policy.py b/lib/ansible/modules/network/aci/aci_intf_policy_fc.py similarity index 91% rename from lib/ansible/modules/network/aci/aci_fc_policy.py rename to lib/ansible/modules/network/aci/aci_intf_policy_fc.py index 6a69a6300f3..1c1aead13d5 100644 --- a/lib/ansible/modules/network/aci/aci_fc_policy.py +++ b/lib/ansible/modules/network/aci/aci_intf_policy_fc.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_fc_policy -short_description: Manage Fibre Channel interface policies on Cisco ACI fabrics +module: aci_intf_policy_fc +short_description: Manage Fibre Channel interface policies on Cisco ACI fabrics (fc:IfPol) description: - Manage ACI Fiber Channel interface policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(fc:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-fcIfPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -26,12 +28,12 @@ requirements: options: fc_policy: description: - - Name of the Fiber Channel interface policy. + - The name of the Fiber Channel interface policy. required: yes aliases: [ name ] description: description: - - Description of the Fiber Channel interface policy. + - The description of the Fiber Channel interface policy. aliases: [ descr ] port_mode: description: @@ -48,7 +50,7 @@ extends_documentation_fragment: aci ''' EXAMPLES = r''' -- aci_fc_policy: +- aci_intf_policy_fc: hostname: '{{ hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_l2_policy.py b/lib/ansible/modules/network/aci/aci_intf_policy_l2.py similarity index 94% rename from lib/ansible/modules/network/aci/aci_l2_policy.py rename to lib/ansible/modules/network/aci/aci_intf_policy_l2.py index 4d6f41e7c6f..7d147a4b3fc 100644 --- a/lib/ansible/modules/network/aci/aci_l2_policy.py +++ b/lib/ansible/modules/network/aci/aci_intf_policy_l2.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_l2_policy -short_description: Manage Layer 2 interface policies on Cisco ACI fabrics +module: aci_intf_policy_l2 +short_description: Manage Layer 2 interface policies on Cisco ACI fabrics (l2:IfPol) description: - Manage Layer 2 interface policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(l2:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-l2IfPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -31,7 +33,7 @@ options: aliases: [ name ] description: description: - - Description of the Layer 2 interface policy. + - The description of the Layer 2 interface policy. aliases: [ descr ] vlan_scope: description: @@ -48,7 +50,7 @@ extends_documentation_fragment: aci ''' EXAMPLES = r''' -- aci_l2_policy: +- aci_intf_policy_l2: hostname: '{{ hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_lldp_policy.py b/lib/ansible/modules/network/aci/aci_intf_policy_lldp.py similarity index 93% rename from lib/ansible/modules/network/aci/aci_lldp_policy.py rename to lib/ansible/modules/network/aci/aci_intf_policy_lldp.py index 0a8f70aba1f..e5da0c4b985 100644 --- a/lib/ansible/modules/network/aci/aci_lldp_policy.py +++ b/lib/ansible/modules/network/aci/aci_intf_policy_lldp.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_lldp_policy -short_description: Manage LLDP interface policies on Cisco ACI fabrics +module: aci_intf_policy_lldp +short_description: Manage LLDP interface policies on Cisco ACI fabrics (lldp:IfPol) description: - Manage LLDP interface policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(lldp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-lldpIfPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -31,7 +33,7 @@ options: aliases: [ name ] description: description: - - Description for the filter. + - The description for the LLDP interface policy name. aliases: [ descr ] receive_state: description: @@ -55,7 +57,7 @@ options: # FIXME: Add more, better examples EXAMPLES = r''' -- aci_lldp_policy: +- aci_intf_policy_lldp: hostname: '{{ hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_mcp.py b/lib/ansible/modules/network/aci/aci_intf_policy_mcp.py similarity index 94% rename from lib/ansible/modules/network/aci/aci_mcp.py rename to lib/ansible/modules/network/aci/aci_intf_policy_mcp.py index eeae22ec0ee..a04a1624871 100644 --- a/lib/ansible/modules/network/aci/aci_mcp.py +++ b/lib/ansible/modules/network/aci/aci_intf_policy_mcp.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_mcp -short_description: Manage MCP interface policies on Cisco ACI fabrics +module: aci_intf_policy_mcp +short_description: Manage MCP interface policies on Cisco ACI fabrics (mcp:IfPol) description: - Manage MCP interface policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(mcp:IfPol) at U(https://developer.cisco.com/media/mim-ref/MO-mcpIfPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -31,7 +33,7 @@ options: aliases: [ mcp_interface, name ] description: description: - - Description for the MCP interface. + - The description for the MCP interface. aliases: [ descr ] admin_state: description: diff --git a/lib/ansible/modules/network/aci/aci_port_channel.py b/lib/ansible/modules/network/aci/aci_intf_policy_port_channel.py similarity index 94% rename from lib/ansible/modules/network/aci/aci_port_channel.py rename to lib/ansible/modules/network/aci/aci_intf_policy_port_channel.py index 1b9f978efc1..773970370d0 100644 --- a/lib/ansible/modules/network/aci/aci_port_channel.py +++ b/lib/ansible/modules/network/aci/aci_intf_policy_port_channel.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_port_channel -short_description: Manage port channel interface policies on Cisco ACI fabrics +module: aci_intf_policy_port_channel +short_description: Manage port channel interface policies on Cisco ACI fabrics (lacp:LagPol) description: - Manage port channel interface policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(lacp:LagPol) at U(https://developer.cisco.com/media/mim-ref/MO-lacpLagPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -31,7 +33,7 @@ options: aliases: [ name ] description: description: - - Description for the port channel. + - The description for the port channel. aliases: [ descr ] max_links: description: @@ -57,7 +59,7 @@ extends_documentation_fragment: aci ''' EXAMPLES = r''' -- aci_port_channel: +- aci_intf_policy_port_channel: hostname: '{{ inventory_hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_port_security.py b/lib/ansible/modules/network/aci/aci_intf_policy_port_security.py similarity index 91% rename from lib/ansible/modules/network/aci/aci_port_security.py rename to lib/ansible/modules/network/aci/aci_intf_policy_port_security.py index a83e121989f..9abbbd580a5 100644 --- a/lib/ansible/modules/network/aci/aci_port_security.py +++ b/lib/ansible/modules/network/aci/aci_intf_policy_port_security.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_port_security -short_description: Manage port security on Cisco ACI fabrics +module: aci_intf_policy_port_security +short_description: Manage port security on Cisco ACI fabrics (l2:PortSecurityPol) description: - Manage port security on Cisco ACI fabrics. +- More information from the internal APIC class + I(l2:PortSecurityPol) at U(https://developer.cisco.com/media/mim-ref/MO-l2PortSecurityPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -31,7 +33,7 @@ options: aliases: [ name ] description: description: - - Description for the contract. + - The description for the contract. aliases: [ descr ] max_end_points: description: @@ -48,7 +50,7 @@ extends_documentation_fragment: aci # FIXME: Add more, better examples EXAMPLES = r''' -- aci_port_security: +- aci_intf_policy_port_security: hostname: '{{ inventory_hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_route_tag_policy.py b/lib/ansible/modules/network/aci/aci_l3out_route_tag_policy.py similarity index 90% rename from lib/ansible/modules/network/aci/aci_route_tag_policy.py rename to lib/ansible/modules/network/aci/aci_l3out_route_tag_policy.py index 522d6cf855a..97dbc448926 100644 --- a/lib/ansible/modules/network/aci/aci_route_tag_policy.py +++ b/lib/ansible/modules/network/aci/aci_l3out_route_tag_policy.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_route_tag_policy -short_description: Manage route tag policies on Cisco ACI fabrics +module: aci_l3out_route_tag_policy +short_description: Manage route tag policies on Cisco ACI fabrics (l3ext:RouteTagPol) description: - Manage route tag policies on Cisco ACI fabrics. +- More information from the internal APIC class + I(l3ext:RouteTagPol) at U(https://developer.cisco.com/media/mim-ref/MO-l3extRouteTagPol.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,7 +26,8 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: rtp: description: @@ -33,7 +36,7 @@ options: aliases: [ name, rtp_name ] description: description: - - Description for the route tag policy. + - The description for the route tag policy. aliases: [ descr ] tenant: description: @@ -55,7 +58,7 @@ extends_documentation_fragment: aci # FIXME: Add more, better examples EXAMPLES = r''' -- aci_route_tag_policy: +- aci_l3out_route_tag_policy: hostname: apic username: admin password: SomeSecretPassword diff --git a/lib/ansible/modules/network/aci/aci_rest.py b/lib/ansible/modules/network/aci/aci_rest.py index 176f4a28fab..1eb651233d7 100644 --- a/lib/ansible/modules/network/aci/aci_rest.py +++ b/lib/ansible/modules/network/aci/aci_rest.py @@ -11,6 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community'} DOCUMENTATION = r''' +--- module: aci_rest short_description: Direct access to the Cisco APIC REST API description: @@ -167,6 +168,7 @@ import os # Optional, only used for XML payload try: import lxml.etree + assert lxml.etree # silence pyflakes HAS_LXML_ETREE = True except ImportError: HAS_LXML_ETREE = False @@ -174,6 +176,7 @@ except ImportError: # Optional, only used for XML payload try: from xmljson import cobra + assert cobra # silence pyflakes HAS_XMLJSON_COBRA = True except ImportError: HAS_XMLJSON_COBRA = False diff --git a/lib/ansible/modules/network/aci/aci_taboo_contract.py b/lib/ansible/modules/network/aci/aci_taboo_contract.py index e75d7fd98a4..af45404c472 100644 --- a/lib/ansible/modules/network/aci/aci_taboo_contract.py +++ b/lib/ansible/modules/network/aci/aci_taboo_contract.py @@ -13,9 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: aci_taboo_contract -short_description: Manage taboo contracts on Cisco ACI fabrics +short_description: Manage taboo contracts on Cisco ACI fabrics (vz:BrCP) description: - Manage taboo contracts on Cisco ACI fabrics. +- More information from the internal APIC class + I(vz:BrCP) at U(https://developer.cisco.com/media/mim-ref/MO-vzBrCP.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,16 +26,17 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: taboo_contract: description: - - Taboo Contract name. + - The name of the Taboo Contract. required: yes aliases: [ name ] description: description: - - Description for the filter. + - The description for the Taboo Contract. aliases: [ descr ] tenant: description: diff --git a/lib/ansible/modules/network/aci/aci_tenant.py b/lib/ansible/modules/network/aci/aci_tenant.py index 7588431102a..ae367b13631 100644 --- a/lib/ansible/modules/network/aci/aci_tenant.py +++ b/lib/ansible/modules/network/aci/aci_tenant.py @@ -13,9 +13,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: aci_tenant -short_description: Manage tenants on Cisco ACI fabrics +short_description: Manage tenants on Cisco ACI fabrics (fv:Tenant) description: - Manage tenants on Cisco ACI fabrics. +- More information from the internal APIC class + I(fv:Tenant) at U(https://developer.cisco.com/media/mim-ref/MO-fvTenant.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) diff --git a/lib/ansible/modules/network/aci/aci_action_rule_profile.py b/lib/ansible/modules/network/aci/aci_tenant_action_rule_profile.py old mode 100755 new mode 100644 similarity index 89% rename from lib/ansible/modules/network/aci/aci_action_rule_profile.py rename to lib/ansible/modules/network/aci/aci_tenant_action_rule_profile.py index 084418f0af9..b0f6d139bdf --- a/lib/ansible/modules/network/aci/aci_action_rule_profile.py +++ b/lib/ansible/modules/network/aci/aci_tenant_action_rule_profile.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_action_rule_profile -short_description: Manage action rule profiles on Cisco ACI fabrics +module: aci_tenant_action_rule_profile +short_description: Manage action rule profiles on Cisco ACI fabrics (rtctrl:AttrP) description: - Manage action rule profiles on Cisco ACI fabrics. +- More information from the internal APIC class + I(rtctrl:AttrP) at U(https://developer.cisco.com/media/mim-ref/MO-rtctrlAttrP.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,7 +26,8 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: action_rule: description: @@ -32,7 +35,7 @@ options: aliases: [ action_rule_name, name ] description: description: - - Description for the action rule profile. + - The description for the action rule profile. aliases: [ descr ] tenant: description: @@ -49,7 +52,7 @@ extends_documentation_fragment: aci # FIXME: Add more, better examples EXAMPLES = r''' -- aci_action_rule_profile: +- aci_tenant_action_rule_profile: hostname: '{{ inventory_hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_span_dst_group.py b/lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py similarity index 85% rename from lib/ansible/modules/network/aci/aci_span_dst_group.py rename to lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py index 8c5df9b6981..d7d67c0c506 100644 --- a/lib/ansible/modules/network/aci/aci_span_dst_group.py +++ b/lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py @@ -12,10 +12,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_span_dst_group -short_description: Manage span destination groups on Cisco ACI fabrics +module: aci_tenant_span_dst_group +short_description: Manage SPAN destination groups on Cisco ACI fabrics (span:DestGrp) description: -- Manage span destination groups on Cisco ACI fabrics. +- Manage SPAN destination groups on Cisco ACI fabrics. +- More information from the internal APIC class + I(span:DestGrp) at U(https://developer.cisco.com/media/mim-ref/MO-spanDestGrp.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -24,16 +26,17 @@ version_added: '2.4' requirements: - ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: dst_group: description: - - The name of the span destination group. + - The name of the SPAN destination group. required: yes aliases: [ name ] description: description: - - Description of the span destination group. + - The description of the SPAN destination group. aliases: [ descr ] tenant: description: @@ -51,7 +54,7 @@ extends_documentation_fragment: aci # FIXME: Add more, better examples EXAMPLES = r''' -- aci_span_dst_group: +- aci_tenant_span_dst_group: hostname: '{{ inventory_hostname }}' username: '{{ username }}' password: '{{ password }}' diff --git a/lib/ansible/modules/network/aci/aci_context.py b/lib/ansible/modules/network/aci/aci_vrf.py similarity index 90% rename from lib/ansible/modules/network/aci/aci_context.py rename to lib/ansible/modules/network/aci/aci_vrf.py index d18611b3011..4287b33145e 100644 --- a/lib/ansible/modules/network/aci/aci_context.py +++ b/lib/ansible/modules/network/aci/aci_vrf.py @@ -12,11 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- -module: aci_context -short_description: Manage private networks (aka. contexts) on Cisco ACI fabrics +module: aci_vrf +short_description: Manage VRF (private networks aka. contexts) on Cisco ACI fabrics (fv:Ctx) description: -- Manage private networks (aka. contexts) on Cisco ACI fabrics. +- Manage VRF (private networks aka. contexts) on Cisco ACI fabrics. - Each context is a private network associated to a tenant, i.e. VRF. +- More information from the internal APIC class + I(fv:Ctx) at U(https://developer.cisco.com/media/mim-ref/MO-fvCtx.html). author: - Swetha Chunduri (@schunduri) - Dag Wieers (@dagwieers) @@ -25,7 +27,8 @@ version_added: '2.4' requirements: - Tested with ACI Fabric 1.0(3f)+ notes: -- The tenant used must exist before using this module in your playbook. The M(aci_tenant) module can be used for this. +- The C(tenant) used must exist before using this module in your playbook. + The M(aci_tenant) module can be used for this. options: tenant: description: @@ -45,7 +48,7 @@ options: choices: [ enforced, unenforced ] description: description: - - Description for the VRF. + - The description for the VRF. state: description: - Use C(present) or C(absent) for adding or removing. @@ -57,7 +60,7 @@ extends_documentation_fragment: aci EXAMPLES = r''' - name: Add a new VRF to a tenant - aci_context: + aci_vrf: hostname: apic username: admin password: SomeSecretPassword @@ -69,7 +72,7 @@ EXAMPLES = r''' state: present - name: Remove a VRF for a tenant - aci_context: + aci_vrf: hostname: apic username: admin password: SomeSecretPassword @@ -78,7 +81,7 @@ EXAMPLES = r''' state: absent - name: Query a VRF of a tenant - aci_context: + aci_vrf: hostname: apic username: admin password: SomeSecretPassword @@ -87,7 +90,7 @@ EXAMPLES = r''' state: query - name: Query all VRFs - aci_context: + aci_vrf: hostname: apic username: admin password: SomeSecretPassword