Skip to content

Commit

Permalink
Merge pull request #144 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop v6.10.1
  • Loading branch information
fmunozmiranda authored Jan 22, 2024
2 parents 1b6587b + 18598b0 commit da92c20
Show file tree
Hide file tree
Showing 22 changed files with 2,520 additions and 612 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ docs/plugins/
docs/_build/
changelogs/.plugin-cache.yaml
playbooks/credentials.yml
.DS_Store
playbooks/device_details.template
.DS_Store
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.9.0 | 2.6.0 |
| 2.3.5.3 | 6.10.1 | 2.6.0 |

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

Expand Down
7 changes: 7 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -763,3 +763,10 @@ releases:
- Changes in site intent module to support one-shot site deletion
- To Support provisioning wired device, reboot AP's, export device list, delete provisioned devices.
- Change the variable names into snake case in all the intent modules for better readability.
6.10.1:
release_date: "2024-01-20"
changes:
release_summary: Changes in network settings, site, discovery, inventory, swim, credential and provisioning intent modules
minor_changes:
- Introducing config_verify to verify the state operations in Catalyst Center in network settings and site intent module
- Changes to support inventory and provisioning intent modules
4 changes: 3 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.10.0
version: 6.10.1
readme: README.md
authors:
- Rafael Campos <[email protected]>
Expand All @@ -15,6 +15,8 @@ authors:
- Akash Bhaskaran <[email protected]>
- Abinash Mishra <[email protected]>
- Abhishek Maheshwari <[email protected]>
- Phan Nguyen <[email protected]>
- Rugvedi Kapse <[email protected]>
description: Ansible Modules for Cisco DNA Center
license_file: "LICENSE"
tags:
Expand Down
20 changes: 10 additions & 10 deletions playbooks/PnP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@
<<: *dnac_login
dnac_log: True
state: merged
config_verify: True
config:
- device_info:
- serial_number: FKC2310E0HB
hostname: 1-5
- device_info:
- serial_number: QD2425L8M7
state: Unclaimed
pid: c9300-24P
is_sudi_required: False

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

- serial_number: ETC2320E0HB
hostname: 1-7
state: Unclaimed
pid: c9300-24P

Expand Down Expand Up @@ -89,7 +88,7 @@
hostname: IAC-EWLC-Claimed
device_info:
- serial_number: FOX2639PAY7
hostname: WLC
hostname: New_WLC
state: Unclaimed
pid: C9800-CL-K9
gateway: 204.192.101.1
Expand All @@ -103,8 +102,9 @@
<<: *dnac_login
dnac_log: True
state: deleted
config_verify: True
config:
- device_info:
- serial_number: FKC2310E0HK
- serial_number: FTC2320E0HA
- serial_number: FKC2310E0HB
- serial_number: QD2425L8M7 #Will get deleted
- serial_number: FTC2320E0HA #Doesn't exist in the inventory
- serial_number: FKC2310E0HB #Doesn't exist in the inventory
30 changes: 15 additions & 15 deletions playbooks/device_credential_intent.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- hosts: dnac_servers
vars_files:
- credentials_245.yml
- credentials.yml
gather_facts: no
connection: local
tasks:
Expand All @@ -23,26 +23,26 @@
cli_credential:
- description: CLI1
username: cli1
password: "12345"
enable_password: "12345"
password: '12345'
enable_password: '12345'
# old_description:
# old_username:
# id: e448ea13-4de0-406b-bc6e-f72b57ed6746 # Use this for updation or deletion
snmp_v2c_read:
- description: SNMPv2c Read1 # use this for deletion
read_community: "123456"
read_community: '123456'
# old_description: # use this for updating the description
# id: 0ee7d677-8804-43f2-8b6c-599c5f18348f # Use this for updation or deletion
snmp_v2c_write:
- description: SNMPv2c Write1 # use this for deletion
write_community: "123456"
write_community: '123456'
# old_description: # use this for updating the description
# id: a96abc1b-1fd6-41f1-8a6d-a5569c17262d # Use this for updation or deletion
snmp_v3:
- auth_password: "12345678" # Atleast 8 characters
- 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_password: '12345678' # Atleast 8 characters
privacy_type: AES128 # [AE128, AE192, AE256]
username: snmpV31
description: snmpV31
Expand All @@ -51,15 +51,15 @@
https_read:
- description: HTTP Read1
username: HTTP_Read1
password: "12345"
password: '12345'
port: 443
# old_description:
# old_username:
# id: a7ef9995-e404-4240-94ca-b5f37f65c19d # Use this for updation or deletion
https_write:
- description: HTTP Write1
username: HTTP_Write1
password: "12345"
password: '12345'
port: 443
# old_description:
# old_username:
Expand All @@ -68,24 +68,24 @@
cli_credential:
# description: CLI
# username: cli
id: e448ea13-4de0-406b-bc6e-f72b57ed6746
id: 2fc5f7d4-cf15-4a4f-99b3-f086e8dd6350
snmp_v2c_read:
# description: SNMPv2c Read
id: 0ee7d677-8804-43f2-8b6c-599c5f18348f
id: a966a4e5-9d11-4683-8edc-a5ad8fa59ee3
snmp_v2c_write:
# description: SNMPv2c Write
id: a96abc1b-1fd6-41f1-8a6d-a5569c17262d
id: 7cd072a4-2263-4087-b6ec-93b20958e286
snmp_v3:
# description: snmpV3
id: d8974823-250a-41b0-8c9b-b27b2ae01472
id: c08a1797-84ce-4add-94a3-b419b13621e4
https_read:
# description: HTTP Read
# username: HTTP_Read
id: d5d7af00-5a38-4ac1-9f55-03338d00c415
id: 1009725d-373b-4e7c-a091-300777e2bbe2
https_write:
# description: HTTP Write
# username: HTTP_Write
id: bec9818e-30cd-468b-bf75-292beefc2e20
id: f1ab6e3d-01e9-4d87-8271-3ac5fde83980
site_name:
- Global/Chennai/Trill
- Global/Chennai/Tidel
Expand Down
69 changes: 69 additions & 0 deletions playbooks/device_details.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
template_details:
- proj_name: 'Onboarding Configuration'
device_config: 'hostname cat9k-1\n'
language: 'velocity'
family: 'Switches and Hubs'
type: 'IOS-XE'
variant: 'XE'
temp_name: 'temp_cat9k-1'
description: 'Test Template'
export_project:
- 'Cloud DayN Templates'
export_template:
- project_name: 'Cloud DayN Templates'
template_name: 'DMVPN Spoke for Branch Router - System Default'
import_project:
do_version: false
payload:
- name: 'Onboarding Configuration2'
import_template:
do_version: false
project_name: 'Onboarding Configuration'
payload:
- name: 'Platinum-Onboarding-Template-J21'
device_types:
- product_family: 'Switches and Hubs'
productSeries: 'Cisco Catalyst 9300 Series Switches'
software_type: 'IOS'
language: 'JINJA'
- name: 'Platinum-Onboarding-Template-J22'
device_types:
- product_family: 'Switches and Hubs'
productSeries: 'Cisco Catalyst 9300 Series Switches'
software_type: 'IOS'
language: 'JINJA'
- name: 'Platinum-Onboarding-Template-J23'
device_types:
- product_family: 'Switches and Hubs'
productSeries: 'Cisco Catalyst 9300 Series Switches'
software_type: 'IOS'
language: 'JINJA'

