├── tests
├── unit
│ ├── __init__.py
│ ├── mock
│ │ ├── __init__.py
│ │ ├── path.py
│ │ ├── vault_helper.py
│ │ ├── procenv.py
│ │ └── loader.py
│ ├── compat
│ │ ├── __init__.py
│ │ ├── builtins.py
│ │ └── unittest.py
│ ├── modules
│ │ ├── __init__.py
│ │ └── utils.py
│ ├── module_utils
│ │ ├── __init__.py
│ │ └── conftest.py
│ └── requirements.txt
├── .gitignore
├── integration
│ ├── target-prefixes.network
│ ├── targets
│ │ ├── aci_vrf_leak_internal_subnet
│ │ │ └── aliases
│ │ ├── aci_interface_policy_cdp
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_rest
│ │ │ ├── tasks
│ │ │ │ ├── xml_files
│ │ │ │ │ ├── fail_parse.xml
│ │ │ │ │ ├── fail_parse.json
│ │ │ │ │ ├── tag.xml
│ │ │ │ │ ├── tn-ans_test_delete.xml
│ │ │ │ │ ├── tn-ans_test_create.xml
│ │ │ │ │ ├── tn-ans_test_update.xml
│ │ │ │ │ ├── tn-ans_test_negative_update_check.xml
│ │ │ │ │ ├── tn-ans_test_annotation.xml
│ │ │ │ │ └── tn-ans_test_annotation_children.xml
│ │ │ │ ├── pki
│ │ │ │ │ ├── admin.crt
│ │ │ │ │ └── admin.key
│ │ │ │ └── main.yml
│ │ │ └── aliases
│ │ ├── aci_interface_policy_spanning_tree
│ │ │ └── aliases
│ │ ├── aci_aep
│ │ │ └── aliases
│ │ ├── aci_ap
│ │ │ └── aliases
│ │ ├── aci_bd
│ │ │ └── aliases
│ │ ├── aci_epg
│ │ │ └── aliases
│ │ ├── aci_esg
│ │ │ └── aliases
│ │ ├── aci_tag
│ │ │ └── aliases
│ │ ├── aci_vrf
│ │ │ └── aliases
│ │ ├── aci_aaa_role
│ │ │ └── aliases
│ │ ├── aci_aaa_user
│ │ │ └── aliases
│ │ ├── aci_bd_subnet
│ │ │ └── aliases
│ │ ├── aci_cloud_ap
│ │ │ └── aliases
│ │ ├── aci_cloud_epg
│ │ │ └── aliases
│ │ ├── aci_contract
│ │ │ └── aliases
│ │ ├── aci_domain
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_filter
│ │ │ └── aliases
│ │ ├── aci_l2out
│ │ │ └── aliases
│ │ ├── aci_l3out
│ │ │ └── aliases
│ │ ├── aci_snmp_user
│ │ │ └── aliases
│ │ ├── aci_system
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_tenant
│ │ │ ├── aliases
│ │ │ ├── pki
│ │ │ │ ├── admin_invalid.key
│ │ │ │ ├── admin.crt
│ │ │ │ ├── rsa_user.crt
│ │ │ │ ├── rsa_ansible.key
│ │ │ │ ├── admin.key
│ │ │ │ ├── rsa_user.key
│ │ │ │ └── openssh_rsa.key
│ │ │ └── filter_plugins
│ │ │ │ └── generate_ips.py
│ │ ├── aci_vlan_pool
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_aaa_domain
│ │ │ └── aliases
│ │ ├── aci_aaa_key_ring
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ ├── admin.crt
│ │ │ │ └── admin.key
│ │ ├── aci_aaa_ssh_auth
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ └── sshkey.pub
│ │ ├── aci_aaa_user_role
│ │ │ └── aliases
│ │ ├── aci_aep_to_domain
│ │ │ └── aliases
│ │ ├── aci_aep_to_epg
│ │ │ └── aliases
│ │ ├── aci_bd_dhcp_label
│ │ │ └── aliases
│ │ ├── aci_bd_to_l3out
│ │ │ └── aliases
│ │ ├── aci_bgp_rr_asn
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_bgp_rr_node
│ │ │ └── aliases
│ │ ├── aci_cloud_bgp_asn
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_cloud_cidr
│ │ │ └── aliases
│ │ ├── aci_cloud_provider
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_cloud_region
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_cloud_subnet
│ │ │ └── aliases
│ │ ├── aci_cloud_zone
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_dhcp_option
│ │ │ └── aliases
│ │ ├── aci_dhcp_relay
│ │ │ └── aliases
│ │ ├── aci_dns_domain
│ │ │ └── aliases
│ │ ├── aci_dns_profile
│ │ │ └── aliases
│ │ ├── aci_dns_provider
│ │ │ └── aliases
│ │ ├── aci_encap_pool
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ ├── vsan.yml
│ │ │ │ └── main.yml
│ │ ├── aci_epg_subnet
│ │ │ └── aliases
│ │ ├── aci_epg_to_domain
│ │ │ └── aliases
│ │ ├── aci_fabric_node
│ │ │ └── aliases
│ │ ├── aci_fabric_pod
│ │ │ └── aliases
│ │ ├── aci_filter_entry
│ │ │ └── aliases
│ │ ├── aci_filter_listify
│ │ │ └── aliases
│ │ ├── aci_firmware_group
│ │ │ └── aliases
│ │ ├── aci_key_policy
│ │ │ └── aliases
│ │ ├── aci_l2out_extepg
│ │ │ └── aliases
│ │ ├── aci_l3out_bgp_peer
│ │ │ └── aliases
│ │ ├── aci_l3out_extepg
│ │ │ └── aliases
│ │ ├── aci_l4l7_device
│ │ │ └── aliases
│ │ ├── aci_match_rule
│ │ │ └── aliases
│ │ ├── aci_node_block
│ │ │ └── aliases
│ │ ├── aci_node_mgmt_epg
│ │ │ └── aliases
│ │ ├── aci_ntp_policy
│ │ │ └── aliases
│ │ ├── aci_ntp_server
│ │ │ └── aliases
│ │ ├── aci_oob_contract
│ │ │ └── aliases
│ │ ├── aci_qos_dscp_class
│ │ │ └── aliases
│ │ ├── aci_snmp_client
│ │ │ └── aliases
│ │ ├── aci_snmp_policy
│ │ │ └── aliases
│ │ ├── aci_subject_label
│ │ │ └── aliases
│ │ ├── aci_syslog_group
│ │ │ └── aliases
│ │ ├── aci_syslog_source
│ │ │ └── aliases
│ │ ├── aci_system_banner
│ │ │ └── aliases
│ │ ├── aci_taboo_contract
│ │ │ └── aliases
│ │ ├── aci_vmm_controller
│ │ │ └── aliases
│ │ ├── aci_vmm_credential
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_vmm_uplink
│ │ │ └── aliases
│ │ ├── aci_vrf_multicast
│ │ │ └── aliases
│ │ ├── aci_aaa_user_domain
│ │ │ └── aliases
│ │ ├── aci_bgp_timers_policy
│ │ │ └── aliases
│ │ ├── aci_cloud_ctx_profile
│ │ │ └── aliases
│ │ ├── aci_cloud_epg_selector
│ │ │ └── aliases
│ │ ├── aci_cloud_external_epg
│ │ │ └── aliases
│ │ ├── aci_cloud_vpn_gateway
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_config_rollback
│ │ │ └── aliases
│ │ ├── aci_config_snapshot
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ ├── admin.crt
│ │ │ │ └── admin.key
│ │ ├── aci_contract_export
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_contract_subject
│ │ │ └── aliases
│ │ ├── aci_dhcp_option_policy
│ │ │ └── aliases
│ │ ├── aci_dhcp_relay_provider
│ │ │ └── aliases
│ │ ├── aci_domain_to_vlan_pool
│ │ │ └── aliases
│ │ ├── aci_encap_pool_range
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_endpoint_tag_ip
│ │ │ └── aliases
│ │ ├── aci_endpoint_tag_mac
│ │ │ └── aliases
│ │ ├── aci_epg_to_contract
│ │ │ └── aliases
│ │ ├── aci_esg_contract_master
│ │ │ └── aliases
│ │ ├── aci_esg_epg_selector
│ │ │ └── aliases
│ │ ├── aci_esg_tag_selector
│ │ │ └── aliases
│ │ ├── aci_esg_to_contract
│ │ │ └── aliases
│ │ ├── aci_fabric_leaf_profile
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_fabric_node_control
│ │ │ └── aliases
│ │ ├── aci_fabric_pod_profile
│ │ │ └── aliases
│ │ ├── aci_fabric_pod_selector
│ │ │ └── aliases
│ │ ├── aci_fabric_scheduler
│ │ │ └── aliases
│ │ ├── aci_fabric_switch_block
│ │ │ └── aliases
│ │ ├── aci_file_remote_path
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ └── rsa_ansible.key
│ │ ├── aci_firmware_group_node
│ │ │ └── aliases
│ │ ├── aci_firmware_policy
│ │ │ └── aliases
│ │ ├── aci_firmware_source
│ │ │ └── aliases
│ │ ├── aci_interface_blacklist
│ │ │ └── aliases
│ │ ├── aci_interface_config
│ │ │ └── aliases
│ │ ├── aci_interface_policy_fc
│ │ │ └── aliases
│ │ ├── aci_interface_policy_l2
│ │ │ └── aliases
│ │ ├── aci_keychain_policy
│ │ │ └── aliases
│ │ ├── aci_l3out_extsubnet
│ │ │ └── aliases
│ │ ├── aci_l3out_floating_svi
│ │ │ └── aliases
│ │ ├── aci_l3out_hsrp_group
│ │ │ └── aliases
│ │ ├── aci_l3out_interface
│ │ │ └── aliases
│ │ ├── aci_l3out_logical_node
│ │ │ └── aliases
│ │ ├── aci_l3out_static_routes
│ │ │ └── aliases
│ │ ├── aci_maintenance_group
│ │ │ └── aliases
│ │ ├── aci_maintenance_policy
│ │ │ └── aliases
│ │ ├── aci_pim_route_map_entry
│ │ │ └── aliases
│ │ ├── aci_qos_custom_policy
│ │ │ └── aliases
│ │ ├── aci_qos_dot1p_class
│ │ │ └── aliases
│ │ ├── aci_snmp_client_group
│ │ │ └── aliases
│ │ ├── aci_syslog_remote_dest
│ │ │ └── aliases
│ │ ├── aci_vmm_vswitch_policy
│ │ │ └── aliases
│ │ ├── aci_vzany_to_contract
│ │ │ └── aliases
│ │ ├── aci_aaa_custom_privilege
│ │ │ └── aliases
│ │ ├── aci_aaa_user_certificate
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ ├── admin_invalid.key
│ │ │ │ ├── admin.crt
│ │ │ │ ├── rsa_user.crt
│ │ │ │ ├── rsa_ansible.key
│ │ │ │ ├── admin.key
│ │ │ │ ├── rsa_user.key
│ │ │ │ └── openssh_rsa.key
│ │ ├── aci_access_span_dst_group
│ │ │ └── aliases
│ │ ├── aci_access_span_filter_group
│ │ │ └── aliases
│ │ ├── aci_access_span_src_group
│ │ │ └── aliases
│ │ ├── aci_action_rule_set_as_path
│ │ │ └── aliases
│ │ ├── aci_bd_rogue_exception_mac
│ │ │ └── aliases
│ │ ├── aci_bfd_multihop_node_policy
│ │ │ └── aliases
│ │ ├── aci_bgp_best_path_policy
│ │ │ └── aliases
│ │ ├── aci_bgp_peer_prefix_policy
│ │ │ └── aliases
│ │ ├── aci_config_export_policy
│ │ │ └── aliases
│ │ ├── aci_domain_to_encap_pool
│ │ │ └── aliases
│ │ ├── aci_epg_monitoring_policy
│ │ │ └── aliases
│ │ ├── aci_epg_to_contract_master
│ │ │ └── aliases
│ │ ├── aci_esg_ip_subnet_selector
│ │ │ └── aliases
│ │ ├── aci_fabric_leaf_switch_assoc
│ │ │ └── aliases
│ │ ├── aci_fabric_management_access
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ ├── admin.crt
│ │ │ │ └── admin.key
│ │ ├── aci_fabric_node_decommission
│ │ │ └── aliases
│ │ ├── aci_fabric_pod_external_tep
│ │ │ └── aliases
│ │ ├── aci_fabric_pod_policy_group
│ │ │ └── aliases
│ │ ├── aci_fabric_pod_remote_pool
│ │ │ └── aliases
│ │ ├── aci_fabric_span_dst_group
│ │ │ └── aliases
│ │ ├── aci_fabric_span_src_group
│ │ │ └── aliases
│ │ ├── aci_fabric_spine_profile
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_fabric_wide_settings
│ │ │ └── aliases
│ │ ├── aci_igmp_interface_policy
│ │ │ └── aliases
│ │ ├── aci_interface_description
│ │ │ └── aliases
│ │ ├── aci_interface_policy_bfd
│ │ │ └── aliases
│ │ ├── aci_interface_policy_eigrp
│ │ │ └── aliases
│ │ ├── aci_interface_policy_hsrp
│ │ │ └── aliases
│ │ ├── aci_interface_policy_lldp
│ │ │ └── aliases
│ │ ├── aci_interface_policy_mcp
│ │ │ └── aliases
│ │ ├── aci_interface_policy_ospf
│ │ │ └── aliases
│ │ ├── aci_interface_policy_pim
│ │ │ └── aliases
│ │ ├── aci_ip_sla_monitoring_policy
│ │ │ └── aliases
│ │ ├── aci_l2out_extepg_to_contract
│ │ │ └── aliases
│ │ ├── aci_l3out_dhcp_relay_label
│ │ │ └── aliases
│ │ ├── aci_l3out_extepg_to_contract
│ │ │ └── aliases
│ │ ├── aci_l3out_floating_svi_path
│ │ │ └── aliases
│ │ ├── aci_l3out_hsrp_secondary_vip
│ │ │ └── aliases
│ │ ├── aci_l3out_route_tag_policy
│ │ │ └── aliases
│ │ ├── aci_l4l7_concrete_device
│ │ │ └── aliases
│ │ ├── aci_l4l7_concrete_interface
│ │ │ └── aliases
│ │ ├── aci_l4l7_logical_interface
│ │ │ └── aliases
│ │ ├── aci_lookup_interface_range
│ │ │ └── aliases
│ │ ├── aci_maintenance_group_node
│ │ │ └── aliases
│ │ ├── aci_match_as_path_regex_term
│ │ │ └── aliases
│ │ ├── aci_match_community_factor
│ │ │ └── aliases
│ │ ├── aci_match_community_term
│ │ │ └── aliases
│ │ ├── aci_match_route_destination
│ │ │ └── aliases
│ │ ├── aci_netflow_exporter_policy
│ │ │ └── aliases
│ │ ├── aci_netflow_monitor_policy
│ │ │ └── aliases
│ │ ├── aci_netflow_record_policy
│ │ │ └── aliases
│ │ ├── aci_pim_route_map_policy
│ │ │ └── aliases
│ │ ├── aci_route_control_context
│ │ │ └── aliases
│ │ ├── aci_route_control_profile
│ │ │ └── aliases
│ │ ├── aci_snmp_community_policy
│ │ │ └── aliases
│ │ ├── aci_static_binding_to_epg
│ │ │ └── aliases
│ │ ├── aci_static_node_mgmt_address
│ │ │ └── aliases
│ │ ├── aci_switch_access_config
│ │ │ └── aliases
│ │ ├── aci_switch_fabric_config
│ │ │ └── aliases
│ │ ├── aci_switch_leaf_selector
│ │ │ └── aliases
│ │ ├── aci_system_endpoint_controls
│ │ │ └── aliases
│ │ ├── aci_tenant_span_dst_group
│ │ │ └── aliases
│ │ ├── aci_tenant_span_src_group
│ │ │ └── aliases
│ │ ├── aci_vlan_pool_encap_block
│ │ │ └── aliases
│ │ ├── aci_vmm_enhanced_lag_policy
│ │ │ └── aliases
│ │ ├── aci_vmm_uplink_container
│ │ │ └── aliases
│ │ ├── aci_vrf_fallback_route_group
│ │ │ └── aliases
│ │ ├── aci_aaa_certificate_authority
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ └── admin.crt
│ │ ├── aci_aaa_security_default_settings
│ │ │ └── aliases
│ │ ├── aci_access_span_src_group_src
│ │ │ └── aliases
│ │ ├── aci_access_spine_switch_profile
│ │ │ └── aliases
│ │ ├── aci_access_spine_switch_selector
│ │ │ └── aliases
│ │ ├── aci_access_switch_policy_group
│ │ │ └── aliases
│ │ ├── aci_action_rule_set_as_path_asn
│ │ │ └── aliases
│ │ ├── aci_bd_to_netflow_monitor_policy
│ │ │ └── aliases
│ │ ├── aci_bulk_static_binding_to_epg
│ │ │ └── aliases
│ │ ├── aci_cloud_external_epg_selector
│ │ │ └── aliases
│ │ ├── aci_contract_subject_to_filter
│ │ │ └── aliases
│ │ ├── aci_epg_to_contract_interface
│ │ │ └── aliases
│ │ ├── aci_fabric_interface_policy_group
│ │ │ └── aliases
│ │ ├── aci_fabric_span_src_group_src
│ │ │ └── aliases
│ │ ├── aci_fabric_spine_switch_assoc
│ │ │ └── aliases
│ │ ├── aci_fabric_switch_policy_group
│ │ │ └── aliases
│ │ ├── aci_interface_policy_bfd_multihop
│ │ │ └── aliases
│ │ ├── aci_interface_policy_leaf_profile
│ │ │ └── aliases
│ │ ├── aci_interface_policy_link_level
│ │ │ └── aliases
│ │ ├── aci_interface_policy_port_channel
│ │ │ └── aliases
│ │ ├── aci_l2out_logical_interface_path
│ │ │ └── aliases
│ │ ├── aci_l2out_logical_node_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_bfd_interface_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_bgp_protocol_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_eigrp_interface_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_hsrp_interface_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_interface_secondary_ip
│ │ │ └── aliases
│ │ ├── aci_l3out_logical_node_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_static_routes_nexthop
│ │ │ └── aliases
│ │ ├── aci_l3out_to_sr_mpls_infra_l3out
│ │ │ └── aliases
│ │ ├── aci_l4l7_policy_based_redirect
│ │ │ └── aliases
│ │ ├── aci_l4l7_redirect_health_group
│ │ │ └── aliases
│ │ ├── aci_match_community_regex_term
│ │ │ └── aliases
│ │ ├── aci_netflow_monitor_to_exporter
│ │ │ └── aliases
│ │ ├── aci_node_mgmt_epg_to_contract
│ │ │ └── aliases
│ │ ├── aci_switch_policy_leaf_profile
│ │ │ └── aliases
│ │ ├── aci_tenant_action_rule_profile
│ │ │ └── aliases
│ │ ├── aci_tenant_ep_retention_policy
│ │ │ └── aliases
│ │ ├── aci_tenant_span_src_group_src
│ │ │ └── aliases
│ │ ├── aci_access_port_block_to_access_port
│ │ │ └── aliases
│ │ ├── aci_access_span_filter_group_entry
│ │ │ └── aliases
│ │ ├── aci_access_span_src_group_src_path
│ │ │ └── aliases
│ │ ├── aci_access_spine_interface_profile
│ │ │ └── aliases
│ │ ├── aci_access_spine_interface_selector
│ │ │ └── aliases
│ │ ├── aci_action_rule_additional_communities
│ │ │ └── aliases
│ │ ├── aci_bgp_address_family_context_policy
│ │ │ └── aliases
│ │ ├── aci_bgp_route_summarization_policy
│ │ │ └── aliases
│ │ ├── aci_contract_subject_to_service_graph
│ │ │ └── aliases
│ │ ├── aci_epg_useg_attribute_block_statement
│ │ │ └── aliases
│ │ ├── aci_fabric_external_connection_profile
│ │ │ └── aliases
│ │ ├── aci_fabric_external_routing_profile
│ │ │ └── aliases
│ │ ├── aci_fabric_pod_connectivity_profile
│ │ │ └── aliases
│ │ ├── aci_fabric_span_src_group_src_node
│ │ │ └── aliases
│ │ ├── aci_fabric_span_src_group_src_path
│ │ │ └── aliases
│ │ ├── aci_interface_policy_leaf_policy_group
│ │ │ └── aliases
│ │ ├── aci_interface_policy_port_security
│ │ │ └── aliases
│ │ ├── aci_interface_policy_storm_control
│ │ │ └── aliases
│ │ ├── aci_l2out_logical_interface_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_floating_svi_secondary_ip
│ │ │ └── aliases
│ │ ├── aci_l3out_logical_interface_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_logical_interface_vpc_member
│ │ │ └── aliases
│ │ ├── aci_l4l7_concrete_interface_attachment
│ │ │ └── aliases
│ │ ├── aci_switch_policy_vpc_protection_group
│ │ │ └── aliases
│ │ ├── aci_system_connectivity_preference
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_tenant_span_src_group_to_dst_group
│ │ │ └── aliases
│ │ ├── aci_access_sub_port_block_to_access_port
│ │ │ └── aliases
│ │ ├── aci_epg_useg_attribute_simple_statement
│ │ │ └── aliases
│ │ ├── aci_fabric_management_access_https_cipher
│ │ │ ├── aliases
│ │ │ └── pki
│ │ │ │ ├── admin.crt
│ │ │ │ └── admin.key
│ │ ├── aci_interface_policy_leaf_fc_policy_group
│ │ │ └── aliases
│ │ ├── aci_interface_policy_port_channel_member
│ │ │ └── aliases
│ │ ├── aci_interface_policy_spine_policy_group
│ │ │ └── aliases
│ │ ├── aci_l3out_bfd_multihop_interface_profile
│ │ │ └── aliases
│ │ ├── aci_l3out_floating_svi_path_secondary_ip
│ │ │ └── aliases
│ │ ├── aci_l4l7_policy_based_redirect_destination
│ │ │ └── aliases
│ │ ├── aci_management_network_instance_profile
│ │ │ └── aliases
│ │ ├── aci_system_global_aes_passphrase_encryption
│ │ │ ├── aliases
│ │ │ └── tasks
│ │ │ │ └── main.yml
│ │ ├── aci_access_port_to_interface_policy_leaf_profile
│ │ │ └── aliases
│ │ ├── aci_interface_policy_leaf_breakout_port_group
│ │ │ └── aliases
│ │ ├── aci_l3out_logical_interface_profile_ospf_policy
│ │ │ └── aliases
│ │ ├── aci_interface_policy_leaf_profile_fex_policy_group
│ │ │ └── aliases
│ │ ├── aci_interface_selector_to_switch_policy_leaf_profile
│ │ │ └── aliases
│ │ ├── aci_management_network_instance_profile_to_contract
│ │ │ └── aliases
│ │ ├── aci_access_spine_interface_profile_to_spine_switch_profile
│ │ │ └── aliases
│ │ └── aci_inventory_system
│ │ │ ├── playbooks
│ │ │ ├── invalid.yml
│ │ │ ├── role_leaf.yml
│ │ │ ├── create_inventories.yml
│ │ │ ├── no_role_defined.yml
│ │ │ └── role_controller.yml
│ │ │ ├── templates
│ │ │ ├── cisco_aci.j2
│ │ │ ├── cisco_aci_invalid_input.j2
│ │ │ ├── cisco_aci_invalid_inventory_name.j2
│ │ │ └── cisco_aci_keyed_groups.j2
│ │ │ └── runme.sh
│ ├── network-integration.requirements.txt
│ └── inventory.networking
└── sanity
│ └── requirements.txt
├── plugins
├── lookup
│ ├── __init__.py
│ └── interface_range.py
├── modules
│ └── __init__.py
├── doc_fragments
│ ├── __init__.py
│ ├── annotation.py
│ └── owner.py
└── module_utils
│ └── __init__.py
├── changelogs
├── .gitignore
└── config.yaml
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── Feature_Request.md
│ └── Bug_Report.md
├── CODEOWNERS
└── workflows
│ ├── galaxy-importer.cfg
│ ├── jira-issue-sync-pr-review.yml
│ ├── changelog-generation.yml
│ ├── jira-issue-sync.yml
│ └── codeql-analysis.yml
├── requirements.txt
├── galaxy.yml
└── docs
├── aci_collection_git_contribution_workflow.md
├── optimizing.md
└── aci_collection_structure.md
/tests/unit/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/plugins/lookup/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/plugins/modules/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/.gitignore:
--------------------------------------------------------------------------------
1 | output/
2 |
--------------------------------------------------------------------------------
/tests/unit/mock/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/plugins/doc_fragments/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/plugins/module_utils/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/unit/compat/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/unit/modules/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/unit/module_utils/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/changelogs/.gitignore:
--------------------------------------------------------------------------------
1 | /.plugin-cache.yaml
2 |
--------------------------------------------------------------------------------
/tests/integration/target-prefixes.network:
--------------------------------------------------------------------------------
1 | aci
2 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vrf_leak_internal_subnet/aliases:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_cdp/aliases:
--------------------------------------------------------------------------------
1 | # unsupported
2 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/fail_parse.xml:
--------------------------------------------------------------------------------
1 | wrong_payload
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/fail_parse.json:
--------------------------------------------------------------------------------
1 | {wrong_payload
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tag.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | lxml
2 | cryptography
3 | pyOpenSSL
4 | python_dateutil
5 | xmljson
6 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_spanning_tree/aliases:
--------------------------------------------------------------------------------
1 | # unsupported
2 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aep/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_ap/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bd/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_esg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tag/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vrf/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_role/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bd_subnet/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_ap/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_domain/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_filter/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l2out/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_snmp_user/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vlan_pool/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_domain/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_key_ring/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_ssh_auth/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_role/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aep_to_domain/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aep_to_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bd_dhcp_label/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bd_to_l3out/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_rr_asn/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_rr_node/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_bgp_asn/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_cidr/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_provider/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_region/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_subnet/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_zone/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dhcp_option/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dhcp_relay/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dns_domain/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dns_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dns_provider/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_encap_pool/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_subnet/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_to_domain/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_node/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_filter_entry/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_filter_listify/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_firmware_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_key_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l2out_extepg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_bgp_peer/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_extepg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_device/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_match_rule/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_node_block/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_node_mgmt_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_ntp_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_ntp_server/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_oob_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_qos_dscp_class/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_snmp_client/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_snmp_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_subject_label/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_syslog_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_syslog_source/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system_banner/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_taboo_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_controller/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_credential/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_uplink/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vrf_multicast/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_domain/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_timers_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_ctx_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_epg_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_external_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_vpn_gateway/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_config_rollback/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_config_snapshot/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_contract_export/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_contract_subject/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dhcp_option_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_dhcp_relay_provider/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_domain_to_vlan_pool/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_encap_pool_range/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_endpoint_tag_ip/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_endpoint_tag_mac/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_esg_contract_master/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_esg_epg_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_esg_tag_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_esg_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_leaf_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_node_control/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_scheduler/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_switch_block/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_file_remote_path/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_firmware_group_node/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_firmware_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_firmware_source/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_blacklist/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_config/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_fc/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_l2/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_keychain_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_extsubnet/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_floating_svi/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_hsrp_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_interface/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_logical_node/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_static_routes/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_maintenance_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_maintenance_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_pim_route_map_entry/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_qos_custom_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_qos_dot1p_class/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_snmp_client_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_syslog_remote_dest/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_vswitch_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vzany_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_custom_privilege/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_span_dst_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_span_filter_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_span_src_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_action_rule_set_as_path/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bd_rogue_exception_mac/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bfd_multihop_node_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_best_path_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_peer_prefix_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_config_export_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_domain_to_encap_pool/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_monitoring_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_to_contract_master/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_esg_ip_subnet_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_leaf_switch_assoc/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_management_access/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_node_decommission/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod_external_tep/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod_remote_pool/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_span_dst_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_span_src_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_spine_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_wide_settings/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_igmp_interface_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_description/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_bfd/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_eigrp/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_hsrp/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_lldp/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_mcp/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_ospf/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_pim/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_ip_sla_monitoring_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l2out_extepg_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_dhcp_relay_label/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_extepg_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_floating_svi_path/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_hsrp_secondary_vip/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_route_tag_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_concrete_device/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_concrete_interface/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_logical_interface/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_lookup_interface_range/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_maintenance_group_node/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_match_as_path_regex_term/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_match_community_factor/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_match_community_term/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_match_route_destination/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_netflow_exporter_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_netflow_monitor_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_netflow_record_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_pim_route_map_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_route_control_context/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_route_control_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_snmp_community_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_static_binding_to_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_static_node_mgmt_address/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_switch_access_config/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_switch_fabric_config/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_switch_leaf_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system_endpoint_controls/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant_span_dst_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant_span_src_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vlan_pool_encap_block/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_enhanced_lag_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_uplink_container/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vrf_fallback_route_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_certificate_authority/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_security_default_settings/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_span_src_group_src/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_spine_switch_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_spine_switch_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_switch_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_action_rule_set_as_path_asn/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bd_to_netflow_monitor_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bulk_static_binding_to_epg/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_external_epg_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_contract_subject_to_filter/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_to_contract_interface/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_interface_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_span_src_group_src/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_spine_switch_assoc/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_switch_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_bfd_multihop/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_leaf_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_link_level/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_port_channel/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l2out_logical_interface_path/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l2out_logical_node_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_bfd_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_bgp_protocol_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_eigrp_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_hsrp_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_interface_secondary_ip/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_logical_node_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_static_routes_nexthop/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_to_sr_mpls_infra_l3out/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_policy_based_redirect/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_redirect_health_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_match_community_regex_term/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_netflow_monitor_to_exporter/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_node_mgmt_epg_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_switch_policy_leaf_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant_action_rule_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant_ep_retention_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant_span_src_group_src/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_port_block_to_access_port/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_span_filter_group_entry/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_span_src_group_src_path/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_spine_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_spine_interface_selector/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_action_rule_additional_communities/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_address_family_context_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_route_summarization_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_contract_subject_to_service_graph/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_useg_attribute_block_statement/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_external_connection_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_external_routing_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_pod_connectivity_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_span_src_group_src_node/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_span_src_group_src_path/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_leaf_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_port_security/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_storm_control/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l2out_logical_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_floating_svi_secondary_ip/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_logical_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_logical_interface_vpc_member/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_concrete_interface_attachment/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tn-ans_test_delete.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_switch_policy_vpc_protection_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system_connectivity_preference/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant_span_src_group_to_dst_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_sub_port_block_to_access_port/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_epg_useg_attribute_simple_statement/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_management_access_https_cipher/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_leaf_fc_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_port_channel_member/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_spine_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_bfd_multihop_interface_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_floating_svi_path_secondary_ip/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l4l7_policy_based_redirect_destination/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_management_network_instance_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system_global_aes_passphrase_encryption/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_l3out_logical_interface_profile_ospf_policy/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_leaf_profile_fex_policy_group/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_management_network_instance_profile_to_contract/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_access_spine_interface_profile_to_spine_switch_profile/aliases:
--------------------------------------------------------------------------------
1 | # No ACI simulator yet, so not enabled
2 | # unsupported
3 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/admin_invalid.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | This is an invalid private key
3 | -----END PRIVATE KEY-----
4 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/admin_invalid.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | This is an invalid private key
3 | -----END PRIVATE KEY-----
4 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tn-ans_test_create.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tn-ans_test_update.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tn-ans_test_negative_update_check.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_ssh_auth/pki/sshkey.pub:
--------------------------------------------------------------------------------
1 | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHL9VwXtwdyTC8lC0FAT4Ss8g0TnYJQf+zJiFlzUBiioqyblvr3w6xwgm5B5oghWag/IwK8c43rxvrW9Yn45xhU= ansible@example
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tn-ans_test_annotation.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # These owners will be the default owners for everything in the repo
2 | # and will be requested for review when someone opens a pull request.
3 |
4 | * @akinross @anvitha-jain @gmicol @lhercot @sajagana @samiib @shrsr
5 |
--------------------------------------------------------------------------------
/tests/integration/network-integration.requirements.txt:
--------------------------------------------------------------------------------
1 | lxml
2 | cryptography
3 | pyOpenSSL
4 | netaddr
5 | ipaddress
6 |
7 | # requirement for aci_rest module
8 | xmljson
9 | lxml
10 |
11 | # requirement for aci_aaa_user module
12 | python-dateutil
--------------------------------------------------------------------------------
/.github/workflows/galaxy-importer.cfg:
--------------------------------------------------------------------------------
1 | [galaxy-importer]
2 | LOG_LEVEL_MAIN = INFO
3 | RUN_FLAKE8 = False
4 | RUN_ANSIBLE_DOC = True
5 | RUN_ANSIBLE_LINT = True
6 | RUN_ANSIBLE_TEST = False
7 | ANSIBLE_TEST_LOCAL_IMAGE = False
8 | LOCAL_IMAGE_DOCKER = False
9 | INFRA_OSD = False
--------------------------------------------------------------------------------
/.github/workflows/jira-issue-sync-pr-review.yml:
--------------------------------------------------------------------------------
1 | name: jira-issue-sync-pr-review
2 |
3 | on:
4 | pull_request_review:
5 |
6 | jobs:
7 | review:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - run: echo "A PR review was added or modified, triggering jira-issue-sync."
11 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/xml_files/tn-ans_test_annotation_children.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tests/unit/mock/path.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, print_function
2 |
3 | __metaclass__ = type
4 |
5 | from ansible_collections.cisco.aci.tests.unit.compat.mock import MagicMock
6 | from ansible.utils.path import unfrackpath
7 |
8 |
9 | mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x)
10 |
--------------------------------------------------------------------------------
/tests/sanity/requirements.txt:
--------------------------------------------------------------------------------
1 | packaging # needed for update-bundled and changelog
2 | sphinx ; python_version >= '3.5' # docs build requires python 3+
3 | sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
4 | straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
5 |
--------------------------------------------------------------------------------
/tests/unit/requirements.txt:
--------------------------------------------------------------------------------
1 | requests
2 | setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
3 | unittest2 ; python_version < '2.7'
4 | importlib ; python_version < '2.7'
5 | netaddr
6 | ipaddress
7 |
8 | # requirement for aci_rest module
9 | xmljson
10 | lxml
11 |
12 | # requirement for aci_aaa_user module
13 | python-dateutil
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/playbooks/invalid.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: My playbook
3 | hosts: all
4 | gather_facts: false
5 | module_defaults:
6 | group/cisco.aci.all:
7 | output_level: debug
8 |
9 | tasks:
10 | - name: Assert host present in hostvars
11 | ansible.builtin.assert:
12 | that:
13 | - "'localhost' in hostvars"
14 | - hostvars | length == 1
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/playbooks/role_leaf.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: My playbook
3 | hosts: role_leaf
4 | gather_facts: false
5 | module_defaults:
6 | group/cisco.aci.all:
7 | output_level: debug
8 |
9 | tasks:
10 | - name: Query all interface_policy_leaf_profile
11 | cisco.aci.aci_interface_policy_leaf_profile:
12 | state: query
13 | register: query_interface_policy_leaf_profile
14 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/templates/cisco_aci.j2:
--------------------------------------------------------------------------------
1 | ---
2 | plugin: cisco.aci.aci_inventory_system
3 | host: {{ aci_host }}
4 | username: {{ aci_username }}
5 | password: {{ aci_password }}
6 | validate_certs: false
7 |
8 | compose:
9 | ansible_connection: "'ansible.netcommon.httpapi'"
10 | ansible_network_os: "'cisco.aci.aci'"
11 | ansible_user: "'{{ aci_username }}'"
12 | ansible_password: "'{{ aci_password }}'"
13 | ansible_httpapi_validate_certs: "'false'"
14 | ansible_httpapi_use_ssl: "'true'"
15 | ansible_httpapi_use_proxy: "'true'"
16 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/templates/cisco_aci_invalid_input.j2:
--------------------------------------------------------------------------------
1 | ---
2 | plugin: cisco.aci.aci_inventory_system
3 | host: {{ aci_host }}
4 | username: {{ aci_username }}
5 | password: {{ aci_password }}
6 | validate_certs: false
7 | unused: true
8 |
9 | compose:
10 | ansible_connection: "'ansible.netcommon.httpapi'"
11 | ansible_network_os: "'cisco.aci.aci'"
12 | ansible_user: "'{{ aci_username }}'"
13 | ansible_password: "'{{ aci_password }}'"
14 | ansible_httpapi_validate_certs: "'false'"
15 | ansible_httpapi_use_ssl: "'true'"
16 | ansible_httpapi_use_proxy: "'true'"
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/templates/cisco_aci_invalid_inventory_name.j2:
--------------------------------------------------------------------------------
1 | ---
2 | plugin: cisco.aci.aci_inventory_system
3 | host: {{ aci_host }}
4 | username: {{ aci_username }}
5 | password: {{ aci_password }}
6 | validate_certs: false
7 | unused: true
8 |
9 | compose:
10 | ansible_connection: "'ansible.netcommon.httpapi'"
11 | ansible_network_os: "'cisco.aci.aci'"
12 | ansible_user: "'{{ aci_username }}'"
13 | ansible_password: "'{{ aci_password }}'"
14 | ansible_httpapi_validate_certs: "'false'"
15 | ansible_httpapi_use_ssl: "'true'"
16 | ansible_httpapi_use_proxy: "'true'"
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vmm_credential/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2018, Dag Wieers (@dagwieers)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - include_tasks: vmware.yml
12 | when: vmware is not defined or vmware
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/templates/cisco_aci_keyed_groups.j2:
--------------------------------------------------------------------------------
1 | ---
2 | plugin: cisco.aci.aci_inventory_system
3 | host: {{ aci_host }}
4 | username: {{ aci_username }}
5 | password: {{ aci_password }}
6 | validate_certs: false
7 |
8 | compose:
9 | ansible_connection: "'ansible.netcommon.httpapi'"
10 | ansible_network_os: "'cisco.aci.aci'"
11 | ansible_user: "'{{ aci_username }}'"
12 | ansible_password: "'{{ aci_password }}'"
13 | ansible_httpapi_validate_certs: "'false'"
14 | ansible_httpapi_use_ssl: "'true'"
15 | ansible_httpapi_use_proxy: "'true'"
16 |
17 | keyed_groups:
18 | - prefix: role
19 | key: role
20 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_encap_pool/tasks/vsan.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: ensure vlan pool does not exist for tests to kick off
3 | cisco.aci.aci_encap_pool: &aci_pool_absent_static
4 | host: "{{ aci_hostname }}"
5 | username: "{{ aci_username }}"
6 | password: "{{ aci_password }}"
7 | validate_certs: '{{ aci_validate_certs | default(false) }}'
8 | use_ssl: '{{ aci_use_ssl | default(true) }}'
9 | use_proxy: '{{ aci_use_proxy | default(true) }}'
10 | output_level: '{{ aci_output_level | default("info") }}'
11 | pool: anstest
12 | pool_type: vsan
13 | pool_allocation_mode: static
14 | state: absent
15 |
16 | # FIXME: Add Test to this integration
--------------------------------------------------------------------------------
/plugins/doc_fragments/annotation.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
4 |
5 | from __future__ import absolute_import, division, print_function
6 |
7 | __metaclass__ = type
8 |
9 |
10 | class ModuleDocFragment(object):
11 | # Standard files documentation fragment
12 | DOCUMENTATION = r"""
13 | options:
14 | annotation:
15 | description:
16 | - User-defined string for annotating an object.
17 | - If the value is not specified in the task, the value of environment variable C(ACI_ANNOTATION) will be used instead.
18 | - If the value is not specified in the task and environment variable C(ACI_ANNOTATION) then the default value will be used.
19 | type: str
20 | default: orchestrator:ansible
21 | """
22 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/playbooks/create_inventories.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Create inventory configuration file
3 | hosts: localhost
4 | connection: local
5 | gather_facts: false
6 | tasks:
7 |
8 | - name: Lookup ACI username and password for CI instances
9 | ansible.builtin.set_fact:
10 | aci_password: "{{ lookup('ansible.builtin.ini', 'aci_password', file='../../../inventory.networking', section='aci:vars') | from_json }}"
11 | aci_username: "{{ lookup('ansible.builtin.ini', 'aci_username', file='../../../inventory.networking', section='aci:vars') }}"
12 |
13 | - name: Create inventory configuration files for each apic defined in inventory
14 | ansible.builtin.template:
15 | src: ../templates/{{ template_name }}.j2
16 | dest: ../{{file_name}}.yml
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_key_ring/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/rsa_user.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIUNOqiIBh811X/tPWSUgr9rajJ7t4wDQYJKoZIhvcNAQEL
3 | BQAwLTEOMAwGA1UEAwwFQWRtaW4xDjAMBgNVBAoMBWNpc2NvMQswCQYDVQQGEwJV
4 | UzAgFw0yMDEwMjkyMjQ0NTNaGA8yMTIwMTAwNTIyNDQ1M1owLTEOMAwGA1UEAwwF
5 | QWRtaW4xDjAMBgNVBAoMBWNpc2NvMQswCQYDVQQGEwJVUzCBnzANBgkqhkiG9w0B
6 | AQEFAAOBjQAwgYkCgYEAwjb3/W3x/bPX+bylh2PjXbcFPwpdTPJwqTxCdUinJRKv
7 | HXW7rwRiV9TdoNZZ946RvVM6l2LzUJyaK4wZZHf6WKJ2veL6LIrORA32vN+ofmpn
8 | XcTAUQ1JVyHbriy0GaT+1wYClqImWj8HxiskgpD+pKc+kzgl33xwwwqyuF1N7ikC
9 | AwEAAaNTMFEwHQYDVR0OBBYEFAK18YAZAaPQW7bHvqRwselDeGskMB8GA1UdIwQY
10 | MBaAFAK18YAZAaPQW7bHvqRwselDeGskMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAgIvzyP0t4CjsmUmgG7QP977c3+Uvbt2wlCwe+rrXlqvuSeaW
12 | l4DaTyv8kYyiqIxgrTVI/G+HbpHgTO2yH57njTIAdRjsJgMU9z0oCazOtVD8KpXj
13 | SKFUtJVbY27BQAnbuDOawX96a0UDY44Ia9NaPuq0/mEcdCKSpQP4ZuvvKVc=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_config_snapshot/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/unit/compat/builtins.py:
--------------------------------------------------------------------------------
1 | # (c) 2014, Toshio Kuratomi
2 | #
3 | # This file is part of Ansible
4 | #
5 | # Ansible is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # Ansible is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with Ansible. If not, see .
17 |
18 | # Make coding more python3-ish
19 | from __future__ import absolute_import, division, print_function
20 |
21 | __metaclass__ = type
22 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIUNOqiIBh811X/tPWSUgr9rajJ7t4wDQYJKoZIhvcNAQEL
3 | BQAwLTEOMAwGA1UEAwwFQWRtaW4xDjAMBgNVBAoMBWNpc2NvMQswCQYDVQQGEwJV
4 | UzAgFw0yMDEwMjkyMjQ0NTNaGA8yMTIwMTAwNTIyNDQ1M1owLTEOMAwGA1UEAwwF
5 | QWRtaW4xDjAMBgNVBAoMBWNpc2NvMQswCQYDVQQGEwJVUzCBnzANBgkqhkiG9w0B
6 | AQEFAAOBjQAwgYkCgYEAwjb3/W3x/bPX+bylh2PjXbcFPwpdTPJwqTxCdUinJRKv
7 | HXW7rwRiV9TdoNZZ946RvVM6l2LzUJyaK4wZZHf6WKJ2veL6LIrORA32vN+ofmpn
8 | XcTAUQ1JVyHbriy0GaT+1wYClqImWj8HxiskgpD+pKc+kzgl33xwwwqyuF1N7ikC
9 | AwEAAaNTMFEwHQYDVR0OBBYEFAK18YAZAaPQW7bHvqRwselDeGskMB8GA1UdIwQY
10 | MBaAFAK18YAZAaPQW7bHvqRwselDeGskMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAgIvzyP0t4CjsmUmgG7QP977c3+Uvbt2wlCwe+rrXlqvuSeaW
12 | l4DaTyv8kYyiqIxgrTVI/G+HbpHgTO2yH57njTIAdRjsJgMU9z0oCazOtVD8KpXj
13 | SKFUtJVbY27BQAnbuDOawX96a0UDY44Ia9NaPuq0/mEcdCKSpQP4ZuvvKVc=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_certificate_authority/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_management_access/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_management_access_https_cipher/pki/admin.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
3 | BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
4 | DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
5 | bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
6 | 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
7 | v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
8 | XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
9 | AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
10 | IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
11 | hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
12 | 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
13 | KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
14 | -----END CERTIFICATE-----
15 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_domain/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2018, Dag Wieers (@dagwieers)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - include_tasks: phys.yml
12 | when: phys is not defined or phys
13 |
14 | - include_tasks: l2dom.yml
15 | when: l2dom is not defined or l2dom
16 |
17 | - include_tasks: l3dom.yml
18 | when: l3dom is not defined or l3dom
19 |
20 | - include_tasks: fc.yml
21 | when: fc is not defined or fc
22 |
23 | - include_tasks: vmm-vmware.yml
24 | when: vmm_vmware is not defined or vmm_vmware
25 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/playbooks/no_role_defined.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: My playbook
3 | hosts: all
4 | gather_facts: false
5 | module_defaults:
6 | group/cisco.aci.all:
7 | output_level: debug
8 |
9 | tasks:
10 | - name: Assert host present in hostvars
11 | ansible.builtin.assert:
12 | that:
13 | - "'localhost' in hostvars"
14 | - hostvars | length >= 2
15 |
16 | - name: Assert that the host is a controller
17 | ansible.builtin.assert:
18 | that:
19 | - "'controller' in hostvars[inventory_hostname].role"
20 |
21 | - name: Assert that reserved ansible keywords are replaced
22 | ansible.builtin.assert:
23 | that:
24 | - "'name' not in hostvars[inventory_hostname]"
25 | - "'_name' in hostvars[inventory_hostname]"
26 | - "'serial' not in hostvars[inventory_hostname]"
27 | - "'_serial' in hostvars[inventory_hostname]"
28 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/rsa_ansible.key:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIICXgIBAAKBgQDVyLS8/ix6QOH7R83B4WuhsliL6nffBvrkHXXsqViit3OZd+/K
3 | fSrNlZysUvHS4hxfRtJrFQfpkogwXEEupBPF3p0xy7wZzvjjWWJk0NQ8PoVlOhUY
4 | emZTfMX+FFNr9pAjjjaVHb9jCuxko7upAyj8POhhETY2zYoJoa8TR6fLZwIDAQAB
5 | AoGBALo5GzeGMThNTIyW/6Tjt94ifP9kPwcIDYSoJRECczNKmmgVEcxRO/fZW6DA
6 | n+YTEKPuDV059KqB+iAmPKFkS9N41kaq+NUAknlFJPV6Vs3gpvJGqWgu++73dhR5
7 | cKsHTlK2KBsRtsXnOJ9odKWFjiTnZ1Eyvmhw7ct+Fojb/7ABAkEA9+Wwm+HGlYqw
8 | ghuFaBtNuqC/S2vO6SEfdQvTDQKKO5ROei5m+ryjWj6flbCcG+5dLs8l4Zh3sQUL
9 | kc0RQfHSWQJBANzFkdO6wXXPOw7RhAEP2sA2W2VacMbGynjsoDJXmypeJ7Z+odLb
10 | 5gNXET9RA77RY/saIBdwR4JNnku2WnoxU78CQQDhYirVP0vu8H6UfHMpeRGNqdLi
11 | vq0LlrrkDxEe1f1aN/e17HRiaZnXVfKABWeZmXmNMndNifLgtiaTtC+JllRZAkEA
12 | ydAdV0SANvaCETC7j9DzcgP+lm8PatYsHlCIvJxS7m71tKCbw0pbQDBmRtADMXrt
13 | /4vJTEPKSrYzfxiqKstOtwJAXkWXaqVhJeKjbMj1buo6s/1qGIfSrZR/AjozvJ03
14 | JehevfULS3668jOYJZW6BoNhysx6+Hqf5Id8fB4iDWPQhA==
15 | -----END RSA PRIVATE KEY-----
16 |
--------------------------------------------------------------------------------
/.github/workflows/changelog-generation.yml:
--------------------------------------------------------------------------------
1 | name: Generate Changelog
2 | on:
3 | push:
4 | branches: [master]
5 | jobs:
6 | generate-changelog:
7 | name: Run automation script
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Check out script code
11 | uses: actions/checkout@v4
12 | with:
13 | repository: ciscoecosystem/release_script
14 | path: ./release_script
15 |
16 | - name: Check out collection code
17 | uses: actions/checkout@v4
18 | with:
19 | path: ./collection
20 |
21 | - name: Set up Python 3.9
22 | uses: actions/setup-python@v5
23 | with:
24 | python-version: 3.9
25 |
26 | - name: Install release script requirements
27 | run: pip install -r ./release_script/requirements.txt
28 |
29 | - name: Run automation script
30 | run: python ./release_script/script.py
31 | env:
32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 |
--------------------------------------------------------------------------------
/changelogs/config.yaml:
--------------------------------------------------------------------------------
1 | changelog_filename_template: ../CHANGELOG.rst
2 | changelog_filename_version_depth: 0
3 | changes_file: changelog.yaml
4 | changes_format: combined
5 | ignore_other_fragment_extensions: true
6 | keep_fragments: false
7 | mention_ancestor: true
8 | new_plugins_after_name: removed_features
9 | notesdir: fragments
10 | prelude_section_name: release_summary
11 | prelude_section_title: Release Summary
12 | changelog_nice_yaml: true
13 | sections:
14 | - - major_changes
15 | - Major Changes
16 | - - minor_changes
17 | - Minor Changes
18 | - - breaking_changes
19 | - Breaking Changes / Porting Guide
20 | - - deprecated_features
21 | - Deprecated Features
22 | - - removed_features
23 | - Removed Features (previously deprecated)
24 | - - security_fixes
25 | - Security Fixes
26 | - - bugfixes
27 | - Bugfixes
28 | - - known_issues
29 | - Known Issues
30 | title: Cisco ACI Ansible Collection
31 | trivial_section_name: trivial
32 | use_fqcn: true
33 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_file_remote_path/pki/rsa_ansible.key:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIICXgIBAAKBgQDVyLS8/ix6QOH7R83B4WuhsliL6nffBvrkHXXsqViit3OZd+/K
3 | fSrNlZysUvHS4hxfRtJrFQfpkogwXEEupBPF3p0xy7wZzvjjWWJk0NQ8PoVlOhUY
4 | emZTfMX+FFNr9pAjjjaVHb9jCuxko7upAyj8POhhETY2zYoJoa8TR6fLZwIDAQAB
5 | AoGBALo5GzeGMThNTIyW/6Tjt94ifP9kPwcIDYSoJRECczNKmmgVEcxRO/fZW6DA
6 | n+YTEKPuDV059KqB+iAmPKFkS9N41kaq+NUAknlFJPV6Vs3gpvJGqWgu++73dhR5
7 | cKsHTlK2KBsRtsXnOJ9odKWFjiTnZ1Eyvmhw7ct+Fojb/7ABAkEA9+Wwm+HGlYqw
8 | ghuFaBtNuqC/S2vO6SEfdQvTDQKKO5ROei5m+ryjWj6flbCcG+5dLs8l4Zh3sQUL
9 | kc0RQfHSWQJBANzFkdO6wXXPOw7RhAEP2sA2W2VacMbGynjsoDJXmypeJ7Z+odLb
10 | 5gNXET9RA77RY/saIBdwR4JNnku2WnoxU78CQQDhYirVP0vu8H6UfHMpeRGNqdLi
11 | vq0LlrrkDxEe1f1aN/e17HRiaZnXVfKABWeZmXmNMndNifLgtiaTtC+JllRZAkEA
12 | ydAdV0SANvaCETC7j9DzcgP+lm8PatYsHlCIvJxS7m71tKCbw0pbQDBmRtADMXrt
13 | /4vJTEPKSrYzfxiqKstOtwJAXkWXaqVhJeKjbMj1buo6s/1qGIfSrZR/AjozvJ03
14 | JehevfULS3668jOYJZW6BoNhysx6+Hqf5Id8fB4iDWPQhA==
15 | -----END RSA PRIVATE KEY-----
16 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_ansible.key:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIICXgIBAAKBgQDVyLS8/ix6QOH7R83B4WuhsliL6nffBvrkHXXsqViit3OZd+/K
3 | fSrNlZysUvHS4hxfRtJrFQfpkogwXEEupBPF3p0xy7wZzvjjWWJk0NQ8PoVlOhUY
4 | emZTfMX+FFNr9pAjjjaVHb9jCuxko7upAyj8POhhETY2zYoJoa8TR6fLZwIDAQAB
5 | AoGBALo5GzeGMThNTIyW/6Tjt94ifP9kPwcIDYSoJRECczNKmmgVEcxRO/fZW6DA
6 | n+YTEKPuDV059KqB+iAmPKFkS9N41kaq+NUAknlFJPV6Vs3gpvJGqWgu++73dhR5
7 | cKsHTlK2KBsRtsXnOJ9odKWFjiTnZ1Eyvmhw7ct+Fojb/7ABAkEA9+Wwm+HGlYqw
8 | ghuFaBtNuqC/S2vO6SEfdQvTDQKKO5ROei5m+ryjWj6flbCcG+5dLs8l4Zh3sQUL
9 | kc0RQfHSWQJBANzFkdO6wXXPOw7RhAEP2sA2W2VacMbGynjsoDJXmypeJ7Z+odLb
10 | 5gNXET9RA77RY/saIBdwR4JNnku2WnoxU78CQQDhYirVP0vu8H6UfHMpeRGNqdLi
11 | vq0LlrrkDxEe1f1aN/e17HRiaZnXVfKABWeZmXmNMndNifLgtiaTtC+JllRZAkEA
12 | ydAdV0SANvaCETC7j9DzcgP+lm8PatYsHlCIvJxS7m71tKCbw0pbQDBmRtADMXrt
13 | /4vJTEPKSrYzfxiqKstOtwJAXkWXaqVhJeKjbMj1buo6s/1qGIfSrZR/AjozvJ03
14 | JehevfULS3668jOYJZW6BoNhysx6+Hqf5Id8fB4iDWPQhA==
15 | -----END RSA PRIVATE KEY-----
16 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_key_ring/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/rsa_user.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMI29/1t8f2z1/m8
3 | pYdj4123BT8KXUzycKk8QnVIpyUSrx11u68EYlfU3aDWWfeOkb1TOpdi81CcmiuM
4 | GWR3+liidr3i+iyKzkQN9rzfqH5qZ13EwFENSVch264stBmk/tcGApaiJlo/B8Yr
5 | JIKQ/qSnPpM4Jd98cMMKsrhdTe4pAgMBAAECgYAX8c8BX9zF+rZWA/wkhRwzIa1z
6 | 6EM4iWt6cgN/kkWJPJR6fVl2aoP1cDki60qMSveM8AX5RCnbdnNLiypWSLSEogdd
7 | bRWyFeF4ZXvivd+Lds2u5Ni3PiCrIpHfNvid2ERCaKhblQRdhi/dTH9Z+3kGspwc
8 | jpKzWMmGjBpqWjWOQQJBAOB3cS/AxbwJ6Fzvbi6sLiK6Ry8eSIMlce3Yyw89oU+M
9 | DGkIbggICCYKxXYIWtBbyxthdQudKFZYbLpCkLSMBXsCQQDdf5ICNN2R0ptYLhSX
10 | kQ4tiGigi1hq93+25Ov1rI8eIFSYlKNcyA/cvwv5ptlXmy1UAyoAdGCbS47pgCwT
11 | Nz+rAkEAtzHkR5PuDXSMluS2KRNPJ/qdxB/UEGzMGdEYkNy8vX5QVpyRqK5dcCbU
12 | V2ukKm7wSe11KEBgPnA2dKGFFkU85wJAD895Vpr7bdtAp2yyn5cFEg74mO0ZZJlC
13 | DoYMqb6lgJsCLtn9RzQonbMtYaadQPmcpLCNIPctpiggjV5OxxhcfQJBAM1ETm8p
14 | /9beBPTS8cJdWHvCRE149H/ZCUxqjFZriJzFYvi0xor85eK8/3V7xaWtTkK25i3+
15 | xWk+sA3DYYDPGM8=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_config_snapshot/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMI29/1t8f2z1/m8
3 | pYdj4123BT8KXUzycKk8QnVIpyUSrx11u68EYlfU3aDWWfeOkb1TOpdi81CcmiuM
4 | GWR3+liidr3i+iyKzkQN9rzfqH5qZ13EwFENSVch264stBmk/tcGApaiJlo/B8Yr
5 | JIKQ/qSnPpM4Jd98cMMKsrhdTe4pAgMBAAECgYAX8c8BX9zF+rZWA/wkhRwzIa1z
6 | 6EM4iWt6cgN/kkWJPJR6fVl2aoP1cDki60qMSveM8AX5RCnbdnNLiypWSLSEogdd
7 | bRWyFeF4ZXvivd+Lds2u5Ni3PiCrIpHfNvid2ERCaKhblQRdhi/dTH9Z+3kGspwc
8 | jpKzWMmGjBpqWjWOQQJBAOB3cS/AxbwJ6Fzvbi6sLiK6Ry8eSIMlce3Yyw89oU+M
9 | DGkIbggICCYKxXYIWtBbyxthdQudKFZYbLpCkLSMBXsCQQDdf5ICNN2R0ptYLhSX
10 | kQ4tiGigi1hq93+25Ov1rI8eIFSYlKNcyA/cvwv5ptlXmy1UAyoAdGCbS47pgCwT
11 | Nz+rAkEAtzHkR5PuDXSMluS2KRNPJ/qdxB/UEGzMGdEYkNy8vX5QVpyRqK5dcCbU
12 | V2ukKm7wSe11KEBgPnA2dKGFFkU85wJAD895Vpr7bdtAp2yyn5cFEg74mO0ZZJlC
13 | DoYMqb6lgJsCLtn9RzQonbMtYaadQPmcpLCNIPctpiggjV5OxxhcfQJBAM1ETm8p
14 | /9beBPTS8cJdWHvCRE149H/ZCUxqjFZriJzFYvi0xor85eK8/3V7xaWtTkK25i3+
15 | xWk+sA3DYYDPGM8=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_management_access/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_management_access_https_cipher/pki/admin.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
3 | D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
4 | VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
5 | /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
6 | giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
7 | +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
8 | Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
9 | 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
10 | 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
11 | p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
12 | Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
13 | sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
14 | ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
15 | 0V4ltlTuu2mTMaw=
16 | -----END PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/filter_plugins/generate_ips.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2023 Cisco and/or its affiliates.
2 | # Copyright: (c) 2023, Shreyas Srish (@shrsr)
3 |
4 | from __future__ import absolute_import, division, print_function
5 |
6 | __metaclass__ = type
7 |
8 | from ipaddress import ip_network
9 | import random
10 |
11 | RANGE_IPV4 = list(ip_network("192.0.2.0/24").hosts()) + list(ip_network("198.51.100.0/24").hosts()) + list(ip_network("203.0.113.0/24").hosts())
12 |
13 |
14 | class FilterModule(object):
15 | def filters(self):
16 | return {
17 | "generate_random_ips": self.generate_random_ips,
18 | }
19 |
20 | def generate_random_ips(self, given_ip, insert_given_ip_at, number_of_ips):
21 | ips = ""
22 | for i in range(number_of_ips):
23 | if i == insert_given_ip_at - 1:
24 | ips += given_ip
25 | else:
26 | ips += str((random.choice(RANGE_IPV4)))
27 | ips += ","
28 | return ips.rstrip(",")
29 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_rest/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2017, Dag Wieers (@dagwieers)
3 | # Copyright: (c) 2020, Cindy Zhao (@cizhao)
4 |
5 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6 |
7 | - name: Test that we have an ACI APIC host, ACI username and ACI password
8 | ansible.builtin.fail:
9 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
10 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
11 |
12 | - include_tasks: yaml_inline.yml
13 | tags: yaml_inline
14 |
15 | - include_tasks: yaml_string.yml
16 | tags: yaml_string
17 |
18 | - include_tasks: json_inline.yml
19 | tags: json_inline
20 |
21 | - include_tasks: json_string.yml
22 | tags: json_string
23 |
24 | - include_tasks: xml_string.yml
25 | tags: xml_string
26 |
27 | - include_tasks: xml_file.yml
28 | tags: xml_file
29 |
30 | - include_tasks: error_handling.yml
31 | tags: error_handling
32 |
--------------------------------------------------------------------------------
/galaxy.yml:
--------------------------------------------------------------------------------
1 | ---
2 | namespace: cisco
3 | name: aci
4 | # The version of the collection. Must be compatible with semantic versioning
5 | version: 2.13.0
6 | readme: README.md
7 | authors:
8 | - Dag Wieers (@dagwieers)
9 | - Swetha Chunduri (@schunduri)
10 | - Jacob McGill (@jmcgill298)
11 | - Rob Huelga (@RobW3LGA)
12 | - Bruno Calogero
13 | - Simon Metzger
14 | - Tim Knipper
15 | - Apoorva Gururaja (@aciguru)
16 | - Devarshi Shah (@devarshishah3)
17 | - Ramses Smeyers (@rsmeyers)
18 | - Lionel Hercot (@lhercot)
19 | description: Ansible Modules for Cisco ACI
20 | license_file: 'LICENSE'
21 | tags:
22 | - cisco
23 | - aci
24 | - cloud
25 | - collection
26 | - networking
27 | - sdn
28 | dependencies:
29 | "ansible.netcommon": "*"
30 | repository: https://github.com/CiscoDevNet/ansible-aci
31 | documentation: https://docs.ansible.com/ansible/latest/scenario_guides/guide_aci.html
32 | homepage: https://github.com/CiscoDevNet/ansible-aci
33 | issues: https://github.com/CiscoDevNet/ansible-aci/issues
--------------------------------------------------------------------------------
/tests/integration/inventory.networking:
--------------------------------------------------------------------------------
1 | [aci]
2 | # Update test_inventory_ips in [aci:vars] whenever hosts are added, removed, or their IP addresses change.
3 | cn-dmz-apic-m1-02-v42 ansible_host=173.36.219.68 aci_hostname=173.36.219.68
4 | cn-dmz-apic-m1-03-v52 ansible_host=173.36.219.69 aci_hostname=173.36.219.69
5 | cn-dmz-apic-m1-04-v602h ansible_host=173.36.219.70 aci_hostname=173.36.219.70
6 | # aws_cloud ansible_host=52.52.20.121 aci_hostname=52.52.20.121 cloud_type=aws region=us-east-1 region_2=us-west-1 availability_zone=us-west-1a
7 | azure_cloud ansible_host=20.245.236.136 aci_hostname=20.245.236.136 cloud_type=azure region=westus region_2=westus2 vnet_gateway=true az_region=westus2
8 |
9 | [aci:vars]
10 | aci_username=ansible_github_ci
11 | aci_remote_username="apic:test\\r_ansible_github_ci"
12 | aci_password="sJ94G92#8dq2hx*K4qh"
13 | ansible_network_os=cisco.aci.aci
14 | ansible_connection=local
15 | ansible_python_interpreter=/usr/bin/python3.9
16 | # The IP addresses of the APICs that we currently test in aci_inventory_system.
17 | test_inventory_ips=("173.36.219.68" "173.36.219.69" "173.36.219.70")
18 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_vlan_pool/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2018, Dag Wieers (dagwieers)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - name: Verify Cloud and Non-Cloud Sites in use.
12 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
13 |
14 | - name: Execute tasks only for non-cloud sites
15 | when: query_cloud.current == [] # This condition will execute only non-cloud sites
16 | block: # block specifies execution of tasks within, based on conditions
17 | - include_tasks: static.yml
18 | when: static is not defined or static
19 |
20 | - include_tasks: dynamic.yml
21 | when: dynamic is not defined or dynamic
22 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_tenant/pki/openssh_rsa.key:
--------------------------------------------------------------------------------
1 | -----BEGIN OPENSSH PRIVATE KEY-----
2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn
3 | NhAAAAAwEAAQAAAIEA3VnrdPOQbr3DPF5GbC31W7ScloEpU9BSDqPmpyYPUdsWl21UXBB8
4 | exip3GVOl+7GbB1WkDKYr7uMuBjsfDzMzZkDAFVEpud+IUzZB7aSfSd+L9bdeFG2sGI+Fv
5 | y1QmiMBT5gcvXaM16vRKe4FywM07/Fmd3REm/+wtmFG/C4sYUAAAIQLuIWNS7iFjUAAAAH
6 | c3NoLXJzYQAAAIEA3VnrdPOQbr3DPF5GbC31W7ScloEpU9BSDqPmpyYPUdsWl21UXBB8ex
7 | ip3GVOl+7GbB1WkDKYr7uMuBjsfDzMzZkDAFVEpud+IUzZB7aSfSd+L9bdeFG2sGI+Fvy1
8 | QmiMBT5gcvXaM16vRKe4FywM07/Fmd3REm/+wtmFG/C4sYUAAAADAQABAAAAgHj5rhALFg
9 | MQP2X8+GwjahemzHYNPXMLRe2ucl8kE/de0CgOnq56bC4yupMz4xJyc4ufNTI2FPDmhfAP
10 | 3x+/cwZeYFsipyGdL1IYbfk0QYSP65Btr2yq8+QyN7zWdFXQ8csT0ImZgNiQKehc69ctLH
11 | XcyelsdwNiUCRZYa7kCpf5AAAAQQCo7OSWQUa16xP9KrKm0F3fnaAKewhQNDIwok5PRgoN
12 | 03k/IpGOCAjvNuOb7DkXmVvxjO8Rj4L16vL+RTzHg8n7AAAAQQD7tej6gJy3MLcmrQ4aHb
13 | FeLzQ/ZXS2IgdIRC8rcNB1h9Rso7+fySVFwnmwy2Um7wwsjNnr2xyhigwfQCSyRubfAAAA
14 | QQDhH5EX7+hdm/fPLM6Goz9N3ERbIgBq2Mel5CCi/Ns7vDfBQiEla1atdKTV0S2EYfxIw2
15 | ehkMGbmXl2/9JHxKgbAAAAFGNpemhhb0BDSVpIQU8tTS05MjhRAQIDBAUG
16 | -----END OPENSSH PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/plugins/doc_fragments/owner.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
4 |
5 | from __future__ import absolute_import, division, print_function
6 |
7 | __metaclass__ = type
8 |
9 |
10 | class ModuleDocFragment(object):
11 | # Standard files documentation fragment
12 | DOCUMENTATION = r"""
13 | options:
14 | owner_key:
15 | description:
16 | - User-defined string for the ownerKey attribute of an ACI object.
17 | - This attribute represents a key for enabling clients to own their data for entity correlation.
18 | - If the value is not specified in the task, the value of environment variable C(ACI_OWNER_KEY) will be used instead.
19 | type: str
20 | owner_tag:
21 | description:
22 | - User-defined string for the ownerTag attribute of an ACI object.
23 | - This attribute represents a tag for enabling clients to add their own data.
24 | - For example, to indicate who created this object.
25 | - If the value is not specified in the task, the value of environment variable C(ACI_OWNER_TAG) will be used instead.
26 | type: str
27 | """
28 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_aaa_user_certificate/pki/openssh_rsa.key:
--------------------------------------------------------------------------------
1 | -----BEGIN OPENSSH PRIVATE KEY-----
2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn
3 | NhAAAAAwEAAQAAAIEA3VnrdPOQbr3DPF5GbC31W7ScloEpU9BSDqPmpyYPUdsWl21UXBB8
4 | exip3GVOl+7GbB1WkDKYr7uMuBjsfDzMzZkDAFVEpud+IUzZB7aSfSd+L9bdeFG2sGI+Fv
5 | y1QmiMBT5gcvXaM16vRKe4FywM07/Fmd3REm/+wtmFG/C4sYUAAAIQLuIWNS7iFjUAAAAH
6 | c3NoLXJzYQAAAIEA3VnrdPOQbr3DPF5GbC31W7ScloEpU9BSDqPmpyYPUdsWl21UXBB8ex
7 | ip3GVOl+7GbB1WkDKYr7uMuBjsfDzMzZkDAFVEpud+IUzZB7aSfSd+L9bdeFG2sGI+Fvy1
8 | QmiMBT5gcvXaM16vRKe4FywM07/Fmd3REm/+wtmFG/C4sYUAAAADAQABAAAAgHj5rhALFg
9 | MQP2X8+GwjahemzHYNPXMLRe2ucl8kE/de0CgOnq56bC4yupMz4xJyc4ufNTI2FPDmhfAP
10 | 3x+/cwZeYFsipyGdL1IYbfk0QYSP65Btr2yq8+QyN7zWdFXQ8csT0ImZgNiQKehc69ctLH
11 | XcyelsdwNiUCRZYa7kCpf5AAAAQQCo7OSWQUa16xP9KrKm0F3fnaAKewhQNDIwok5PRgoN
12 | 03k/IpGOCAjvNuOb7DkXmVvxjO8Rj4L16vL+RTzHg8n7AAAAQQD7tej6gJy3MLcmrQ4aHb
13 | FeLzQ/ZXS2IgdIRC8rcNB1h9Rso7+fySVFwnmwy2Um7wwsjNnr2xyhigwfQCSyRubfAAAA
14 | QQDhH5EX7+hdm/fPLM6Goz9N3ERbIgBq2Mel5CCi/Ns7vDfBQiEla1atdKTV0S2EYfxIw2
15 | ehkMGbmXl2/9JHxKgbAAAAFGNpemhhb0BDSVpIQU8tTS05MjhRAQIDBAUG
16 | -----END OPENSSH PRIVATE KEY-----
17 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_encap_pool/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2017, Jacob McGill (@jmcgill298)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: test that we have an aci apic host, aci username and aci password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - name: Verify Cloud and Non-Cloud Sites in use.
12 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
13 |
14 | - name: Execute tasks only for non-cloud sites
15 | when: query_cloud.current == [] # This condition will execute only non-cloud sites
16 | block: # block specifies execution of tasks within, based on conditions
17 | - include_tasks: vlan.yml
18 | when: vlan is not defined or vlan
19 |
20 | - include_tasks: vxlan.yml
21 | when: vxlan is not defined or vxlan
22 |
23 | - include_tasks: vsan.yml
24 | when: vsan is not defined or vsan
25 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_encap_pool_range/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2017, Jacob McGill (@jmcgill298)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: test that we have an aci apic host, aci username and aci password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - name: Verify Cloud and Non-Cloud Sites in use.
12 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
13 |
14 | - name: Execute tasks only for non-cloud sites
15 | when: query_cloud.current == [] # This condition will execute only non-cloud sites
16 | block: # block specifies execution of tasks within, based on conditions
17 | - include_tasks: vlan.yml
18 | when: "vlan is not defined or (vlan is defined and vlan == 'True')"
19 |
20 | - include_tasks: vxlan.yml
21 | when: "vxlan is not defined or (vxlan is defined and vxlan == 'True')"
22 |
23 | - include_tasks: vsan.yml
24 | when: "vsan is not defined or (vsan is defined and vsan == 'True')"
25 |
--------------------------------------------------------------------------------
/.github/workflows/jira-issue-sync.yml:
--------------------------------------------------------------------------------
1 | name: Sync GitHub Issues & Pull Requests to Jira
2 |
3 | on:
4 | pull_request_target:
5 | types:
6 | - assigned
7 | - unassigned
8 | - labeled
9 | - unlabeled
10 | - opened
11 | - edited
12 | - closed
13 | - reopened
14 | - synchronize
15 | - converted_to_draft
16 | - ready_for_review
17 | - locked
18 | - unlocked
19 | - review_requested
20 | - review_request_removed
21 | - auto_merge_enabled
22 | - auto_merge_disabled
23 | workflow_run:
24 | workflows: [jira-issue-sync-pr-review]
25 | types:
26 | - completed
27 | issues:
28 | issue_comment:
29 | concurrency: jira_issues
30 |
31 | jobs:
32 | sync_issues_to_jira:
33 | runs-on: ubuntu-latest
34 | steps:
35 | - name: Sync GitHub Issues & Pull Requests to Jira
36 | uses: ciscoecosystem/sync-jira-actions@v1
37 | with:
38 | sync_label: jira-sync
39 | status_field_id: 10740
40 | find_jira_retries: 0
41 | link_closing_issues: true
42 | env:
43 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 | JIRA_PASS: ${{ secrets.JIRA_PASS }}
45 | JIRA_USER: ${{ secrets.JIRA_USER }}
46 | JIRA_URL: ${{ secrets.JIRA_URL }}
47 | JIRA_PROJECT: DCNE
48 | JIRA_COMPONENT: ansible-aci
49 | JIRA_ISSUE_TYPE: GitHub Issue
50 |
--------------------------------------------------------------------------------
/tests/unit/compat/unittest.py:
--------------------------------------------------------------------------------
1 | # (c) 2014, Toshio Kuratomi
2 | #
3 | # This file is part of Ansible
4 | #
5 | # Ansible is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # Ansible is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with Ansible. If not, see .
17 |
18 | # Make coding more python3-ish
19 | from __future__ import absolute_import, division, print_function
20 |
21 | __metaclass__ = type
22 |
23 | """
24 | Compat module for Python2.7's unittest module
25 | """
26 |
27 | import sys
28 |
29 | # Allow wildcard import because we really do want to import all of
30 | # unittests's symbols into this compat shim
31 | # pylint: disable=wildcard-import,unused-wildcard-import
32 | if sys.version_info < (2, 7):
33 | try:
34 | # Need unittest2 on python2.6
35 | from unittest2 import *
36 | except ImportError:
37 | print("You need unittest2 installed on python2.6.x to run tests")
38 | else:
39 | from unittest import *
40 |
--------------------------------------------------------------------------------
/tests/unit/modules/utils.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, print_function
2 |
3 | __metaclass__ = type
4 |
5 | import json
6 |
7 | from ansible_collections.cisco.aci.tests.unit.compat import unittest
8 | from ansible_collections.cisco.aci.tests.unit.compat.mock import patch
9 | from ansible.module_utils import basic
10 | from ansible.module_utils._text import to_bytes
11 |
12 |
13 | def set_module_args(args):
14 | if "_ansible_remote_tmp" not in args:
15 | args["_ansible_remote_tmp"] = "/tmp"
16 | if "_ansible_keep_remote_files" not in args:
17 | args["_ansible_keep_remote_files"] = False
18 |
19 | args = json.dumps({"ANSIBLE_MODULE_ARGS": args})
20 | basic._ANSIBLE_ARGS = to_bytes(args)
21 |
22 |
23 | class AnsibleExitJson(Exception):
24 | pass
25 |
26 |
27 | class AnsibleFailJson(Exception):
28 | pass
29 |
30 |
31 | def exit_json(*args, **kwargs):
32 | if "changed" not in kwargs:
33 | kwargs["changed"] = False
34 | raise AnsibleExitJson(kwargs)
35 |
36 |
37 | def fail_json(*args, **kwargs):
38 | kwargs["failed"] = True
39 | raise AnsibleFailJson(kwargs)
40 |
41 |
42 | class ModuleTestCase(unittest.TestCase):
43 | def setUp(self):
44 | self.mock_module = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json)
45 | self.mock_module.start()
46 | self.mock_sleep = patch("time.sleep")
47 | self.mock_sleep.start()
48 | set_module_args({})
49 | self.addCleanup(self.mock_module.stop)
50 | self.addCleanup(self.mock_sleep.stop)
51 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: ["master"]
6 |
7 | schedule:
8 | - cron: '40 8 * * 5'
9 |
10 | jobs:
11 | analyze:
12 | name: Analyze
13 | runs-on: ubuntu-latest
14 | permissions:
15 | actions: read
16 | contents: read
17 | security-events: write
18 |
19 | strategy:
20 | fail-fast: false
21 | matrix:
22 | language: ['python']
23 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
24 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
25 |
26 | steps:
27 | - name: Checkout repository
28 | uses: actions/checkout@v4
29 |
30 | # Initializes the CodeQL tools for scanning.
31 | - name: Initialize CodeQL
32 | uses: github/codeql-action/init@v3
33 | with:
34 | languages: ${{ matrix.language }}
35 | # If you wish to specify custom queries, you can do so here or in a config file.
36 | # By default, queries listed here will override any specified in a config file.
37 | # Prefix the list here with "+" to use these queries and those in the config file.
38 |
39 | # Details on CodeQL's query packs refer to :
40 | # https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
41 | # queries: security-extended,security-and-quality
42 |
43 | - name: Perform CodeQL Analysis
44 | uses: github/codeql-action/analyze@v3
45 |
--------------------------------------------------------------------------------
/tests/unit/mock/vault_helper.py:
--------------------------------------------------------------------------------
1 | # Ansible is free software: you can redistribute it and/or modify
2 | # it under the terms of the GNU General Public License as published by
3 | # the Free Software Foundation, either version 3 of the License, or
4 | # (at your option) any later version.
5 | #
6 | # Ansible is distributed in the hope that it will be useful,
7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 | # GNU General Public License for more details.
10 | #
11 | # You should have received a copy of the GNU General Public License
12 | # along with Ansible. If not, see .
13 |
14 | # Make coding more python3-ish
15 | from __future__ import absolute_import, division, print_function
16 |
17 | __metaclass__ = type
18 |
19 | from ansible.module_utils._text import to_bytes
20 |
21 | from ansible.parsing.vault import VaultSecret
22 |
23 |
24 | class TextVaultSecret(VaultSecret):
25 | """A secret piece of text. ie, a password. Tracks text encoding.
26 |
27 | The text encoding of the text may not be the default text encoding so
28 | we keep track of the encoding so we encode it to the same bytes."""
29 |
30 | def __init__(self, text, encoding=None, errors=None, _bytes=None):
31 | super(TextVaultSecret, self).__init__()
32 | self.text = text
33 | self.encoding = encoding or "utf-8"
34 | self._bytes = _bytes
35 | self.errors = errors or "strict"
36 |
37 | @property
38 | def bytes(self):
39 | """The text encoded with encoding, unless we specifically set _bytes."""
40 | return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors)
41 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Feature_Request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🚀 Feature Request
3 | about: I have a suggestion (might want to implement it myself 🙂)!
4 | labels: enhancement
5 | ---
6 |
7 |
8 |
9 | ### Community Note
10 |
11 | * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
12 | * Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
13 | * If you are interested in working on this issue or have submitted a pull request, please leave a comment
14 |
15 |
16 |
17 | ### Description
18 |
20 |
21 |
22 |
23 | * xxxx
24 |
25 | ### New or Affected Module(s):
26 |
27 |
28 |
29 | * aci_XXXXX + fv:XXXX
30 |
31 | ### APIC version and APIC Platform
32 |
33 | * V x.x.x and on-prem/cloud-aws/cloud-azure/all.
34 |
35 | ### Collection versions
36 |
37 | * cisco.aci x.x.x
38 |
39 | ### References
40 |
41 |
47 |
48 | * #0000
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/playbooks/role_controller.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: My playbook
3 | hosts: role_controller
4 | gather_facts: false
5 | module_defaults:
6 | group/cisco.aci.all:
7 | output_level: debug
8 |
9 | tasks:
10 | - name: Assert host present in hostvars
11 | ansible.builtin.assert:
12 | that:
13 | - "'localhost' in hostvars"
14 | - hostvars | length >= 2
15 |
16 | - name: Assert that the host is a controller
17 | ansible.builtin.assert:
18 | that:
19 | - "'controller' in hostvars[inventory_hostname].role"
20 |
21 | - name: Assert that reserved ansible keywords are replaced
22 | ansible.builtin.assert:
23 | that:
24 | - "'name' not in hostvars[inventory_hostname]"
25 | - "'_name' in hostvars[inventory_hostname]"
26 | - "'serial' not in hostvars[inventory_hostname]"
27 | - "'_serial' in hostvars[inventory_hostname]"
28 |
29 | - name: Assure tenant does not exist
30 | cisco.aci.aci_tenant: &delete_tenant
31 | tenant: ansible_inventory_test
32 | state: absent
33 |
34 | - name: Create tenant
35 | cisco.aci.aci_tenant:
36 | <<: *delete_tenant
37 | state: present
38 | register: create_tenant
39 |
40 | - name: Assert that the tenant was created
41 | ansible.builtin.assert:
42 | that:
43 | - create_tenant is changed
44 | - create_tenant.previous == []
45 | - create_tenant.current.0.fvTenant.attributes.name == 'ansible_inventory_test'
46 |
47 | - name: Delete tenant
48 | cisco.aci.aci_tenant:
49 | <<: *delete_tenant
50 | register: delete_tenant
51 |
52 | - name: Assert that the tenant was deleted
53 | ansible.builtin.assert:
54 | that:
55 | - delete_tenant is changed
56 | - delete_tenant.previous.0.fvTenant.attributes.name == 'ansible_inventory_test'
57 | - delete_tenant.current == []
58 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_provider/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2020, Lionel Hercot (@lhercot)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # CLEAN ENVIRONMENT
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: '{{ aci_output_level | default("info") }}'
22 |
23 | - name: Query system information
24 | cisco.aci.aci_system:
25 | <<: *aci_info
26 | id: 1
27 | state: query
28 | register: version
29 |
30 | # QUERY OBJECTS
31 | - name: Query cloud provider object
32 | cisco.aci.aci_cloud_provider:
33 | <<: *aci_info
34 | state: query
35 | register: query_cloud
36 | when: version.current.0.topSystem.attributes.version is version('4.1', '>=')
37 |
38 | - name: Set vars
39 | ansible.builtin.set_fact:
40 | query_cloud:
41 | current: []
42 | when: version.current.0.topSystem.attributes.version is version('4.1', '<')
43 |
44 | - name: Verify query_cloud for all sites
45 | ansible.builtin.assert:
46 | that:
47 | - query_cloud is not changed
48 |
49 | - name: Verify query_cloud for Cloud Sites
50 | ansible.builtin.assert:
51 | that:
52 | - query_cloud is not changed
53 | - query_cloud.current.0.cloudProvP.attributes.environment == "public-cloud"
54 | - '"vendor" in query_cloud.current.0.cloudProvP.attributes'
55 | when:
56 | - query_cloud.current | length > 0 # This condition will execute only cloud sites
57 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2020, Lionel Hercot (@lhercot)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # CLEAN ENVIRONMENT
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: '{{ aci_output_level | default("info") }}'
22 |
23 | # QUERY OBJECTS
24 | - name: Query all controllers system information
25 | cisco.aci.aci_system:
26 | <<: *aci_info
27 | state: query
28 | register: query_all
29 |
30 | - name: Verify query_all
31 | ansible.builtin.assert:
32 | that:
33 | - query_all is not changed
34 | - query_all.current.0.topSystem.attributes.id == "1"
35 | - '"version" in query_all.current.0.topSystem.attributes'
36 |
37 |
38 | - name: Query a specific controller system information
39 | cisco.aci.aci_system:
40 | <<: *aci_info
41 | id: 1
42 | state: query
43 | register: query_controller
44 |
45 | - name: Verify query_controller
46 | ansible.builtin.assert:
47 | that:
48 | - query_controller is not changed
49 | - query_controller.current.0.topSystem.attributes.id == "1"
50 | - '"version" in query_controller.current.0.topSystem.attributes'
51 |
52 | - name: Query non_existing controller
53 | cisco.aci.aci_system:
54 | <<: *aci_info
55 | id: 99
56 | state: query
57 | register: query_non_existing
58 |
59 | - name: Verify query_non_existing
60 | ansible.builtin.assert:
61 | that:
62 | - query_non_existing is not changed
63 | - query_non_existing.current == []
--------------------------------------------------------------------------------
/tests/integration/targets/aci_inventory_system/runme.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # shellcheck source=../../inventory.networking
4 | source ../../inventory.networking
5 |
6 | # Ensure test_inventory_ips is defined and is an array
7 | # Disabling the SC2154 warning to avoid sanity failures for ubuntu-latest (stable-2.16)
8 | # shellcheck disable=SC2154
9 | if [[ -z "${test_inventory_ips[*]}" ]]; then
10 | echo "Error: test_inventory_ips is not set or empty."
11 | exit 1
12 | fi
13 |
14 | HOSTS=("${test_inventory_ips[@]}")
15 |
16 | for host in "${HOSTS[@]}"; do
17 | echo "$host"
18 | # Create empty inventory files
19 | : > test.cisco_aci.yml
20 | : > test.cisco_aci_invalid.yml
21 |
22 | ansible-playbook playbooks/create_inventories.yml -e "template_name=cisco_aci_keyed_groups" -e "file_name=test.cisco_aci" -e "aci_host=${host}" -vvvv
23 | export ANSIBLE_INVENTORY="test.cisco_aci.yml"
24 |
25 | ansible-inventory --graph
26 | ansible-inventory --list
27 | ansible-playbook playbooks/role_controller.yml -vvvv
28 | # Current tests are executed against ACI fabrics that only consist of controllers.
29 | # The tests can also be executed against ACI fabrics that consist of leaf switches.
30 | # Test will fail when the hosts types ( like leaf role ) are not defined in the dynamic inventory.
31 | # Uncomment the line below to execute test specific for the leaf role.
32 | # ansible-playbook playbooks/role_leaf.yml -vvvv
33 |
34 | ansible-playbook playbooks/create_inventories.yml -e "template_name=cisco_aci" -e "file_name=test.cisco_aci" -e "aci_host=${host}" -vvvv
35 | ansible-inventory --list
36 | ansible-playbook playbooks/no_role_defined.yml -vvvv
37 |
38 | ansible-playbook playbooks/create_inventories.yml -e "template_name=cisco_aci_invalid_input" -e "file_name=test.cisco_aci" -e "aci_host=${host}" -vvvv
39 | ansible-inventory --list
40 | ansible-playbook playbooks/no_role_defined.yml -vvvv
41 |
42 | ansible-playbook playbooks/create_inventories.yml -e "template_name=cisco_aci_invalid_inventory_name" -e "file_name=test.cisco_aci_invalid" -e "aci_host=${host}" -vvvv
43 | export ANSIBLE_INVENTORY="test.cisco_aci_invalid.yml"
44 |
45 | ansible-inventory --list
46 | ansible-playbook playbooks/invalid.yml -vvvv
47 | done
48 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Bug_Report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🐛 Bug Report
3 | about: If something isn't working as expected 🤔.
4 | labels: bug
5 | ---
6 |
7 |
8 |
9 | ### Community Note
10 |
11 | * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
12 | * Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
13 | * If you are interested in working on this issue or have submitted a pull request, please leave a comment
14 |
15 |
16 |
17 | ### Description
18 |
20 |
21 |
22 |
23 | * xxxx
24 |
25 | ### Affected Module Name(s):
26 |
27 |
28 |
29 | * aci_XXXXX
30 |
31 | ### APIC version and APIC Platform
32 |
33 | * V x.x.x and on-prem/cloud-aws/cloud-azure/all.
34 |
35 | ### Collection versions
36 |
37 | * cisco.aci x.x.x
38 |
39 | ### Output/ Error message
40 |
41 |
44 | *
45 |
46 | ### Expected Behavior
47 |
48 |
49 | *
50 |
51 | ### Actual Behavior
52 |
53 |
54 | *
55 |
56 | ### Playbook tasks to Reproduce
57 |
58 |
59 |
60 | *
61 |
62 | ### Important Factoids
63 |
64 |
65 |
66 | ### References
67 |
68 |
73 |
74 | * #0000
--------------------------------------------------------------------------------
/tests/unit/module_utils/conftest.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2017 Ansible Project
2 | # GNU General Public License v3.0+
3 | # see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt
4 |
5 | from __future__ import absolute_import, division, print_function
6 |
7 | __metaclass__ = type
8 |
9 | import json
10 | import sys
11 | from io import BytesIO
12 |
13 | import pytest
14 |
15 | import ansible.module_utils.basic
16 | from ansible.module_utils.six import PY3, string_types
17 | from ansible.module_utils._text import to_bytes
18 | from ansible.module_utils.common._collections_compat import MutableMapping
19 |
20 |
21 | @pytest.fixture
22 | def stdin(mocker, request):
23 | old_args = ansible.module_utils.basic._ANSIBLE_ARGS
24 | ansible.module_utils.basic._ANSIBLE_ARGS = None
25 | old_argv = sys.argv
26 | sys.argv = ["ansible_unittest"]
27 |
28 | if isinstance(request.param, string_types):
29 | args = request.param
30 | elif isinstance(request.param, MutableMapping):
31 | if "ANSIBLE_MODULE_ARGS" not in request.param:
32 | request.param = {"ANSIBLE_MODULE_ARGS": request.param}
33 | if "_ansible_remote_tmp" not in request.param["ANSIBLE_MODULE_ARGS"]:
34 | request.param["ANSIBLE_MODULE_ARGS"]["_ansible_remote_tmp"] = "/tmp"
35 | if "_ansible_keep_remote_files" not in request.param["ANSIBLE_MODULE_ARGS"]:
36 | request.param["ANSIBLE_MODULE_ARGS"]["_ansible_keep_remote_files"] = False
37 | args = json.dumps(request.param)
38 | else:
39 | raise Exception("Malformed data to the stdin pytest fixture")
40 |
41 | fake_stdin = BytesIO(to_bytes(args, errors="surrogate_or_strict"))
42 | if PY3:
43 | mocker.patch("ansible.module_utils.basic.sys.stdin", mocker.MagicMock())
44 | mocker.patch("ansible.module_utils.basic.sys.stdin.buffer", fake_stdin)
45 | else:
46 | mocker.patch("ansible.module_utils.basic.sys.stdin", fake_stdin)
47 |
48 | yield fake_stdin
49 |
50 | ansible.module_utils.basic._ANSIBLE_ARGS = old_args
51 | sys.argv = old_argv
52 |
53 |
54 | @pytest.fixture
55 | def am(stdin, request):
56 | old_args = ansible.module_utils.basic._ANSIBLE_ARGS
57 | ansible.module_utils.basic._ANSIBLE_ARGS = None
58 | old_argv = sys.argv
59 | sys.argv = ["ansible_unittest"]
60 |
61 | argspec = {}
62 | if hasattr(request, "param"):
63 | if isinstance(request.param, dict):
64 | argspec = request.param
65 |
66 | am = ansible.module_utils.basic.AnsibleModule(
67 | argument_spec=argspec,
68 | )
69 | am._name = "ansible_unittest"
70 |
71 | yield am
72 |
73 | ansible.module_utils.basic._ANSIBLE_ARGS = old_args
74 | sys.argv = old_argv
75 |
--------------------------------------------------------------------------------
/plugins/lookup/interface_range.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | # Copyright: (c) 2022, Akini Ross (@akinross)
5 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6 |
7 | from __future__ import absolute_import, division, print_function
8 |
9 | __metaclass__ = type
10 |
11 | ANSIBLE_METADATA = {"metadata_version": "1.1", "status": ["preview"], "supported_by": "certified"}
12 |
13 | DOCUMENTATION = """
14 | name: interface_range
15 | short_description: query interfaces from a range or comma separated list of ranges
16 | description:
17 | - this lookup returns interfaces from a range or comma separated list of ranges given to it
18 | notes:
19 | - duplicate interfaces from overlapping ranges will only be returned once
20 | options:
21 | _terms:
22 | description: comma separated strings of interface ranges
23 | required: True
24 | """
25 |
26 | EXAMPLES = """
27 | - name: "loop through range of interfaces"
28 | ansible.builtin.debug:
29 | msg: "{{ item }}"
30 | with_items: "{{ query('cisco.aci.interface_range', '1/1-4,1/20-25', '1/5', '1/2/3/8-10', '5/0-2') }}"
31 | """
32 |
33 | RETURN = """
34 | _list:
35 | description: list of interfaces
36 | type: list
37 | elements: str
38 | """
39 |
40 | import re
41 |
42 | from ansible.errors import AnsibleError
43 | from ansible.plugins.lookup import LookupBase
44 |
45 |
46 | class LookupModule(LookupBase):
47 | def run(self, terms, **kwargs):
48 | interfaces = []
49 | errors = []
50 |
51 | for interface_range in ",".join(terms).replace(" ", "").split(","):
52 | if re.fullmatch(r"((\d+/)+\d+-\d+$)", interface_range):
53 | slots = interface_range.rsplit("/", 1)[0]
54 | range_start, range_stop = interface_range.rsplit("/", 1)[1].split("-")
55 | if int(range_stop) > int(range_start):
56 | for x in range(int(range_start), int(range_stop) + 1):
57 | interfaces.append("{0}/{1}".format(slots, x))
58 | else:
59 | errors.append(interface_range)
60 | elif re.fullmatch(r"((\d+/)+\d+$)", interface_range):
61 | interfaces.append(interface_range)
62 | else:
63 | errors.append(interface_range)
64 | if errors:
65 | raise AnsibleError("Invalid range inputs, {0}".format(errors))
66 |
67 | # Sorted functionality for visual aid only, will result in 1/25, 1/3, 1/31
68 | # If full sort is needed leverage natsort package (https://github.com/SethMMorton/natsort)
69 | return sorted(set(interfaces))
70 |
--------------------------------------------------------------------------------
/tests/unit/mock/procenv.py:
--------------------------------------------------------------------------------
1 | # (c) 2016, Matt Davis
2 | # (c) 2016, Toshio Kuratomi
3 | #
4 | # This file is part of Ansible
5 | #
6 | # Ansible is free software: you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation, either version 3 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # Ansible is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with Ansible. If not, see .
18 |
19 | # Make coding more python3-ish
20 | from __future__ import absolute_import, division, print_function
21 |
22 | __metaclass__ = type
23 |
24 | import sys
25 | import json
26 |
27 | from contextlib import contextmanager
28 | from io import BytesIO, StringIO
29 | from ansible_collections.cisco.aci.tests.unit.compat import unittest
30 | from ansible.module_utils.six import PY3
31 | from ansible.module_utils._text import to_bytes
32 |
33 |
34 | @contextmanager
35 | def swap_stdin_and_argv(stdin_data="", argv_data=tuple()):
36 | """
37 | context manager that temporarily masks the test runner's values for stdin and argv
38 | """
39 | real_stdin = sys.stdin
40 | real_argv = sys.argv
41 |
42 | if PY3:
43 | fake_stream = StringIO(stdin_data)
44 | fake_stream.buffer = BytesIO(to_bytes(stdin_data))
45 | else:
46 | fake_stream = BytesIO(to_bytes(stdin_data))
47 |
48 | try:
49 | sys.stdin = fake_stream
50 | sys.argv = argv_data
51 |
52 | yield
53 | finally:
54 | sys.stdin = real_stdin
55 | sys.argv = real_argv
56 |
57 |
58 | @contextmanager
59 | def swap_stdout():
60 | """
61 | context manager that temporarily replaces stdout for tests that need to verify output
62 | """
63 | old_stdout = sys.stdout
64 |
65 | if PY3:
66 | fake_stream = StringIO()
67 | else:
68 | fake_stream = BytesIO()
69 |
70 | try:
71 | sys.stdout = fake_stream
72 |
73 | yield fake_stream
74 | finally:
75 | sys.stdout = old_stdout
76 |
77 |
78 | class ModuleTestCase(unittest.TestCase):
79 | def setUp(self, module_args=None):
80 | if module_args is None:
81 | module_args = {"_ansible_remote_tmp": "/tmp", "_ansible_keep_remote_files": False}
82 |
83 | args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
84 |
85 | # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
86 | self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
87 | self.stdin_swap.__enter__()
88 |
89 | def tearDown(self):
90 | # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
91 | self.stdin_swap.__exit__(None, None, None)
92 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_region/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2020, Cindy Zhao (@cizhao)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # CLEAN ENVIRONMENT
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: '{{ aci_output_level | default("info") }}'
22 |
23 | - name: Verify Cloud and Non-Cloud Sites in use.
24 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
25 |
26 | - name: Execute tasks only for cloud sites
27 | when: query_cloud.current | length > 0 # This condition will execute only cloud sites
28 | block: # block specifies execution of tasks within, based on conditions
29 | - name: Query all regions
30 | cisco.aci.aci_cloud_region:
31 | <<: *aci_info
32 | cloud: "{{ cloud_type }}"
33 | state: query
34 | register: query_all
35 |
36 | - name: Verify query_all
37 | ansible.builtin.assert:
38 | that:
39 | - query_all is not changed
40 | - query_all.current.0.cloudProvP.attributes.dn == "uni/clouddomp/provp-{{cloud_type}}"
41 | - query_all.current.0.cloudProvP.attributes.vendor == "{{cloud_type}}"
42 | - query_all.current.0.cloudProvP.children | length > 10
43 | when: query_all.current != []
44 |
45 | - name: Query a specific region
46 | cisco.aci.aci_cloud_region:
47 | <<: *aci_info
48 | cloud: "{{ cloud_type }}"
49 | region: "{{ region_2 }}"
50 | state: query
51 | register: query_region
52 |
53 | - name: Verify query_region
54 | ansible.builtin.assert:
55 | that:
56 | - query_region is not changed
57 | - query_region.current.0.cloudRegion.attributes.adminSt == "managed"
58 | - query_region.current.0.cloudRegion.attributes.dn == "uni/clouddomp/provp-{{cloud_type}}/region-{{region_2}}"
59 | - query_region.current.0.cloudRegion.attributes.name == "{{region_2}}"
60 | when: query_region.current != []
61 |
62 | - name: Query non_existing region
63 | cisco.aci.aci_cloud_region:
64 | <<: *aci_info
65 | cloud: "{{ cloud_type }}"
66 | region: non_existing
67 | state: query
68 | register: query_non_existing_region
69 |
70 | - name: Verify query_non_existing_region
71 | ansible.builtin.assert:
72 | that:
73 | - query_non_existing_region is not changed
74 | - query_non_existing_region.current == []
75 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_bgp_rr_asn/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2021, Tim Cragg (@timcragg)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # GET Credentials from the inventory
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: debug
22 |
23 | # CLEAN ENVIRONMENT
24 | - name: Remove BGP Route Reflector ASN if it already exists
25 | cisco.aci.aci_bgp_rr_asn:
26 | <<: *aci_info
27 | state: absent
28 |
29 | # ADD ROUTE REFLECTOR BGP ASN
30 | - name: Add BGP Route Reflector ASN
31 | cisco.aci.aci_bgp_rr_asn:
32 | <<: *aci_info
33 | asn: 65001
34 | state: present
35 | register: add_bgp_rr_asn
36 |
37 | - name: Verify that BGP route reflector ASN has been created with correct attributes
38 | ansible.builtin.assert:
39 | that:
40 | - add_bgp_rr_asn is changed
41 | - add_bgp_rr_asn.current.0.bgpAsP.attributes.annotation == 'orchestrator:ansible'
42 | - add_bgp_rr_asn.current.0.bgpAsP.attributes.dn == "uni/fabric/bgpInstP-default/as"
43 | - add_bgp_rr_asn.current.0.bgpAsP.attributes.asn == "65001"
44 |
45 | # ADD ROUTE REFLECTOR ASN AGAIN TO TEST IDEMPOTENCE
46 | - name: Add BGP route reflector ASN again
47 | cisco.aci.aci_bgp_rr_asn:
48 | <<: *aci_info
49 | asn: 65001
50 | state: present
51 | register: add_bgp_rr_asn_again
52 |
53 | - name: Verify that BGP route reflector ASN idempotence
54 | ansible.builtin.assert:
55 | that:
56 | - add_bgp_rr_asn_again is not changed
57 | - add_bgp_rr_asn_again.current.0.bgpAsP.attributes.dn == "uni/fabric/bgpInstP-default/as"
58 | - add_bgp_rr_asn_again.current.0.bgpAsP.attributes.asn == "65001"
59 |
60 | # MODIFY ROUTE REFLECTOR ASN
61 | - name: Update BGP route reflector ASN
62 | cisco.aci.aci_bgp_rr_asn:
63 | <<: *aci_info
64 | asn: 65002
65 | state: present
66 | register: update_bgp_rr_asn
67 |
68 | - name: Verify that BGP route reflector ASN has been updated with correct attributes
69 | ansible.builtin.assert:
70 | that:
71 | - update_bgp_rr_asn is changed
72 | - update_bgp_rr_asn.current.0.bgpAsP.attributes.dn == "uni/fabric/bgpInstP-default/as"
73 | - update_bgp_rr_asn.current.0.bgpAsP.attributes.asn == "65002"
74 |
75 | # QUERY ROUTE REFLECTOR ASN
76 | - name: Query BGP route reflector ASN
77 | cisco.aci.aci_bgp_rr_asn:
78 | <<: *aci_info
79 | state: query
80 | register: query_bgp_rr_asn
81 |
82 | - name: Verify BGP route reflector ASN
83 | ansible.builtin.assert:
84 | that:
85 | - query_bgp_rr_asn is not changed
86 | - query_bgp_rr_asn.current.0.bgpAsP.attributes.dn == "uni/fabric/bgpInstP-default/as"
87 | - query_bgp_rr_asn.current.0.bgpAsP.attributes.asn == "65002"
88 |
--------------------------------------------------------------------------------
/docs/aci_collection_git_contribution_workflow.md:
--------------------------------------------------------------------------------
1 | # Git contribution workflow for ACI collection
2 |
3 | To contribute to the Cisco ACI Ansible Collection, follow the standard Git workflow: Fork → Clone → Branch. This ensures clean code isolation, proper tracking of changes, and allows seamless contributions via pull requests. Fork and clone tasks are carried out just once.
4 | The collection code is located in a git repository (https://github.com/CiscoDevNet/ansible-aci).
5 |
6 | **Step1: Fork the repository**
7 |
8 | A Fork is a personal copy of the repository under your GitHub account, allowing you to make changes without affecting the upstream project.
9 |
10 | Steps to create a fork of the repository:
11 | * Navigate to: https://github.com/CiscoDevNet/ansible-aci
12 | * Click the *Fork* button in the upper-right corner to create your fork of the CiscoDevNet's **ansible-aci** repo
13 |
14 | Refer to GitHub's official guide of [How to fork a repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo)
15 |
16 | **Step2: Clone the forked repository**
17 |
18 | Clone allows to copy a repository to the local machine.
19 |
20 | * Clone the forked repository in the terminal using the following command:
21 |
22 | ```text
23 | git clone https://github.com//ansible-aci.git
24 | ```
25 |
26 | Verify the name of the Git remote of your forked repository by running the following commands in the terminal:
27 |
28 | ```text
29 | cd ansible-aci
30 | git remote -v
31 | ```
32 |
33 | Expected output:
34 |
35 | ```text
36 | origin https://github.com//ansible-aci.git (fetch)
37 | origin https://github.com//ansible-aci.git (push)
38 | ```
39 |
40 | **Naming Convention**
41 | "origin" is the default name for the first Git remote of a cloned repository. In this case, it represents your forked repo where you are going to make changes, commit, and push your code to GitHub.
42 |
43 | * Add the upstream repo as a new Git remote:
44 |
45 | To be able to retrieve the latest changes made to the upstream project repo (CiscoDevNet/ansible-aci), we need to add it as a second Git remote. We recommend calling this second remote "upstream" and we will keep referring to it as upstream in the rest of the document.
46 | Add the original CiscoDevNet repository (CiscoDevNet/ansible-aci) as a second remote named `upstream`, which will allow the fetch, and sync the latest changes:
47 |
48 | ```text
49 | git remote add upstream https://github.com/CiscoDevNet/ansible-aci.git
50 | ```
51 |
52 | Adding the remote branch "upstream" is a one-time operation.
53 | After adding the upstream remote, update the local repository with the latest changes from the upstream repository:
54 |
55 | * Fetch and update the local `master` branch from upstream:
56 |
57 | ```text
58 | git checkout master
59 | git pull upstream master
60 | ```
61 |
62 | **Step 3: Create a Feature Branch**
63 |
64 | Branch facilitates bug fixes, addition of new features, and the integration of new versions after isolated testing. Master is the default branch of the local repository.
65 | Each time changes are required for a module or a new module is to be created, it is recommended that a new dedicated branch be created from master. This provides a clean branch of the latest master, enabling all necessary modifications to be made.
66 |
67 | * Create a branch from master by using the following commands on the terminal:
68 |
69 | ```text
70 | git checkout master
71 | git checkout -b
72 | ```
73 |
74 | Maintaining changes in a dedicated branch allows the master branch to remain clean and synchronized with the upstream master. This simplifies keeping the local master branch updated without the need to merge code or rebase the master branch.
75 |
76 | > [!CAUTION]
77 | > Never commit directly to `master`. Use feature branches for all development work to simplify merging, testing, and collaboration.
78 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_zone/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2020, Cindy Zhao (@cizhao)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # CLEAN ENVIRONMENT
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: '{{ aci_output_level | default("info") }}'
22 |
23 | - name: Verify Cloud and Non-Cloud Sites in use.
24 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
25 |
26 | - name: Execute tasks only for cloud sites
27 | when: query_cloud.current | length > 0 # This condition will execute only cloud sites
28 | block: # block specifies execution of tasks within, based on conditions
29 | - name: Query all zones under us-west-1
30 | cisco.aci.aci_cloud_zone:
31 | <<: *aci_info
32 | cloud: "{{ cloud_type }}"
33 | region: "{{ region_2 }}"
34 | state: query
35 | register: query_all
36 |
37 | - name: Verify query_all
38 | ansible.builtin.assert:
39 | that:
40 | - query_all is not changed
41 | - query_all.current.0.cloudRegion.attributes.name == "{{region_2}}"
42 | - query_all.current.0.cloudRegion.children | length >= 1
43 |
44 | - name: Query a specific zone under region us-west-1
45 | cisco.aci.aci_cloud_zone:
46 | <<: *aci_info
47 | cloud: "{{ cloud_type }}"
48 | region: "{{ region_2 }}"
49 | zone: "{{ availability_zone | default(omit) }}"
50 | state: query
51 | register: query_zone_1
52 |
53 | - name: Query another specific zone under region us-west-1
54 | cisco.aci.aci_cloud_zone:
55 | <<: *aci_info
56 | cloud: "{{ cloud_type }}"
57 | region: "{{ region_2 }}"
58 | zone: us-west-1b
59 | state: query
60 | register: query_zone_2
61 |
62 | - name: Verify query_zone_1 and query_zone_2
63 | ansible.builtin.assert:
64 | that:
65 | - query_zone_1 is not changed
66 | - query_zone_2 is not changed
67 | - query_zone_1.current.0.cloudZone.attributes.name == "{{availability_zone}}"
68 | - query_zone_1.current.0.cloudZone.attributes.dn == "uni/clouddomp/provp-{{cloud_type}}/region-{{region_2}}/zone-us-west-1a"
69 | - query_zone_2.current.0.cloudZone.attributes.name == "us-west-1b"
70 | - query_zone_2.current.0.cloudZone.attributes.dn == "uni/clouddomp/provp-{{cloud_type}}/region-{{region_2}}/zone-us-west-1b"
71 | when: query_zone_1.current != [] and query_zone_2.current != []
72 |
73 | - name: Query non_existing zone under region us-west-1
74 | cisco.aci.aci_cloud_zone:
75 | <<: *aci_info
76 | cloud: "{{ cloud_type }}"
77 | region: "{{ region_2 }}"
78 | zone: non_existing
79 | state: query
80 | register: query_non_existing_zone
81 |
82 | - name: Query zone under non_existing region
83 | cisco.aci.aci_cloud_zone:
84 | <<: *aci_info
85 | cloud: "{{ cloud_type }}"
86 | region: non_existing
87 | zone: "{{ availability_zone | default(omit) }}"
88 | state: query
89 | register: query_non_existing_region
90 |
91 | - name: Verify query_non_existing_zone
92 | ansible.builtin.assert:
93 | that:
94 | - query_non_existing_zone is not changed
95 | - query_non_existing_zone.current == []
96 | - query_non_existing_region is not changed
97 | - query_non_existing_region.current == []
98 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system_connectivity_preference/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2024, David Neilan (@dneilan-intel)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - name: Set vars
12 | ansible.builtin.set_fact:
13 | aci_info: &aci_info
14 | host: "{{ aci_hostname }}"
15 | username: "{{ aci_username }}"
16 | password: "{{ aci_password }}"
17 | validate_certs: '{{ aci_validate_certs | default(false) }}'
18 | use_ssl: '{{ aci_use_ssl | default(true) }}'
19 | use_proxy: '{{ aci_use_proxy | default(true) }}'
20 | output_level: '{{ aci_output_level | default("info") }}'
21 |
22 | # CLEANUP ENVIRONMENT
23 | - name: Initialize system connectivity preference
24 | cisco.aci.aci_system_connectivity_preference: &aci_system_connectivity_preference_initial
25 | <<: *aci_info
26 | interface_preference: inband
27 |
28 | # UPDATE SYSTEM CONNECTIVITY PREFERENCE
29 | - name: Update system connectivity preference (check mode)
30 | cisco.aci.aci_system_connectivity_preference: &aci_connectivity_preference
31 | <<: *aci_info
32 | interface_preference: ooband
33 | check_mode: true
34 | register: cm_update_connectivity_preference
35 |
36 | - name: Update system connectivity preference
37 | cisco.aci.aci_system_connectivity_preference:
38 | <<: *aci_connectivity_preference
39 | register: nm_update_connectivity_preference
40 |
41 | - name: Update system connectivity preference again
42 | cisco.aci.aci_system_connectivity_preference:
43 | <<: *aci_connectivity_preference
44 | register: nm_update_connectivity_preference_again
45 |
46 | - name: Verify system connectivity preference
47 | ansible.builtin.assert:
48 | that:
49 | - cm_update_connectivity_preference is changed
50 | - cm_update_connectivity_preference.proposed.mgmtConnectivityPrefs.attributes.interfacePref == "ooband"
51 | - cm_update_connectivity_preference.current.0.mgmtConnectivityPrefs.attributes.interfacePref == "inband"
52 | - nm_update_connectivity_preference is changed
53 | - nm_update_connectivity_preference.current.0.mgmtConnectivityPrefs.attributes.interfacePref == "ooband"
54 | - nm_update_connectivity_preference.previous.0.mgmtConnectivityPrefs.attributes.interfacePref == "inband"
55 | - nm_update_connectivity_preference_again is not changed
56 | - nm_update_connectivity_preference_again.current.0.mgmtConnectivityPrefs.attributes.interfacePref == "ooband"
57 | - nm_update_connectivity_preference_again.previous.0.mgmtConnectivityPrefs.attributes.interfacePref == "ooband"
58 |
59 | # QUERY SYSTEM CONNECTIVITY PREFERENCE
60 | - name: Query system connectivity preference
61 | cisco.aci.aci_system_connectivity_preference:
62 | <<: *aci_connectivity_preference
63 | state: query
64 | register: query
65 |
66 | - name: Verify system connectivity preference query
67 | ansible.builtin.assert:
68 | that:
69 | - query is not changed
70 | - query.current.0.mgmtConnectivityPrefs.attributes.interfacePref == "ooband"
71 |
72 | # ERROR SYSTEM CONNECTIVITY PREFERENCE
73 | - name: Update system connectivity preference (error)
74 | cisco.aci.aci_system_connectivity_preference:
75 | <<: *aci_info
76 | interface_preference: foo
77 | ignore_errors: true
78 | register: err_update_system_connectivity_preference
79 |
80 | - name: Verify system connectivity preference error
81 | ansible.builtin.assert:
82 | that:
83 | - err_update_system_connectivity_preference is failed
84 | - err_update_system_connectivity_preference.msg == expected_failure_message
85 | vars:
86 | expected_failure_message: "value of interface_preference must be one of: ooband, inband, got: foo"
87 |
88 | # CLEANUP ENVIRONMENT
89 | - name: Revert system connectivity preference
90 | cisco.aci.aci_system_connectivity_preference:
91 | <<: *aci_system_connectivity_preference_initial
92 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_vpn_gateway/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2020, Cindy Zhao (@cizhao)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # CLEAN ENVIRONMENT
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: '{{ aci_output_level | default("info") }}'
22 |
23 | - name: Verify Cloud and Non-Cloud Sites in use.
24 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
25 |
26 | - name: Execute tasks only for cloud sites
27 | when: query_cloud.current | length > 0 # This condition will execute only cloud sites
28 | block: # block specifies execution of tasks within, based on conditions
29 | - name: Ensure tenant doesn't exist
30 | cisco.aci.aci_tenant:
31 | <<: *aci_info
32 | state: absent
33 | tenant: ansible_test
34 | register: tenant_absent
35 |
36 | - name: Ensure tenant exists for tests to kick off
37 | cisco.aci.aci_tenant:
38 | <<: *aci_info
39 | state: present
40 | tenant: ansible_test
41 | register: tenant_present
42 |
43 | - name: Ensure aci cloud context profile does not exists
44 | cisco.aci.aci_cloud_ctx_profile:
45 | <<: *aci_info
46 | tenant: ansible_test
47 | name: ctx_profile_1
48 | state: absent
49 | register: rm_ctx_profile_1
50 |
51 | - name: Verify rm_ctx_profile_1
52 | ansible.builtin.assert:
53 | that:
54 | - rm_ctx_profile_1.current == []
55 |
56 | - name: Create aci cloud context profile (normal mode)
57 | cisco.aci.aci_cloud_ctx_profile:
58 | <<: *aci_info
59 | tenant: ansible_test
60 | cloud: "{{ cloud_type }}"
61 | name: ctx_profile_1
62 | vrf: ctx_profile_vrf_1
63 | region: "{{ region_2 }}"
64 | primary_cidr: '10.50.0.0/16'
65 | state: present
66 | register: nm_add_aci_ctx_profile
67 |
68 | - name: Create aci cloud subnet with VpnGateway enabled (normal_mode)
69 | cisco.aci.aci_cloud_subnet:
70 | <<: *aci_info
71 | tenant: ansible_test
72 | cloud_context_profile: ctx_profile_1
73 | cidr: '10.50.0.0/16'
74 | availability_zone: "{{ availability_zone | default(omit) }}"
75 | address: 10.50.0.1
76 | description: specify this subnet as VpnGateway router
77 | vnet_gateway: "{{ vnet_gateway | default(omit)}}"
78 | state: present
79 | register: nm_add_subnet
80 |
81 | - name: Enable VpnGateway
82 | cisco.aci.aci_cloud_vpn_gateway:
83 | <<: *aci_info
84 | tenant: ansible_test
85 | cloud_context_profile: ctx_profile_1
86 | state: present
87 |
88 | - name: Disable VpnGateway
89 | cisco.aci.aci_cloud_vpn_gateway:
90 | <<: *aci_info
91 | tenant: ansible_test
92 | cloud_context_profile: ctx_profile_1
93 | state: absent
94 |
95 | - name: Enable VpnGateway again
96 | cisco.aci.aci_cloud_vpn_gateway:
97 | <<: *aci_info
98 | tenant: ansible_test
99 | cloud_context_profile: ctx_profile_1
100 | state: present
101 |
102 | - name: Query VpnGateway
103 | cisco.aci.aci_cloud_vpn_gateway:
104 | <<: *aci_info
105 | tenant: ansible_test
106 | cloud_context_profile: ctx_profile_1
107 | register: query_vpn_gateway
108 |
109 | - name: Verify VpnGateway
110 | ansible.builtin.assert:
111 | that:
112 | - query_vpn_gateway is not changed
113 | - query_vpn_gateway.current.0.cloudRouterP.children | length == 3
114 | - query_vpn_gateway.current.0.cloudRouterP.attributes.annotation == 'orchestrator:ansible'
115 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_contract_export/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Author: Marcel Zehnder (@maercu)
2 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
3 |
4 | # SET VARS
5 | - name: Set vars
6 | ansible.builtin.set_fact:
7 | aci_info: &aci_info
8 | host: '{{ aci_hostname }}'
9 | username: '{{ aci_username }}'
10 | password: '{{ aci_password }}'
11 | validate_certs: '{{ aci_validate_certs | default(false) }}'
12 | use_ssl: '{{ aci_use_ssl | default(true) }}'
13 | use_proxy: '{{ aci_use_proxy | default(true) }}'
14 | output_level: '{{ aci_output_level | default("info") }}'
15 |
16 | # CLEAN ENVIRONMENT
17 | - name: Remove test tenant1 before we kickoff
18 | cisco.aci.aci_tenant: &tenant1_absent
19 | <<: *aci_info
20 | tenant: ansible_test
21 | state: absent
22 |
23 | - name: Remove test tenant2 before we kickoff
24 | cisco.aci.aci_tenant: &tenant2_absent
25 | <<: *aci_info
26 | tenant: ansible_test_2
27 | state: absent
28 |
29 | # SETUP ENVIRONMENT
30 | - name: Create tenant1
31 | cisco.aci.aci_tenant: &tenant1_present
32 | <<: *tenant1_absent
33 | state: present
34 |
35 | - name: Create tenant2
36 | cisco.aci.aci_tenant: &tenant2_present
37 | <<: *tenant2_absent
38 | state: present
39 |
40 | - name: Configure source contracts
41 | cisco.aci.aci_contract:
42 | <<: *tenant1_present
43 | contract: '{{ item }}'
44 | scope: global
45 | loop:
46 | - src_contract1
47 | - src_contract2
48 |
49 | # BEGIN WITH TESTS
50 | - name: Create contract interface (check_mode)
51 | cisco.aci.aci_contract_export: &cif_present
52 | <<: *tenant1_present
53 | contract: src_contract1
54 | destination_tenant: ansible_test_2
55 | name: testcif1
56 | check_mode: true
57 | register: cm_add_intf
58 |
59 | - name: Create contract interface (normal_mode)
60 | cisco.aci.aci_contract_export:
61 | <<: *cif_present
62 | register: nm_add_intf
63 |
64 | - name: Verify add_intf
65 | ansible.builtin.assert:
66 | that:
67 | - cm_add_intf is changed
68 | - nm_add_intf is changed
69 | - cm_add_intf.previous == nm_add_intf.previous == []
70 | - cm_add_intf.sent.vzCPIf.attributes.name == nm_add_intf.sent.vzCPIf.attributes.name == 'testcif1'
71 | - nm_add_intf.current.0.vzCPIf.attributes.annotation == 'orchestrator:ansible'
72 |
73 | - name: Create interface again, check if idempotency works
74 | cisco.aci.aci_contract_export:
75 | <<: *cif_present
76 | register: add_intf_again
77 |
78 | - name: Verify add_intf_again
79 | ansible.builtin.assert:
80 | that:
81 | - add_intf_again is not changed
82 |
83 | # UPDATE CONTRACT INTERFACEE
84 | - name: Update interface
85 | cisco.aci.aci_contract_export: &cif_update
86 | <<: *cif_present
87 | description: newdescription
88 | register: update_intf
89 |
90 | - name: Verify update_intf
91 | ansible.builtin.assert:
92 | that:
93 | - update_intf is changed
94 | - update_intf.previous != []
95 |
96 | # CREATE ANOTHER CONTRACT INTERFACE
97 | - name: Add another profile
98 | cisco.aci.aci_contract_export:
99 | <<: *cif_present
100 | name: testcif2
101 | contract: src_contract2
102 |
103 | # QUERY ALL INTERFACES
104 | - name: Query all interfaces
105 | cisco.aci.aci_contract_export:
106 | <<: *aci_info
107 | state: query
108 | register: query_all_intfs
109 |
110 | - name: Verify query_all_intfs
111 | ansible.builtin.assert:
112 | that:
113 | - query_all_intfs is not changed
114 | - query_all_intfs.current|length > 1
115 |
116 | # QUERY A SPECIFIC INTERFACE
117 | - name: Query a specific interface
118 | cisco.aci.aci_contract_export:
119 | <<: *cif_update
120 | state: query
121 | register: query_spec_intf
122 |
123 | - name: Verify query_spec_intf
124 | ansible.builtin.assert:
125 | that:
126 | - query_spec_intf is not changed
127 | - query_spec_intf.current|length == 1
128 |
129 | # REMOVE INTERFACE
130 | - name: Remove interface
131 | cisco.aci.aci_contract_export:
132 | <<: *cif_update
133 | state: absent
134 | register: remove_intf
135 |
136 | - name: Verify remove_intf
137 | ansible.builtin.assert:
138 | that:
139 | - remove_intf is changed
140 | - remove_intf.current == []
141 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_interface_policy_cdp/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2019, Tim Knipper (tknipper11)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | - name: Verify Cloud and Non-Cloud Sites in use.
12 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
13 |
14 | - name: Execute tasks only for non-cloud sites
15 | when: query_cloud.current == [] # This condition will execute only non-cloud sites
16 | block: # block specifies execution of tasks within, based on conditions
17 | # CLEAN ENVIRONMENT
18 | - name: Remove CDP Test Policy
19 | cisco.aci.aci_interface_policy_cdp:
20 | name: Ansible_CDP_Test_Policy
21 | host: "{{ aci_hostname }}"
22 | username: "{{ aci_username }}"
23 | password: "{{ aci_password }}"
24 | validate_certs: '{{ aci_validate_certs | default(false) }}'
25 | use_ssl: '{{ aci_use_ssl | default(true) }}'
26 | use_proxy: '{{ aci_use_proxy | default(false) }}'
27 | output_level: debug
28 | state: absent
29 | register: cdp_delete
30 |
31 | - name: Create CDP Test Policy
32 | cisco.aci.aci_interface_policy_cdp:
33 | name: Ansible_CDP_Test_Policy
34 | host: "{{ aci_hostname }}"
35 | username: "{{ aci_username }}"
36 | password: "{{ aci_password }}"
37 | validate_certs: '{{ aci_validate_certs | default(false) }}'
38 | use_ssl: '{{ aci_use_ssl | default(true) }}'
39 | use_proxy: '{{ aci_use_proxy | default(false) }}'
40 | # output_level: debug
41 | state: present
42 | register: cdp_create
43 | - debug:
44 | var: cdp_create
45 |
46 | - assert:
47 | that:
48 | - cdp_create is changed
49 | - cdp_create.current.0.cdpIfPol.attributes.annotation == 'orchestrator:ansible'
50 |
51 |
52 | - name: test for idempotency
53 | cisco.aci.aci_interface_policy_cdp:
54 | name: Ansible_CDP_Test_Policy
55 | host: "{{ aci_hostname }}"
56 | username: "{{ aci_username }}"
57 | password: "{{ aci_password }}"
58 | validate_certs: '{{ aci_validate_certs | default(false) }}'
59 | use_ssl: '{{ aci_use_ssl | default(true) }}'
60 | use_proxy: '{{ aci_use_proxy | default(false) }}'
61 | # output_level: debug
62 | state: present
63 | register: cdp_idem
64 |
65 | - name: Assert that idempotency is not changed
66 | ansible.builtin.assert:
67 | that:
68 | - cdp_idem is not changed
69 |
70 |
71 |
72 | - name: Create CDP Disable Test Policy
73 | cisco.aci.aci_interface_policy_cdp:
74 | name: Ansible_CDP_Test_Policy
75 | host: "{{ aci_hostname }}"
76 | username: "{{ aci_username }}"
77 | password: "{{ aci_password }}"
78 | validate_certs: '{{ aci_validate_certs | default(false) }}'
79 | use_ssl: '{{ aci_use_ssl | default(true) }}'
80 | use_proxy: '{{ aci_use_proxy | default(false) }}'
81 | # output_level: debug
82 | state: present
83 | admin_state: false
84 | register: cdp_disable
85 | - debug:
86 | var: cdp_disable
87 |
88 | - name: Assert that CDP is Disabled
89 | ansible.builtin.assert:
90 | that:
91 | - cdp_disable.current.0.cdpIfPol.attributes.adminSt == 'disabled'
92 |
93 |
94 | - name: Query CDP Policy
95 | cisco.aci.aci_interface_policy_cdp:
96 | host: "{{ aci_hostname }}"
97 | username: "{{ aci_username }}"
98 | password: "{{ aci_password }}"
99 | validate_certs: '{{ aci_validate_certs | default(false) }}'
100 | use_ssl: '{{ aci_use_ssl | default(true) }}'
101 | use_proxy: '{{ aci_use_proxy | default(false) }}'
102 | # output_level: debug
103 | state: query
104 | register: cdp_query
105 | - debug:
106 | var: cdp_query
107 |
108 | - name: CDP Query Assertion
109 | ansible.builtin.assert:
110 | that:
111 | - cdp_query is not changed
--------------------------------------------------------------------------------
/tests/unit/mock/loader.py:
--------------------------------------------------------------------------------
1 | # (c) 2012-2014, Michael DeHaan
2 | #
3 | # This file is part of Ansible
4 | #
5 | # Ansible is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # Ansible is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with Ansible. If not, see .
17 |
18 | # Make coding more python3-ish
19 | from __future__ import absolute_import, division, print_function
20 |
21 | __metaclass__ = type
22 |
23 | import os
24 |
25 | from ansible.errors import AnsibleParserError
26 | from ansible.parsing.dataloader import DataLoader
27 | from ansible.module_utils._text import to_bytes, to_text
28 |
29 |
30 | class DictDataLoader(DataLoader):
31 | def __init__(self, file_mapping=None):
32 | file_mapping = {} if file_mapping is None else file_mapping
33 | assert isinstance(file_mapping, dict)
34 |
35 | super(DictDataLoader, self).__init__()
36 |
37 | self._file_mapping = file_mapping
38 | self._build_known_directories()
39 | self._vault_secrets = None
40 |
41 | def load_from_file(self, path, cache=True, unsafe=False):
42 | path = to_text(path)
43 | if path in self._file_mapping:
44 | return self.load(self._file_mapping[path], path)
45 | return None
46 |
47 | # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
48 | # unicode/text it's created with to utf-8
49 | def _get_file_contents(self, file_name):
50 | file_name = to_text(file_name)
51 | if file_name in self._file_mapping:
52 | return (to_bytes(self._file_mapping[file_name]), False)
53 | else:
54 | raise AnsibleParserError("file not found: %s" % file_name)
55 |
56 | def path_exists(self, path):
57 | path = to_text(path)
58 | return path in self._file_mapping or path in self._known_directories
59 |
60 | def is_file(self, path):
61 | path = to_text(path)
62 | return path in self._file_mapping
63 |
64 | def is_directory(self, path):
65 | path = to_text(path)
66 | return path in self._known_directories
67 |
68 | def list_directory(self, path):
69 | ret = []
70 | path = to_text(path)
71 | for x in list(self._file_mapping.keys()) + self._known_directories:
72 | if x.startswith(path):
73 | if os.path.dirname(x) == path:
74 | ret.append(os.path.basename(x))
75 | return ret
76 |
77 | def is_executable(self, path):
78 | # FIXME: figure out a way to make paths return true for this
79 | return False
80 |
81 | def _add_known_directory(self, directory):
82 | if directory not in self._known_directories:
83 | self._known_directories.append(directory)
84 |
85 | def _build_known_directories(self):
86 | self._known_directories = []
87 | for path in self._file_mapping:
88 | dirname = os.path.dirname(path)
89 | while dirname not in ("/", ""):
90 | self._add_known_directory(dirname)
91 | dirname = os.path.dirname(dirname)
92 |
93 | def push(self, path, content):
94 | rebuild_dirs = False
95 | if path not in self._file_mapping:
96 | rebuild_dirs = True
97 |
98 | self._file_mapping[path] = content
99 |
100 | if rebuild_dirs:
101 | self._build_known_directories()
102 |
103 | def pop(self, path):
104 | if path in self._file_mapping:
105 | del self._file_mapping[path]
106 | self._build_known_directories()
107 |
108 | def clear(self):
109 | self._file_mapping = dict()
110 | self._known_directories = []
111 |
112 | def get_basedir(self):
113 | return os.getcwd()
114 |
115 | def set_vault_secrets(self, vault_secrets):
116 | self._vault_secrets = vault_secrets
117 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_system_global_aes_passphrase_encryption/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2023, Tim Cragg (@timcragg)
3 | # Copyright: (c) 2023, Akini Ross (@akinross)
4 |
5 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6 |
7 | - name: Test that we have an ACI APIC host, ACI username and ACI password
8 | ansible.builtin.fail:
9 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
10 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
11 |
12 | # SET VARS
13 | - name: Set vars
14 | ansible.builtin.set_fact:
15 | aci_info: &aci_info
16 | host: '{{ aci_hostname }}'
17 | username: '{{ aci_username }}'
18 | password: '{{ aci_password }}'
19 | validate_certs: '{{ aci_validate_certs | default(false) }}'
20 | use_ssl: '{{ aci_use_ssl | default(true) }}'
21 | use_proxy: '{{ aci_use_proxy | default(true) }}'
22 | output_level: '{{ aci_output_level | default("info") }}'
23 |
24 | - name: Verify Cloud and Non-Cloud Sites in use.
25 | ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
26 |
27 | - name: Execute tasks only for non-cloud sites
28 | when: query_cloud.current == [] # This condition will skip execution for cloud sites
29 | block:
30 |
31 | - name: Clear existing passphrase
32 | cisco.aci.aci_system_global_aes_passphrase_encryption:
33 | <<: *aci_info
34 | state: absent
35 |
36 | - name: Set passphrase
37 | cisco.aci.aci_system_global_aes_passphrase_encryption:
38 | <<: *aci_info
39 | passphrase: ansible_passphrase
40 | state: present
41 | register: set_passphrase
42 |
43 | - name: Set passphrase again
44 | cisco.aci.aci_system_global_aes_passphrase_encryption:
45 | <<: *aci_info
46 | passphrase: ansible_passphrase
47 | state: present
48 | register: set_passphrase_again
49 |
50 | - name: Query key configured
51 | cisco.aci.aci_system_global_aes_passphrase_encryption:
52 | <<: *aci_info
53 | state: query
54 | register: query_passphrase
55 |
56 | - name: Enable encryption
57 | cisco.aci.aci_system_global_aes_passphrase_encryption:
58 | <<: *aci_info
59 | enable: yes
60 | state: present
61 |
62 | - name: Query encryption enabled
63 | cisco.aci.aci_system_global_aes_passphrase_encryption:
64 | <<: *aci_info
65 | state: query
66 | register: query_encryption
67 |
68 | - name: Verify passphrase and encryption settings
69 | ansible.builtin.assert:
70 | that:
71 | - set_passphrase.current.0.pkiExportEncryptionKey.attributes.passphrase is undefined
72 | - set_passphrase.proposed.pkiExportEncryptionKey.attributes.passphrase == "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
73 | # Idempotency is not supported when setting passphrase
74 | - set_passphrase_again is changed
75 | - set_passphrase_again.current == set_passphrase_again.previous
76 | - set_passphrase_again.current.0.pkiExportEncryptionKey.attributes.passphrase is undefined
77 | - set_passphrase_again.previous.0.pkiExportEncryptionKey.attributes.passphrase is undefined
78 | - set_passphrase_again.proposed.pkiExportEncryptionKey.attributes.passphrase == "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
79 | - query_passphrase.current.0.pkiExportEncryptionKey.attributes.keyConfigured == "yes"
80 | - query_passphrase.current.0.pkiExportEncryptionKey.attributes.strongEncryptionEnabled == "no"
81 | - query_encryption.current.0.pkiExportEncryptionKey.attributes.keyConfigured == "yes"
82 | - query_encryption.current.0.pkiExportEncryptionKey.attributes.strongEncryptionEnabled == "yes"
83 |
84 | # CLEAR PASSPHRASE
85 | - name: Clear encryption key
86 | cisco.aci.aci_system_global_aes_passphrase_encryption:
87 | <<: *aci_info
88 | state: absent
89 |
90 | - name: Query cleared encryption key
91 | cisco.aci.aci_system_global_aes_passphrase_encryption:
92 | <<: *aci_info
93 | state: query
94 | register: query_deletion
95 |
96 | - name: Verify encryption key is deleted
97 | ansible.builtin.assert:
98 | that:
99 | - query_deletion.current.0.pkiExportEncryptionKey.attributes.keyConfigured == "no"
100 | - query_deletion.current.0.pkiExportEncryptionKey.attributes.strongEncryptionEnabled == "no"
101 |
--------------------------------------------------------------------------------
/docs/optimizing.md:
--------------------------------------------------------------------------------
1 | # Optimizing Playbooks
2 |
3 | The combined use of the following optimizations can reduce playbook execution time when compared to default behavior. This reduction can be significant in some circumstances.
4 |
5 | ## Using the ACI HTTPAPI plugin
6 |
7 | The Ansible ACI HTTPAPI plugin instructs Ansible how to interact with an APIC's HTTP based API and execute tasks on the APIC.
8 |
9 | ### Benefits
10 |
11 | - The ACI login credentials and ansible variables can stay in the inventory.
12 | - Logs in once and executes subsequent tasks without requiring additional logins when using password-based authentication.
13 | - Automatically refreshes password-based logins if the token expires during the playbook.
14 | - Assists with overcoming rate limiting on logins.
15 | - Leverages APIC's high availability by allowing a list of APIC hosts to be defined as a single ansible host.
16 |
17 | ### Enabling the plugin
18 |
19 | The httpapi plugin can be enabled by setting the following variables:
20 |
21 | ```ini
22 | ansible_connection=ansible.netcommon.httpapi
23 | ansible_network_os=cisco.aci.aci
24 | ```
25 |
26 | Instead of using `hostname`, `username` & `password` in the playbook, the following variables can be used in the inventory.
27 |
28 | ```ini
29 | ansible_user=apicUser
30 | ansible_password="SomeSecretPassword"
31 | ```
32 |
33 | The `ansible_host` variable can contain one or more APIC hosts separated by a comma. If multiple hosts are defined the plugin will try executing tasks on the hosts in the order listed until one completes or they all fail.
34 |
35 | ```ini
36 | single_apic ansible_host=apic.host
37 | cluster_apic ansible_host=apic1.host,apic2.host,apic3.host
38 | ```
39 |
40 | Signature-based authentication can be specified in the inventory.
41 |
42 | ```ini
43 | ansible_httpapi_session_key={'admin': "{{ lookup('file', 'admin.key')}}"}
44 | ```
45 |
46 | > [!NOTE]
47 | > `ansible_httpapi_session_key` takes precedence over `ansible_password`.
48 |
49 | > [!TIP]
50 | > Using signature-based authentication with or without ACI HTTPAPI enabled has the same execution time benefit.
51 |
52 | ### Full Example Inventory using ACI HTTPAPI plugin
53 |
54 | ```ini
55 | [aci]
56 | single_apic ansible_host=apic.host
57 | cluster_apic ansible_host=apic1.host,apic2.host,apic3.host
58 |
59 | [aci:vars]
60 | ansible_user=admin
61 | ansible_password="SomeSecretPassword"
62 | ansible_connection=ansible.netcommon.httpapi
63 | ansible_network_os=cisco.aci.aci
64 | ```
65 |
66 | ## Using the `suppress_` options
67 |
68 | Users of all ACI modules have two options for optimizing playbook performance by decreasing API calls. These parameters can improve playbook performance while disabling some module functionality. The goal of these suppress options is to limit the number of GET API calls to APIC, hence reducing APIC's workload and increasing playbook execution speed.
69 |
70 | ### `suppress_previous`
71 |
72 | If enabled, a GET call to check previous object state will not be sent before a POST update to APIC.
73 |
74 | > [!WARNING]
75 | > This causes the previous return value to be empty. The previous state of the object will not be checked and POST update calls to APIC will contain all properties specified in the task.
76 |
77 | #### `suppress_previous` Aliases
78 |
79 | - `no_previous`
80 | - `ignore_previous`
81 |
82 | #### `suppress_previous` Example
83 |
84 | ```yml
85 | - hosts: aci
86 | gather_facts: no
87 |
88 | tasks:
89 | - name: Add a new EPG
90 | cisco.aci.aci_epg:
91 | tenant: production
92 | ap: intranet
93 | epg: web_epg
94 | description: Web Intranet EPG
95 | bd: prod_bd
96 | suppress_previous: true
97 | ```
98 |
99 | ### `suppress_verification`
100 |
101 | If enabled, a verifying GET call to check current object state will not be sent after a POST call to APIC.
102 |
103 | > [!WARNING]
104 | > This causes the current return value to be set to the proposed value. The current object state including default values will be unverifiable until another task executes for the same object.
105 |
106 | #### `suppress_verification` Aliases
107 |
108 | - `no_verification`
109 | - `no_verify`
110 | - `suppress_verify`
111 | - `ignore_verify`
112 | - `ignore_verification`
113 |
114 | #### `suppress_verification` Example
115 |
116 | ```yml
117 | - hosts: aci
118 | gather_facts: no
119 |
120 | tasks:
121 | - name: Add a new EPG
122 | cisco.aci.aci_epg:
123 | tenant: production
124 | ap: intranet
125 | epg: web_epg
126 | description: Web Intranet EPG
127 | bd: prod_bd
128 | suppress_verification: true
129 | ```
130 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_cloud_bgp_asn/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2021, Anvitha Jain (@anvitha-jain)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # These tasks need not be executed now, to execute the given tasks follow these steps:
12 | # 1. Go to cloud APIC
13 | # 2. Go to Region Management (top right corner blue arrow symbol)
14 | # 3. Deselect the box whose cloud routers option is selected
15 | # 4. Run the below task
16 | # 5. Once the tasks are completed revert the changes made in above steps.
17 |
18 | # CLEAN ENVIRONMENT
19 | - name: Set vars
20 | ansible.builtin.set_fact:
21 | aci_info: &aci_info
22 | host: "{{ aci_hostname }}"
23 | username: "{{ aci_username }}"
24 | password: "{{ aci_password }}"
25 | validate_certs: '{{ aci_validate_certs | default(false) }}'
26 | use_ssl: '{{ aci_use_ssl | default(true) }}'
27 | use_proxy: '{{ aci_use_proxy | default(true) }}'
28 | output_level: '{{ aci_output_level | default("info") }}'
29 |
30 | # - name: Verify Cloud and Non-Cloud Sites in use.
31 | # ansible.builtin.include_tasks: ../../../../../../integration/targets/aci_cloud_provider/tasks/main.yml
32 |
33 | # - name: Execute tasks only for cloud sites
34 | # when: query_cloud.current | length > 0 # This condition will execute only cloud sites
35 | # block: # block specifies execution of tasks within, based on conditions
36 |
37 | # - name: Ensure cloud BGP ASN doesn't exist
38 | # cisco.aci.aci_cloud_bgp_asn:
39 | # <<: *aci_info
40 | # state: absent
41 |
42 | # - name: Create cloud BGP ASN
43 | # cisco.aci.aci_cloud_bgp_asn:
44 | # <<: *aci_info
45 | # state: present
46 | # register: asn_present
47 |
48 | # - name: Verify asn_present
49 | # ansible.builtin.assert:
50 | # that:
51 | # - asn_present is changed
52 | # - asn_present.current.0.cloudBgpAsP.attributes.asn == '0'
53 |
54 | # - name: Create cloud BGP ASN
55 | # cisco.aci.aci_cloud_bgp_asn:
56 | # <<: *aci_info
57 | # annotation: 'tag_system'
58 | # asn: 64605
59 | # description: 'sample autonomous profile'
60 | # name: 'BGP_ASN'
61 | # name_alias: 'alias_sys_prof'
62 | # state: present
63 | # register: asn_present_2
64 |
65 | # - name: Verify asn_present_2
66 | # ansible.builtin.assert:
67 | # that:
68 | # - asn_present_2 is changed
69 | # - asn_present_2.current.0.cloudBgpAsP.attributes.asn == '64605'
70 |
71 | # - name: Create same cloud BGP ASN again
72 | # cisco.aci.aci_cloud_bgp_asn:
73 | # <<: *aci_info
74 | # annotation: 'tag_system'
75 | # asn: 64605
76 | # description: 'sample autonomous profile'
77 | # name: 'BGP_ASN'
78 | # name_alias: 'alias_sys_prof'
79 | # state: present
80 | # register: asn_present_again
81 |
82 | # - name: Verify asn_present_again
83 | # ansible.builtin.assert:
84 | # that:
85 | # - asn_present_again is not changed
86 | # - asn_present_again.current.0.cloudBgpAsP.attributes.asn == '64605'
87 |
88 | # - name: Query particular cloud BGP ASN
89 | # cisco.aci.aci_cloud_bgp_asn:
90 | # <<: *aci_info
91 | # annotation: 'tag_system'
92 | # asn: 64605
93 | # description: 'sample autonomous profile'
94 | # name: 'BGP_ASN'
95 | # name_alias: 'alias_sys_prof'
96 | # state: query
97 | # register: asn_query
98 |
99 | # # Query all will give same result as query
100 | # # There can be only one cloud BGP ASN
101 | # - name: Query all cloud BGP ASN
102 | # cisco.aci.aci_cloud_bgp_asn:
103 | # <<: *aci_info
104 | # state: query
105 | # register: asn_query_all
106 |
107 | # - name: Verify query
108 | # ansible.builtin.assert:
109 | # that:
110 | # - asn_query is not changed
111 | # - asn_query_all is not changed
112 |
113 | # - name: Delete cloud BGP ASN
114 | # cisco.aci.aci_cloud_bgp_asn:
115 | # <<: *aci_info
116 | # state: absent
117 | # register: asn_absent
118 |
119 | # - name: Verify absent
120 | # ansible.builtin.assert:
121 | # that:
122 | # - asn_absent is changed
123 | # - asn_absent.current == []
--------------------------------------------------------------------------------
/docs/aci_collection_structure.md:
--------------------------------------------------------------------------------
1 | # Structure of the cisco.aci collection
2 |
3 | The **ansible-aci** repository consists of directories and files as listed below:
4 |
5 | ```
6 | ansible-aci/
7 | ├─ plugins/
8 | │ ├─ modules/
9 | │ │ ├─ aci_l2out.py
10 | │ │ ├─ ...
11 | │ ├─ module_utils/
12 | │ │ ├─ aci.py
13 | │ │ ├─ constants.py
14 | │ ├─ doc_fragments/
15 | │ │ ├─ aci.py
16 | │ │ ├─ annotation.py
17 | │ │ ├─ owner.py
18 | │ ├─ httpapi/
19 | │ │ ├─ aci.py
20 | │ ├─ .../
21 | │ │ ├─...
22 | ├─ tests/
23 | │ ├─ integration/
24 | │ │ ├─ inventory.networking
25 | │ │ ├─ targets/
26 | │ │ │ ├─ aci_l2out/
27 | │ │ │ │ ├─ tasks/
28 | │ │ │ │ │ ├─ main.yml
29 | │ │ │ ├─ .../
30 | │ ├─ sanity/
31 | │ │ ├─ requirements.txt
32 | │ ├─ .../
33 | ├─ changelogs/
34 | │ ├─ changelog.yml
35 | │ ├─ config.yml
36 | ├─ meta/
37 | │ ├─ runtime.yml
38 | ├─ license
39 | ├─ galaxy.yml
40 | ├─ README.md
41 | ├─ requirements.txt
42 | ```
43 |
44 | Let's briefly go through each file and its context.
45 |
46 | ## plugins
47 | Consists of Python code that defines different functions and capabilities of the collection.
48 |
49 | ### modules
50 | The **modules** directory in plugins consists of Cisco ACI modules, and each module covers the functionality of an object in ACI. Any new module developed to manage an ACI object goes in this directory.
51 |
52 | ### module_utils
53 |
54 | The **module_utils** directory has the aci.py file and constants.py file, which serves as a library for the modules. Most modules in the collection borrow functions from this library. These functions help a module to reduce redundancy of the code by availing code reusability. This is where one would add any function to use across multiple modules.
55 |
56 | * `constants.py`: The constants.py typically contains constant values used throughout the collection modules and utilities. These constants may include fixed strings, default values, API endpoint paths, or other static configuration parameters that support consistent and maintainable code within the collection.
57 |
58 | * `aci.py`: The aci.py file is a comprehensive utility module that facilitates interaction with the Cisco ACI APIC REST API. It provides the ACIModule class, which encapsulates the core logic for managing API communication, authentication, configuration management, and response processing.
59 |
60 | ### doc_fragments
61 |
62 | The **doc_fragments** directory has the aci.py file, which serves as a plugin and is used in each module's documentation. Every module has its own documentation section, but all the modules also share some common documentation elements, such as authentication details, notes: or seealso: entries. To avoid duplication of that information in each module's documentation block, it can be saved once in doc_fragments and used by all modules.
63 |
64 | ## tests
65 | This is where the different tests are defined. We run all sanity, unit, and integration tests on every code submission to the repository.
66 |
67 | The **integration** directory in **tests** consists of the **targets** directory, which has test directories for most of the modules present in our collection. Each module has its own test directory, and each directory is similar to an ansible role and contains a tasks directory, which contains a main.yml file. The main.yml file consists of tasks covering every functionality that a module provides. If the main.yml becomes too big, it can be split into multiple .yml files, and each of those can be imported into the main.yml file. Integration tests are run on every code submission to the repository. Every new module submission, bug fix or enhancement requires a test file or a change to an existing test file. This ensures that the code in our module is usable and robust.
68 |
69 | The **integration** directory also consists of the **inventory.networking** file, which defines the hosts, groups of hosts, and variables used by the integration tests role defined in the integration's targets directory.
70 |
71 | ## changelogs
72 | This directory consists of a record of all the changes made to the project.
73 |
74 | The **changelog.yml** file contains a chronologically ordered list of collection versions and the changes included in those versions. This file is used to generate the changelog.rst file. The changes are categorized into major changes, minor changes and bugfixes.
75 |
76 | The **config.yml** file contains configuration options used by the ansible-changelog tool to generate the **changelog.rst** file.
77 |
78 | ## galaxy.yml
79 | The **galaxy.yml** file is placed in the root directory of the collection. This file contains the metadata of the collection that is used to generate an ansible-aci collection object. It is also used for information in Ansible Galaxy.
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_leaf_profile/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2021, Tim Cragg (@timcragg)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # GET Credentials from the inventory
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: debug
22 |
23 | # CLEAN ENVIRONMENT
24 | - name: Remove ansible_leaf_switch_prf if it already exists
25 | cisco.aci.aci_fabric_leaf_profile:
26 | <<: *aci_info
27 | name: ansible_leaf_switch_prf
28 | state: absent
29 |
30 | # CREATE SPINE SWITCH POLICY
31 | - name: Create ansible_leaf_switch_prf
32 | cisco.aci.aci_fabric_leaf_profile:
33 | <<: *aci_info
34 | name: ansible_leaf_switch_prf
35 | state: present
36 | register: add_switch_prf
37 |
38 | - name: Verify profile creation
39 | ansible.builtin.assert:
40 | that:
41 | - add_switch_prf.current.0.fabricLeafP.attributes.dn == "uni/fabric/leprof-ansible_leaf_switch_prf"
42 | - add_switch_prf.current.0.fabricLeafP.attributes.name == "ansible_leaf_switch_prf"
43 | - add_switch_prf.current.0.fabricLeafP.attributes.annotation == 'orchestrator:ansible'
44 |
45 | # CREATE SPINE SWITCH POLICY AGAIN TO TEST IDEMPOTENCE
46 | - name: Create ansible_leaf_switch_prf again
47 | cisco.aci.aci_fabric_leaf_profile:
48 | <<: *aci_info
49 | name: ansible_leaf_switch_prf
50 | state: present
51 | register: add_switch_prf_again
52 |
53 | - name: Verify profile creation idempotence
54 | ansible.builtin.assert:
55 | that:
56 | - add_switch_prf_again is not changed
57 | - add_switch_prf_again.current.0.fabricLeafP.attributes.dn == "uni/fabric/leprof-ansible_leaf_switch_prf"
58 | - add_switch_prf_again.current.0.fabricLeafP.attributes.name == "ansible_leaf_switch_prf"
59 |
60 | # QUERY SPINE SWITCH POLICY
61 | - name: query leaf switch profile
62 | cisco.aci.aci_fabric_leaf_profile:
63 | <<: *aci_info
64 | name: ansible_leaf_switch_prf
65 | state: query
66 | register: query_switch_prf
67 |
68 | - name: Verify profile query
69 | ansible.builtin.assert:
70 | that:
71 | - query_switch_prf is not changed
72 | - query_switch_prf.current.0.fabricLeafP.attributes.dn == "uni/fabric/leprof-ansible_leaf_switch_prf"
73 | - query_switch_prf.current.0.fabricLeafP.attributes.name == "ansible_leaf_switch_prf"
74 |
75 | # QUERY ALL SPINE SWITCH POLICIES
76 | - name: query all leaf switch profiles
77 | cisco.aci.aci_fabric_leaf_profile:
78 | <<: *aci_info
79 | state: query
80 | register: query_switch_prf_all
81 |
82 | - name: Verify profile query idempotence
83 | ansible.builtin.assert:
84 | that:
85 | - query_switch_prf_all is not changed
86 |
87 | # DELETE SPINE SWITCH PROFILE
88 | - name: Delete ansible_leaf_switch_prf
89 | cisco.aci.aci_fabric_leaf_profile:
90 | <<: *aci_info
91 | name: ansible_leaf_switch_prf
92 | state: absent
93 | register: delete_switch_prf
94 |
95 | - name: Verify profile deletion
96 | ansible.builtin.assert:
97 | that:
98 | - delete_switch_prf is changed
99 | - delete_switch_prf.current == []
100 | - delete_switch_prf.previous.0.fabricLeafP.attributes.dn == "uni/fabric/leprof-ansible_leaf_switch_prf"
101 | - delete_switch_prf.previous.0.fabricLeafP.attributes.name == "ansible_leaf_switch_prf"
102 |
103 | # DELETE SPINE SWITCH PROFILE AGAIN TO TEST IDEMPOTENCE
104 | - name: Delete ansible_leaf_switch_prf again
105 | cisco.aci.aci_fabric_leaf_profile:
106 | <<: *aci_info
107 | name: ansible_leaf_switch_prf
108 | state: absent
109 | register: delete_switch_prf_again
110 |
111 | - name: Verify profile deletion idempotence
112 | ansible.builtin.assert:
113 | that:
114 | - delete_switch_prf_again is not changed
115 | - delete_switch_prf_again.current == []
116 |
117 | # CLEAN UP ENVIRONMENT
118 | - name: Remove ansible_leaf_switch_prf
119 | cisco.aci.aci_fabric_leaf_profile:
120 | <<: *aci_info
121 | name: ansible_leaf_switch_prf
122 | state: absent
123 |
--------------------------------------------------------------------------------
/tests/integration/targets/aci_fabric_spine_profile/tasks/main.yml:
--------------------------------------------------------------------------------
1 | # Test code for the ACI modules
2 | # Copyright: (c) 2021, Tim Cragg (@timcragg)
3 |
4 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5 |
6 | - name: Test that we have an ACI APIC host, ACI username and ACI password
7 | ansible.builtin.fail:
8 | msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
9 | when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
10 |
11 | # GET Credentials from the inventory
12 | - name: Set vars
13 | ansible.builtin.set_fact:
14 | aci_info: &aci_info
15 | host: "{{ aci_hostname }}"
16 | username: "{{ aci_username }}"
17 | password: "{{ aci_password }}"
18 | validate_certs: '{{ aci_validate_certs | default(false) }}'
19 | use_ssl: '{{ aci_use_ssl | default(true) }}'
20 | use_proxy: '{{ aci_use_proxy | default(true) }}'
21 | output_level: debug
22 |
23 | # CLEAN ENVIRONMENT
24 | - name: Remove ansible_spine_switch_prf if it already exists
25 | cisco.aci.aci_fabric_spine_profile:
26 | <<: *aci_info
27 | name: ansible_spine_switch_prf
28 | state: absent
29 |
30 | # CREATE SPINE SWITCH POLICY
31 | - name: Create ansible_spine_switch_prf
32 | cisco.aci.aci_fabric_spine_profile:
33 | <<: *aci_info
34 | name: ansible_spine_switch_prf
35 | state: present
36 | register: add_switch_prf
37 |
38 | - name: Verify profile creation
39 | ansible.builtin.assert:
40 | that:
41 | - add_switch_prf.current.0.fabricSpineP.attributes.dn == "uni/fabric/spprof-ansible_spine_switch_prf"
42 | - add_switch_prf.current.0.fabricSpineP.attributes.name == "ansible_spine_switch_prf"
43 | - add_switch_prf.current.0.fabricSpineP.attributes.annotation == 'orchestrator:ansible'
44 |
45 | # CREATE SPINE SWITCH POLICY AGAIN TO TEST IDEMPOTENCE
46 | - name: Create ansible_spine_switch_prf again
47 | cisco.aci.aci_fabric_spine_profile:
48 | <<: *aci_info
49 | name: ansible_spine_switch_prf
50 | state: present
51 | register: add_switch_prf_again
52 |
53 | - name: Verify profile creation idempotence
54 | ansible.builtin.assert:
55 | that:
56 | - add_switch_prf_again is not changed
57 | - add_switch_prf_again.current.0.fabricSpineP.attributes.dn == "uni/fabric/spprof-ansible_spine_switch_prf"
58 | - add_switch_prf_again.current.0.fabricSpineP.attributes.name == "ansible_spine_switch_prf"
59 |
60 | # QUERY SPINE SWITCH POLICY
61 | - name: query spine switch profile
62 | cisco.aci.aci_fabric_spine_profile:
63 | <<: *aci_info
64 | name: ansible_spine_switch_prf
65 | state: query
66 | register: query_switch_prf
67 |
68 | - name: Verify profile query
69 | ansible.builtin.assert:
70 | that:
71 | - query_switch_prf is not changed
72 | - query_switch_prf.current.0.fabricSpineP.attributes.dn == "uni/fabric/spprof-ansible_spine_switch_prf"
73 | - query_switch_prf.current.0.fabricSpineP.attributes.name == "ansible_spine_switch_prf"
74 |
75 | # QUERY ALL SPINE SWITCH POLICIES
76 | - name: query all spine switch profiles
77 | cisco.aci.aci_fabric_spine_profile:
78 | <<: *aci_info
79 | state: query
80 | register: query_switch_prf_all
81 |
82 | - name: Verify profile query idempotence
83 | ansible.builtin.assert:
84 | that:
85 | - query_switch_prf_all is not changed
86 |
87 | # DELETE SPINE SWITCH PROFILE
88 | - name: Delete ansible_spine_switch_prf
89 | cisco.aci.aci_fabric_spine_profile:
90 | <<: *aci_info
91 | name: ansible_spine_switch_prf
92 | state: absent
93 | register: delete_switch_prf
94 |
95 | - name: Verify profile deletion
96 | ansible.builtin.assert:
97 | that:
98 | - delete_switch_prf is changed
99 | - delete_switch_prf.current == []
100 | - delete_switch_prf.previous.0.fabricSpineP.attributes.dn == "uni/fabric/spprof-ansible_spine_switch_prf"
101 | - delete_switch_prf.previous.0.fabricSpineP.attributes.name == "ansible_spine_switch_prf"
102 |
103 | # DELETE SPINE SWITCH PROFILE AGAIN TO TEST IDEMPOTENCE
104 | - name: Delete ansible_spine_switch_prf again
105 | cisco.aci.aci_fabric_spine_profile:
106 | <<: *aci_info
107 | name: ansible_spine_switch_prf
108 | state: absent
109 | register: delete_switch_prf_again
110 |
111 | - name: Verify profile deletion idempotence
112 | ansible.builtin.assert:
113 | that:
114 | - delete_switch_prf_again is not changed
115 | - delete_switch_prf_again.current == []
116 |
117 | # CLEAN UP ENVIRONMENT
118 | - name: Remove ansible_spine_switch_prf
119 | cisco.aci.aci_fabric_spine_profile:
120 | <<: *aci_info
121 | name: ansible_spine_switch_prf
122 | state: absent
123 |
--------------------------------------------------------------------------------