-
Notifications
You must be signed in to change notification settings - Fork 232
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(eos_validate_state): ANTA VerifyRoutingProtocolModel now only run if there is BGP configuration #3212
Fix(eos_validate_state): ANTA VerifyRoutingProtocolModel now only run if there is BGP configuration #3212
Conversation
…figuration and service_routing_protocols_model is set to multi-agent
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdtestrouting.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdtestrouting.py
Outdated
Show resolved
Hide resolved
else: | ||
LOGGER.warning("Variable 'service_routing_protocols_model' is NOT set to 'multi-agent'. %s is skipped.", self.__class__.__name__) | ||
return None |
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.
Could invert if and else and return first
if service_routing_protocols_model != "multi-agent":
LOGGER.warning("Variable 'service_routing_protocols_model' is NOT set to 'multi-agent'. %s is skipped.", self.__class__.__name__)
return None
...
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.
Agreed. Fixed in 6fbead6
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.
Can be merged like this - made one comment on changing some if/else logic but non blocking
Change Summary
VerifyRoutingProtocolModel is now run only if there is a BGP configuration and
service_routing_protocols_model
is set to 'multi-agent' in the structured_config.Related Issue(s)
Fixes #3189
Component(s) name
arista.avd.eos_validate_state
in ANTA ModeProposed changes
AvdTestBGP test definition is now added only if
router_bgp
andservice_routing_protocols_model
exist andservice_routing_protocols_model
is set to 'multi-agent' in the structured_config.How to test
Tested with
eos_validate_state
molecule.VerifyRoutingProtocolModel
test is now removed from L2 leafs test catalog.Checklist
User Checklist
Repository Checklist