-
Notifications
You must be signed in to change notification settings - Fork 34
feat(anta): Added testcases to verifying Route Type #925
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3056c03
Issue_884: Added testcases for verifying Route Type
5d261f9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4a7d9e1
Issue_884: Fixed linting issues observed in pre-commit run
geetanjalimanegslab d97b92f
Issue_884: Updated documentation and opimized code
geetanjalimanegslab 4396803
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 69e1e16
Issue_884: fixed pre-commit issues
geetanjalimanegslab 4ad14e4
Issue_884: Updated docstrings and added unit test for multi VRF
geetanjalimanegslab 0c7f76d
Merge branch 'main' into issue_884
gmuloc 7d9b6d2
Update anta/custom_types.py
gmuloc 3c434d7
Update anta/tests/routing/generic.py
gmuloc 58bcf8a
Apply suggestions from code review
gmuloc ea56022
Merge branch 'main' into issue_884
gmuloc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2023-2024 Arista Networks, Inc. | ||
# Use of this source code is governed by the Apache License 2.0 | ||
# that can be found in the LICENSE file. | ||
"""Module containing input models for generic routing tests.""" | ||
|
||
from __future__ import annotations | ||
|
||
from ipaddress import IPv4Network | ||
|
||
from pydantic import BaseModel, ConfigDict | ||
|
||
from anta.custom_types import IPv4RouteType | ||
|
||
|
||
class IPv4Routes(BaseModel): | ||
"""Model for a list of IPV4 route entries.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
prefix: IPv4Network | ||
"""The IPV4 network to validate the route type.""" | ||
vrf: str = "default" | ||
"""VRF context. Defaults to `default` VRF.""" | ||
route_type: IPv4RouteType | ||
"""List of IPV4 Route type to validate the valid rout type.""" | ||
|
||
def __str__(self) -> str: | ||
"""Return a human-readable string representation of the IPv4RouteType for reporting.""" | ||
return f"Prefix: {self.prefix} VRF: {self.vrf}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.