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

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

Open
jianm12007 opened this issue Nov 3, 2022 · 4 comments
Assignees
Labels
bug Something isn't working in-progress Team is working to solve issue.

Comments

@jianm12007
Copy link

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.

  • hosts: dnac_servers
    vars_files:

    • vars.yml
      connection: local
      gather_facts: no

    tasks:

    • name: Assign IP Pool to VN and fabric sites.
      cisco.dnac.sda_virtual_network_ip_pool:
      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}}"
      state: absent
      virtualNetworkName: "OT"
      ipPoolName: "HQ_VN_OT"
      siteNameHierarchy: "Global/Shanghai/SHA-17/SH_Floor_1"
@bvargasre bvargasre added in-progress Team is working to solve issue. bug Something isn't working labels Nov 22, 2022
@bvargasre
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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

@jianm12007
Copy link
Author

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"
}

syed-khadeerahmed pushed a commit to syed-khadeerahmed/dnacenter-ansible that referenced this issue Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in-progress Team is working to solve issue.
Projects
None yet
Development

No branches or pull requests

3 participants