-
Notifications
You must be signed in to change notification settings - Fork 220
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(eos_validate_state): Added the validation for STUN client configurations #3898
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
ansible_collections/arista/avd/roles/eos_validate_state/ANTA-Preview.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/ANTA-Preview.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
stun_interfaces = [ | ||
local_interfaces.get("name") | ||
for path_group in path_groups | ||
for local_interfaces in path_group.get("local_interfaces") | ||
if get(local_interfaces, "stun.server_profiles") is not 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.
Might be helpful to take a look at the mixin classes under plugin_utils/eos_validate_state_utils
. There are validations methods you can use to make sure the data is present and logs accordingly.
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/ANTA-Preview.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Show resolved
Hide resolved
LOGGER.info("No local interface found with STUN configuration. %s is skipped.", self.__class__.__name__) | ||
return None | ||
|
||
# Generate the ANTA tests for each interface with STUN configuration |
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.
# Generate the ANTA tests for each interface with STUN configuration | |
# Generate the ANTA tests for each identified local interface. |
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/ANTA-Preview.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/python_modules/tests/avdteststun.py
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
Quality Gate passedIssues Measures |
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.
LGTM
Change Summary
Added the validation for STUN client configuration.
Related Issue(s)
Fixes #3889
Component(s) name
arista.avd.eos_validate_state
Proposed changes
We have the ANTA testcase ready for validate the STUN client configuration hence added the support in AVD. Right now it will collect the all the local interfaces from path group where stun server profiles are attached. Source port is 4500(default) for now.
How to test
Run the molecule or test it on lab with eos_validate_state in playbook.
Note: Need ANTA==0.14.0 to test this.
Checklist
User Checklist
Repository Checklist