Skip to content

Commit

Permalink
Merge pull request #191 from madhansansel/main
Browse files Browse the repository at this point in the history
SDA Workflow manager modules
  • Loading branch information
fmunozmiranda authored Oct 16, 2024
2 parents 444910c + 7340a2f commit b1262ed
Show file tree
Hide file tree
Showing 41 changed files with 26,642 additions and 1,434 deletions.
22 changes: 22 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1015,3 +1015,25 @@ releases:
- network_settings_workflow_manager.py: added attributes 'wired_data_collection', 'wireless_telemetry', and 'netflow_collector'.
- provision_workflow_manager.py: added attribute 'force_provisioning'.
- accesspoint_workflow_manager.py: added attribute 'reboot_aps'.
6.21.0:
release_date: "2024-10-14"
changes:
release_summary: Code changes in workflow manager modules.
minor_changes:
- Added 'lan_automation_workflow_manager' to automate network discovery, deployment, and device configuration with LAN Automation.
- Added 'sda_fabric_devices_workflow_manager' to manage SDA fabric devices.
- Added 'sda_extranet_policies_workflow_manager' to manage SDA Extranet Policies.
- Added 'sda_fabric_virtual_networks_workflow_manager' to configure fabric VLANs, Virtual Networks, and Anycast Gateways.
- Added 'sda_host_port_onboarding_workflow_manager' to manage host port onboarding in SD-Access Fabric.
- Enhancements in swim_workflow_manager module.
- Changes in user_role_workflow_manager module.
- Changes in device_credential_workflow_manager module.
- Changes in accesspoint_workflow_manager module.
- Changes in events_and_notifications_workflow_manager module.
- Changes in sda_fabric_transits_workflow_manager module.
- Changes in inventory_workflow_manager module.
- Changes in ise_radius_integration_workflow_manager module.
- Enhancements in network_settings_workflow_manager module.
- Changes in dnac.py to support common APIs
- device_credential_workflow_manager.py: added attribute 'apply_credentials_to_site'.
- accesspoint_workflow_manager.py: added attribute 'factory_reset_aps'.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: cisco
name: dnac
version: 6.20.0
version: 6.21.0
readme: README.md
authors:
- Rafael Campos <[email protected]>
Expand Down
108 changes: 108 additions & 0 deletions playbooks/lan_automation_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
- hosts: dnac_servers
connection: local
gather_facts: no
vars_files:
- "credentials.yml"
tasks:
- name: Start a LAN Automation session and update LAN Automated devices
cisco.dnac.lan_automation_workflow_manager:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
dnac_log_level: "{{dnac_log_level}}"
dnac_log: true
dnac_log_append: false
config_verify: false
state: deleted
config:
- lan_automation:
discovered_device_site_name_hierarchy: "Global/USA/SAN JOSE"
peer_device_management_ip_address: "91.1.1.2"
primary_device_management_ip_address: "204.1.1.4"
primary_device_interface_names:
- "HundredGigE1/0/2"
- "HundredGigE1/0/29"
- "HundredGigE1/0/35"
- "HundredGigE1/0/33"
- "HundredGigE1/0/31"
ip_pools:
- ip_pool_name: "underlay_sub"
ip_pool_role: "MAIN_POOL"
- ip_pool_name: "underlay_sub_small"
ip_pool_role: "PHYSICAL_LINK_POOL"
multicast_enabled: true
redistribute_isis_to_bgp: true
host_name_prefix: "San-Jose"
isis_domain_pwd: "cisco"
discovery_level: 5
discovery_timeout: 40
discovery_devices:
- device_serial_number: "FJC27172JDX"
device_host_name: "SR-LAN-9300-IM1"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD23"
device_management_ip_address: "204.1.1.10"
- device_serial_number: "FJC2721261G"
device_host_name: "SR-LAN-9300-IM2"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD20"
device_management_ip_address: "204.1.1.11"
- device_serial_number: "FCW2152L02V"
device_host_name: "SR-LAN-9300-TRANSIT"
device_management_ip_address: "204.1.1.12"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD23"
- device_serial_number: "FXS2429Q0WE"
device_host_name: "SR-LAN-9400X-EDGE1"
device_management_ip_address: "204.1.1.13"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD20/BLD20_FLOOR1"
- device_serial_number: "FOC2722YGWW"
device_host_name: "SR-LAN-9300X-EDGE2"
device_management_ip_address: "204.1.1.14"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD20/BLD20_FLOOR1"
- device_serial_number: "FCW2213G01S"
device_host_name: "SR-LAN-9300-EDGE3"
device_management_ip_address: "204.1.1.15"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD23/FLOOR1_LEVEL1"
- device_serial_number: "FJC271915XB"
device_host_name: "SR-LAN-9200CX-AEN1"
device_management_ip_address: "204.1.1.16"
device_site_name_hierarchy: "Global/USA/SAN JOSE/BLD23/FLOOR1_LEVEL1"
launch_and_wait: false
pnp_authorization: false
device_serial_number_authorization:
- "FJC27172JDX"
- "FJC2721261G"
- "FCW2152L02V"
- "FXS2429Q0WE"
- "FOC2722YGWW"
- "FCW2213G01S"
- "FJC271915XB"

