Merging upstream version 1.3.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-17 07:33:51 +01:00
parent 5b922100c9
commit 8a6a3342fc
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
337 changed files with 16571 additions and 4891 deletions

View file

@ -1,9 +1,12 @@
# Copyright (c) 2023-2024 Arista Networks, Inc.
# 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.
"""Unit tests data for the asynceapi client package."""
SUCCESS_EAPI_RESPONSE = {
from asynceapi._constants import EapiCommandFormat
from asynceapi._types import EapiJsonOutput, JsonRpc
SUCCESS_EAPI_RESPONSE: EapiJsonOutput = {
"jsonrpc": "2.0",
"id": "EapiExplorer-1",
"result": [
@ -49,7 +52,7 @@ SUCCESS_EAPI_RESPONSE = {
}
"""Successful eAPI JSON response."""
ERROR_EAPI_RESPONSE = {
ERROR_EAPI_RESPONSE: EapiJsonOutput = {
"jsonrpc": "2.0",
"id": "EapiExplorer-1",
"error": {
@ -84,5 +87,10 @@ ERROR_EAPI_RESPONSE = {
}
"""Error eAPI JSON response."""
JSONRPC_REQUEST_TEMPLATE = {"jsonrpc": "2.0", "method": "runCmds", "params": {"version": 1, "cmds": [], "format": "json"}, "id": "EapiExplorer-1"}
JSONRPC_REQUEST_TEMPLATE: JsonRpc = {
"jsonrpc": "2.0",
"method": "runCmds",
"params": {"version": 1, "cmds": [], "format": EapiCommandFormat.JSON},
"id": "EapiExplorer-1",
}
"""Template for JSON-RPC eAPI request. `cmds` must be filled by the parametrize decorator."""