Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #152

Merged
merged 97 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
154cc16
Added new workflow modules and playbooks
Feb 6, 2024
a9ac86a
Added the sanity ignore and compile versions; changed the changed the…
Feb 6, 2024
da31779
API get_image_name_from_id was returning image_id instead of name whi…
Abhishek-121 Feb 6, 2024
d00b139
Fixes for SNMP issue and records to return value
abimishr Feb 6, 2024
b100826
Merge pull request #145 from Abhishek-121/main
madhansansel Feb 6, 2024
1461d1d
Merge branch 'madhansansel:main' into main
MUTHU-RAKESH-27 Feb 6, 2024
0e2f027
Fixes for SNMP issue and records to return value
abimishr Feb 6, 2024
64cfc22
Used name and description for identying the device credentials rather…
Feb 6, 2024
cedb2e7
Merge pull request #144 from MUTHU-RAKESH-27/main
madhansansel Feb 6, 2024
befa027
Merge pull request #143 from cisco-en-programmability/main
madhansansel Feb 6, 2024
90b95be
Make seperate file workflow_manager file for each module of Swim, Sit…
Abhishek-121 Feb 6, 2024
134ee1b
Fixes for SNMP issue and records to return value
abimishr Feb 6, 2024
1012c3d
Merge pull request #147 from Abhishek-121/main
madhansansel Feb 6, 2024
46b1c75
Removed the unnecessary comments from the playbooks
Feb 6, 2024
f6faf17
Merge branch 'madhansansel:main' into main
MUTHU-RAKESH-27 Feb 6, 2024
0cf3fe1
Merge pull request #148 from MUTHU-RAKESH-27/main
madhansansel Feb 6, 2024
1592b3b
remove commented line from the site, swim playbook and update comment…
Abhishek-121 Feb 7, 2024
77fdd89
Merge pull request #149 from Abhishek-121/main
madhansansel Feb 7, 2024
352e536
Added a global documentation file for all the workflow_manager modules
Feb 7, 2024
5234928
Changed the DNAC to Cisco Catalyst Center
Feb 7, 2024
d3df7d1
Changed DNAC to Cisco Catalyst Center
Feb 7, 2024
5000354
Addressed the PR comments
Feb 7, 2024
8f67fe2
Merge pull request #150 from MUTHU-RAKESH-27/main
madhansansel Feb 7, 2024
bd3d71f
Changed the global documentation from intent_params to workflow_manag…
Feb 7, 2024
954ef01
Merge branch 'madhansansel:main' into main
MUTHU-RAKESH-27 Feb 7, 2024
d5902a1
Merge pull request #146 from abimishr/PNP_Code_Abinash
madhansansel Feb 7, 2024
04b97b2
Merge pull request #151 from MUTHU-RAKESH-27/main
madhansansel Feb 7, 2024
0bcdd8f
Changed the term intent to workflow_manager in the class descripion a…
Feb 7, 2024
82d6650
Merge pull request #152 from MUTHU-RAKESH-27/main
madhansansel Feb 7, 2024
e582298
Changed the copyright year to 2024
Feb 7, 2024
0bbb744
Merge branch 'madhansansel:main' into main
MUTHU-RAKESH-27 Feb 7, 2024
29b591c
Merge pull request #153 from MUTHU-RAKESH-27/main
madhansansel Feb 7, 2024
10d4e8e
Adding workflow manager codes for Discovery and PnP
abimishr Feb 7, 2024
63e7613
Merge pull request #154 from abimishr/PNP_Code_Abinash
madhansansel Feb 7, 2024
b39b020
Adding Playbook and Code for Provision workflow manager
abimishr Feb 8, 2024
a8f69aa
Fixing naming conventions
abimishr Feb 8, 2024
254bddc
Merge pull request #155 from abimishr/PNP_Code_Abinash
madhansansel Feb 8, 2024
bcee95f
Remove snmp mode default value of AUTHPRIV while updating device and …
Abhishek-121 Feb 12, 2024
b78480d
Adding small changes post testing in Discovery
abimishr Feb 12, 2024
2a8b581
Merge pull request #157 from abimishr/PNP_Code_Abinash
madhansansel Feb 12, 2024
5218b8a
Merge pull request #156 from Abhishek-121/main
madhansansel Feb 12, 2024
6b5b7e7
Pushing the latest changes in Intent module
abimishr Feb 12, 2024
56babab
Merge pull request #158 from abimishr/PNP_Code_Abinash
madhansansel Feb 12, 2024
8d9c2d6
Replace device_type in swim module for tagging/un-tagging image with …
Abhishek-121 Feb 13, 2024
f4ee8b9
Changing the names of PnP type
abimishr Feb 13, 2024
1f0b308
Changing the names of PnP type
abimishr Feb 13, 2024
77a84e7
Changing the names of PnP type
abimishr Feb 13, 2024
eef6550
Changing the names of PnP type
abimishr Feb 13, 2024
1c59345
replace boolean false value to False in swim workflow manager playbook
Abhishek-121 Feb 14, 2024
e646929
Changing the names of PnP type
abimishr Feb 14, 2024
6f741a4
Changing the names of PnP type
abimishr Feb 14, 2024
70aac58
Added detailed description in the documentation, solved the ipv4 gate…
Feb 14, 2024
12b55c1
add brief description for each paramter in both intent module and wor…
Abhishek-121 Feb 14, 2024
3cc0ffb
Merge pull request #161 from abimishr/PNP_Code_Abinash
madhansansel Feb 14, 2024
ba03e4c
Merge branch 'madhansansel:main' into main
MUTHU-RAKESH-27 Feb 15, 2024
c10eaa6
Addressed the PR comments
Feb 15, 2024
759890f
Merge pull request #162 from MUTHU-RAKESH-27/main
madhansansel Feb 15, 2024
feec7cc
Merge pull request #160 from Abhishek-121/main
madhansansel Feb 15, 2024
6eed2c3
Give the brief description of each parameter in site intent and workf…
Abhishek-121 Feb 15, 2024
67b7a18
make site type description more clearer with examples
Abhishek-121 Feb 15, 2024
e09cac9
Making changes to incorporate discovery specific credentials
abimishr Feb 15, 2024
76380c4
Making changes to incorporate discovery specific credentials
abimishr Feb 15, 2024
281dd30
Making changes to incorporate discovery specific credentials
abimishr Feb 16, 2024
b45c5db
Making changes to incorporate discovery specific credentials
abimishr Feb 16, 2024
e6f62c3
Merge branch 'madhansansel:main' into main
Abhishek-121 Feb 16, 2024
a2f7c79
Making changes to incorporate discovery specific credentials
abimishr Feb 16, 2024
ed8a74b
Making changes to incorporate discovery specific credentials
abimishr Feb 16, 2024
5c2fcc8
Change type to site_type and write one API to convert it, also chnage…
Abhishek-121 Feb 16, 2024
3c8d3d2
Merge pull request #163 from Abhishek-121/main
madhansansel Feb 16, 2024
9550cd8
Making changes to incorporate discovery specific credentials
abimishr Feb 16, 2024
8ac540a
Merge pull request #164 from abimishr/PNP_Code_Abinash
madhansansel Feb 16, 2024
112b123
Fix the issue of updating snmp auth passphrase and snmp private passw…
Abhishek-121 Feb 16, 2024
26b1738
Merge pull request #165 from Abhishek-121/main
madhansansel Feb 16, 2024
c946e19
Adding workflow modules and updating the version
madhansansel Feb 16, 2024
237c56f
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
34b4421
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
2cb4adc
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
41e3690
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
1019df3
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
9516186
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
59587f3
Adding fix for SWIM upgrade in PnP
abimishr Feb 20, 2024
408ce69
Merge pull request #166 from abimishr/PNP_Code_Abinash
madhansansel Feb 20, 2024
2c67b0d
Add examples as playbook for each module SWIM, Site and Inventory, Fi…
Abhishek-121 Feb 20, 2024
1bf2648
revert the dnac debug log level to WARNING
Abhishek-121 Feb 20, 2024
cbb1ea5
revert dnac debug level from DEBUG to WARNING in site intent module
Abhishek-121 Feb 20, 2024
c8a766d
Add debug log messages
Abhishek-121 Feb 20, 2024
7e9b8d5
Merge pull request #167 from Abhishek-121/main
madhansansel Feb 20, 2024
0e299a0
Provide the support to update list of interfaces for a specific devic…
Abhishek-121 Feb 21, 2024
1b887e0
update the netconf port description in the documentation
Abhishek-121 Feb 21, 2024
e76a66c
Merge pull request #168 from Abhishek-121/main
madhansansel Feb 21, 2024
269d47f
Update swim module documentation
Abhishek-121 Feb 21, 2024
49dfe30
Add the documentation for third party application type and image fami…
Abhishek-121 Feb 21, 2024
698a581
Merge pull request #169 from Abhishek-121/main
madhansansel Feb 21, 2024
1068153
Added minor changes in changelog
madhansansel Feb 21, 2024
9d4904a
Merge pull request #151 from madhansansel/main
wastorga Feb 21, 2024
823a2ba
add smartquotes config to conf.py
wastorga Feb 21, 2024
72d11c3
Update reame
bvargasre Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following table shows the supported versions.
| 2.2.2.3 | 3.3.1 | 2.3.3 |
| 2.2.3.3 | 6.4.0 | 2.4.11 |
| 2.3.3.0 | 6.6.4 | 2.5.5 |
| 2.3.5.3 | 6.10.4 | 2.6.0 |
| 2.3.5.3 | 6.11.0 | 2.6.0 |

