fix: Use proper IDs for vpws-service-ids #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why is this such a big PR?
While trying to test the new IDs, I found out, that our tests were not executed for this specific set of test data. Turns out: The test data was invalid.
It raised a StopIteration exception and this bubbled up into the
list(map())construct ofget_router_sd_from_pathand returned an empty set of devices for this specific tests, so our tests never got executed. I fixed this by unrolling the loop.The test data itself was invalid, because we needed loopback IP addresses for the generation of EVPN-VPWS services. The test data correctly added loopback IPs in
loopbacks, but they never got used. We tried to derive loopbacks from the device interface list, which did not work for this test data. I jumped the opportunity to resolve this issue once and for all and removed the code path to derive the router ID from the interfaces list of the device and just use the specific information about loopbacks given. This should not make a difference for production use cases.