-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(anta.tests): Refactor VerifySpecificPath test case (#965)
--------- Co-authored-by: Geetanjali Mane <[email protected]> Co-authored-by: Guillaume Mulocher <[email protected]>
- Loading branch information
1 parent
461fa69
commit 1dd5a60
Showing
5 changed files
with
206 additions
and
108 deletions.
There are no files selected for viewing
This file contains 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-2025 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 path-selection tests.""" | ||
|
||
from __future__ import annotations | ||
|
||
from ipaddress import IPv4Address | ||
|
||
from pydantic import BaseModel, ConfigDict | ||
|
||
|
||
class DpsPath(BaseModel): | ||
"""Model for a list of DPS path entries.""" | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
peer: IPv4Address | ||
"""Static peer IPv4 address.""" | ||
path_group: str | ||
"""Router path group name.""" | ||
source_address: IPv4Address | ||
"""Source IPv4 address of path.""" | ||
destination_address: IPv4Address | ||
"""Destination IPv4 address of path.""" | ||
|
||
def __str__(self) -> str: | ||
"""Return a human-readable string representation of the DpsPath for reporting.""" | ||
return f"Peer: {self.peer}, PathGroup: {self.path_group}, Source: {self.source_address}, Destination: {self.destination_address}" |
This file contains 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 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 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.