If your Ansible collection is older please consider updating it first.

Expand Down
14 changes: 14 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -792,3 +792,17 @@ releases:
- Introducing log levels and log file path
- Updated Documentation in template intent module
- Enhancements in device_credential, inventory, discovery and template intent modules.
6.11.0:
release_date: "2024-02-17"
changes:
release_summary: Adding new workflow manager modules in Cisco Catalyst Center
minor_changes:
- The 'site_workflow_manager' module orchestrates the creation of sites within the Cisco Catalyst Center, encompassing areas such as buildings and floors. It ensures necessary pre-checks are performed and allows for subsequent updates to these sites. Additionally, the module facilitates the deletion of specific sites using the site and parent names. A feature to delete all child sites by specifying only the parent site name is also available.
- The 'swim_workflow_manager' module handles the importation of SWIM images into the Cisco Catalyst Center, utilizing either a remote URL or a local image file path. It provides functionality for tagging and untagging SWIM images based on device family, role, and site. The module ensures the successful importation of images for distribution and activation on devices within the Cisco Catalyst Center. It also allows for the retrieval of a list of devices tied to a specific site, device family, and device role, facilitating various SWIM operations such as importing, tagging, distribution, and activation.
- The 'network_settings_workflow_manager' module manages global IP pool allocation, reserved sub pool assignment, and network function administration, including DHCP, Syslog, SNMP, NTP, Network AAA, client and endpoint AAA, and DNS servers, ensuring seamless operation at site and global levels in the Cisco Catalyst Center.
- The 'device_credential_workflow_manager' module oversees the management of global device credentials, including CLI, SNMPv2C read, SNMPv2C write, SNMPv3, HTTP(s) read, and HTTP(s) write. It facilitates the assignment of these credentials to specific sites, ensuring secure and efficient access to network devices across the infrastructure in the Cisco Catalyst Center.
- The 'inventory_workflow_manager' module is responsible for the actions that can be performed over devices which includes adding, deleting, resyncing, updating device details, device credentials, common info etc. for all types of devices - network device, compute device, meraki device, firepower management system device and third party devices. Exporting devices details and device credentials details into the CSV file, doing wired/wireless device provisioning, reboot AP devices, resyncing of device etc. Also we can update device just by giving the parameter that need to be changes on single or bulk devices and rest required parameters will be fetched from Cisco Catalyst Center and prepopulate it before triggering the update API.
- The 'pnp_workflow_manager' module helps in adding a device or adding devices in bulk to PnP database of the Cisco Catalyst Center. Post addition, device can be claimed to a site along with template provision and image upgrade. Along with that devices can be deleted from the PnP database.
- The 'discovery_workflow_manager' module streamlines the discovery of devices using various methods including single IP, IP range, multi-range, CDP, CIDR, and LLDP. It also offers the ability to clear out discoveries by deleting them from the discovery database, with an option to delete all discoveries simultaneously.
- The 'provision_workflow_manager' module provisions and re-provisions devices added in the inventory to site, by taking management IP address as input. It allows provisioning of both wired and wireless devices. It also allows un-provisioning of devices.
- The 'template_workflow_manager' module is responsible for overseeing templates, export projects/templates, and import projects/templates. It handles configuration templates by enabling the creation, updating, and deletion of templates and projects. Additionally, the module supports export functionality to retrieve project and template details from Cisco Catalyst Center, and Import functionality to create templates and projects within the Cisco Catalyst Center.
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
'.md': 'markdown',
}