- lan_automated_device_update:
loopback_update_device_list:
- device_management_ip_address: "204.1.2.3"
new_loopback0_ip_address: "204.1.1.20"
- device_management_ip_address: "204.1.1.11"
new_loopback0_ip_address: "204.1.1.19"

- lan_automated_device_update:
hostname_update_devices:
- device_management_ip_address: "24.61.1.10"
new_host_name: "SR-LAN-9400X-EDGE1"

- lan_automated_device_update:
link_add:
source_device_management_ip_address: "204.1.1.10"
source_device_interface_name: "TwoGigabitEthernet1/0/20"
destination_device_management_ip_address: "204.1.1.15"
destination_device_interface_name: "GigabitEthernet1/0/20"
ip_pool_name: "underlay_sub"

- lan_automated_device_update:
link_delete:
source_device_management_ip_address: "204.1.1.20"
source_device_interface_name: "TwoGigabitEthernet1/0/20"
destination_device_management_ip_address: "204.1.1.15"
destination_device_interface_name: "GigabitEthernet1/0/20"
88 changes: 88 additions & 0 deletions playbooks/sda_fabric_devices_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: no
connection: local
tasks:
- name: Add the SDA fabric device as BORDER and CONTROL node and do L2 and L3 handoff.
cisco.dnac.sda_fabric_devices_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_debug: "{{ dnac_debug }}"
dnac_version: "{{ dnac_version }}"
dnac_log: true
dnac_log_level: DEBUG
dnac_log_append: true
dnac_log_file_path: "{{ dnac_log_file_path }}"
state: merged
config_verify: true
config:
- fabric_devices:
fabric_name: Global/USA/SAN-JOSE
device_config:
- device_ip: 10.0.0.1
device_roles: [CONTROL_PLANE_NODE, EDGE_NODE]
borders_settings:
layer3_settings:
local_autonomous_system_number: 213
is_default_exit: true
import_external_routes: true
border_priority: 1
prepend_autonomous_system_count: 1

layer3_handoff_ip_transit:
- transit_network_name: IP_TRANSIT_1
interface_name: FortyGigabitEthernet1/1/1
external_connectivity_ip_pool_name: reserved_pool_1
virtual_network_name: L3VN1
vlan_id: 333
tcp_mss_adjustment: 510

layer3_handoff_sda_transit:
transit_network_name: SDA_PUB_SUB_TRANSIT
affinity_id_prime: 2
affinity_id_decider: 2
connected_to_internet: true
is_multicast_over_transit_enabled: true

layer2_handoff:
- interface_name: FortyGigabitEthernet1/1/1
internal_vlan_id: 443
external_vlan_id: 444

- name: Delete the SDA fabric device and remove L2 and L3 handoff configurations
cisco.dnac.sda_fabric_devices_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_debug: "{{ dnac_debug }}"
dnac_version: "{{ dnac_version }}"
dnac_log: true
dnac_log_level: DEBUG
dnac_log_append: true
dnac_log_file_path: "{{ dnac_log_file_path }}"
state: merged
config_verify: true
config:
- fabric_devices:
fabric_name: Global/USA/SAN-JOSE
device_config:
- device_ip: 10.0.0.1
delete_fabric_device: true
borders_settings:
layer3_handoff_ip_transit:
- transit_network_name: IP_TRANSIT_1
interface_name: FortyGigabitEthernet1/1/1
virtual_network_name: L3VN1

layer3_handoff_sda_transit:
- transit_network_name: SDA_PUB_SUB_TRANSIT

layer2_handoff:
- interface_name: FortyGigabitEthernet1/1/1
internal_vlan_id: 443
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- "credentials.yml"
tasks:
- name: Configure the fabric sites/zones and authentication profile template in Cisco Catalyst Center.
cisco.dnac.fabric_sites_zones_workflow_manager:
cisco.dnac.sda_fabric_sites_zones_workflow_manager:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
Expand All @@ -18,12 +18,12 @@
dnac_debug: "{{dnac_debug}}"
dnac_log_level: DEBUG
dnac_log: true
config_verify: True
config_verify: true
state: merged
config:
- fabric_sites:
- site_name: "{{item.fabric_sites.site_name}}"
site_type: "{{item.fabric_sites.site_type}}"
fabric_type: "{{item.fabric_sites.fabric_type}}"
authentication_profile: "{{item.fabric_sites.authentication_profile}}"
is_pub_sub_enabled: "{{item.fabric_sites.is_pub_sub_enabled}}"
update_authentication_profile:
Expand All @@ -32,6 +32,6 @@
wake_on_lan: "{{item.fabric_sites.update_authentication_profile.wake_on_lan}}"
number_of_hosts: "{{item.fabric_sites.update_authentication_profile.number_of_hosts}}"

