Skip to content

Commit

Permalink
Merge pull request #217 from cisco-en-programmability/main
Browse files Browse the repository at this point in the history
Changes in workflow manager modules
  • Loading branch information
JosePabloOcampo1212 authored Dec 17, 2024
2 parents ff511c5 + a2cca33 commit c526f68
Show file tree
Hide file tree
Showing 18 changed files with 1,212 additions and 306 deletions.
29 changes: 29 additions & 0 deletions plugins/modules/device_credential_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,35 @@
site_name:
- Global/Vietnam/halong/Hanoi
- 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_verify: True
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
"""

RETURN = r"""
Expand Down
6 changes: 6 additions & 0 deletions plugins/modules/lan_automation_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,12 @@ def extract_lan_automation(self, config):
msg="IP address: {} does not exist in Catalyst Center. Please provide a valid IP address for "
"'lan_automation -> peer_device_management_ip_address'!".format(peer_device_ip), response=[]
)
self.log("Validate peer device management IP address is not the same as primary device IP", "INFO")
if primary_device_ip == peer_device_ip:
self.module.fail_json(
msg="The primary device management IP address '{}' cannot be the same as the peer device IP "
"address '{}'.".format(primary_device_ip, peer_device_ip), response=[]
)
self.log("Peer device management IP address '{}' is valid.".format(peer_device_ip), "DEBUG")
else:
self.log("Peer device IP not provided. Skipping peer device checks.", "INFO")
Expand Down
Loading

0 comments on commit c526f68

Please sign in to comment.