# Avoid substitution of smartquotes
smartquotes = False

# The master toctree document.
master_doc = 'index'

Expand Down
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.10.4
version: 6.11.0
readme: README.md
authors:
- Rafael Campos <rcampos@altus.cr>
Expand Down
10 changes: 5 additions & 5 deletions playbooks/PnP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
pid: c9300-24P
is_sudi_required: True

- name: Claim an added Switch with template and image upgrade to a site only
- name: Claim a pre-added switch, apply a template, and perform an image upgrade for a specific site
cisco.dnac.pnp_intent:
<<: *dnac_login
dnac_log: True
Expand All @@ -75,14 +75,14 @@
state: Unclaimed
pid: C9300-48UXM

- name: Claim an added Wireless Controller with template and image upgrade to a site only
- name: Claim an existing Wireless Controller, apply a template, and upgrade its image for a specified site
cisco.dnac.pnp_intent:
<<: *dnac_login
dnac_log: True
state: merged
config:
- site_name: Global/USA/San Francisco/BGL_18
pnp_type: catalyst_wlc
pnp_type: CatalystWLC
template_name: "Ansible_PNP_WLC"
image_name: C9800-40-universalk9_wlc.17.12.01.SPA.bin
template_params:
Expand All @@ -98,7 +98,7 @@
subnet_mask: 255.255.255.0
vlan_id: 1101

