Skip to content

Resolving dcnm vpc pair keyError with ipAddress #460

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

Merged

Conversation

sivakasi-cisco
Copy link
Collaborator

@sivakasi-cisco sivakasi-cisco commented Jul 4, 2025

Problem statement:
KeyError with IpAddress in vpc pair module
"/tmp/ansible_cisco.dcnm.dcnm_vpc_pair_payload_7o9s47zc/ansible_cisco.dcnm.dcnm_vpc_pair_payload.zip/ansible_collections/cisco/dcnm/plugins/module_utils/network/dcnm/dcnm.py", line 757, in dcnm_get_template_specs\nKeyError: 'ipAddress'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

Root cause:
The ipAddress field is missing with dcnm template xlation

Fix
Changes to add ipAddress field along with IT test for dcnm vpc pair

@sivakasi-cisco
Copy link
Collaborator Author

#422

@sivakasi-cisco sivakasi-cisco force-pushed the keyError_fix_for_dcnm_vpc_pair branch from 2cca809 to aa35c0b Compare July 10, 2025 16:47
@sivakasi-cisco
Copy link
Collaborator Author

Overall in the second changeset, I had removed all the changes made in the integration test yaml files. This is because, the actual problem lied with useVirtualPeerLink variable, as being set as null (or) None (or) False in different files. Hence, the variable set and the response obtained from NDFC are different, which shows a difference in comparison, leading to generating a diff in idemopotent tests.

Now, in the fix, the changes are made so that, the variable "useVirtualPeerLink" is set to false uniformly(being a boolean variable). Also the want and have comparison checks are updated.

@mikewiebe mikewiebe self-assigned this Jul 14, 2025
@sivakasi-cisco sivakasi-cisco force-pushed the keyError_fix_for_dcnm_vpc_pair branch from 22c0fee to b6480c4 Compare July 15, 2025 10:40
@sivakasi-cisco
Copy link
Collaborator Author

Hi Peter @peter8498, Can you please test the diffs and help us to confirm if these changes solve the issue reported in #422

@peter8498
Copy link
Contributor

Hi Peter @peter8498, Can you please test the diffs and help us to confirm if these changes solve the issue reported in #422

I have taken the change and deployed on my environment and can confirm this resolves the orginal issue we were seeing. So happy for this to be merged

@peter8498
Copy link
Contributor

Hi Peter @peter8498, Can you please test the diffs and help us to confirm if these changes solve the issue reported in #422

I have taken the change and deployed on my environment and can confirm this resolves the orginal issue we were seeing. So happy for this to be merged

Update: I noticed there was a small change in the PR since the last time i tested. Re-ran the test i have to create the VPC pair with the updated collection code and it is all good and creates all the desired attributes correctly and we no longer see the original issue

@mikewiebe mikewiebe merged commit dfdeb1d into CiscoDevNet:develop Jul 15, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants