-
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.tests): New VXLAN tests #431
feat(anta.tests): New VXLAN tests #431
Conversation
anta/tests/vxlan.py
Outdated
vlan_ = vxlan1["vniBindings"][vni]["vlan"] | ||
elif vni in vxlan1["vniBindingsToVrf"]: | ||
vlan_ = vxlan1["vniBindingsToVrf"][vni]["vlan"] | ||
else: | ||
no_binding.append(vni) | ||
vlan_ = None | ||
|
||
if vlan_ and vlan != vlan_: | ||
wrong_binding.append({vni: vlan_}) |
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.
change vlan_
with retrieved_vlan
or something similar
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.
Fixed in 60aa011
anta/tests/vxlan.py
Outdated
if len(vteps := vxlan1["vteps"]) == 0: | ||
self.result.is_failure("Vxlan1 interface has no VTEP") | ||
return |
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.
what if input.vteps
is an empty list ? Maybe someone wants to verify there is no VTEP peers :)
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.
Fixed in 60aa011
tests/units/anta_tests/test_vxlan.py
Outdated
@@ -303,7 +303,7 @@ | |||
"test": VerifyVxlanVtep, | |||
"eos_data": [{"vteps": {}, "interfaces": {"Vxlan1": {"vteps": ["10.1.1.5", "10.1.1.6"]}}}], | |||
"inputs": {"vteps": []}, | |||
"expected": {"result": "failure", "messages": ["Unexpected VTEP peer(s) on Vxlan1 interface: {'10.1.1.5', '10.1.1.6'}"]}, | |||
"expected": {"result": "failure", "messages": ["Unexpected VTEP peer(s) on Vxlan1 interface: {'10.1.1.6', '10.1.1.5'}"]}, |
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.
Why did the order change?
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.
Ah damn I am using sets that's why CI is failing sometimes...
Description
New VXLAN tests:
Checklist:
pre-commit run
)tox -e testenv
)