- name: Delete multiple devices from the Pnp dashboard #If device is not present it won't fail
- name: Remove multiple devices from the PnP dashboard safely (ignores non-existent devices)
cisco.dnac.pnp_intent:
<<: *dnac_login
dnac_log: True
Expand All @@ -108,4 +108,4 @@
- device_info:
- serial_number: QD2425L8M7 #Will get deleted
- serial_number: FTC2320E0HA #Doesn't exist in the inventory
- serial_number: FKC2310E0HB #Doesn't exist in the inventory
- serial_number: FKC2310E0HB #Doesn't exist in the inventory
111 changes: 111 additions & 0 deletions playbooks/PnP_Workflow_Manager_Playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
- name: Manage operations - Add, claim, and delete devices of Onboarding Configuration (PnP)
hosts: localhost
connection: local
gather_facts: no

vars_files:
- "{{ CLUSTERFILE }}"

vars:
dnac_login: &dnac_login
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

tasks:

- name: Import devices in bulk
cisco.dnac.pnp_workflow_manager:
<<: *dnac_login
dnac_log: True
state: merged
config_verify: True
config:
- device_info:
- serial_number: QD2425L8M7
state: Unclaimed
pid: c9300-24P
is_sudi_required: False

- serial_number: QTC2320E0H9
state: Unclaimed
pid: c9300-24P
hostname: Test-123

- serial_number: ETC2320E0HB
state: Unclaimed
pid: c9300-24P

- name: Add a new device and claim it
cisco.dnac.pnp_workflow_manager:
<<: *dnac_login
dnac_log: True
state: merged
config:
- site_name: Global/USA/San Francisco/BGL_18
device_info:
- serial_number: FJC2330E0BB
hostname: Test-9300-10
state: Unclaimed
pid: c9300-24P
is_sudi_required: True

- name: Claim a pre-added switch, apply a template, and perform an image upgrade for a specific site
cisco.dnac.pnp_workflow_manager:
<<: *dnac_login
dnac_log: True
state: merged
config:
- site_name: Global/USA/San Francisco/BGL_18
template_name: "Ansible_PNP_Switch"
image_name: cat9k_iosxe_npe.17.03.07.SPA.bin
project_name: Onboarding Configuration
template_details:
hostname: SJC-Switch-1
interface: TwoGigabitEthernet1/0/2
device_info:
- serial_number: FJC271924EQ
hostname: Switch
state: Unclaimed
pid: C9300-48UXM

