Merging upstream version 1.3.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
5b922100c9
commit
8a6a3342fc
337 changed files with 16571 additions and 4891 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2024 Arista Networks, Inc.
|
||||
# Copyright (c) 2024-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.
|
||||
# Initially written by Jeremy Schulman at https://github.com/jeremyschulman/aio-eapi
|
||||
|
@ -6,13 +6,16 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import httpx
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._types import EapiComplexCommand, EapiJsonOutput, EapiSimpleCommand, EapiTextOutput
|
||||
|
||||
|
||||
class EapiCommandError(RuntimeError):
|
||||
"""Exception class for EAPI command errors.
|
||||
"""Exception class for eAPI command errors.
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
@ -23,7 +26,14 @@ class EapiCommandError(RuntimeError):
|
|||
not_exec: a list of commands that were not executed
|
||||
"""
|
||||
|
||||
def __init__(self, failed: str, errors: list[str], errmsg: str, passed: list[str | dict[str, Any]], not_exec: list[dict[str, Any]]) -> None:
|
||||
def __init__(
|
||||
self,
|
||||
failed: str,
|
||||
errors: list[str],
|
||||
errmsg: str,
|
||||
passed: list[EapiJsonOutput] | list[EapiTextOutput],
|
||||
not_exec: list[EapiSimpleCommand | EapiComplexCommand],
|
||||
) -> None:
|
||||
"""Initialize for the EapiCommandError exception."""
|
||||
self.failed = failed
|
||||
self.errmsg = errmsg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue