Skip to content

Commit

Permalink
Merge pull request #156 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop to main
  • Loading branch information
bvargasre authored Mar 7, 2024
2 parents e783b79 + 9d9f353 commit 543a177
Show file tree
Hide file tree
Showing 17 changed files with 2,878 additions and 917 deletions.
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.11.0 | 2.6.0 |
| 2.3.5.3 | 6.12.0 | 2.6.0 |

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

Expand Down
23 changes: 23 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,3 +806,26 @@ releases:
- 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.
6.12.0:
release_date: "2024-03-06"
changes:
release_summary: Enhancements in discovery and inventory workflow manager modules.
minor_changes:
- Changes in discovery workflow manager module to support SNMP credentials v2 and handling error messages.
- Changes in inventory workflow manager module to support snmp v2.
- swim_workflow_manager - attribute 'device_series_name' was added.
- swim_intent - attribute 'device_series_name' was added.
- discovery_workflow_manager - attribute 'global_credentials' was added and 'global_cli_len' was removed.
- discovery_intent - attribute 'global_credentials' was added and 'global_cli_len' was removed.
- >
inventory_workflow_manager - attributes 'serial_number', 'device_added', 'role_source' were removed.
attributes 'clear_mac_address_table', 'device_ip', 'resync_retry_count', 'resync_retry_interval',
'reprovision_wired_device', 'provision_wireless_device' were added.
Renamed argument from 'ip_address' to 'ip_address_list'.
- >
inventory_intent - attributes 'serial_number', 'device_added', 'role_source' were removed.
attributes 'clear_mac_address_table', 'device_ip', 'resync_retry_count', 'resync_retry_interval',
'reprovision_wired_device', 'provision_wireless_device' were added.
Renamed argument from 'ip_address' to 'ip_address_list'.
- pnp_workflow_manager - Adding fix for Stackswitch getting changed to normal switch post editing the device's info.
- pnp_intent - Adding fix for Stackswitch getting changed to normal switch post editing the device's info.
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.11.0
version: 6.12.0
readme: README.md
authors:
- Rafael Campos <[email protected]>
Expand Down
129 changes: 121 additions & 8 deletions playbooks/discovery_intent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,121 @@
dnac_log_level: DEBUG

tasks:

- name: Execute discovery devices using MULTI RANGE with various global credentials
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- discovery_name: Multi_global
discovery_type: MULTI RANGE
ip_address_list:
- 204.1.2.1-204.1.2.5
- 204.192.3.40
- 204.192.4.200
- 204.1.2.6
- 204.1.2.7
- 204.1.2.8
- 204.1.2.9
- 204.1.2.10
- 204.1.2.11
global_credentials:
cli_credentials_list:
- description: ISE
username: cisco
- description: CLI1234 #Incorrect name passed
username: cli
http_read_credential_list:
- description: HTTP Read
username: HTTP_Read
snmp_v3_credential_list:
- description: snmpV3
username: snmpV3
protocol_order: ssh

- name: Execute discovery of single device using various discovery specific credentials and all the global credentials
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- discovery_name: Single IP Discovery
discovery_type: "SINGLE"
ip_address_list:
- 204.1.2.5
discovery_specific_credentials:
cli_credentials_list:
- username: cisco
password: Cisco#123
enable_password: Cisco#123
http_read_credential:
username: string
password: Lablab#123
port: 443
secure: True
snmp_v2_read_credential:
desc: string
community: string
snmp_v2_write_credential:
desc: string
community: string
snmp_v3_credential:
username: v3Public2
snmp_mode: AUTHPRIV
auth_type: SHA
auth_password: Lablab#1234
privacy_type: AES256
privacy_password: Lablab#1234
global_cli_len: 3
protocol_order: ssh

- name: Execute discovery of single device using various discovery specific credentials only
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- discovery_name: Single without Global Credentials
discovery_type: "SINGLE"
ip_address_list:
- 204.1.2.5
discovery_specific_credentials:
cli_credentials_list:
- username: cisco
password: Cisco#123
enable_password: Cisco#123
http_read_credential:
username: string
password: Lablab#123
port: 443
secure: True
snmp_v2_read_credential:
desc: string
community: string
snmp_v2_write_credential:
desc: string
community: string
snmp_v3_credential:
username: v3Public2
snmp_mode: AUTHPRIV
auth_type: SHA
auth_password: Lablab#1234
privacy_type: AES256
privacy_password: Lablab#1234
global_cli_len: 3
use_global_cred: False
protocol_order: ssh

- name: Execute discovery devices using MULTI RANGE with various discovery specific credentials
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- ip_address_list:
- discovery_type: "MULTI RANGE"
discovery_name: Multi_range
ip_address_list:
- 204.1.2.1-204.1.2.100 #It will be taken as 204.1.2.1 - 204.1.2.1
- 205.2.1.1-205.2.1.10
ip_filter_list:
Expand All @@ -51,32 +159,37 @@
auth_type: SHA
privacy_type: AES192
privacy_password: cisco#123
discovery_type: "MULTI RANGE"
discovery_name: Multi_range
protocol_order: ssh
start_index: 1
records_to_return: 1000
snmp_version: v2
global_cli_len: 5