- name: Claim an existing Wireless Controller, apply a template, and upgrade its image for a specified site
cisco.dnac.pnp_workflow_manager:
<<: *dnac_login
dnac_log: True
state: merged
config:
- site_name: Global/USA/San Francisco/BGL_18
pnp_type: CatalystWLC
template_name: "Ansible_PNP_WLC"
image_name: C9800-40-universalk9_wlc.17.12.01.SPA.bin
template_params:
hostname: IAC-EWLC-Claimed
device_info:
- serial_number: FOX2639PAY7
hostname: New_WLC
state: Unclaimed
pid: C9800-CL-K9
gateway: 204.192.101.1
ip_interface_name: TenGigabitEthernet0/0/0
static_ip: 204.192.101.10
subnet_mask: 255.255.255.0
vlan_id: 1101

- name: Remove multiple devices from the PnP dashboard safely (ignores non-existent devices)
cisco.dnac.pnp_workflow_manager:
<<: *dnac_login
dnac_log: True
state: deleted
config_verify: True
config:
- device_info:
- serial_number: QD2425L8M7 #Will get deleted
- serial_number: FTC2320E0HA #Doesn't exist in the inventory
- serial_number: FKC2310E0HB #Doesn't exist in the inventory
103 changes: 103 additions & 0 deletions playbooks/device_credential_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: no
connection: local
tasks:
- name: Create Credentials and assign it to a site.
cisco.dnac.device_credential_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_log: True
state: merged
config:
- global_credential_details:
cli_credential:
- description: CLI1
username: cli1
password: '12345'
enable_password: '12345'
# old_description:
# old_username:
snmp_v2c_read:
- description: SNMPv2c Read1 # use this for deletion
read_community: '123456'
# old_description: # use this for updating the description
snmp_v2c_write:
- description: SNMPv2c Write1 # use this for deletion
write_community: '123456'
# old_description: # use this for updating the description
snmp_v3:
- auth_password: '12345678' # Atleast 8 characters
auth_type: SHA # [SHA, MD5] (SHA is recommended)
snmp_mode: AUTHPRIV # [AUTHPRIV, AUTHNOPRIV, NOAUTHNOPRIV]
privacy_password: '12345678' # Atleast 8 characters
privacy_type: AES128 # [AE128, AE192, AE256]
username: snmpV31
description: snmpV31
# old_description:
https_read:
- description: HTTP Read1
username: HTTP_Read1
password: '12345'
port: 443
# old_description:
# old_username:
https_write:
- description: HTTP Write1
username: HTTP_Write1
password: '12345'
port: 443
# old_description:
# old_username:
assign_credentials_to_site:
cli_credential:
description: CLI
username: cli
snmp_v2c_read:
description: SNMPv2c Read
snmp_v2c_write:
description: SNMPv2c Write
snmp_v3:
description: snmpV3
https_read:
description: HTTP Read
username: HTTP_Read
https_write:
description: HTTP Write
username: HTTP_Write
site_name:
- Global/Chennai/Trill
- Global/Chennai/Tidel

- name: Delete Credentials
cisco.dnac.device_credential_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_log: True
state: deleted
config:
- global_credential_details:
cli_credential:
- description: CLI1
username: cli1
snmp_v2c_read:
- description: SNMPv2c Read1 # use this for deletion
snmp_v2c_write:
- description: SNMPv2c Write1 # use this for deletion
snmp_v3:
- description: snmpV31
https_read:
- description: HTTP Read1
username: HTTP_Read1
https_write:
- description: HTTP Write1
username: HTTP_Write1
38 changes: 38 additions & 0 deletions playbooks/device_provision_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
- name: Provision and Re-provision wired and wireless devices
hosts: localhost
connection: local
gather_facts: no

vars_files:
- "{{ CLUSTERFILE }}"

vars:
dnac_login: &dnac_login
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 }}"

tasks:
- name: Provision a wired device to a site
cisco.dnac.workflow_manager:
<<: *dnac_login
dnac_log: True
state: merged
config_verify: True
config:
- site_name_hierarchy: Global/USA/San Francisco/BGL_18
management_ip_address: 204.1.1.1


- name: Unprovision a wired device from a site
cisco.dnac.workflow_manager:
<<: *dnac_login
dnac_log: True
state: deleted
config:
- management_ip_address: 204.1.1.1
Loading
Loading