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

Fix path matching in AtLeastProductOfValidator.Validate() #746

Merged

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Jul 24, 2024

AtLeastProductOfValidator.Validate() was incorrectly assuming that passed paths would be relative to the root attribute, rather than relative to the attribute being validated.

This PR introduces req.PathExpression.MergeExpressions(o.PathExpression) along with a loop to handle the results which should resolve the issue.

Need to exercise the behavior in each of the bgp-related data sources to make sure it still works as expected.

The validator is confirmed working in each of these:

  • apstra_datacenter_ct_bgp_peering_generic_system
  • apstra_datacenter_ct_bgp_peering_ip_endpoint
  • apstra_datacenter_ct_dynamic_bgp_peering

@chrismarget-j chrismarget-j merged commit 65a00e6 into main Jul 25, 2024
1 check passed
@chrismarget-j chrismarget-j deleted the bug/745-fix-path-matching-in-at-least-n-of-validator branch July 25, 2024 17:51
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.

2 participants