Skip to content

Commit

Permalink
Merge pull request #187 from madhansansel/main
Browse files Browse the repository at this point in the history
SDA workflow manger modules
  • Loading branch information
bvargasre authored Sep 27, 2024
2 parents 44f9fbe + 56e187c commit 84d84e7
Show file tree
Hide file tree
Showing 37 changed files with 10,474 additions and 1,931 deletions.
159 changes: 85 additions & 74 deletions .circleci/config.yml

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -980,3 +980,25 @@ releases:
- inventory_workflow_manager.py: added attributes resync_device_count and resync_max_timeout
- accesspoint_workflow_manager.py: added attributes 'is_assigned_site_as_location', and other new attributes.
- device_configs_backup_workflow_manager.py. added attribute 'site'.
6.19.0:
release_date: "2024-09-25"
changes:
release_summary: Code changes in workflow manager modules.
minor_changes:
- Added 'fabric_transits_workflow_manager.py' to perform operations on SDA fabric transits.
- Changes in ise_radius_integration_workflow_manager module to check ise certification status.
- Setting dnac versions and compare for version based routing.
- Minor bug fixes in network_compliance_workflow_manager module.
- Changes in network_settings_workflow_manager module to support exception handling.
- Changes in rma_workflow_manager module.
- Changes in sda_extranet_policies_workflow_manager module.
- Changes in swim_workflow_manager module to support CCO image.
- Adding support to update password in user_role_workflow_manager module.
- Unit test automation for worflow_manager modules.
- access_point_workflow_manager module.py: added attributes 'hostname' and 'management_ip_address'.
- device_configs_backup_workflow_manager.py: added attributes 'hostname_list' and 'ip_address_list', 'site_list', 'mac_address_list', 'serial_number_list'.
- device_configs_backup_workflow_manager.py: removed attributes 'hostname', 'ip_address', 'site', 'mac_address' and 'serial_number'.
- fabric_sites_zones_workflow_manager.py: added attribute 'fabric_type'.
- fabric_sites_zones_workflow_manager.py: removed attribute 'site_type'.
- swim_workflow_manager.py: added attribute 'cco_image_details'.
- user_role_workflow_manager: added attribute 'password_update'.
7 changes: 6 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: cisco
name: dnac
version: 6.18.0
version: 6.19.0
readme: README.md
authors:
- Rafael Campos <rcampos@altus.cr>
Expand All @@ -10,6 +10,7 @@ authors:
- Bryan Vargas <bvargas@altus.cr>
- Francisco Muñoz <fmunoz@altus.cr>
- Madhan Sankaranarayanan <madsanka@cisco.com>
- Pawan Singh <pawansi@cisco.com>
- Rishita Chowdhary (@rishitachowdhary)
- Muthu Rakesh Babu <mutbabu@cisco.com>
- Akash Bhaskaran <akabhask@cisco.com>
Expand All @@ -21,6 +22,10 @@ authors:
- Ajith Andrew J <jajandre@cisco.com>
- Syed Khadeer Ahmed <syedkahm@cisco.com>
- A Mohamed Rafeek <mabdulk2@cisco.com>
- Trupti A Shetty <trashett@cisco.com>
- Sonali Deepthi Kesali <skesali@cisco.com>
- Megha Kandari <mekandar@cisco.com>

description: Ansible Modules for Cisco DNA Center
license_file: "LICENSE"
tags:
Expand Down
151 changes: 151 additions & 0 deletions playbooks/fabric_transits_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: no
connection: local
tasks:
- name: Create the SDA fabric transits with transit_type as IP_BASED_TRANSIT
cisco.dnac.fabric_transits_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:
- sda_fabric_transits:
- name: Sample1
transit_type: IP_BASED_TRANSIT # IP_BASED_TRANSIT, SDA_LISP_PUB_SUB_TRANSIT, SDA_LISP_BGP_TRANSIT
ip_transit_settings: # For IP_BASED_TRANSIT
routing_protocol_name: BGP # only bgp
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:
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:
- sda_fabric_transits:
- name: Sample2
transit_type: SDA_LISP_BGP_TRANSIT # IP_BASED_TRANSIT, SDA_LISP_PUB_SUB_TRANSIT, SDA_LISP_BGP_TRANSIT
sda_transit_settings: # For SDA_LISP_BGP_TRANSIT and SDA_LISP_PUB_SUB_TRANSIT
control_plane_network_device_ips: # 2 for SDA_LISP_BGP_TRANSIT and 4 for SDA_LISP_PUB_SUB_TRANSIT
- 10.0.0.1
- 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:
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:
- sda_fabric_transits:
- name: Sample3
transit_type: SDA_LISP_PUB_SUB_TRANSIT # IP_BASED_TRANSIT, SDA_LISP_PUB_SUB_TRANSIT, SDA_LISP_BGP_TRANSIT
sda_transit_settings: # For SDA_LISP_BGP_TRANSIT and SDA_LISP_PUB_SUB_TRANSIT
is_multicast_over_transit_enabled: True # only for SDA_LISP_PUB_SUB_TRANSIT
control_plane_network_device_ips: # 2 for SDA_LISP_BGP_TRANSIT and 4 for SDA_LISP_PUB_SUB_TRANSIT
- 11.0.0.1
- 11.0.0.2
- 11.0.0.3
- 11.0.0.4

- name: Update the SDA fabric transits with transit_type as SDA_LISP_BGP_TRANSIT
cisco.dnac.fabric_transits_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:
- sda_fabric_transits:
- name: Sample2
transit_type: SDA_LISP_BGP_TRANSIT # IP_BASED_TRANSIT, SDA_LISP_PUB_SUB_TRANSIT, SDA_LISP_BGP_TRANSIT
sda_transit_settings: # For SDA_LISP_BGP_TRANSIT and SDA_LISP_PUB_SUB_TRANSIT
control_plane_network_device_ips: # 2 for SDA_LISP_BGP_TRANSIT and 4 for SDA_LISP_PUB_SUB_TRANSIT
- 10.0.0.3
- 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:
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:
- sda_fabric_transits:
- name: Sample3
transit_type: SDA_LISP_PUB_SUB_TRANSIT # IP_BASED_TRANSIT, SDA_LISP_PUB_SUB_TRANSIT, SDA_LISP_BGP_TRANSIT
sda_transit_settings: # For SDA_LISP_BGP_TRANSIT and SDA_LISP_PUB_SUB_TRANSIT
is_multicast_over_transit_enabled: True # only for SDA_LISP_PUB_SUB_TRANSIT
control_plane_network_device_ips: # 2 for SDA_LISP_BGP_TRANSIT and 4 for SDA_LISP_PUB_SUB_TRANSIT
- 11.0.0.5
- 11.0.0.6
- 11.0.0.7
- 11.0.0.8

- name: Delete the SDA fabric transits
cisco.dnac.fabric_transits_workflow_manager:
dnac_host: "{{ dnac_host }}"
dnac_port: "{{ dnac_port }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
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:
- sda_fabric_transits:
- name: Sample1
- name: Sample2
- name: Sample3
48 changes: 24 additions & 24 deletions playbooks/network_compliance_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Testing
hosts: dnac_servers
gather_facts: no
gather_facts: false

vars_files:
- "credentials.yml"
Expand All @@ -17,30 +17,30 @@
dnac_debug: "{{ dnac_debug }}"
dnac_log: true
dnac_log_level: INFO
dnac_log_append: False
dnac_log_append: false
config_verify: true

tasks:
- name: Run Compliance check using IP address list (run_compliance by default is True)
- name: Run Compliance check using IP address list (run_compliance by default is true)
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']

- name: Run Compliance check using IP address list
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
run_compliance: True
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
run_compliance: true


- name: Run Compliance check using Site
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
- site: "Global"
run_compliance: True
run_compliance: true


- name: Run Compliance check using both IP address list and Site
Expand All @@ -49,7 +49,7 @@
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
site_name: "Global/USA/San Francisco/Building_1/floor_1"
run_compliance: True
run_compliance: true


- name: Run Compliance check with specific categories using IP address list
Expand All @@ -60,7 +60,7 @@
run_compliance_categories: ['INTENT', 'RUNNING_CONFIG', 'IMAGE', 'PSIRT']


- name: Run Compliance check with specific categories using Site
- name: Run Compliance check with specific categories using Site
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
Expand All @@ -82,17 +82,17 @@
<<: *dnac_login
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
run_compliance: False
sync_device_config: True
run_compliance: false
sync_device_config: true


- name: Sync Device Configuration using Site
- name: Sync Device Configuration using Site
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
- site_name: "Global/USA/San Francisco/Building_1/floor_1"
run_compliance: False
sync_device_config: True
run_compliance: false
sync_device_config: true


- name: Sync Device Configuration using both IP address list and Site
Expand All @@ -101,26 +101,26 @@
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
site_name: "Global/USA/San Francisco/Building_1/floor_1"
run_compliance: False
sync_device_config: True
run_compliance: false
sync_device_config: true


- name: Run Compliance and Sync Device Configuration with IP address list
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
run_compliance: True
sync_device_config: True
run_compliance: true
sync_device_config: true


- name: Run Compliance and Sync Device Configuration with Site
cisco.dnac.network_compliance_workflow_manager:
<<: *dnac_login
config:
- site_name: "Global/USA/San Francisco/Building_1/floor_1"
run_compliance: True
sync_device_config: True
run_compliance: true
sync_device_config: true


- name: Run Compliance with specific categories and Sync Device Configuration with IP address list
Expand All @@ -129,7 +129,7 @@
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
run_compliance_categories: ['INTENT', 'RUNNING_CONFIG', 'IMAGE', 'PSIRT']
sync_device_config: True
sync_device_config: true


- name: Run Compliance with specific categories and Sync Device Configuration with Site
Expand All @@ -138,7 +138,7 @@
config:
- site_name: "Global/USA/San Francisco/Building_1/floor_1"
run_compliance_categories: ['INTENT', 'RUNNING_CONFIG', 'IMAGE', 'PSIRT']
sync_device_config: True
sync_device_config: true


- name: Run Compliance and Sync Device Configuration using both IP address list and Site
Expand All @@ -147,5 +147,5 @@
config:
- ip_address_list: ['204.1.2.2', '204.1.2.5', '204.1.2.4']
site_name: "Global/USA/San Francisco/Building_1/floor_1"
run_compliance: True
sync_device_config: True
run_compliance: true
sync_device_config: true
4 changes: 2 additions & 2 deletions playbooks/sda_extranet_policies_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Testing
hosts: dnac_servers
gather_facts: no
gather_facts: false

vars_files:
- "credentials.yml"
Expand All @@ -17,7 +17,7 @@
dnac_debug: "{{ dnac_debug }}"
dnac_log: true
dnac_log_level: INFO
dnac_log_append: False
dnac_log_append: false
config_verify: true

tasks:
Expand Down
9 changes: 5 additions & 4 deletions playbooks/swim_workflow_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
dnac_task_poll_interval: 1
config:
- import_image_details:
type: "{{ item.type }}"
type: remote
url_details:
payload:
- source_url: http://172.21.236.183/swim/V1712_2_CCO/cat9k_iosxe.17.12.02.SPA.bin
payload:
- source_url:
- "http://172.21.236.183/swim/V1712_2_CCO/cat9k_iosxe.17.12.02.SPA.bin"
third_party: False
tagging_details:
image_name: cat9k_iosxe.17.12.02.SPA.bin
Expand All @@ -51,4 +52,4 @@

with_items: "{{ image_details }}"
tags:
- swim
- swim
Loading

0 comments on commit 84d84e7

Please sign in to comment.