├── images └── .gitkeep ├── plugins ├── plugin_utils │ └── .gitkeep ├── README.md └── action │ └── dtd │ └── prepare_service_model.py ├── roles ├── dtc │ ├── remove │ │ ├── tasks │ │ │ ├── isn │ │ │ │ └── .gitkeep │ │ │ ├── msd │ │ │ │ └── .gitkeep │ │ │ └── vxlan │ │ │ │ └── .gitkeep │ │ └── meta │ │ │ └── main.yml │ ├── common │ │ ├── templates │ │ │ ├── ndfc_fabric │ │ │ │ ├── .gitkeep │ │ │ │ ├── isn_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── advanced │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── isn_fabric_advanced.j2 │ │ │ │ │ ├── bootstrap │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── general │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── isn_fabric_general.j2 │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── isn_fabric_resources.j2 │ │ │ │ │ ├── flow_monitor │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── isn_fabric_base.j2 │ │ │ │ ├── msd_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── dci │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── general │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── msd_fabric_resources.j2 │ │ │ │ │ ├── security │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── msd_fabric_security.j2 │ │ │ │ │ └── msd_fabric_base.j2 │ │ │ │ ├── dc_vxlan_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── vpc │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── advanced │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── bootstrap │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_vxlan_fabric_bootstrap.j2 │ │ │ │ │ ├── general │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_vxlan_fabric_general.j2 │ │ │ │ │ ├── protocols │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── resources │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── security │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_vxlan_fabric_security.j2 │ │ │ │ │ ├── config_backup │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── flow_monitor │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── manageability │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── replication │ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── mcfg_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── dci │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── general │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── security │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── mcfg_fabric_security.j2 │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── mcfg_fabric_resources.j2 │ │ │ │ │ └── mcfg_fabric_base.j2 │ │ │ │ ├── dc_external_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── advanced │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_external_fabric_advanced.j2 │ │ │ │ │ ├── bootstrap │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_external_fabric_bootstrap.j2 │ │ │ │ │ ├── general │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_external_fabric_general.j2 │ │ │ │ │ ├── resources │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ └── dc_external_fabric_resources.j2 │ │ │ │ │ ├── config_backup │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── flow_monitor │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── dc_external_fabric_base.j2 │ │ │ │ └── ebgp_vxlan_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── evpn │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── general │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── vpc │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── ebgp_vxlan_fabric_vpc.j2 │ │ │ │ │ ├── advanced │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── bootstrap │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── ebgp_vxlan_fabric_bootstrap.j2 │ │ │ │ │ ├── flow_monitor │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── protocols │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── security │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── ebgp_vxlan_fabric_security.j2 │ │ │ │ │ ├── config_backup │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── manageability │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── ebgp_vxlan_fabric_base.j2 │ │ │ ├── ndfc_vrfs │ │ │ │ ├── .gitkeep │ │ │ │ ├── mcfg_fabric │ │ │ │ │ └── mcfg_fabric_attach_vrfs_loopbacks.j2 │ │ │ │ └── msd_fabric │ │ │ │ │ └── msd_fabric_attach_vrfs_loopbacks.j2 │ │ │ ├── ndfc_inventory │ │ │ │ ├── .gitkeep │ │ │ │ ├── isn_fabric │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── isn_fabric_inventory_no_bootstrap.j2 │ │ │ │ ├── dc_vxlan_fabric │ │ │ │ │ └── .gitkeep │ │ │ │ ├── common │ │ │ │ │ └── fabric_inventory_no_bootstrap.j2 │ │ │ │ └── dc_external_fabric │ │ │ │ │ └── dc_external_fabric_inventory_no_bootstrap.j2 │ │ │ ├── ndfc_networks │ │ │ │ └── .gitkeep │ │ │ ├── ndfc_interfaces │ │ │ │ ├── ndfc_interface_ethernet.j2 │ │ │ │ ├── ndfc_interface_breakout.j2 │ │ │ │ └── ndfc_interface_breakout_preprov.j2 │ │ │ ├── ndfc_route_control │ │ │ │ ├── ndfc_ip_access_list.j2 │ │ │ │ ├── ndfc_mac_list.j2 │ │ │ │ ├── ndfc_ip_as_path_access_lists.j2 │ │ │ │ └── ndfc_route_map.j2 │ │ │ ├── ndfc_vrf_lite.j2 │ │ │ ├── ndfc_vpc │ │ │ │ ├── ndfc_vpc_peering_pairs.j2 │ │ │ │ ├── ndfc_vpc_domain_id_resource.j2 │ │ │ │ └── ndfc_vpc_fabric_peering_links.j2 │ │ │ ├── ndfc_bgw_anycast_vip.j2 │ │ │ ├── ndfc_attach_networks.j2 │ │ │ ├── ndfc_inventory.j2 │ │ │ ├── ndfc_attach_vrfs.j2 │ │ │ ├── ndfc_inventory_no_bootstrap.j2 │ │ │ ├── ndfc_route_control.j2 │ │ │ └── ndfc_fabric.j2 │ │ ├── tasks │ │ │ ├── isn │ │ │ │ └── task_file_placeholder.yaml │ │ │ ├── cleanup_files.yml │ │ │ ├── mcfg │ │ │ │ └── ndfc_child_fabrics.yml │ │ │ └── msd │ │ │ │ └── ndfc_child_fabrics.yml │ │ ├── meta │ │ │ └── main.yml │ │ └── README.md │ ├── create │ │ ├── tasks │ │ │ ├── isn │ │ │ │ └── task_file_placeholder.yaml │ │ │ └── common │ │ │ │ └── devices.yml │ │ └── meta │ │ │ └── main.yml │ ├── connectivity_check │ │ └── meta │ │ │ └── main.yml │ └── deploy │ │ └── meta │ │ └── main.yml ├── validate │ ├── files │ │ └── rules │ │ │ ├── common │ │ │ ├── .gitkeep │ │ │ ├── 303_topology_switch_role.py │ │ │ ├── 302_topology_switch_management.py │ │ │ ├── 301_topology_switch_serial.py │ │ │ └── 307_topology_switch_preprovision.py │ │ │ ├── isn │ │ │ ├── .gitkeep │ │ │ ├── 303_topology_switch_role.py │ │ │ ├── 302_topology_switch_management.py │ │ │ ├── 301_topology_switch_serial.py │ │ │ └── 307_topology_switch_preprovision.py │ │ │ ├── common_vxlan │ │ │ └── .gitkeep │ │ │ ├── ebgp_vxlan │ │ │ └── .gitkeep │ │ │ ├── external │ │ │ └── .gitkeep │ │ │ ├── ibgp_vxlan │ │ │ ├── .gitkeep │ │ │ ├── 203_global_underlay_isis.py │ │ │ └── 202_global_underlay_mcast_trm.py │ │ │ └── multisite │ │ │ └── .gitkeep │ ├── meta │ │ └── main.yml │ ├── tasks │ │ └── cleanup_model_files.yml │ └── README.md └── common_global │ ├── meta │ └── main.yml │ ├── tasks │ └── main.yml │ └── README.md ├── tests ├── config.yml └── integration │ ├── ansible.cfg │ ├── roles │ ├── test_create │ │ ├── meta │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ └── tests │ │ │ └── test.yml │ ├── test_remove │ │ ├── meta │ │ │ └── main.yml │ │ ├── tests │ │ │ └── test.yml │ │ └── tasks │ │ │ └── main.yml │ └── test_common │ │ └── tasks │ │ └── main.yml │ └── host_vars │ └── examples │ ├── fabric_empty_example │ ├── topology_vpc.yaml │ ├── topology_switches.yaml │ ├── topology_fabric_links.yaml │ ├── topology_edge_connections.yaml │ ├── vrfs.yaml │ ├── networks.yaml │ └── global.yaml │ ├── fabric_full_large_example │ ├── topology_fabric_links.yaml │ └── topology_edge_connections.yaml │ ├── fabric_full_small_sha_example │ ├── topology_int_routed.yaml │ ├── topology_fabric_links.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ ├── topology_vpc.yaml │ └── topology_int_loopback_fabric.yaml │ ├── fabric_full_small_isis_ingress_example │ ├── topology_int_routed.yaml │ ├── topology_fabric_links.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ ├── topology_vpc.yaml │ └── topology_int_loopback_fabric.yaml │ ├── fabric_full_small_ospf_ingress_example │ ├── topology_int_routed.yaml │ ├── topology_fabric_links.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ ├── topology_vpc.yaml │ └── topology_int_loopback_fabric.yaml │ ├── fabric_full_small_isis_multicast_asm_example │ ├── topology_int_routed.yaml │ ├── topology_fabric_links.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ └── topology_vpc.yaml │ ├── fabric_full_small_ospf_multicast_asm_example │ ├── topology_int_routed.yaml │ ├── topology_fabric_links.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ └── topology_vpc.yaml │ ├── fabric_full_small_isis_multicast_bidir_example │ ├── topology_fabric_links.yaml │ ├── topology_int_routed.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ └── topology_vpc.yaml │ └── fabric_full_small_ospf_multicast_bidir_example │ ├── topology_fabric_links.yaml │ ├── topology_int_routed.yaml │ ├── topology_int_routed_po.yaml │ ├── topology_int_routed_subint.yaml │ ├── topology_edge_connections.yaml │ └── topology_vpc.yaml ├── requirements.txt ├── meta └── runtime.yml ├── .github ├── CODEOWNERS └── pull_request_template.md ├── .ansible-lint.yml ├── galaxy.yml ├── LICENSE └── SECURITY.md /images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/plugin_utils/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/remove/tasks/isn/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/remove/tasks/msd/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/remove/tasks/vxlan/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/common/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/isn/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vrfs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/common_vxlan/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/ebgp_vxlan/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/external/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/ibgp_vxlan/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/validate/files/rules/multisite/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_networks/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/dci/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/dci/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory/isn_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/vpc/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/advanced/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/bootstrap/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/general/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/general/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/security/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/general/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/security/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory/dc_vxlan_fabric/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/advanced/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/bootstrap/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/general/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/protocols/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/security/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/evpn/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/general/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/vpc/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/flow_monitor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | modules: 3 | python_requires: ">=3.10" 4 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/advanced/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/bootstrap/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/general/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/config_backup/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/flow_monitor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/manageability/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/replication/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/advanced/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/bootstrap/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/flow_monitor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/protocols/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/security/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/config_backup/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/flow_monitor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/config_backup/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/manageability/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_interfaces/ndfc_interface_ethernet.j2: -------------------------------------------------------------------------------- 1 | # Sample ethernet interface template for reference -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | nac-yaml==1.0.0 3 | nac-validate==1.0.0 4 | macaddress 5 | netaddr 6 | packaging 7 | jmespath 8 | -------------------------------------------------------------------------------- /meta/runtime.yml: -------------------------------------------------------------------------------- 1 | # This file is used to redirect to a default action plugin if needed. 2 | # 3 | --- 4 | 5 | requires_ansible: ">=2.15.0,<2.19.0" 6 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/security/msd_fabric_security.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC MSD Security config data structure for fabric {{ vxlan.fabric.name }} #} 2 | ENABLE_SGT: "off" -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/security/mcfg_fabric_security.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC MCFG Security config data structure for fabric {{ vxlan.fabric.name }} #} 2 | ENABLE_SGT: "off" 3 | -------------------------------------------------------------------------------- /tests/integration/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | # This ansible.cfg file is only used for testing purposes in this tests/integration directory. 3 | roles_path = ./roles 4 | collections_paths = ../../../../../ansible_collections/ -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | 4 | # These owners will be the default owners for everything in the repo. 5 | * @netascode/vxlan-maintainers 6 | -------------------------------------------------------------------------------- /.ansible-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # .ansible-lint 3 | 4 | skip_list: 5 | - fqcn[deep] 6 | - jinja[spacing] 7 | - sanity[cannot-ignore] # Tobe resolved in 0.6.0 8 | - var-naming[no-role-prefix] # Tobe resolved in 0.6.0 9 | 10 | exclude_paths: 11 | - roles/dtc/common/files/ 12 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/resources/isn_fabric_resources.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC ISN Resources config data structure for fabric {{ vxlan.fabric.name }} #} 2 | SUBINTERFACE_RANGE: {{ vxlan.multisite.isn.sub_int_range | default(defaults.vxlan.multisite.isn.sub_int_range) | title }} 3 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/resources/dc_external_fabric_resources.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC VXLAN EVPN Resources config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {# This aligns with NDFC, but need to revisit this and defaults #} 3 | SUBINTERFACE_RANGE: "2-511" 4 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/security/dc_vxlan_fabric_security.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC VXLAN EVPN Security config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %} 3 | ENABLE_SGT: false 4 | {% endif %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/security/ebgp_vxlan_fabric_security.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC eBGP VXLAN EVPN Security config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %} 3 | ENABLE_MACSEC: false 4 | {% endif %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_route_control/ndfc_ip_access_list.j2: -------------------------------------------------------------------------------- 1 | {% if policy_types["ipv4_access_lists"] is defined %} 2 | {% include "ndfc_route_control/access_list/ndfc_route_control_access_list_ipv4.j2" %} 3 | {% endif %} 4 | {% if policy_types["ipv6_access_lists"] is defined %} 5 | {% include "ndfc_route_control/access_list/ndfc_route_control_access_list_ipv6.j2" %} 6 | {% endif %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vrf_lite.j2: -------------------------------------------------------------------------------- 1 | {% if item.ospf is defined and item.ospf %} 2 | {% include 'ndfc_vrf_lite/ndfc_vrf_lite_ospf.j2' %} 3 | {% endif %} 4 | {% if (item.bgp is defined and item.bgp) or switch_item.bgp_peers or switch_item.bgp %} 5 | {% include 'ndfc_vrf_lite/ndfc_vrf_lite_ebgp.j2' %} 6 | {% endif %} 7 | {% if switch_item.static_routes %} 8 | {% include 'ndfc_vrf_lite/ndfc_vrf_lite_static.j2' %} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/general/isn_fabric_general.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC ISN General config data structure for fabric {{ vxlan.fabric.name }} #} 2 | BGP_AS: "{{ vxlan.multisite.isn.bgp_asn }}" 3 | {% if not (vxlan.multisite.isn.bootstrap.enable_bootstrap | default(defaults.vxlan.multisite.isn.bootstrap.enable_bootstrap) | ansible.builtin.bool) %} 4 | IS_READ_ONLY: false 5 | {% else %} 6 | IS_READ_ONLY: "" 7 | {% endif %} 8 | {# #} 9 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/general/dc_external_fabric_general.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC External General config data structure for fabric {{ vxlan.fabric.name }} #} 2 | BGP_AS: "{{ vxlan.global.external.bgp_asn }}" 3 | {% if not (vxlan.global.external.bootstrap.enable_bootstrap | default(defaults.vxlan.global.external.bootstrap.enable_bootstrap) | ansible.builtin.bool) %} 4 | IS_READ_ONLY: false 5 | {% else %} 6 | IS_READ_ONLY: "" 7 | {% endif %} 8 | {# #} 9 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vpc/ndfc_vpc_peering_pairs.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC vPC Peering config data structure for vPC pairs is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% if data_model_extended.vxlan.topology.vpc_peers is defined and data_model_extended.vxlan.topology.vpc_peers is not none %} 6 | {% for vpc_peers_pair in data_model_extended.vxlan.topology.vpc_peers %} 7 | - peerOneId: {{ vpc_peers_pair.peer1_mgmt_ip_address }} 8 | peerTwoId: {{ vpc_peers_pair.peer2_mgmt_ip_address }} 9 | {% if vpc_peers_pair.fabric_peering is defined %} 10 | useVirtualPeerlink: {{ vpc_peers_pair.fabric_peering }} 11 | {% endif %} 12 | {% endfor %} 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_bgw_anycast_vip.j2: -------------------------------------------------------------------------------- 1 | # This NDFC BGW Anycast VIP structure is auto-generated 2 | # DO NOT EDIT MANUALLY 3 | # 4 | 5 | {% set anycast_lo_id = vxlan.multisite.vtep_loopback_id | default(defaults.vxlan.multisite.vtep_loopback_id) %} 6 | 7 | {% if vxlan.multisite.child_fabrics is defined and vxlan.multisite.child_fabrics is iterable %} 8 | {% for fabric in vxlan.multisite.child_fabrics %} 9 | {% if fabric.bgw_anycast_vip_ipv4 is defined %} 10 | - entity_name: "{{ fabric.name }}" 11 | pool_type: IP 12 | pool_name: "LOOPBACK{{ anycast_lo_id }}_IP_POOL" 13 | scope_type: fabric 14 | resource: "{{ fabric.bgw_anycast_vip_ipv4 }}" 15 | {% endif %} 16 | {% endfor %} 17 | {% endif %} 18 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vpc/ndfc_vpc_domain_id_resource.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC config data that updates links for vPC Fabric Peering is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% if vxlan.topology.vpc_peers is defined %} 6 | {%- set switch_list = {} -%} 7 | {%- for switch in vxlan.topology.switches %} 8 | {% set _ = switch_list.update({switch.name : switch.serial_number}) %} 9 | {% endfor -%} 10 | {% for vpc in vxlan.topology.vpc_peers %} 11 | {% if vpc.domain_id is defined %} 12 | - entity_name: "{{ switch_list[vpc.peer1] }}~{{ switch_list[vpc.peer2] }}" 13 | pool_type: "ID" 14 | pool_name: "VPC_DOMAIN_ID" 15 | scope_type: "fabric" 16 | resource: "{{ vpc.domain_id }}" 17 | {% endif %} 18 | {% endfor %} 19 | {% endif %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/mcfg_fabric_base.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC Multi-Cluster Fabric Group (MCFG) Base config data structure for fabric {{ vxlan.fabric.name }} #} 2 | - FABRIC_NAME: {{ vxlan.fabric.name }} 3 | FABRIC_TYPE: MCFG 4 | DEPLOY: False 5 | 6 | {# Include NDFC MCFG General Template #} 7 | {% include '/ndfc_fabric/mcfg_fabric/general/mcfg_fabric_general.j2' %} 8 | 9 | {# Include NDFC MCFG DCI Template #} 10 | {% include '/ndfc_fabric/mcfg_fabric/dci/mcfg_fabric_dci.j2' %} 11 | 12 | {# Include NDFC MCFG Security Template #} 13 | {% include '/ndfc_fabric/mcfg_fabric/security/mcfg_fabric_security.j2' %} 14 | 15 | {# Include NDFC MCFG Resources Template #} 16 | {% include '/ndfc_fabric/mcfg_fabric/resources/mcfg_fabric_resources.j2' %} 17 | -------------------------------------------------------------------------------- /roles/validate/files/rules/isn/303_topology_switch_role.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "303" 3 | description = "Verify switch role is defined" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | switches = [] 10 | if data_model.get("vxlan", None): 11 | if data_model["vxlan"].get("topology", None): 12 | if data_model.get("vxlan").get("topology").get("switches", None): 13 | switches = data_model.get("vxlan").get("topology").get("switches") 14 | for switch in switches: 15 | if not switch.get("role", False): 16 | results.append( 17 | f"vxlan.topology.switches.{switch['name']}.role must be defined" 18 | ) 19 | return results 20 | -------------------------------------------------------------------------------- /roles/validate/files/rules/common/303_topology_switch_role.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "303" 3 | description = "Verify switch role is defined" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | switches = [] 10 | if data_model.get("vxlan", None): 11 | if data_model["vxlan"].get("topology", None): 12 | if data_model.get("vxlan").get("topology").get("switches", None): 13 | switches = data_model.get("vxlan").get("topology").get("switches") 14 | for switch in switches: 15 | if not switch.get("role", False): 16 | results.append( 17 | f"vxlan.topology.switches.{switch['name']}.role must be defined" 18 | ) 19 | return results 20 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_attach_networks.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC fabric networks config data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% set vxlan = data_model_extended.vxlan %} 6 | {% if vxlan.fabric.type in ['VXLAN_EVPN', 'eBGP_VXLAN'] %} 7 | 8 | {# Include NDFC DC VXLAN EVPN Base Template #} 9 | {% include '/ndfc_networks/dc_vxlan_fabric/dc_vxlan_fabric_networks.j2' %} 10 | 11 | {% elif vxlan.fabric.type == 'MSD'%} 12 | 13 | {# Include NDFC MSD Base Template #} 14 | {% include '/ndfc_networks/msd_fabric/msd_fabric_networks.j2' %} 15 | 16 | {% elif vxlan.fabric.type == 'MCFG'%} 17 | 18 | {# Include NDFC MCFG Base Template #} 19 | {% include '/ndfc_networks/mcfg_fabric/mcfg_fabric_networks.j2' %} 20 | 21 | {# Supported fabric types are: VXLAN_EVPN (iBGP), eBGP_VXLAN, MSD and MCFG #} 22 | {% endif %} 23 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC fabric inventory config data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% set vxlan = data_model_extended.vxlan %} 6 | {% if vxlan.fabric.type in ['VXLAN_EVPN', 'eBGP_VXLAN'] %} 7 | 8 | {# Include NDFC DC VXLAN EVPN Base Template #} 9 | {% include '/ndfc_inventory/common/fabric_inventory.j2' %} 10 | 11 | {% elif vxlan.fabric.type == 'ISN'%} 12 | 13 | {# Include NDFC ISN Base Template #} 14 | {% include '/ndfc_inventory/isn_fabric/isn_fabric_inventory.j2' %} 15 | 16 | {% elif vxlan.fabric.type == 'External' %} 17 | 18 | {# Include NDFC DC External Template #} 19 | {% include '/ndfc_inventory/dc_external_fabric/dc_external_fabric_inventory.j2' %} 20 | 21 | {# Supported fabric types are: DC VXLAN EVPN, eBGP_VXLAN, ISN and External #} 22 | {% endif %} 23 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/msd_fabric_base.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC MultiSite Domain (MSD) Base config data structure for fabric {{ vxlan.fabric.name }} #} 2 | - FABRIC_NAME: {{ vxlan.fabric.name }} 3 | FABRIC_TYPE: VXLAN_EVPN_MSD 4 | DEPLOY: False 5 | 6 | {# Include NDFC MSD General Template #} 7 | {% include '/ndfc_fabric/msd_fabric/general/msd_fabric_general.j2' %} 8 | 9 | {# Include NDFC MSD DCI Template #} 10 | {% include '/ndfc_fabric/msd_fabric/dci/msd_fabric_dci.j2' %} 11 | 12 | {% if ndfc_version | cisco.nac_dc_vxlan.version_compare('12.2.2', '>=') %} 13 | {# Include NDFC MSD Security Template #} 14 | {% include '/ndfc_fabric/msd_fabric/security/msd_fabric_security.j2' %} 15 | {% endif %} 16 | 17 | {# Include NDFC MSD Resources Template #} 18 | {% include '/ndfc_fabric/msd_fabric/resources/msd_fabric_resources.j2' %} 19 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/isn_fabric_base.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC ISN Base config data structure for fabric {{ vxlan.fabric.name }} #} 2 | - FABRIC_NAME: {{ vxlan.fabric.name }} 3 | FABRIC_TYPE: ISN 4 | DEPLOY: False 5 | 6 | {# Include NDFC ISN General Template #} 7 | {% include '/ndfc_fabric/isn_fabric/general/isn_fabric_general.j2' %} 8 | 9 | {# Include NDFC ISN Advanced Template #} 10 | {% include '/ndfc_fabric/isn_fabric/advanced/isn_fabric_advanced.j2' %} 11 | 12 | {# Include NDFC ISN Resources Template #} 13 | {% include '/ndfc_fabric/isn_fabric/resources/isn_fabric_resources.j2' %} 14 | 15 | {# Include NDFC ISN Bootstrap Template #} 16 | {% include '/ndfc_fabric/isn_fabric/bootstrap/isn_fabric_bootstrap.j2' %} 17 | 18 | {# Include NDFC ISN Flow Monitor Template #} 19 | {% include '/ndfc_fabric/isn_fabric/flow_monitor/isn_fabric_flow_monitor.j2' %} 20 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_route_control/ndfc_mac_list.j2: -------------------------------------------------------------------------------- 1 | ! This NDFC Route_Control_MAC-List config data structure is auto-generated 2 | ! DO NOT EDIT MANUALLY 3 | ! 4 | ! 5 | {% for policy_name in policy_types["mac_list"] : %} 6 | {% for mac_list in item["mac_list"] %} 7 | {% if policy_name.name == mac_list.name %} 8 | {% for entry in mac_list["entries"] | sort(attribute='seq_number') %} 9 | {% if "mac_mask" in entry %} 10 | mac-list {{ mac_list.name }} seq {{ entry.seq_number }} {{ entry.operation }} {{ entry.mac | hwaddr('cisco') }} {{ entry.mac_mask | hwaddr('cisco')}} 11 | {% else %} 12 | mac-list {{ mac_list.name }} seq {{ entry.seq_number }} {{ entry.operation }} {{ entry.mac | hwaddr('cisco') }} ffff.ffff.ffff 13 | {% endif%} 14 | {% endfor %} 15 | {% endif %} 16 | {% endfor %} 17 | {% endfor %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_attach_vrfs.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC fabric VRFs config data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% set vxlan = data_model_extended.vxlan %} 6 | {% if vxlan.fabric.type in ['VXLAN_EVPN', 'eBGP_VXLAN'] %} 7 | 8 | {# Include NDFC DC VXLAN EVPN Base Template #} 9 | {% include '/ndfc_vrfs/dc_vxlan_fabric/dc_vxlan_fabric_vrfs.j2' %} 10 | 11 | {% elif vxlan.fabric.type == 'MSD'%} 12 | 13 | {# Include NDFC MSD Base Template #} 14 | {% include '/ndfc_vrfs/msd_fabric/msd_fabric_vrfs.j2' %} 15 | {# {% include '/ndfc_vrfs/msd_fabric/child_fabric/msd_child_fabric_vrfs.j2' %} #} 16 | 17 | {% elif vxlan.fabric.type == 'MCFG'%} 18 | 19 | {# Include NDFC MCFG Base Template #} 20 | {% include '/ndfc_vrfs/mcfg_fabric/mcfg_fabric_vrfs.j2' %} 21 | 22 | {% else %} 23 | {# Supported fabric types are: VXLAN_EVPN (iBGP), eBGP_VXLAN, MSD and MCFG #} 24 | {% endif %} 25 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory_no_bootstrap.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC fabric inventory no bootstrap config data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% set vxlan = data_model_extended.vxlan %} 6 | {% if vxlan.fabric.type in ['VXLAN_EVPN', 'eBGP_VXLAN'] %} 7 | 8 | {# Include NDFC DC VXLAN EVPN Base Template #} 9 | {% include '/ndfc_inventory/common/fabric_inventory_no_bootstrap.j2' %} 10 | 11 | {% elif vxlan.fabric.type == 'ISN'%} 12 | 13 | {# Include NDFC ISN Base Template #} 14 | {% include '/ndfc_inventory/isn_fabric/isn_fabric_inventory_no_bootstrap.j2' %} 15 | 16 | {% elif vxlan.fabric.type == 'External' %} 17 | 18 | {# Include NDFC DC External Template #} 19 | {% include '/ndfc_inventory/dc_external_fabric/dc_external_fabric_inventory_no_bootstrap.j2' %} 20 | 21 | {# Supported fabric types are: DC VXLAN EVPN, eBGP_VXLAN, ISN and External #} 22 | {% endif %} 23 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_route_control/ndfc_ip_as_path_access_lists.j2: -------------------------------------------------------------------------------- 1 | ! This NDFC Route_Control_Route_maps config data structure is auto-generated 2 | ! DO NOT EDIT MANUALLY 3 | ! 4 | ! 5 | 6 | {# Get policy route-maps in groups #} 7 | {% for policy_name in policy_types["ip_as_path_access_lists"] %} 8 | {# Get route-maps under Route_control #} 9 | {% for ip_as_path_access_list in item["ip_as_path_access_lists"]%} 10 | {# If policy name in Group equal to policy in Route_control #} 11 | {% if policy_name["name"] == ip_as_path_access_list["name"] %} 12 | {% for entry in ip_as_path_access_list["entries"] | sort(attribute='seq_number') %} 13 | ip as-path access-list {{ ip_as_path_access_list["name"] }} seq {{entry["seq_number"]}} {{ entry["operation"] }} "{{ entry["bgp_as_paths_regex"] }}" 14 | {% endfor %} 15 | {% endif %} 16 | {% endfor %} 17 | {% endfor %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/dc_external_fabric_base.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC External Base config data structure for fabric {{ vxlan.fabric.name }} #} 2 | 3 | {# Include NDFC DC External General Template #} 4 | {% include '/ndfc_fabric/dc_external_fabric/general/dc_external_fabric_general.j2' %} 5 | 6 | {# Include NDFC DC External Advanced Template #} 7 | {% include '/ndfc_fabric/dc_external_fabric/advanced/dc_external_fabric_advanced.j2' %} 8 | 9 | {# Include NDFC DC External Resources Template #} 10 | {% include '/ndfc_fabric/dc_external_fabric/resources/dc_external_fabric_resources.j2' %} 11 | 12 | {# Include NDFC DC External Bootstrap Template #} 13 | {% include '/ndfc_fabric/dc_external_fabric/bootstrap/dc_external_fabric_bootstrap.j2' %} 14 | 15 | {# Include NDFC DC External Flow Monitor Template #} 16 | {% include '/ndfc_fabric/dc_external_fabric/flow_monitor/dc_external_fabric_flow_monitor.j2' %} 17 | -------------------------------------------------------------------------------- /plugins/README.md: -------------------------------------------------------------------------------- 1 | # Collections Plugins Directory 2 | 3 | This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that 4 | is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that 5 | would contain module utils and modules respectively. 6 | 7 | Here is an example directory of the majority of plugins currently supported by Ansible: 8 | 9 | ``` 10 | └── plugins 11 | ├── action 12 | ├── become 13 | ├── cache 14 | ├── callback 15 | ├── cliconf 16 | ├── connection 17 | ├── filter 18 | ├── httpapi 19 | ├── inventory 20 | ├── lookup 21 | ├── module_utils 22 | ├── modules 23 | ├── netconf 24 | ├── shell 25 | ├── strategy 26 | ├── terminal 27 | ├── test 28 | └── vars 29 | ``` 30 | 31 | A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/2.13/plugins/plugins.html). 32 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vpc/ndfc_vpc_fabric_peering_links.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC config data that updates links for vPC Fabric Peering is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% for peers in data_model_extended.vxlan.topology.vpc_peers %} 6 | {% if peers['peer1_peerlink_interfaces'] is defined %} 7 | {% for interface_index in range(peers['peer1_peerlink_interfaces']|length) %} 8 | {% set peer1_interface = peers['peer1_peerlink_interfaces'][interface_index] %} 9 | {% set peer2_interface = peers['peer2_peerlink_interfaces'][interface_index] %} 10 | {% if peer1_interface is defined and peer2_interface is defined %} 11 | - dst_fabric : {{ data_model_extended.vxlan.fabric.name }} 12 | template: int_pre_provision_intra_fabric_link 13 | src_interface: {{peer1_interface.name}} 14 | dst_interface: {{peer2_interface.name}} 15 | src_device: {{ peers.peer1_mgmt_ip_address }} 16 | dst_device: {{ peers.peer2_mgmt_ip_address }} 17 | {% endif %} 18 | {% endfor %} 19 | {% endif %} 20 | {% endfor %} 21 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory/isn_fabric/isn_fabric_inventory_no_bootstrap.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC ISN Inventory config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% set simplified_fabric_type = data_model_extended.vxlan.fabric.simplified_type %} 3 | {% set poap_data = poap_data['poap_data'] %} 4 | {% for switch in data_model_extended.vxlan.topology.switches %} 5 | {% if switch.management.management_ipv4_address is defined %} 6 | - seed_ip: {{ switch['management']['management_ipv4_address'] }} 7 | {% elif switch.management.management_ipv6_address is defined %} 8 | - seed_ip: {{ switch['management']['management_ipv6_address'] }} 9 | {% endif %} 10 | auth_proto: {{ data_model_extended.vxlan.multisite.isn.auth_proto | default(defaults.vxlan.multisite.isn.auth_proto) }} 11 | user_name: PLACE_HOLDER_USERNAME 12 | password: PLACE_HOLDER_PASSWORD 13 | max_hops: 0 # this is the default value as it is not defined into the data model 14 | role: {{ switch['role'] }} 15 | preserve_config: true 16 | {% endfor %} 17 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory/common/fabric_inventory_no_bootstrap.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC VXLAN EVPN Inventory config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% set simplified_fabric_type = data_model_extended.vxlan.fabric.simplified_type %} 3 | {% set poap_data = poap_data['poap_data'] %} 4 | {% for switch in data_model_extended.vxlan.topology.switches %} 5 | {% if switch.management.management_ipv4_address is defined %} 6 | - seed_ip: {{ switch['management']['management_ipv4_address'] }} 7 | {% elif switch.management.management_ipv6_address is defined %} 8 | - seed_ip: {{ switch['management']['management_ipv6_address'] }} 9 | {% endif %} 10 | auth_proto: {{ data_model_extended['vxlan']['global'][simplified_fabric_type]['auth_proto'] | default(defaults.vxlan.global[simplified_fabric_type].auth_proto) }} 11 | user_name: PLACE_HOLDER_USERNAME 12 | password: PLACE_HOLDER_PASSWORD 13 | max_hops: 0 # this is the default value as it is not defined into the data model 14 | role: {{ switch['role'] }} 15 | preserve_config: false 16 | {% endfor %} 17 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_inventory/dc_external_fabric/dc_external_fabric_inventory_no_bootstrap.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC External Inventory config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% set simplified_fabric_type = data_model_extended.vxlan.fabric.simplified_type %} 3 | {% set poap_data = poap_data['poap_data'] %} 4 | {% for switch in data_model_extended.vxlan.topology.switches %} 5 | {% if switch.management.management_ipv4_address is defined %} 6 | - seed_ip: {{ switch['management']['management_ipv4_address'] }} 7 | {% elif switch.management.management_ipv6_address is defined %} 8 | - seed_ip: {{ switch['management']['management_ipv6_address'] }} 9 | {% endif %} 10 | auth_proto: {{ data_model_extended['vxlan']['global'][simplified_fabric_type]['auth_proto'] | default(defaults.vxlan.global[simplified_fabric_type].auth_proto) }} 11 | user_name: PLACE_HOLDER_USERNAME 12 | password: PLACE_HOLDER_PASSWORD 13 | max_hops: 0 # this is the default value as it is not defined into the data model 14 | role: {{ switch['role'] }} 15 | preserve_config: true 16 | {% endfor %} 17 | -------------------------------------------------------------------------------- /galaxy.yml: -------------------------------------------------------------------------------- 1 | --- 2 | namespace: cisco 3 | name: nac_dc_vxlan 4 | version: 0.5.1-dev 5 | readme: README.md 6 | authors: 7 | - Devendra Gupta 8 | - Jesus Casero Diaz-Cano 9 | - Justin Burnette 10 | - Matt Tarkington 11 | - Mike Wiebe 12 | - Rafael Muller 13 | - Rameez Rahim 14 | - Shangxin Du 15 | - Udit Mehrotra 16 | - Vladimir Joshevski 17 | - Slawomir Kaszlikowski 18 | - Michal Kilar 19 | description: Ansible Solution Collection for VXLAN 20 | 21 | repository: https://github.com/netascode/ansible-dc-vxlan 22 | documentation: https://github.com/netascode/ansible-dc-vxlan/blob/main/README.md 23 | homepage: https://netascode.cisco.com/docs/data_models/vxlan/overview/ 24 | issues: https://github.com/netascode/ansible-dc-vxlan/issues 25 | 26 | license_file: LICENSE 27 | 28 | tags: [cisco, dc, nd, ndfc, nxos, networking, vxlan, evpn, nac, sac] 29 | 30 | dependencies: 31 | "ansible.netcommon": ">=4.1.0" 32 | "cisco.dcnm": ">=3.9.1" 33 | "community.general": ">=8.5.0" 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024-2025 Cisco and/or its affiliates. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /plugins/action/dtd/prepare_service_model.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | -------------------------------------------------------------------------------- /tests/integration/roles/test_create/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | dependencies: 24 | - test_common 25 | -------------------------------------------------------------------------------- /tests/integration/roles/test_remove/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | dependencies: 24 | - test_common 25 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_route_control.j2: -------------------------------------------------------------------------------- 1 | {% for policy_types in group_item %} 2 | {% if "route_maps" in policy_types %} 3 | {% include "ndfc_route_control/ndfc_route_map.j2" %} 4 | {% endif %} 5 | {% if "ipv4_prefix_lists" in policy_types or "ipv6_prefix_lists" in policy_types %} 6 | {% include "ndfc_route_control/ndfc_prefix_list.j2" %} 7 | {% endif %} 8 | {% if "standard_community_lists" in policy_types or "extended_community_lists" in policy_types %} 9 | {% include "ndfc_route_control/ndfc_community_list.j2" %} 10 | {% endif %} 11 | {% if "ipv4_access_lists" in policy_types or "ipv6_access_lists" in policy_types %} 12 | {% include "ndfc_route_control/ndfc_ip_access_list.j2" %} 13 | {% endif %} 14 | {% if "mac_list" in policy_types %} 15 | {% include "ndfc_route_control/ndfc_mac_list.j2" %} 16 | {% endif %} 17 | {% if "time_range" in policy_types %} 18 | {% include "ndfc_route_control/ndfc_time_range.j2" %} 19 | {% endif %} 20 | {% if "ipv4_object_groups" in policy_types or "ipv6_object_groups" in policy_types %} 21 | {% include "ndfc_route_control/ndfc_object_groups.j2" %} 22 | {% endif %} 23 | {% if "ip_as_path_access_lists" in policy_types %} 24 | {% include "ndfc_route_control/ndfc_ip_as_path_access_lists.j2" %} 25 | {% endif %} 26 | {% endfor %} -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC fabric config data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% set vxlan = data_model_extended.vxlan %} 6 | 7 | {% if vxlan.fabric.type == 'VXLAN_EVPN' %} 8 | 9 | {# Include NDFC iBGP VXLAN EVPN Base Template #} 10 | {% include '/ndfc_fabric/dc_vxlan_fabric/dc_vxlan_fabric_base.j2' %} 11 | 12 | {% elif vxlan.fabric.type == 'eBGP_VXLAN'%} 13 | 14 | {# Include NDFC eBGP VXLAN EVPN Base Template #} 15 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/ebgp_vxlan_fabric_base.j2' %} 16 | 17 | {% elif vxlan.fabric.type == 'MSD'%} 18 | 19 | {# Include NDFC MSD Base Template #} 20 | {% include '/ndfc_fabric/msd_fabric/msd_fabric_base.j2' %} 21 | 22 | {% elif vxlan.fabric.type == 'MCFG'%} 23 | 24 | {# Include NDFC MCFG Base Template #} 25 | {% include '/ndfc_fabric/mcfg_fabric/mcfg_fabric_base.j2' %} 26 | 27 | {% elif vxlan.fabric.type == 'ISN'%} 28 | 29 | {# Include NDFC ISN Base Template #} 30 | {% include '/ndfc_fabric/isn_fabric/isn_fabric_base.j2' %} 31 | 32 | {% elif vxlan.fabric.type == 'External' %} 33 | 34 | {# Include NDFC External Fabric Base Template #} 35 | {% include '/ndfc_fabric/dc_external_fabric/dc_external_fabric_base.j2' %} 36 | 37 | {# Supported fabric types are: VXLAN_EVPN (iBGP), eBGP_VXLAN, MSD, MCFG, ISN, and External #} 38 | {% endif %} 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: [] 26 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/topology_switches.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | switches: [] 26 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: [] 26 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: [] 26 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/vrfs.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | overlay: 25 | vrfs: [] 26 | 27 | vrf_attach_groups: [] 28 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/networks.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | overlay: 25 | networks: [] 26 | 27 | 28 | network_attach_groups: [] 29 | -------------------------------------------------------------------------------- /tests/integration/roles/test_remove/tests/test.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Debug Remove Role Tests 25 | ansible.builtin.debug: 26 | msg: "Executing Remove Role Tests" 27 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/msd_fabric/resources/msd_fabric_resources.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC MSD Resources config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if not (vxlan.multisite.enable_ipv6_underlay | default(defaults.vxlan.multisite.enable_ipv6_underlay) | ansible.builtin.bool) %} 3 | LOOPBACK100_IP_RANGE: {{ vxlan.multisite.ipv4_vtep_loopback_range | default(defaults.vxlan.multisite.ipv4_vtep_loopback_range) }} 4 | DCI_SUBNET_RANGE: {{ vxlan.multisite.overlay_dci.ipv4_dci_subnet_range | default(defaults.vxlan.multisite.overlay_dci.ipv4_dci_subnet_range) }} 5 | DCI_SUBNET_TARGET_MASK: {{ vxlan.multisite.overlay_dci.ipv4_dci_subnet_mask | default(defaults.vxlan.multisite.overlay_dci.ipv4_dci_subnet_mask) }} 6 | {% endif %} 7 | {% if ( (ndfc_version | cisco.nac_dc_vxlan.version_compare('12.2.2', '>=')) and 8 | (vxlan.multisite.enable_ipv6_underlay | default(defaults.vxlan.multisite.enable_ipv6_underlay) | ansible.builtin.bool) ) %} 9 | LOOPBACK100_IPV6_RANGE: {{ vxlan.multisite.ipv6_vtep_loopback_range | default(defaults.vxlan.multisite.ipv6_vtep_loopback_range) }} 10 | V6_DCI_SUBNET_RANGE: {{ vxlan.multisite.overlay_dci.ipv6_dci_subnet_range | default(defaults.vxlan.multisite.overlay_dci.ipv6_dci_subnet_range) }} 11 | V6_DCI_SUBNET_TARGET_MASK: {{ vxlan.multisite.overlay_dci.ipv6_dci_subnet_mask | default(defaults.vxlan.multisite.overlay_dci.ipv6_dci_subnet_mask) }} 12 | {% endif %} 13 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/mcfg_fabric/resources/mcfg_fabric_resources.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC MCFG Resources config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if not (vxlan.multisite.enable_ipv6_underlay | default(defaults.vxlan.multisite.enable_ipv6_underlay) | ansible.builtin.bool) %} 3 | LOOPBACK100_IP_RANGE: {{ vxlan.multisite.ipv4_vtep_loopback_range | default(defaults.vxlan.multisite.ipv4_vtep_loopback_range) }} 4 | DCI_SUBNET_RANGE: {{ vxlan.multisite.overlay_dci.ipv4_dci_subnet_range | default(defaults.vxlan.multisite.overlay_dci.ipv4_dci_subnet_range) }} 5 | DCI_SUBNET_TARGET_MASK: "{{ vxlan.multisite.overlay_dci.ipv4_dci_subnet_mask | default(defaults.vxlan.multisite.overlay_dci.ipv4_dci_subnet_mask) }}" 6 | {% endif %} 7 | {% if ( (ndfc_version | cisco.nac_dc_vxlan.version_compare('12.2.2', '>=')) and 8 | (vxlan.multisite.enable_ipv6_underlay | default(defaults.vxlan.multisite.enable_ipv6_underlay) | ansible.builtin.bool) ) %} 9 | LOOPBACK100_IPV6_RANGE: {{ vxlan.multisite.ipv6_vtep_loopback_range | default(defaults.vxlan.multisite.ipv6_vtep_loopback_range) }} 10 | V6_DCI_SUBNET_RANGE: {{ vxlan.multisite.overlay_dci.ipv6_dci_subnet_range | default(defaults.vxlan.multisite.overlay_dci.ipv6_dci_subnet_range) }} 11 | V6_DCI_SUBNET_TARGET_MASK: {{ vxlan.multisite.overlay_dci.ipv6_dci_subnet_mask | default(defaults.vxlan.multisite.overlay_dci.ipv6_dci_subnet_mask) }} 12 | {% endif %} 13 | -------------------------------------------------------------------------------- /roles/dtc/common/tasks/isn/task_file_placeholder.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | # This is a placeholder file for future expansion of ISN fabric type 23 | # capabilities if needed. 24 | # 25 | # Tasks in this file are intended to override tasks under common 26 | -------------------------------------------------------------------------------- /roles/dtc/create/tasks/isn/task_file_placeholder.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | # This is a placeholder file for future expansion of ISN fabric type 23 | # capabilities if needed. 24 | # 25 | # Tasks in this file are intended to override tasks under common 26 | -------------------------------------------------------------------------------- /roles/common_global/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Infrastructure role to manage tags and default flag settings. 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: [] 29 | -------------------------------------------------------------------------------- /roles/validate/files/rules/common/302_topology_switch_management.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "302" 3 | description = "Verify at least either a mgmt IPv4 or IPv6 address is configured" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | management_defined = [] 10 | switches = [] 11 | if data_model.get("vxlan", None): 12 | if data_model["vxlan"].get("topology", None): 13 | if data_model.get("vxlan").get("topology").get("switches", None): 14 | switches = data_model.get("vxlan").get("topology").get("switches") 15 | for switch in switches: 16 | if not switch.get("management", False): 17 | results.append( 18 | f"vxlan.topology.switches.{switch['name']}.management must be defined" 19 | ) 20 | else: 21 | management_defined.append(switch) 22 | 23 | for switch in management_defined: 24 | if not ( 25 | switch["management"].get("management_ipv4_address", False) 26 | or switch["management"].get("management_ipv6_address", False) 27 | ): 28 | results.append( 29 | f"vxlan.topology.switches.{switch['name']}.management " 30 | f"must define either management_ipv4_address or management_ipv6_address" 31 | ) 32 | return results 33 | -------------------------------------------------------------------------------- /roles/validate/files/rules/isn/302_topology_switch_management.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "302" 3 | description = "Verify at least either a mgmt IPv4 or IPv6 address is configured" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | management_defined = [] 10 | switches = [] 11 | if data_model.get("vxlan", None): 12 | if data_model["vxlan"].get("topology", None): 13 | if data_model.get("vxlan").get("topology").get("switches", None): 14 | switches = data_model.get("vxlan").get("topology").get("switches") 15 | for switch in switches: 16 | if not switch.get("management", False): 17 | results.append( 18 | f"vxlan.topology.switches.{switch['name']}.management must be defined" 19 | ) 20 | else: 21 | management_defined.append(switch) 22 | 23 | for switch in management_defined: 24 | if not ( 25 | switch["management"].get("management_ipv4_address", False) 26 | or switch["management"].get("management_ipv6_address", False) 27 | ): 28 | results.append( 29 | f"vxlan.topology.switches.{switch['name']}.management " 30 | f"must define either management_ipv4_address or management_ipv6_address" 31 | ) 32 | return results 33 | -------------------------------------------------------------------------------- /roles/common_global/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | --- 22 | 23 | - name: Verify User Tags 24 | cisco.nac_dc_vxlan.dtc.verify_tags: 25 | all_tags: "{{ nac_tags.all }}" 26 | play_tags: "{{ ansible_run_tags }}" 27 | tags: "{{ ansible_run_tags }}" 28 | delegate_to: localhost 29 | -------------------------------------------------------------------------------- /tests/integration/roles/test_create/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Display Role Path 25 | ansible.builtin.debug: 26 | msg: "Test Role Path - {{ role_path }}" 27 | 28 | - name: Execute Create Role Tests 29 | ansible.builtin.import_tasks: tests/test.yml 30 | -------------------------------------------------------------------------------- /tests/integration/roles/test_remove/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Debug Remove Role Tests 25 | ansible.builtin.debug: 26 | msg: "Test Role Path - {{ role_path }}" 27 | 28 | - name: Execute Remove Role Tests 29 | ansible.builtin.import_tasks: tests/test.yml 30 | -------------------------------------------------------------------------------- /roles/dtc/connectivity_check/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Role to check connectivity to the NDFC controller. 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: 29 | - cisco.nac_dc_vxlan.common_global 30 | -------------------------------------------------------------------------------- /roles/validate/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Role to validate service model data describing the configured state of a fabric. 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: [cisco.nac_dc_vxlan.common_global] 29 | -------------------------------------------------------------------------------- /roles/dtc/common/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Common infrastructure role dependency used by other roles in this collection 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: 29 | - cisco.nac_dc_vxlan.common_global 30 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_route_control/ndfc_route_map.j2: -------------------------------------------------------------------------------- 1 | ! This NDFC Route_Control_Route_maps config data structure is auto-generated 2 | ! DO NOT EDIT MANUALLY 3 | ! 4 | ! 5 | {# Get policy route-maps in groups #} 6 | {% for policy_name in policy_types["route_maps"] %} 7 | {# Get route-maps under Route_control #} 8 | {% for route_map in item["route_maps"]%} 9 | {# If policy name in Group equal to policy in Route_control #} 10 | {% if policy_name["name"] == route_map["name"] %} 11 | {% for entry in route_map["entries"] | sort(attribute='seq_number') %} 12 | route-map {{ route_map["name"] | lower }} {{ entry["operation"] }} {{ entry["seq_number"] }} 13 | {% if entry["description"] is defined %} 14 | description {{ entry["description"] }} 15 | {% endif %} 16 | {% if entry["match"] is defined %} 17 | {% include "ndfc_route_control/route_map/ndfc_route_control_route_map_match.j2" %} 18 | {% endif %} 19 | {% if entry["continue"] is defined %} 20 | continue {{ entry["continue"] }} 21 | {% endif %} 22 | {% if entry["set"] is defined %} 23 | {% include "ndfc_route_control/route_map/ndfc_route_control_route_map_set.j2" %} 24 | {% endif %} 25 | {% endfor %} 26 | {% endif %} 27 | {% endfor %} 28 | {% endfor %} -------------------------------------------------------------------------------- /roles/validate/files/rules/ibgp_vxlan/203_global_underlay_isis.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "203" 3 | description = "Verify fabric underlay ISIS authentication" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | 10 | if data_model.get("vxlan", None): 11 | if data_model["vxlan"].get("underlay", None): 12 | if data_model["vxlan"].get("underlay").get("isis", None): 13 | if data_model["vxlan"].get("underlay").get("isis").get("authentication_enable"): 14 | if data_model["vxlan"]["underlay"]["isis"]["authentication_enable"] is True: 15 | if not data_model["vxlan"]["underlay"]["isis"].get("authentication_key"): 16 | results.append( 17 | "For vxlan.underlay.isis.authentication_enable is enabled, " 18 | "vxlan.underlay.isis.authentication_key must be provided" 19 | ) 20 | if not data_model["vxlan"]["underlay"]["isis"].get("authentication_keychain_name"): 21 | results.append( 22 | "For vxlan.underlay.isis.authentication_enable is enabled, " 23 | "vxlan.underlay.isis.authentication_keychain_name must be provided" 24 | ) 25 | return results 26 | -------------------------------------------------------------------------------- /roles/common_global/README.md: -------------------------------------------------------------------------------- 1 | Role Name: cisco.nac_dc_vxlan.common_global 2 | ====================================== 3 | 4 | This role is used to manage tags and default settings for control flags 5 | 6 | 7 | Requirements 8 | ------------ 9 | None 10 | 11 | Role Variables 12 | -------------- 13 | None 14 | 15 | Dependencies 16 | ------------ 17 | None 18 | 19 | License 20 | ------- 21 | 22 | MIT License 23 | 24 | Copyright (c) 2024 Cisco and/or its affiliates. 25 | 26 | Permission is hereby granted, free of charge, to any person obtaining a copy 27 | of this software and associated documentation files (the "Software"), to deal 28 | in the Software without restriction, including without limitation the rights 29 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 30 | copies of the Software, and to permit persons to whom the Software is 31 | furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in all 34 | copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 37 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 38 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 39 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 40 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 41 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 42 | SOFTWARE. 43 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/vpc/ebgp_vxlan_fabric_vpc.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC eBGP VXLAN EVPN vPC config data structure for fabric {{ vxlan.fabric.name }} #} 2 | VPC_PEER_LINK_VLAN: {{ vxlan.global.ebgp.vpc.peer_link_vlan | default(defaults.vxlan.global.ebgp.vpc.peer_link_vlan) }} 3 | VPC_PEER_KEEP_ALIVE_OPTION: {{ vxlan.global.ebgp.vpc.peer_keep_alive | default(defaults.vxlan.global.ebgp.vpc.peer_keep_alive) }} 4 | VPC_AUTO_RECOVERY_TIME: {{ vxlan.global.ebgp.vpc.auto_recovery_time | default(defaults.vxlan.global.ebgp.vpc.auto_recovery_time) }} 5 | VPC_DELAY_RESTORE: {{ vxlan.global.ebgp.vpc.delay_restore_time | default(defaults.vxlan.global.ebgp.vpc.delay_restore_time) }} 6 | VPC_PEER_LINK_PO: {{ vxlan.global.ebgp.vpc.peer_link_port_channel_id | default(defaults.vxlan.global.ebgp.vpc.peer_link_port_channel_id) }} 7 | VPC_ENABLE_IPv6_ND_SYNC: {{ vxlan.global.ebgp.vpc.ipv6_nd_sync | default(defaults.vxlan.global.ebgp.vpc.ipv6_nd_sync) }} 8 | ENABLE_FABRIC_VPC_DOMAIN_ID: False 9 | VPC_DOMAIN_ID_RANGE: {{ vxlan.global.ebgp.vpc.domain_id_range | default(defaults.vxlan.global.ebgp.vpc.domain_id_range) }} 10 | FABRIC_VPC_QOS: {{ vxlan.global.ebgp.vpc.fabric_vpc_qos | default(defaults.vxlan.global.ebgp.vpc.fabric_vpc_qos) }} 11 | {% if (vxlan.global.ebgp.vpc.fabric_vpc_qos | default(defaults.vxlan.global.ebgp.vpc.fabric_vpc_qos) | title) == 'True' %} 12 | FABRIC_VPC_QOS_POLICY_NAME: {{ vxlan.global.ebgp.vpc.fabric_vpc_qos_policy_name | default(defaults.vxlan.global.ebgp.vpc.fabric_vpc_qos_policy_name) }} 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /roles/dtc/create/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Role to create state within the NDFC controller. 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: 29 | - cisco.nac_dc_vxlan.dtc.connectivity_check 30 | - cisco.nac_dc_vxlan.validate 31 | - cisco.nac_dc_vxlan.dtc.common 32 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/bootstrap/dc_vxlan_fabric_bootstrap.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC VXLAN EVPN Bootstrap config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if vxlan.global.ibgp.bootstrap is defined %} 3 | BOOTSTRAP_ENABLE: {{ vxlan.global.ibgp.bootstrap.enable_bootstrap | default(defaults.vxlan.global.ibgp.bootstrap.enable_bootstrap) | bool }} 4 | {% if vxlan.global.ibgp.bootstrap.enable_bootstrap | default(defaults.vxlan.global.ibgp.bootstrap.enable_bootstrap) | bool %} 5 | DHCP_ENABLE: {{ vxlan.global.ibgp.bootstrap.enable_local_dhcp_server | default(defaults.vxlan.global.ibgp.bootstrap.enable_local_dhcp_server) | bool }} 6 | {% if vxlan.global.ibgp.bootstrap.enable_local_dhcp_server | default(defaults.vxlan.global.ibgp.bootstrap.enable_local_dhcp_server) | bool %} 7 | DHCP_IPV6_ENABLE: {{ vxlan.global.ibgp.bootstrap.dhcp_version }} 8 | {% if vxlan.global.ibgp.bootstrap.dhcp_version is defined and vxlan.global.ibgp.bootstrap.dhcp_version == "DHCPv4" %} 9 | DHCP_START: {{ vxlan.global.ibgp.bootstrap.dhcp_v4.scope_start_address }} 10 | DHCP_END: {{ vxlan.global.ibgp.bootstrap.dhcp_v4.scope_end_address }} 11 | MGMT_GW: {{ vxlan.global.ibgp.bootstrap.dhcp_v4.switch_mgmt_default_gw }} 12 | MGMT_PREFIX: {{ vxlan.global.ibgp.bootstrap.dhcp_v4.mgmt_prefix }} 13 | {% if vxlan.global.ibgp.bootstrap.dhcp_v4.multi_subnet_scope is defined %} 14 | BOOTSTRAP_MULTISUBNET: "{{ vxlan.global.ibgp.bootstrap.dhcp_v4.multi_subnet_scope }}" 15 | {% endif %} 16 | {% endif %} 17 | {% endif %} 18 | {% endif %} 19 | {% endif %} 20 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/bootstrap/ebgp_vxlan_fabric_bootstrap.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC eBGP VXLAN EVPN Bootstrap config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if vxlan.global.ebgp.bootstrap is defined %} 3 | BOOTSTRAP_ENABLE: {{ vxlan.global.ebgp.bootstrap.enable_bootstrap | default(defaults.vxlan.global.ebgp.bootstrap.enable_bootstrap) | bool }} 4 | {% if vxlan.global.ebgp.bootstrap.enable_bootstrap | default(defaults.vxlan.global.ebgp.bootstrap.enable_bootstrap) | bool %} 5 | DHCP_ENABLE: {{ vxlan.global.ebgp.bootstrap.enable_local_dhcp_server | default(defaults.vxlan.global.ebgp.bootstrap.enable_local_dhcp_server) | bool }} 6 | {% if vxlan.global.ebgp.bootstrap.enable_local_dhcp_server | default(defaults.vxlan.global.ebgp.bootstrap.enable_local_dhcp_server) | bool %} 7 | DHCP_IPV6_ENABLE: {{ vxlan.global.ebgp.bootstrap.dhcp_version }} 8 | {% if vxlan.global.ebgp.bootstrap.dhcp_version is defined and vxlan.global.ebgp.bootstrap.dhcp_version == "DHCPv4" %} 9 | DHCP_START: {{ vxlan.global.ebgp.bootstrap.dhcp_v4.scope_start_address }} 10 | DHCP_END: {{ vxlan.global.ebgp.bootstrap.dhcp_v4.scope_end_address }} 11 | MGMT_GW: {{ vxlan.global.ebgp.bootstrap.dhcp_v4.switch_mgmt_default_gw }} 12 | MGMT_PREFIX: {{ vxlan.global.ebgp.bootstrap.dhcp_v4.mgmt_prefix }} 13 | {% if vxlan.global.ebgp.bootstrap.dhcp_v4.multi_subnet_scope is defined %} 14 | BOOTSTRAP_MULTISUBNET: "{{ vxlan.global.ebgp.bootstrap.dhcp_v4.multi_subnet_scope }}" 15 | {% endif %} 16 | {% endif %} 17 | {% endif %} 18 | {% endif %} 19 | {% endif %} 20 | -------------------------------------------------------------------------------- /roles/dtc/remove/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Role to remove unmanaged state from NDFC and fabric devices. 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: 29 | - cisco.nac_dc_vxlan.dtc.connectivity_check 30 | - cisco.nac_dc_vxlan.validate 31 | - cisco.nac_dc_vxlan.dtc.common 32 | -------------------------------------------------------------------------------- /roles/validate/files/rules/ibgp_vxlan/202_global_underlay_mcast_trm.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "202" 3 | description = "Verify fabric underlay supports multicast for TRM" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | fabric_replication = False 10 | fabric_mcast_mode = False 11 | fabric_trm = False 12 | 13 | if data_model.get("vxlan", None): 14 | if data_model["vxlan"].get("underlay", None): 15 | if data_model["vxlan"].get("underlay").get("general", None): 16 | fabric_replication = data_model["vxlan"]["underlay"]["general"].get("replication_mode", False) 17 | 18 | if data_model["vxlan"].get("underlay").get("multicast", None): 19 | fabric_mcast_mode = data_model["vxlan"]["underlay"]["multicast"].get("rp_mode", False) 20 | fabric_trm = data_model["vxlan"]["underlay"]["multicast"].get("trm_enable", False) 21 | 22 | if fabric_replication: 23 | if ((fabric_replication == "multicast" and fabric_mcast_mode == "bidir" and fabric_trm) or 24 | (fabric_replication == "ingress" and fabric_trm)): 25 | results.append( 26 | "For vxlan.underlay.multicast.trm_enable to be enabled, " 27 | "vxlan.underlay.general.replication_mode must be set to multicast and " 28 | "vxlan.underlay.multicast.rp_mode must be set to asm." 29 | ) 30 | 31 | return results 32 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ## Related Issue(s) 6 | 7 | 8 | 9 | 10 | ## Related Collection Role 11 | 12 | * [ ] cisco.nac_dc_vxlan.validate 13 | * [ ] cisco.nac_dc_vxlan.dtc.create 14 | * [ ] cisco.nac_dc_vxlan.dtc.deploy 15 | * [ ] cisco.nac_dc_vxlan.dtc.remove 16 | * [ ] other 17 | 18 | ## Related Data Model Element 19 | 20 | * [ ] vxlan.fabric 21 | * [ ] vxlan.global 22 | * [ ] vxlan.topology 23 | * [ ] vxlan.underlay 24 | * [ ] vxlan.overlay 25 | * [ ] vxlan.overlay_extensions 26 | * [ ] vxlan.policy 27 | * [ ] vxlan.multisite 28 | * [ ] defaults.vxlan 29 | * [ ] other 30 | 31 | ## Proposed Changes 32 | 33 | 34 | 35 | ## Test Notes 36 | 37 | 38 | 39 | ## Cisco Nexus Dashboard Version 40 | 41 | 42 | 43 | ## Checklist 44 | 45 | * [ ] Latest commit is rebased from develop with merge conflicts resolved 46 | * [ ] New or updates to documentation has been made accordingly 47 | * [ ] Assigned the proper reviewers 48 | -------------------------------------------------------------------------------- /roles/dtc/deploy/meta/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | galaxy_info: 23 | author: Cisco 24 | description: Role to deploy state from the NDFC controller to the fabric devices. 25 | license: LICENSE 26 | min_ansible_version: 2.14.15 27 | 28 | dependencies: 29 | - cisco.nac_dc_vxlan.dtc.connectivity_check 30 | - cisco.nac_dc_vxlan.validate 31 | - cisco.nac_dc_vxlan.dtc.common 32 | -------------------------------------------------------------------------------- /roles/dtc/common/tasks/cleanup_files.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Delete content & directory 25 | ansible.builtin.file: 26 | state: absent 27 | path: "{{ path_name }}" 28 | delegate_to: localhost 29 | 30 | - name: Recreate the directory 31 | ansible.builtin.file: 32 | path: "{{ path_name }}" 33 | state: directory 34 | mode: '0755' 35 | delegate_to: localhost 36 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_interfaces/ndfc_interface_breakout.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC breakout interface data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | {% for switch in data_model_extended.vxlan.topology.switches %} 6 | {% if switch.interface_breakouts is defined %} 7 | {% for breakout in switch.interface_breakouts %} 8 | {% if not (breakout.enable_during_bootstrap | default(false)) %} 9 | {% if breakout.to is defined %} 10 | {% for port in range(breakout.from, breakout.to + 1) %} 11 | - name: Ethernet{{ breakout.module }}/{{ port }} 12 | type: breakout 13 | switch: 14 | {% if switch.management.management_ipv4_address is defined %} 15 | - {{ switch.management.management_ipv4_address }} 16 | {% elif (switch.management.management_ipv4_address is not defined) and (switch.management.management_ipv6_address is defined) %} 17 | - {{ switch.management.management_ipv6_address }} 18 | {% endif %} 19 | deploy: true 20 | profile: 21 | map: {{ breakout.map }} 22 | {% endfor %} 23 | {% else %} 24 | - name: Ethernet{{ breakout.module }}/{{ breakout.from }} 25 | type: breakout 26 | switch: 27 | {% if switch.management.management_ipv4_address is defined %} 28 | - {{ switch.management.management_ipv4_address }} 29 | {% elif (switch.management.management_ipv4_address is not defined) and (switch.management.management_ipv6_address is defined) %} 30 | - {{ switch.management.management_ipv6_address }} 31 | {% endif %} 32 | deploy: true 33 | profile: 34 | map: {{ breakout.map }} 35 | {% endif %} 36 | {% endif %} 37 | {% endfor %} 38 | {% endif %} 39 | {% endfor %} 40 | -------------------------------------------------------------------------------- /roles/validate/files/rules/common/301_topology_switch_serial.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "301" 3 | description = "Verify a switch's serial number exists in the topology inventory" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | switches = [] 10 | 11 | check = cls.data_model_key_check(data_model, ['vxlan', 'topology', 'switches']) 12 | if 'switches' in check['keys_data']: 13 | switches = data_model.get("vxlan").get("topology").get("switches") 14 | else: 15 | return results 16 | 17 | for switch in switches: 18 | if not switch.get("serial_number", False): 19 | results.append( 20 | f"vxlan.topology.switches.{switch['name']} serial number must be defined at least once in the topology inventory." 21 | ) 22 | 23 | return results 24 | 25 | @classmethod 26 | def data_model_key_check(cls, tested_object, keys): 27 | dm_key_dict = {'keys_found': [], 'keys_not_found': [], 'keys_data': [], 'keys_no_data': []} 28 | for key in keys: 29 | if tested_object and key in tested_object: 30 | dm_key_dict['keys_found'].append(key) 31 | tested_object = tested_object[key] 32 | if tested_object: 33 | dm_key_dict['keys_data'].append(key) 34 | else: 35 | dm_key_dict['keys_no_data'].append(key) 36 | else: 37 | dm_key_dict['keys_not_found'].append(key) 38 | return dm_key_dict 39 | -------------------------------------------------------------------------------- /roles/validate/files/rules/isn/301_topology_switch_serial.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "301" 3 | description = "Verify a switch's serial number exists in the topology inventory" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | switches = [] 10 | 11 | check = cls.data_model_key_check(data_model, ['vxlan', 'topology', 'switches']) 12 | if 'switches' in check['keys_data']: 13 | switches = data_model.get("vxlan").get("topology").get("switches") 14 | else: 15 | return results 16 | 17 | for switch in switches: 18 | if not switch.get("serial_number", False): 19 | results.append( 20 | f"vxlan.topology.switches.{switch['name']} serial number must be defined at least once in the topology inventory." 21 | ) 22 | 23 | return results 24 | 25 | @classmethod 26 | def data_model_key_check(cls, tested_object, keys): 27 | dm_key_dict = {'keys_found': [], 'keys_not_found': [], 'keys_data': [], 'keys_no_data': []} 28 | for key in keys: 29 | if tested_object and key in tested_object: 30 | dm_key_dict['keys_found'].append(key) 31 | tested_object = tested_object[key] 32 | if tested_object: 33 | dm_key_dict['keys_data'].append(key) 34 | else: 35 | dm_key_dict['keys_no_data'].append(key) 36 | else: 37 | dm_key_dict['keys_not_found'].append(key) 38 | return dm_key_dict 39 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_interfaces/ndfc_interface_breakout_preprov.j2: -------------------------------------------------------------------------------- 1 | --- 2 | # This NDFC breakout interface data structure is auto-generated 3 | # DO NOT EDIT MANUALLY 4 | # 5 | 6 | {% for switch in data_model_extended.vxlan.topology.switches %} 7 | {% if switch.interface_breakouts is defined %} 8 | {% for breakout in switch.interface_breakouts %} 9 | {% if breakout.enable_during_bootstrap is defined and breakout.enable_during_bootstrap | ansible.builtin.bool %} 10 | {% if breakout.to is defined %} 11 | {% for port in range(breakout.from, breakout.to + 1) %} 12 | - name: Ethernet{{ breakout.module }}/{{ port }} 13 | type: breakout 14 | switch: 15 | {% if switch.management.management_ipv4_address is defined %} 16 | - {{ switch.management.management_ipv4_address }} 17 | {% elif (switch.management.management_ipv4_address is not defined) and (switch.management.management_ipv6_address is defined) %} 18 | - {{ switch.management.management_ipv6_address }} 19 | {% endif %} 20 | deploy: true 21 | profile: 22 | map: {{ breakout.map }} 23 | {% endfor %} 24 | {% else %} 25 | - name: Ethernet{{ breakout.module }}/{{ breakout.from }} 26 | type: breakout 27 | switch: 28 | {% if switch.management.management_ipv4_address is defined %} 29 | - {{ switch.management.management_ipv4_address }} 30 | {% elif (switch.management.management_ipv4_address is not defined) and (switch.management.management_ipv6_address is defined) %} 31 | - {{ switch.management.management_ipv6_address }} 32 | {% endif %} 33 | deploy: true 34 | profile: 35 | map: {{ breakout.map }} 36 | {% endif %} 37 | {% endif %} 38 | {% endfor %} 39 | {% endif %} 40 | {% endfor %} 41 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/advanced/dc_external_fabric_advanced.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC External Advanced config data structure for fabric {{ vxlan.fabric.name }} #} 2 | POWER_REDUNDANCY_MODE: ps-redundant 3 | FEATURE_PTP: {{ vxlan.global.external.ptp.enable | default(defaults.vxlan.global.external.ptp.enable) }} 4 | {% if vxlan.global.external.ptp.enable | default(defaults.vxlan.global.external.ptp.enable) %} 5 | PTP_DOMAIN_ID: {{ vxlan.global.external.ptp.domain_id }} 6 | PTP_LB_ID: {{ vxlan.global.external.ptp.lb_id }} 7 | {% endif %} 8 | ENABLE_NXAPI: {{ vxlan.global.external.enable_nxapi_https | default(defaults.vxlan.global.external.enable_nxapi_https) }} 9 | {% if vxlan.global.external.enable_nxapi_https | default(defaults.vxlan.global.external.enable_nxapi_https) %} 10 | NXAPI_HTTPS_PORT: {{ vxlan.global.external.nxapi_https_port | default(defaults.vxlan.global.external.nxapi_https_port) }} 11 | {% endif %} 12 | ENABLE_NXAPI_HTTP: {{ vxlan.global.external.enable_nxapi_http | default(defaults.vxlan.global.external.enable_nxapi_http) }} 13 | {% if vxlan.global.external.enable_nxapi_http | default(defaults.vxlan.global.external.enable_nxapi_http) %} 14 | NXAPI_HTTP_PORT: {{ vxlan.global.external.nxapi_http_port | default(defaults.vxlan.global.external.nxapi_http_port) }} 15 | {% endif %} 16 | SNMP_SERVER_HOST_TRAP: {{ vxlan.global.external.snmp_server_host_trap | default(defaults.vxlan.global.external.snmp_server_host_trap) }} 17 | {% if vxlan.global.external.bootstrap is defined and vxlan.global.external.bootstrap.enable_cdp_mgmt is defined %} 18 | CDP_ENABLE: {{ vxlan.global.external.bootstrap.enable_cdp_mgmt }} 19 | {% endif %} 20 | {# #} 21 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policies and Procedures 2 | 3 | This document outlines security procedures and general policies for the 4 | `ansible-dc-vxlan` project. 5 | 6 | - [Reporting a Bug](#reporting-a-bug) 7 | - [Disclosure Policy](#disclosure-policy) 8 | - [Comments on this Policy](#comments-on-this-policy) 9 | 10 | ## Reporting a Bug 11 | 12 | The `ansible-dc-vxlan` team and community take all security bugs in 13 | `ansible-dc-vxlan` seriously. Thank you for improving the security of 14 | `ansible-dc-vxlan`. We appreciate your efforts and responsible disclosure and 15 | will make every effort to acknowledge your contributions. 16 | 17 | Report security bugs by emailing `oss-security@cisco.com`. 18 | 19 | The lead maintainer will acknowledge your email within 48 hours, and will send a 20 | more detailed response within 48 hours indicating the next steps in handling 21 | your report. After the initial reply to your report, the security team will 22 | endeavor to keep you informed of the progress towards a fix and full 23 | announcement, and may ask for additional information or guidance. 24 | 25 | ## Disclosure Policy 26 | 27 | When the security team receives a security bug report, they will assign it to a 28 | primary handler. This person will coordinate the fix and release process, 29 | involving the following steps: 30 | 31 | - Confirm the problem and determine the affected versions. 32 | - Audit code to find any potential similar problems. 33 | - Prepare fixes for all releases still under maintenance. These fixes will be 34 | released as quickly as possible. 35 | 36 | ## Comments on this Policy 37 | 38 | If you have suggestions on how this process could be improved please submit a 39 | pull request. -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_large_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_external_fabric/bootstrap/dc_external_fabric_bootstrap.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC External Bootstrap config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% if vxlan.global.external.bootstrap is defined %} 3 | BOOTSTRAP_ENABLE: {{ vxlan.global.external.bootstrap.enable_bootstrap | default(defaults.vxlan.global.external.bootstrap.enable_bootstrap) | bool }} 4 | {% if vxlan.global.external.bootstrap.enable_bootstrap | default(defaults.vxlan.global.external.bootstrap.enable_bootstrap) | bool %} 5 | DHCP_ENABLE: {{ vxlan.global.external.bootstrap.enable_local_dhcp_server | default(defaults.vxlan.global.external.bootstrap.enable_local_dhcp_server) | bool }} 6 | {% if vxlan.global.external.bootstrap.enable_local_dhcp_server | default(defaults.vxlan.global.external.bootstrap.enable_local_dhcp_server) | bool %} 7 | DHCP_IPV6_ENABLE: {{ vxlan.global.external.bootstrap.dhcp_version }} 8 | {% if vxlan.global.external.bootstrap.dhcp_version is defined and vxlan.global.external.bootstrap.dhcp_version == "DHCPv4" %} 9 | DHCP_START: {{ vxlan.global.external.bootstrap.dhcp_v4.scope_start_address }} 10 | DHCP_END: {{ vxlan.global.external.bootstrap.dhcp_v4.scope_end_address }} 11 | MGMT_GW: {{ vxlan.global.external.bootstrap.dhcp_v4.switch_mgmt_default_gw }} 12 | MGMT_PREFIX: {{ vxlan.global.external.bootstrap.dhcp_v4.mgmt_prefix }} 13 | DOMAIN_NAME: "{{ vxlan.global.external.bootstrap.dhcp_v4.domain_name }}" 14 | {% if vxlan.global.external.bootstrap.dhcp_v4.multi_subnet_scope is defined %} 15 | BOOTSTRAP_MULTISUBNET: "{{ vxlan.global.external.bootstrap.dhcp_v4.multi_subnet_scope }}" 16 | {% endif %} 17 | {% endif %} 18 | {% endif %} 19 | {% endif %} 20 | {% endif %} 21 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /roles/dtc/create/tasks/common/devices.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Manage Devices Entry Point 25 | ansible.builtin.debug: 26 | msg: 27 | - "----------------------------------------------------------------" 28 | - "+ Manage Devices Fabric {{ data_model_extended.vxlan.fabric.name }}" 29 | - "----------------------------------------------------------------" 30 | 31 | - name: Manage Devices Discovery in Nexus Dashboard 32 | ansible.builtin.import_tasks: devices_discovery.yml 33 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_asm_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_asm_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_asm_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_asm_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_bidir_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_bidir_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_bidir_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_asm_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_asm_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_bidir_example/topology_fabric_links.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | fabric_links: 26 | - source_device: "source_device" 27 | source_interface: "Ethernet1/1" 28 | dest_device: "dest_device" 29 | dest_interface: "Ethernet1/2" 30 | - source_device: "source_device2" 31 | source_interface: "Ethernet1/1" 32 | dest_device: "dest_device2" 33 | dest_interface: "Ethernet1/2" 34 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_bidir_example/topology_int_routed.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_bidir_example/topology_int_routed_po.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_asm_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_bidir_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_asm_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_bidir_example/topology_int_routed_subint.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | 29 | - name: << leaf1_hostname >> 30 | serial_number: << leaf1_serial >> 31 | interfaces: [] 32 | 33 | - name: << leaf2_hostname >> 34 | serial_number: << leaf2_serial >> 35 | interfaces: [] 36 | -------------------------------------------------------------------------------- /roles/validate/tasks/cleanup_model_files.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Remove Service Model JSON Files 25 | ansible.builtin.find: 26 | paths: "{{ role_path }}/files/" 27 | patterns: "{{ data_model_extended.vxlan.fabric.name }}_service_model*.json" 28 | file_type: file 29 | recurse: false 30 | register: files_to_delete 31 | delegate_to: localhost 32 | 33 | - name: Delete the found files 34 | ansible.builtin.file: 35 | path: "{{ item.path }}" 36 | state: absent 37 | loop: "{{ files_to_delete.files }}" 38 | delegate_to: localhost 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_empty_example/global.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | global: 25 | name: << fabric_name >> 26 | bgp_asn: 787878 27 | route_reflectors: 4 28 | anycast_gateway_mac: 20:20:00:00:00:aa 29 | auth_proto: MD5 30 | vpc: 31 | peer_link_vlan: 3600 32 | peer_keep_alive: management 33 | auto_recovery_time: 300 34 | delay_restore_time: 175 35 | peer_link_port_channel_id: 555 36 | advertise_pip: false 37 | advertise_pip_border_only: true 38 | domain_id_range: 1-100 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_large_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/dc_vxlan_fabric/general/dc_vxlan_fabric_general.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC DC VXLAN EVPN General config data structure for fabric {{ vxlan.fabric.name }} #} 2 | BGP_AS: "{{ vxlan.global.ibgp.bgp_asn }}" 3 | UNDERLAY_IS_V6: {{ vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title }} 4 | {% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %} 5 | USE_LINK_LOCAL: {{ vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address) | title }} 6 | {% if not (vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address) | ansible.builtin.bool) %} 7 | V6_SUBNET_TARGET_MASK: {{ vxlan.underlay.ipv6.underlay_subnet_mask | default(defaults.vxlan.underlay.ipv6.underlay_subnet_mask) }} 8 | {% endif %} 9 | {% endif %} 10 | {% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %} 11 | FABRIC_INTERFACE_TYPE: {{ vxlan.underlay.ipv4.fabric_interface_numbering | default(defaults.vxlan.underlay.ipv4.fabric_interface_numbering) }} 12 | SUBNET_TARGET_MASK: {{ vxlan.underlay.ipv4.subnet_mask | default(defaults.vxlan.underlay.ipv4.subnet_mask) }} 13 | {% endif %} 14 | LINK_STATE_ROUTING: {{ vxlan.underlay.general.routing_protocol | default(defaults.vxlan.underlay.general.routing_protocol) }} 15 | RR_COUNT: {{ vxlan.global.ibgp.route_reflectors | default(defaults.vxlan.global.ibgp.route_reflectors) }} 16 | ANYCAST_GW_MAC: {{ vxlan.global.ibgp.anycast_gateway_mac | default(defaults.vxlan.global.ibgp.anycast_gateway_mac) }} 17 | {# #} 18 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/ebgp_vxlan_fabric_base.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC eBGP VXLAN EVPN Base config data structure for fabric {{ vxlan.fabric.name }} #} 2 | {% from 'macros/convert_ranges.j2' import convert_ranges as convert_ranges %} 3 | - FABRIC_NAME: {{ vxlan.fabric.name }} 4 | FABRIC_TYPE: BGP 5 | DEPLOY: False 6 | 7 | {# Include NDFC eBGP VXLAN EVPN General Template #} 8 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/general/ebgp_vxlan_fabric_general.j2' %} 9 | 10 | {# Include NDFC eBGP VXLAN EVPN Template #} 11 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/evpn/ebgp_vxlan_fabric_evpn.j2' %} 12 | 13 | {# Include NDFC eBGP VXLAN EVPN vPC Template #} 14 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/vpc/ebgp_vxlan_fabric_vpc.j2' %} 15 | 16 | {# Include NDFC eBGP VXLAN EVPN Protocols Template #} 17 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/protocols/ebgp_vxlan_fabric_protocols.j2' %} 18 | 19 | {% if ndfc_version | cisco.nac_dc_vxlan.version_compare('12.2.2', '>=') %} 20 | {# Include NDFC eBGP VXLAN EVPN Security Template #} 21 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/security/ebgp_vxlan_fabric_security.j2' %} 22 | {% endif %} 23 | 24 | {# Include NDFC eBGP VXLAN EVPN Advanced Template #} 25 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/advanced/ebgp_vxlan_fabric_advanced.j2' %} 26 | 27 | {# Include NDFC eBGP VXLAN EVPN Manageability Template #} 28 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/manageability/ebgp_vxlan_fabric_manageability.j2' %} 29 | 30 | {# Include NDFC eBGP VXLAN EVPN Bootstrap Template #} 31 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/bootstrap/ebgp_vxlan_fabric_bootstrap.j2' %} 32 | 33 | {# Include NDFC eBGP VXLAN EVPN Flow Monitor Template #} 34 | {% include '/ndfc_fabric/ebgp_vxlan_fabric/flow_monitor/ebgp_vxlan_fabric_flow_monitor.j2' %} 35 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_asm_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_asm_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_bidir_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_bidir_example/topology_edge_connections.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | edge_connections: 26 | - dest_fabric: "dest_fabric" 27 | source_device: "source_device" 28 | dest_device: "dest_device" 29 | source_interface: "Ethernet1/1" 30 | dest_interface: "Ethernet1/2" 31 | - dest_fabric: "dest_fabric2" 32 | source_device: "source_device" 33 | dest_device: "dest_device" 34 | source_interface: "Ethernet1/1" 35 | dest_interface: "Ethernet1/2" 36 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_asm_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_multicast_bidir_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_asm_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_multicast_bidir_example/topology_vpc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | vxlan: 24 | topology: 25 | vpc_peers: 26 | - peer1: << leaf1_hostname >> 27 | peer1_peerlink_interfaces: 28 | - name: Ethernet1/3 29 | - name: Ethernet1/4 30 | peer2: << leaf2_hostname >> 31 | peer2_peerlink_interfaces: 32 | - name: Ethernet1/3 33 | - name: Ethernet1/4 34 | fabric_peering: false 35 | domain_id: 100 36 | vtep_vip: "10.10.88.1" 37 | vpc_interfaces: 38 | - vpc_id: 30 39 | -------------------------------------------------------------------------------- /roles/dtc/common/README.md: -------------------------------------------------------------------------------- 1 | Role Name: cisco.nac_dc_vxlan.dtc.common 2 | ======================================== 3 | 4 | Infrastructure role dependency used by 5 | 6 | * cisco.nac_dc_vxlan.dtc.create 7 | * cisco.nac_dc_vxlan.dtc.deploy 8 | * cisco.nac_dc_vxlan.dtc.remove 9 | 10 | Requirements 11 | ------------ 12 | None 13 | 14 | Role Variables 15 | -------------- 16 | None 17 | 18 | Dependencies 19 | ------------ 20 | 21 | See [Galaxy File](https://github.com/netascode/ansible-dc-vxlan/blob/develop/galaxy.yml#L14) 22 | 23 | 24 | Example Playbook 25 | ---------------- 26 | 27 | This role should NOT be called directly 28 | 29 | License 30 | ------- 31 | 32 | MIT License 33 | 34 | Copyright (c) 2024 Cisco and/or its affiliates. 35 | 36 | Permission is hereby granted, free of charge, to any person obtaining a copy 37 | of this software and associated documentation files (the "Software"), to deal 38 | in the Software without restriction, including without limitation the rights 39 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 40 | copies of the Software, and to permit persons to whom the Software is 41 | furnished to do so, subject to the following conditions: 42 | 43 | The above copyright notice and this permission notice shall be included in all 44 | copies or substantial portions of the Software. 45 | 46 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 47 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 48 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 49 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 50 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 51 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 52 | SOFTWARE. 53 | -------------------------------------------------------------------------------- /tests/integration/roles/test_create/tests/test.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | # tasks file for create 23 | 24 | - name: Display Test Header 25 | ansible.builtin.debug: 26 | msg: "Executing Create Role Tests" 27 | 28 | - name: Get Fabric Switches Data 29 | cisco.dcnm.dcnm_inventory: 30 | fabric: "{{ data_model_extended.vxlan.fabric.name }}" 31 | state: query 32 | register: fabric_query 33 | vars: 34 | ansible_command_timeout: 1000 35 | ansible_connect_timeout: 1000 36 | 37 | - name: Run inventory tests 38 | cisco.nac_dc_vxlan.test.inventory: 39 | test_data: "{{ fabric_query }}" 40 | data_model: "{{ data_model_extended }}" 41 | -------------------------------------------------------------------------------- /roles/validate/files/rules/isn/307_topology_switch_preprovision.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "307" 3 | description = "Verify subnet is defined when preprovision is set" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | switches = [] 10 | 11 | dm_check = cls.data_model_key_check(data_model, ['vxlan', 'topology', 'switches']) 12 | if 'switches' in dm_check['keys_data']: 13 | switches = data_model['vxlan']['topology']['switches'] 14 | 15 | for switch in switches: 16 | dm_check = cls.data_model_key_check(switch, ['poap', 'preprovision']) 17 | if 'preprovision' in dm_check['keys_data']: 18 | dm_check = cls.data_model_key_check(switch, ['management', 'subnet_mask_ipv4']) 19 | if 'subnet_mask_ipv4' in dm_check['keys_not_found'] or 'subnet_mask_ipv4' in dm_check['keys_no_data']: 20 | results.append( 21 | f"vxlan.topology.switches.{switch['name']}.subnet_mask_ipv4 must be defined when preprovision is used." 22 | ) 23 | return results 24 | 25 | @classmethod 26 | def data_model_key_check(cls, tested_object, keys): 27 | dm_key_dict = {'keys_found': [], 'keys_not_found': [], 'keys_data': [], 'keys_no_data': []} 28 | for key in keys: 29 | if tested_object and key in tested_object: 30 | dm_key_dict['keys_found'].append(key) 31 | tested_object = tested_object[key] 32 | if tested_object: 33 | dm_key_dict['keys_data'].append(key) 34 | else: 35 | dm_key_dict['keys_no_data'].append(key) 36 | else: 37 | dm_key_dict['keys_not_found'].append(key) 38 | return dm_key_dict 39 | -------------------------------------------------------------------------------- /roles/validate/files/rules/common/307_topology_switch_preprovision.py: -------------------------------------------------------------------------------- 1 | class Rule: 2 | id = "307" 3 | description = "Verify subnet is defined when preprovision is set" 4 | severity = "HIGH" 5 | 6 | @classmethod 7 | def match(cls, data_model): 8 | results = [] 9 | switches = [] 10 | 11 | dm_check = cls.data_model_key_check(data_model, ['vxlan', 'topology', 'switches']) 12 | if 'switches' in dm_check['keys_data']: 13 | switches = data_model['vxlan']['topology']['switches'] 14 | 15 | for switch in switches: 16 | dm_check = cls.data_model_key_check(switch, ['poap', 'preprovision']) 17 | if 'preprovision' in dm_check['keys_data']: 18 | dm_check = cls.data_model_key_check(switch, ['management', 'subnet_mask_ipv4']) 19 | if 'subnet_mask_ipv4' in dm_check['keys_not_found'] or 'subnet_mask_ipv4' in dm_check['keys_no_data']: 20 | results.append( 21 | f"vxlan.topology.switches.{switch['name']}.subnet_mask_ipv4 must be defined when preprovision is used." 22 | ) 23 | return results 24 | 25 | @classmethod 26 | def data_model_key_check(cls, tested_object, keys): 27 | dm_key_dict = {'keys_found': [], 'keys_not_found': [], 'keys_data': [], 'keys_no_data': []} 28 | for key in keys: 29 | if tested_object and key in tested_object: 30 | dm_key_dict['keys_found'].append(key) 31 | tested_object = tested_object[key] 32 | if tested_object: 33 | dm_key_dict['keys_data'].append(key) 34 | else: 35 | dm_key_dict['keys_no_data'].append(key) 36 | else: 37 | dm_key_dict['keys_not_found'].append(key) 38 | return dm_key_dict 39 | -------------------------------------------------------------------------------- /tests/integration/roles/test_common/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Import Validate Role 25 | ansible.builtin.import_role: 26 | name: cisco.nac_dc_vxlan.validate 27 | tags: 'role_validate' 28 | 29 | - name: Import DTC Create Role 30 | ansible.builtin.import_role: 31 | name: cisco.nac_dc_vxlan.dtc.create 32 | tags: 'role_create' 33 | 34 | - name: Import DTC Deploy Role 35 | ansible.builtin.import_role: 36 | name: cisco.nac_dc_vxlan.dtc.deploy 37 | tags: 'role_deploy' 38 | 39 | - name: Import DTC Remove Role 40 | ansible.builtin.import_role: 41 | name: cisco.nac_dc_vxlan.dtc.remove 42 | tags: 'role_remove' 43 | -------------------------------------------------------------------------------- /roles/validate/README.md: -------------------------------------------------------------------------------- 1 | Role Name: cisco.nac_dc_vxlan.validate 2 | ====================================== 3 | 4 | This role is used to validate service model data against the following: 5 | 6 | * Service Model Data Schema 7 | * Service Model Data Integrity Rules 8 | 9 | Requirements 10 | ------------ 11 | None 12 | 13 | Role Variables 14 | -------------- 15 | None 16 | 17 | Dependencies 18 | ------------ 19 | 20 | See [Galaxy File](https://github.com/netascode/ansible-dc-vxlan/blob/develop/galaxy.yml#L14) 21 | 22 | 23 | Example Playbook 24 | ---------------- 25 | 26 | ```yaml 27 | - hosts: netascode_rtpfabric 28 | 29 | roles: 30 | - role: cisco.nac_dc_vxlan.validate 31 | ``` 32 | 33 | License 34 | ------- 35 | 36 | MIT License 37 | 38 | Copyright (c) 2024 Cisco and/or its affiliates. 39 | 40 | Permission is hereby granted, free of charge, to any person obtaining a copy 41 | of this software and associated documentation files (the "Software"), to deal 42 | in the Software without restriction, including without limitation the rights 43 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 44 | copies of the Software, and to permit persons to whom the Software is 45 | furnished to do so, subject to the following conditions: 46 | 47 | The above copyright notice and this permission notice shall be included in all 48 | copies or substantial portions of the Software. 49 | 50 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 51 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 52 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 53 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 54 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 55 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 56 | SOFTWARE. -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_fabric/isn_fabric/advanced/isn_fabric_advanced.j2: -------------------------------------------------------------------------------- 1 | {# Auto-generated NDFC ISN Advanced config data structure for fabric {{ vxlan.fabric.name }} #} 2 | POWER_REDUNDANCY_MODE: ps-redundant 3 | {# Not supporting these features in ISN currently #} 4 | {# Most of these features are supported only on Cisco NX-OS switches #} 5 | {# Some of these features are supported only on Cisco Catalyst 9000 switches #} 6 | MPLS_HANDOFF: false 7 | AAA_REMOTE_IP_ENABLED: false 8 | INBAND_MGMT: false 9 | {% if vxlan.multisite.isn.bootstrap is defined and vxlan.multisite.isn.bootstrap.enable_cdp_mgmt is defined %} 10 | CDP_ENABLE: {{ vxlan.multisite.isn.bootstrap.enable_cdp_mgmt }} 11 | {% endif %} 12 | ENABLE_NXAPI: {{ vxlan.multisite.isn.enable_nxapi_https | default(defaults.vxlan.multisite.isn.enable_nxapi_https) }} 13 | {% if vxlan.multisite.isn.enable_nxapi_https | default(defaults.vxlan.multisite.isn.enable_nxapi_https) %} 14 | NXAPI_HTTPS_PORT: {{ vxlan.multisite.isn.nxapi_https_port | default(defaults.vxlan.multisite.isn.nxapi_https_port) }} 15 | {% endif %} 16 | ENABLE_NXAPI_HTTP: {{ vxlan.multisite.isn.enable_nxapi_http | default(defaults.vxlan.multisite.isn.enable_nxapi_http) }} 17 | {% if vxlan.multisite.isn.enable_nxapi_http | default(defaults.vxlan.multisite.isn.enable_nxapi_http) %} 18 | NXAPI_HTTP_PORT: {{ vxlan.multisite.isn.nxapi_http_port | default(defaults.vxlan.multisite.isn.nxapi_http_port) }} 19 | {% endif %} 20 | FEATURE_PTP: {{ vxlan.multisite.isn.ptp.enable | default(defaults.vxlan.multisite.isn.ptp.enable) }} 21 | {% if vxlan.multisite.isn.ptp.enable | default(defaults.vxlan.multisite.isn.ptp.enable) %} 22 | PTP_DOMAIN_ID: {{ vxlan.multisite.isn.ptp.domain_id | default(defaults.vxlan.multisite.isn.ptp.domain_id) }} 23 | PTP_LB_ID: {{ vxlan.multisite.isn.ptp.lb_id | default(defaults.vxlan.multisite.isn.ptp.lb_id) }} 24 | {% endif %} 25 | {# #} 26 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_sha_example/topology_int_loopback_fabric.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | # - name: lo0 29 | # description: 'NetAsCode Fabric Loopback Interface' 30 | # mode: fabric_loopback 31 | # ipv4_address: 10.2.0.3 32 | 33 | - name: << leaf1_hostname >> 34 | serial_number: << leaf1_serial >> 35 | interfaces: [] 36 | 37 | - name: << leaf2_hostname >> 38 | serial_number: << leaf2_serial >> 39 | interfaces: [] 40 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_isis_ingress_example/topology_int_loopback_fabric.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | # - name: lo0 29 | # description: 'NetAsCode Fabric Loopback Interface' 30 | # mode: fabric_loopback 31 | # ipv4_address: 10.2.0.3 32 | 33 | - name: << leaf1_hostname >> 34 | serial_number: << leaf1_serial >> 35 | interfaces: [] 36 | 37 | - name: << leaf2_hostname >> 38 | serial_number: << leaf2_serial >> 39 | interfaces: [] 40 | -------------------------------------------------------------------------------- /tests/integration/host_vars/examples/fabric_full_small_ospf_ingress_example/topology_int_loopback_fabric.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | vxlan: 23 | topology: 24 | switches: 25 | - name: << spine1_hostname >> 26 | serial_number: << spine1_serial >> 27 | interfaces: [] 28 | # - name: lo0 29 | # description: 'NetAsCode Fabric Loopback Interface' 30 | # mode: fabric_loopback 31 | # ipv4_address: 10.2.0.3 32 | 33 | - name: << leaf1_hostname >> 34 | serial_number: << leaf1_serial >> 35 | interfaces: [] 36 | 37 | - name: << leaf2_hostname >> 38 | serial_number: << leaf2_serial >> 39 | interfaces: [] 40 | -------------------------------------------------------------------------------- /roles/dtc/common/tasks/mcfg/ndfc_child_fabrics.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Build Multisite Child Fabric Data for Nexus Dashboard 25 | ansible.builtin.debug: 26 | msg: "Building MCFG Child Fabric Data" 27 | 28 | - name: Prepare Multisite Add and Remove Child Fabric Data 29 | cisco.nac_dc_vxlan.dtc.prepare_msite_child_fabrics_data: 30 | parent_fabric: "{{ data_model_extended.vxlan.fabric.name }}" 31 | parent_fabric_type: "{{ data_model_extended.vxlan.fabric.type }}" 32 | child_fabrics: "{{ data_model_extended.vxlan.multisite.child_fabrics }}" 33 | when: 34 | - data_model_extended.vxlan.multisite.child_fabrics is defined 35 | register: data_model_mcfg_child_fabrics 36 | -------------------------------------------------------------------------------- /roles/dtc/common/tasks/msd/ndfc_child_fabrics.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 Cisco Systems, Inc. and its affiliates 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | # this software and associated documentation files (the "Software"), to deal in 5 | # the Software without restriction, including without limitation the rights to 6 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | # the Software, and to permit persons to whom the Software is furnished to do so, 8 | # subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in all 11 | # copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | # 20 | # SPDX-License-Identifier: MIT 21 | 22 | --- 23 | 24 | - name: Build Multisite Child Fabric Data for Nexus Dashboard 25 | ansible.builtin.debug: 26 | msg: "Building MSD Child Fabric Data" 27 | 28 | - name: Prepare Multisite Add and Remove Child Fabric Data 29 | cisco.nac_dc_vxlan.dtc.prepare_msite_child_fabrics_data: 30 | parent_fabric: "{{ data_model_extended.vxlan.fabric.name }}" 31 | parent_fabric_type: "{{ data_model_extended.vxlan.fabric.type }}" 32 | child_fabrics: "{{ data_model_extended.vxlan.multisite.child_fabrics }}" 33 | when: 34 | - data_model_extended.vxlan.multisite.child_fabrics is defined 35 | register: data_model_msd_child_fabrics 36 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vrfs/mcfg_fabric/mcfg_fabric_attach_vrfs_loopbacks.j2: -------------------------------------------------------------------------------- 1 | # This NDFC VRF loopback config data structure is auto-generated 2 | # DO NOT EDIT MANUALLY 3 | # 4 | [ 5 | {% for vrf in data_model_extended.vxlan.overlay.vrfs %} 6 | {% if vrf['vrf_attach_group'] is defined %} 7 | {% if runtime_mcfg_data_model.overlay_attach_groups.vrf_attach_groups_dict[vrf['vrf_attach_group']] is defined %} 8 | { 9 | "vrfName": "{{ vrf["name"] }}", 10 | "lanAttachList": 11 | [ 12 | {% for attach in runtime_mcfg_data_model.overlay_attach_groups.vrf_attach_groups_dict[vrf['vrf_attach_group']] %} 13 | {% if attach.loopback_id is defined and attach.loopback_id %} 14 | { 15 | "vrfName": "{{ vrf["name"] }}", 16 | {% for switch in runtime_mcfg_data_model.switches %} 17 | {% if switch["hostname"] == attach["hostname"] %} 18 | "fabric": "{{ switch["fabric_name"] }}", 19 | "serialNumber": "{{ switch["serial_number"] }}", 20 | {% endif %} 21 | {% endfor %} 22 | "freeformConfig": "{{ attach['freeform_config'] | default('') | replace('\n', '\\n') | replace('"', '\\"') }}", 23 | "extensionValues": "", 24 | {% if vrf["vlan_id"] is defined %} 25 | "vlan": {{ vrf["vlan_id"] }}, 26 | {% endif %} 27 | "deployment": true, 28 | "instanceValues": "{\"loopbackId\": \"{{ attach['loopback_id'] | default('')}}\", \"loopbackIpAddress\": \"{{ attach['loopback_ipv4'] | default('') }}\", \"loopbackIpV6Address\":\"{{ attach['loopback_ipv6'] | default('') }}\"}" 29 | }{% if not loop.last %},{% endif %} 30 | {# Empty space needed to prettify and correctly represent the comma in a list continuation #} 31 | 32 | {% endif %} 33 | {% endfor %} 34 | ] 35 | }{% if not loop.last %},{% endif %} 36 | {# Empty space needed to prettify and correctly represent the comma in a list continuation #} 37 | 38 | {% endif %} 39 | {% endif %} 40 | {% endfor %} 41 | ] 42 | -------------------------------------------------------------------------------- /roles/dtc/common/templates/ndfc_vrfs/msd_fabric/msd_fabric_attach_vrfs_loopbacks.j2: -------------------------------------------------------------------------------- 1 | # This NDFC VRF loopback config data structure is auto-generated 2 | # DO NOT EDIT MANUALLY 3 | # 4 | [ 5 | {% for vrf in data_model_extended.vxlan.overlay.vrfs %} 6 | {% if vrf['vrf_attach_group'] is defined %} 7 | {% if runtime_msd_data_model.overlay_attach_groups.vrf_attach_groups_dict[vrf['vrf_attach_group']] is defined %} 8 | { 9 | "vrfName": "{{ vrf["name"] }}", 10 | "lanAttachList": 11 | [ 12 | {% for attach in runtime_msd_data_model.overlay_attach_groups.vrf_attach_groups_dict[vrf['vrf_attach_group']] %} 13 | {% if attach.loopback_id is defined and attach.loopback_id %} 14 | { 15 | "vrfName": "{{ vrf["name"] }}", 16 | {% for switch in runtime_msd_data_model.switches %} 17 | {% if switch["hostname"] == attach["hostname"] %} 18 | "fabric": "{{ switch["fabric_name"] }}", 19 | "serialNumber": "{{ switch["serial_number"] }}", 20 | {% endif %} 21 | {% endfor %} 22 | "freeformConfig": "{{ attach['freeform_config'] | default('') | replace('\n', '\\n') | replace('"', '\\"') }}", 23 | "extensionValues": "", 24 | {% if vrf["vlan_id"] is defined %} 25 | "vlan": "{{ vrf["vlan_id"] }}", 26 | {% endif %} 27 | "deployment": true, 28 | "instanceValues": "{\"loopbackId\": \"{{ attach['loopback_id'] | default('')}}\", \"loopbackIpAddress\": \"{{ attach['loopback_ipv4'] | default('') }}\", \"loopbackIpV6Address\":\"{{ attach['loopback_ipv6'] | default('') }}\"}" 29 | }{% if not loop.last %},{% endif %} 30 | {# Empty space needed to prettify and correctly represent the comma in a list continuation #} 31 | 32 | {% endif %} 33 | {% endfor %} 34 | ] 35 | }{% if not loop.last %},{% endif %} 36 | {# Empty space needed to prettify and correctly represent the comma in a list continuation #} 37 | 38 | {% endif %} 39 | {% endif %} 40 | {% endfor %} 41 | ] 42 | --------------------------------------------------------------------------------