Skip to content
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 the SNMP source interface for specified VRF #870

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vitthalmagadum
Copy link
Collaborator

Description

Verifies SNMP source-interface for a specified VRF.

Expected Results
----------------
* Success: The test will pass if the provided SNMP source-interface is configured in the specified VRF.
* Failure: The test will fail if the provided SNMP source-interface is NOT configured in the specified VRF.

Fixes #854

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

Copy link

codspeed-hq bot commented Oct 10, 2024

CodSpeed Performance Report

Merging #870 will not alter performance

Comparing vitthalmagadum:issue_854 (85574fc) with main (92cbcd3)

Summary

✅ 8 untouched benchmarks


# Verify source-interface details.
if not actual_interface:
failures += f"Source interface '{interface}' is not configured.\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
failures += f"Source interface '{interface}' is not configured.\n"
failures += f"Source interface '{interface}' is not configured with vrf `{vrf}`.\n"

if not actual_interface:
failures += f"Source interface '{interface}' is not configured.\n"
elif actual_interface != interface:
failures += f"Source interface '{interface}' is not correctly configured in vrf '{vrf}'.\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again what is expected and what actual interface received please mention that in failure message.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link

sonarcloud bot commented Oct 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the test case to verify the SNMP source interface for specified VRF
2 participants