with_items: "{{ fabric_sites}}"
with_items: "{{ fabric_site_zones }}"
tags:
- fabric_site_zones_testing
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
connection: local
tasks:
- name: Create the SDA fabric transits with transit_type as IP_BASED_TRANSIT
cisco.dnac.fabric_transits_workflow_manager:
cisco.dnac.sda_fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
Expand All @@ -28,7 +28,7 @@
autonomous_system_number: 1234 # between 1 and 4294967295

- name: Create the SDA fabric transits with transit_type as SDA_LISP_BGP_TRANSIT
cisco.dnac.fabric_transits_workflow_manager:
cisco.dnac.sda_fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
Expand All @@ -52,7 +52,7 @@
- 10.0.0.2

- name: Create the SDA fabric transits with transit_type as SDA_LISP_PUB_SUB_TRANSIT
cisco.dnac.fabric_transits_workflow_manager:
cisco.dnac.sda_fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
Expand All @@ -79,7 +79,7 @@
- 11.0.0.4

- name: Update the SDA fabric transits with transit_type as SDA_LISP_BGP_TRANSIT
cisco.dnac.fabric_transits_workflow_manager:
cisco.dnac.sda_fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
Expand All @@ -103,7 +103,7 @@
- 10.0.0.4

- name: Update the SDA fabric transits with transit_type as SDA_LISP_PUB_SUB_TRANSIT
cisco.dnac.fabric_transits_workflow_manager:
cisco.dnac.sda_fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
Expand All @@ -130,7 +130,7 @@
- 11.0.0.8

- name: Delete the SDA fabric transits
cisco.dnac.fabric_transits_workflow_manager:
cisco.dnac.sda_fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
Expand All @@ -148,4 +148,4 @@
- sda_fabric_transits:
- name: Sample1
- name: Sample2
- name: Sample3
- name: Sample3
66 changes: 66 additions & 0 deletions playbooks/sda_fabric_virtual_networks_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
- name: Configure the Fabric Vlan(s), Virtual network(s) and Anycast gateway(s) for SDA in Cisco Catalyst Center
hosts: localhost
connection: local
gather_facts: no
vars_files:
- "credentials.yml"
tasks:
- name: Configure the Fabric Vlan(s), Virtual network(s) and Anycast gateway(s) for SDA in Cisco Catalyst Center
cisco.dnac.sda_fabric_virtual_networks_workflow_manager:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
dnac_log_level: DEBUG
dnac_log: true
config_verify: true
state: deleted
config:
- fabric_vlan:
- vlan_name: "vlan_test1"
fabric_site_locations:
- site_name_hierarchy: "Global/India/Chennai"
fabric_type: "fabric_zone"
- site_name_hierarchy: "Global/India"
fabric_type: "fabric_site"
vlan_id: 1933
traffic_type: "VOICE"
fabric_enabled_wireless: false
- vlan_name: "vlan_test22"
fabric_site_locations:
- site_name_hierarchy: "Global/India"
fabric_type: "fabric_site"
vlan_id: 1836
traffic_type: "DATA"
fabric_enabled_wireless: false
- virtual_networks:
- vn_name: "vn_wo_anchor1"
fabric_site_locations:
- site_name_hierarchy: "Global/India/Chennai"
fabric_type: "fabric_zone"
- site_name_hierarchy: "Global/India"
fabric_type: "fabric_site"
- anycast_gateways:
- vn_name: "vn_wo_anchor1"
fabric_site_location:
site_name_hierarchy: "Global/India"
fabric_type: "fabric_site"
ip_pool_name: "Reserve_Ip_pool"
tcp_mss_adjustment: 581
vlan_name: Vlan_test
vlan_id: 34
traffic_type: "VOICE"
is_critical_pool: false
layer2_flooding_enabled: false
fabric_enabled_wireless: false
ip_directed_broadcast: false
intra_subnet_routing_enabled: true
multiple_ip_to_mac_addresses: false
auto_generate_vlan_name: true

tags:
- fabric_virtual_network_testing
Loading

0 comments on commit b1262ed

Please sign in to comment.