-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(anta): Added the test case to verify multiple routes with only specific nodes as next-hops #835
base: main
Are you sure you want to change the base?
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
ff97c98
to
8104c91
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
CodSpeed Performance ReportMerging #835 will not alter performanceComparing Summary
|
Quality Gate passedIssues Measures |
name = "VerifyRouteEntry" | ||
description = "Verifies the route entry(s) for the provided IPv4 Network(s)." | ||
categories: ClassVar[list[str]] = ["routing"] | ||
commands: ClassVar[list[AntaCommand | AntaTemplate]] = [AntaTemplate(template="show ip route {prefix}", revision=4)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can give the vrf information into command so that will again help to reduce the output if a network is configure with another vrf
], | ||
"inputs": { | ||
"route_entries": [ | ||
{"prefix": "10.10.0.1/32", "vrf": "default", "strict": True, "nexthops": ["10.100.0.8", "10.100.0.10", "10.100.0.11"]}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the unit tests where strict is false
"{'10.10.0.1/32': {'default': 'Expected only `10.100.0.8, 10.100.0.10, 10.100.0.11` nexthops should be listed but " | ||
"found `10.100.0.8, 10.100.0.10` instead.'}, '10.100.0.128/31': {'MGMT': 'Expected only `10.100.0.8, 10.100.0.10, " | ||
"10.100.0.11` nexthops should be listed but found `10.100.0.8, 10.100.0.10` instead.'}}" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the unit test where strict is true and length of actual and expected nexthop is also same but the addresses are not same.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Description
Verifies the route entries of given IPv4 network(s).
Fixes #819
Checklist:
pre-commit run
)tox -e testenv
)