device_details:
- site_name: 'Global/Chennai/Trill'
image_name: 'cat9k_iosxe.17.04.01.SPA.bin'
proj_name: 'Onboarding Configuration'
temp_name: 'temp_cat9k-1'
device_version: '2'
device_number: 'AB2425L8M7'
device_name: 'Cat9k-1'
device_state: 'Unclaimed'
device_id: 'C9300-48UXM'
- site_name: 'Global/Chennai/Trill'
image_name: cat9k_iosxe.17.04.01.SPA.bin'
proj_name: 'Onboarding Configuration'
temp_name: 'temp_cat9k-2'
device_version: '2'
device_number: 'CD2425L8M7'
device_name: 'Cat9k-2'
device_state: 'Unclaimed'
device_id: 'C9300-48UXM'
- site_name: 'Global/Chennai/Trill'
image_name: 'cat9k_iosxe.17.04.01.SPA.bin'
proj_name: 'Onboarding Configuration'
temp_name: 'temp_cat9k-3'
device_version: '2'
device_number: 'EF2425L8M7'
device_name: 'Cat9k-3'
device_state: 'Unclaimed'
device_id: 'C9300-48UXM'
69 changes: 0 additions & 69 deletions playbooks/device_details.yml

This file was deleted.

9 changes: 8 additions & 1 deletion playbooks/device_provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@
- site_name: Global/USA/San Francisco/BGL_18
management_ip_address: 204.1.2.2



- name: Unprovision a wired device to a site
cisco.dnac.provision_intent:
<<: *dnac_login
dnac_log: True
state: deleted
config:
- management_ip_address: 204.1.2.2
23 changes: 22 additions & 1 deletion playbooks/discovery_intent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- devices_list:
- name: SJ-BN-9300
Expand All @@ -37,8 +38,28 @@
l2interface: TenGigabitEthernet1/1/6
ip: 204.1.2.3
discovery_type: "MULTI RANGE"
discovery_name: Multi_Range_Discovery_Test
protocol_order: ssh
start_index: 1
records_to_return: 25
snmp_version: v2


- name: Execute discovery devices using CDP/LLDP/CIDR
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- devices_list: #List length should be one
- name: SJ-BN-9300
site: Global/USA/SAN JOSE/BLD23
role: MAPSERVER,BORDERNODE,INTERNAL,EXTERNAL,SDATRANSIT
l2interface: TenGigabitEthernet1/1/8
ip: 204.1.2.1
discovery_type: "CDP" #Can be LLDP and CIDR
cdp_level: 16 #Instead use lldp for LLDP and prefix length for CIDR
discovery_name: CDP_Test_1
protocol_order: ssh
start_index: 1
records_to_return: 25
snmp_version: v2
Loading

0 comments on commit da92c20

Please sign in to comment.