forked from aristanetworks/anta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(anta): Refactor VerifyInterfacesStatus test for nicer failur…
…e message (aristanetworks#899)
- Loading branch information
1 parent
595790f
commit 206de52
Showing
4 changed files
with
95 additions
and
37 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,23 @@ | ||
# 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 interface tests.""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Literal | ||
|
||
from pydantic import BaseModel | ||
|
||
from anta.custom_types import Interface | ||
|
||
|
||
class InterfaceState(BaseModel): | ||
"""Model for an interface state.""" | ||
|
||
name: Interface | ||
"""Interface to validate.""" | ||
status: Literal["up", "down", "adminDown"] | ||
"""Expected status of the interface.""" | ||
line_protocol_status: Literal["up", "down", "testing", "unknown", "dormant", "notPresent", "lowerLayerDown"] | None = None | ||
"""Expected line protocol status of the interface.""" |
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