- name: Execute discovery devices using CDP/LLDP/CIDR
cisco.dnac.discovery_intent:
<<: *dnac_login
state: merged
config_verify: True
config:
- ip_address_list: #List length should be one
- 204.1.2.1
- discovery_name: CDP_Test_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
ip_address_list: #List length should be one
- 204.1.2.1
cdp_level: 2 #Instead use lldp_level for LLDP and prefix length for CIDR
discovery_specific_credentials:
cli_credentials_list:
- username: admin
password: maglev123
enable_password: maglev123
protocol_order: ssh

- name: Execute deletion of single discovery from the dashboard
cisco.dnac.discovery_intent:
<<: *dnac_login
state: deleted
config_verify: True
config:
- discovery_name: CDP_Test_1

- name: Execute deletion of all the discoveries from the dashboard
cisco.dnac.discovery_intent:
<<: *dnac_login
Expand Down
129 changes: 121 additions & 8 deletions playbooks/discovery_workflow_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,121 @@
dnac_log_level: DEBUG

tasks:

- name: Execute discovery devices using MULTI RANGE with various global credentials
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
state: merged
config_verify: True
config:
- discovery_name: Multi_global
discovery_type: MULTI RANGE
ip_address_list:
- 204.1.2.1-204.1.2.5
- 204.192.3.40
- 204.192.4.200
- 204.1.2.6
- 204.1.2.7
- 204.1.2.8
- 204.1.2.9
- 204.1.2.10
- 204.1.2.11
global_credentials:
cli_credentials_list:
- description: ISE
username: cisco
- description: CLI1234 #Incorrect name passed
username: cli
http_read_credential_list:
- description: HTTP Read
username: HTTP_Read
snmp_v3_credential_list:
- description: snmpV3
username: snmpV3
protocol_order: ssh

- name: Execute discovery of single device using various discovery specific credentials and all the global credentials
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
state: merged
config_verify: True
config:
- discovery_name: Single IP Discovery
discovery_type: "SINGLE"
ip_address_list:
- 204.1.2.5
discovery_specific_credentials:
cli_credentials_list:
- username: cisco
password: Cisco#123
enable_password: Cisco#123
http_read_credential:
username: string
password: Lablab#123
port: 443
secure: True
snmp_v2_read_credential:
desc: string
community: string
snmp_v2_write_credential:
desc: string
community: string
snmp_v3_credential:
username: v3Public2
snmp_mode: AUTHPRIV
auth_type: SHA
auth_password: Lablab#1234
privacy_type: AES256
privacy_password: Lablab#1234
global_cli_len: 3
protocol_order: ssh

- name: Execute discovery of single device using various discovery specific credentials only
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
state: merged
config_verify: True
config:
- discovery_name: Single without Global Credentials
discovery_type: "SINGLE"
ip_address_list:
- 204.1.2.5
discovery_specific_credentials:
cli_credentials_list:
- username: cisco
password: Cisco#123
enable_password: Cisco#123
http_read_credential:
username: string
password: Lablab#123
port: 443
secure: True
snmp_v2_read_credential:
desc: string
community: string
snmp_v2_write_credential:
desc: string
community: string
snmp_v3_credential:
username: v3Public2
snmp_mode: AUTHPRIV
auth_type: SHA
auth_password: Lablab#1234
privacy_type: AES256
privacy_password: Lablab#1234
global_cli_len: 3
use_global_cred: False
protocol_order: ssh

- name: Execute discovery devices using MULTI RANGE with various discovery specific credentials
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
state: merged
config_verify: True
config:
- ip_address_list:
- discovery_type: "MULTI RANGE"
discovery_name: Multi_range
ip_address_list:
- 204.1.2.1-204.1.2.100 #It will be taken as 204.1.2.1 - 204.1.2.1
- 205.2.1.1-205.2.1.10
ip_filter_list:
Expand All @@ -51,32 +159,37 @@
auth_type: SHA
privacy_type: AES192
privacy_password: cisco#123
discovery_type: "MULTI RANGE"
discovery_name: Multi_range
protocol_order: ssh
start_index: 1
records_to_return: 1000
snmp_version: v2
global_cli_len: 5

- name: Execute discovery devices using CDP/LLDP/CIDR
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
state: merged
config_verify: True
config:
- ip_address_list: #List length should be one
- 204.1.2.1
- discovery_name: CDP_Test_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
ip_address_list: #List length should be one
- 204.1.2.1
cdp_level: 2 #Instead use lldp_level for LLDP and prefix length for CIDR
discovery_specific_credentials:
cli_credentials_list:
- username: admin
password: maglev123
enable_password: maglev123
protocol_order: ssh

- name: Execute deletion of single discovery from the dashboard
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
state: deleted
config_verify: True
config:
- discovery_name: CDP_Test_1

- name: Execute deletion of all the discoveries from the dashboard
cisco.dnac.discovery_workflow_manager:
<<: *dnac_login
Expand Down
Loading

0 comments on commit 543a177

Please sign in to comment.