cisco-en-programmability / dnacenter-ansible

Cisco DNA Center Ansible modules
https://cisco-en-programmability.github.io/dnacenter-ansible/
GNU General Public License v3.0
29 stars 45 forks source link

Using cisco.dnac.sda_virtual_network_ip_pool to delete ip pools from VN does not work #80

Open jianm12007 opened 1 year ago

jianm12007 commented 1 year ago

The dnac version is 2.3.3.5 and dnac collection is 6.6.0. I try to delete IP pools from VN using cisco.dnac.sda_virtual_network_ip_pool, it show the below error messages.

TASK [Assign IP Pool to VN and fabric sites.] ** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: get_ip_pool_from_sda_virtual_network() missing 1 required positional argument: 'site_name_hierarchy' fatal: [10.100.0.1]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}

=================================================================================== My playbook is as below:


Release IP Pool to VN and fabric sites.

bvargasre commented 1 year ago

Hi @jianm12007 , thanks for reporting the bug. dnacenter ansible 6.6.1 is available. Feel free to test it and close or comment if necessary.

jianm12007 commented 1 year ago

I have tested with Ansible cisco.dnac 6.6.1 and dnacentersda 2.5.5, still output the below error message.

TASK [Release IP Pool to VN and fabric sites.] ***** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.cisco.dnac.plugins.plugin_utils.exceptions.AnsibleSDAException fatal: [10.100.0.1]: FAILED! => {"changed": false, "msg": "Could not get object to be delete {'status': 'failed', 'description': \"'usedForWireless'\", 'executionId': '65dc8cc5-c2e3-4f88-870b-63eae1b2c244'}"}

The message 'usedForWireless' looks strange. Would you please double check?

Before test ansible playbook, I have checked the DNAC API, it is works fine.

bvargasre commented 1 year ago

Could you consult this executionID 65dc8cc5-c2e3-4f88-870b-63eae1b2c244 and send me the response

jianm12007 commented 1 year ago

This is the output of querying the executionID from DNAC API:

{ "bapiKey": "fa92-19bf-45c8-b43b", "bapiExecutionId": "65dc8cc5-c2e3-4f88-870b-63eae1b2c244", "startTime": "Mon Nov 28 02:44:32 UTC 2022", "startTimeEpoch": 1669603472895, "endTime": "Mon Nov 28 02:44:33 UTC 2022", "endTimeEpoch": 1669603473986, "timeDuration": 1091, "status": "SUCCESS", "runtimeInstanceId": "DNACP_Runtime_5b937d5a-879b-4f03-8dc2-339f52fb8339" }