You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
While running the merged-state integration test, dcnm_vrf appears to be sending an invalid payload, which results in the following 500 error response:
"com.google.gson.JsonArray incompatible with com.google.gson.JsonObject"
Ansible Version and collection version
DCNM version
V 3.6.0
Affected module(s)
dcnm_vrf
Ansible Playbook
This happens when the following test from the merged.yaml integration test is run.
1. Potential fix for issue #357
If any interface in the playbook task's vrf_lite configuration does not match an interface on the switch that had extensionValues, call fail_json().
- Refactor vrf_lite processing out of push_diff_attach() and into:
- update_vrf_attach_vrf_lite_extensions()
- In update_vrf_attach_vrf_lite_extensions() verify that all interfaces in the playbook's vrf_lite section match an interface on the switch that has extensionValues. If this check fails, call fail_json()
2. Rename get_extension_values_from_lite_object() to get_extension_values_from_lite_objects() and be explicit that the method takes a list of objects and returns a list of objects, or an empty list.
3. Add some debug statements
4. Rename vrf to vrf_name in push_to_remote()
Some test cases were previously (incorrectly) passing, but starting failing after the commit for issue #357 This commit updates these test cases to (correctly pass and adds corresponding test cases which (correctly) fail.
1. Updated test cases that previously passed incorrectly to now pass correctly. These test cases previously passed despite using an interface that did not contain extensionValues. Modified these test cases to use an interface WITH extensionValues.
2. Added test cases, corresponding to the above test cases, which fail due to using an interface without extensionValues. These test cases are modified to expect fail_json() to be called.
3. Modified ALL testcases to call self.test_data.get() to retrieve their playbook. Previously, global vars were used for their playbook. This has a couple advantages. a. when a testcase (or set of testcases) are run, only the playbook fixtures needed to be retrieved are retrieved. Previously, ALL playbook fixtures where retrieved even if only one test case was run. b. The dict() definition is now simpler and more consistent between testcases, since the config key in the dict() will always be playbook i.e. dict(config=playbook), where previously the config key contained different vars for every testcase.
4. Fixed a reference to a non-existent fixture in delete_std_lite.
This test case was trying to access self.mock_vrf_attach_get_ext_object_dcnm_att4_only, which does not exist. Modified it to use self.mock_vrf_attach_get_ext_object_dcnm_att2_only.
5. Ran black, isort linters.
Community Note
While running the merged-state integration test, dcnm_vrf appears to be sending an invalid payload, which results in the following 500 error response:
Ansible Version and collection version
DCNM version
Affected module(s)
Ansible Playbook
This happens when the following test from the
merged.yaml
integration test is run.Debug Output
500 vs 200 responses with their payloads
Expected Behavior
We should get a 200 response.
Actual Behavior
We get a 500 response
Steps to Reproduce
Topology
Switch Roles
This test was running with no errors with a different topology where bgw_1 and bgw_2 were both Border Gateway Spine role.
References
The text was updated successfully, but these errors were encountered: