# Copyright (c) 2026 Arista Networks, Inc.
# Use of this source code is governed by the Apache License 2.0
# that can be found in the COPYING file.
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: compliancecheck.proto
# plugin: python-aristaproto
# This file has been @generated
__all__ = (
"ConfigType",
"ImageType",
"DiffOp",
"ErrorCode",
"TaskType",
"FilterCode",
"ConfigSourceType",
"ImageSource",
"SoftwareComplianceCode",
"ExtensionInstallStatus",
"ImageDiffOp",
"DiffEntry",
"ConfigDiff",
"ConfigSource",
"ConfigSources",
"CvpConfigError",
"ConfigDiffSummary",
"InLineFilterCode",
"ConfigFilterCodes",
"ExtensionInfo",
"ConfigRequest",
"GetConfigRequest",
"GetConfigResponse",
"GetProposedConfigRequest",
"GetProposedConfigResponse",
"GetConfigDiffRequest",
"GetConfigDiffResponse",
"ConfigDiffRawRequest",
"ConfigDiffRawResponse",
"GetConfigDiffForTaskRequest",
"GetConfigDiffForTaskResponse",
"GetConfigDiffSummaryForTaskRequest",
"GetConfigDiffSummaryForTaskResponse",
"ImageDiff",
"ImageInfo",
"GetImageDiffForTaskRequest",
"GetImageDiffForTaskResponse",
"ImageStatus",
"GetDeviceStatusRequest",
"GetDeviceStatusResponse",
"GetImageDiffRequest",
"GetImageDiffResponse",
"ImageRequest",
"ComplianceStatus",
"ComplianceStatusBySup",
"GetImageDiffRequestV2",
"GetImageDiffResponseV2",
"GetConfigDiffSummaryRequest",
"GetConfigDiffSummaryResponse",
"SoftwareImage",
"ImageMetadata",
"Extension",
"RebootRequired",
"SoftwareImageDiff",
"SoftwareImageDiffsBySup",
"ExtensionDiff",
"TerminAttrDiffsBySup",
"ExtensionDiffs",
"ExtensionDiffsBySup",
"ImageInfoV3",
"GetImageDiffRequestV3",
"GetImageDiffResponseV3",
"ComplianceStub",
"ComplianceBase",
)
from dataclasses import dataclass
from datetime import datetime
from typing import (
TYPE_CHECKING,
AsyncIterable,
AsyncIterator,
Dict,
Iterable,
List,
Optional,
Union,
)
import aristaproto
import grpclib
from aristaproto.grpc.grpclib_server import ServiceBase
if TYPE_CHECKING:
import grpclib.server
from aristaproto.grpc.grpclib_client import MetadataLike
from grpclib.metadata import Deadline
[docs]
class ConfigType(aristaproto.Enum):
"""ConfigType identifies a running or designed configuration."""
CONFIGTYPE_UNSPECIFIED = 0
"""CONFIGTYPE_UNSPECIFIED indicates an unknown configuration type."""
RUNNING_CONFIG = 1
"""RUNNING_CONFIG indicates a running configuration."""
DESIGNED_CONFIG = 2
"""DESIGNED_CONFIG indicates a designed configuration."""
[docs]
class ImageType(aristaproto.Enum):
"""ImageType identifies a running or designed image."""
IMAGETYPE_UNSPECIFIED = 0
"""IMAGETYPE_UNSPECIFIED indicates an unknown image type."""
RUNNING_IMAGE = 1
"""RUNNING_IMAGE indicates a running image."""
DESIGNED_IMAGE = 2
"""DESIGNED_IMAGE indicates a designed image."""
[docs]
class DiffOp(aristaproto.Enum):
"""
DiffOp represents the operation performed to get from one side of the diff
to the other.
"""
DIFFOP_UNSPECIFIED = 0
"""DIFFOP_UNSPECIFIED indicates an unknown diff operation."""
NOP = 1
"""NOP indicates that sides A and B are identical at this line."""
IGNORE = 2
"""
IGNORE indicates a line ignored on either side A or B. One line number is -1.
"""
ADD = 3
"""ADD indicates that a line was added to side A."""
DELETE = 4
"""DELETE indicates that a line was deleted from side B."""
CHANGE = 5
"""CHANGE indicates that a line on side A was modified."""
[docs]
class ErrorCode(aristaproto.Enum):
"""ErrorCode indicates how an error should be handled."""
ERRORCODE_UNSPECIFIED = 0
"""ERRORCODE_UNSPECIFIED indicates an unknown error code."""
DEVICEWARNING = 1
"""DEVICEWARNING indicates a device warning."""
DEVICEERROR = 2
"""DEVICEERROR indicates a device error."""
UNREACHABLEDEVICE = 3
"""UNREACHABLEDEVICE indicates that the device cannot be reached."""
DAOERROR = 4
"""
DAOERROR indicates a data access object error while manipulating the database.
"""
FILTERERROR = 5
"""
FILTERERROR indicates an error from the proposed configuration management filters.
"""
OTHER = 6
"""OTHER indicates an error that should be retained in the log."""
INACTIVEDEVICE = 7
"""INACTIVEDEVICE indicates that the device was not streaming."""
PROPOSED_CONFIG_CHECK = 8
"""
PROPOSED_CONFIG_CHECK indicates an issue with the content of proposed configuration.
"""
[docs]
class TaskType(aristaproto.Enum):
"""TaskType identifies the type of task."""
TASKTYPE_UNSPECIFIED = 0
"""TASKTYPE_UNSPECIFIED indicates an unknown task type."""
CONFIG = 1
"""CONFIG indicates a configuration push task."""
IMAGE = 2
"""IMAGE indicates an image push task."""
[docs]
class FilterCode(aristaproto.Enum):
"""
FilterCode identifies the proposed configuration management filter that a
configuration line matches.
"""
UNSPECIFIED = 0
"""
UNSPECIFIED indicates that the configuration line did not match a filter.
"""
MANAGED_LINE = 1
"""
MANAGED_LINE indicates that the configuration line matches a managed filter.
"""
UNMANAGED_LINE = 2
"""
UNMANAGED_LINE indicates that the configuration line matches an unmanaged filter.
"""
[docs]
class ConfigSourceType(aristaproto.Enum):
"""
ConfigSourceType identifies where a source configuration was created.
"""
CONFIG_TYPE_UNSPECIFIED = 0
"""
CONFIG_TYPE_UNSPECIFIED indicates an unknown configuration source type.
"""
CONFIG_TYPE_TOMCAT_CONFIGLET = 1
"""
CONFIG_TYPE_TOMCAT_CONFIGLET indicates a configuration created by the Java
backend. ConfigSource.key contains the configlet name for this type.
"""
CONFIG_TYPE_STUDIO = 2
"""
CONFIG_TYPE_STUDIO indicates a configuration created through a Studio.
ConfigSource.key is the Studio ID passed to the workspace API.
"""
CONFIG_TYPE_STUDIO_STATIC = 3
"""
CONFIG_TYPE_STUDIO_STATIC indicates a configlet created through a static
configlet Studio. ConfigSource.key is the Studio configlet ID passed to the
corresponding API.
"""
CONFIG_TYPE_HIERARCHY = 5
"""
CONFIG_TYPE_HIERARCHY indicates a configuration generated by the Hierarchies workflow.
"""
[docs]
class ImageSource(aristaproto.Enum):
"""ImageSource identifies the origin of an image change."""
UNSPECIFIED = 0
"""IMAGE_SOURCE_UNSPECIFIED indicates an unknown image source."""
STUDIO = 1
"""IMAGE_SOURCE_STUDIO indicates an image assigned through a Studio."""
NETWORK_PROVISIONING = 2
"""
IMAGE_SOURCE_NETWORK_PROVISIONING indicates an image assigned through network provisioning.
"""
HIERARCHY = 3
"""
IMAGE_SOURCE_HIERARCHY indicates an image assigned through the hierarchies workflow.
"""
[docs]
class SoftwareComplianceCode(aristaproto.Enum):
"""SoftwareComplianceCode indicates possible compliance status."""
UNSPECIFIED = 0
"""
SOFTWARE_COMPLIANCE_CODE_UNSPECIFIED indicates compliance code is unspecified.
"""
IN_SYNC = 1
"""
SOFTWARE_COMPLIANCE_CODE_IN_SYNC indicates that designed and running images
and extensions are identical.
"""
OUT_OF_SYNC = 2
"""
SOFTWARE_COMPLIANCE_CODE_OUT_OF_SYNC indicates that designed and running
images and extensions differ.
"""
[docs]
class ExtensionInstallStatus(aristaproto.Enum):
"""
ExtensionInstallStatus indicates whether an extension is installed, not
installed, or force-installed.
"""
UNSPECIFIED = 0
"""
EXTENSION_INSTALL_STATUS_UNSPECIFIED indicates an unknown extension
installation status.
"""
NOT_INSTALLED = 1
"""
EXTENSION_INSTALL_STATUS_NOT_INSTALLED indicates that the extension is not
installed on the device.
"""
INSTALLED = 2
"""
EXTENSION_INSTALL_STATUS_INSTALLED indicates that the extension is
installed on the device.
"""
FORCE_INSTALLED = 3
"""
EXTENSION_INSTALL_STATUS_FORCE_INSTALLED indicates that the extension is
force-installed on the device.
"""
[docs]
class ImageDiffOp(aristaproto.Enum):
"""
ImageDiffOp represents the operation performed to get from one side of the
diff to the other.
"""
DIFF_OP_UNSPECIFIED = 0
"""DIFF_OP_UNSPECIFIED indicates an unknown image diff operation."""
DIFF_OP_NOP = 1
"""DIFF_OP_NOP indicates no change."""
DIFF_OP_ADD = 2
"""DIFF_OP_ADD indicates that software was added."""
DIFF_OP_DELETE = 3
"""DIFF_OP_DELETE indicates that software was deleted."""
DIFF_OP_CHANGE = 4
"""DIFF_OP_CHANGE indicates that software was updated."""
[docs]
@dataclass(eq=False, repr=False)
class DiffEntry(aristaproto.Message):
"""DiffEntry represents one entry in a configuration diff."""
op: "DiffOp" = aristaproto.enum_field(1)
a_lineno: int = aristaproto.int32_field(2)
"""a_lineno is the line number on side A to which this diff applies."""
b_lineno: int = aristaproto.int32_field(3)
"""b_lineno is the line number on side B to which this diff applies."""
a_parent_lineno: int = aristaproto.int32_field(9)
"""
a_parent_lineno is the line number of the containing block's leading
command on side A.
"""
b_parent_lineno: int = aristaproto.int32_field(4)
"""
b_parent_lineno is the line number of the containing block's leading
command on side B.
"""
a_line: str = aristaproto.string_field(5)
"""a_line is the configuration line content on side A."""
b_line: str = aristaproto.string_field(6)
"""b_line is the configuration line content on side B."""
a_filter_code: "FilterCode" = aristaproto.enum_field(7)
"""a_filter_code is the filter code for the line on side A."""
b_filter_code: "FilterCode" = aristaproto.enum_field(8)
"""b_filter_code is the filter code for the line on side B."""
[docs]
@dataclass(eq=False, repr=False)
class ConfigDiff(aristaproto.Message):
entries: List["DiffEntry"] = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class ConfigSource(aristaproto.Message):
source_type: "ConfigSourceType" = aristaproto.enum_field(1)
key: str = aristaproto.string_field(2)
[docs]
@dataclass(eq=False, repr=False)
class ConfigSources(aristaproto.Message):
source: List["ConfigSource"] = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class CvpConfigError(aristaproto.Message):
"""
CvpConfigError describes an error reported by CloudVision Portal or a device
during configuration validation.
"""
error_code: "ErrorCode" = aristaproto.enum_field(1)
error_msg: str = aristaproto.string_field(2)
line_num: int = aristaproto.int32_field(3)
configlet_name: str = aristaproto.string_field(4)
config_line_num: int = aristaproto.int32_field(5)
[docs]
@dataclass(eq=False, repr=False)
class ConfigDiffSummary(aristaproto.Message):
config_compliance: bool = aristaproto.bool_field(1)
nop: int = aristaproto.uint32_field(2)
ignore: int = aristaproto.uint32_field(3)
add: int = aristaproto.uint32_field(4)
delete: int = aristaproto.uint32_field(5)
change: int = aristaproto.uint32_field(6)
digest: str = aristaproto.string_field(7)
error: str = aristaproto.string_field(8)
[docs]
@dataclass(eq=False, repr=False)
class InLineFilterCode(aristaproto.Message):
line_no: int = aristaproto.int32_field(1)
filter_code: "FilterCode" = aristaproto.enum_field(2)
[docs]
@dataclass(eq=False, repr=False)
class ConfigFilterCodes(aristaproto.Message):
in_line_filter_code: List["InLineFilterCode"] = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class ExtensionInfo(aristaproto.Message):
name: str = aristaproto.string_field(1)
version: str = aristaproto.string_field(2)
present_in_cvp: bool = aristaproto.bool_field(3)
present_in_device: bool = aristaproto.bool_field(4)
installed: bool = aristaproto.bool_field(5)
reboot_required: bool = aristaproto.bool_field(6)
install_details: str = aristaproto.string_field(8)
status_detail: str = aristaproto.string_field(9)
is_embedded: bool = aristaproto.bool_field(10)
arch: str = aristaproto.string_field(11)
[docs]
@dataclass(eq=False, repr=False)
class ConfigRequest(aristaproto.Message):
type: "ConfigType" = aristaproto.enum_field(1)
timestamp: datetime = aristaproto.message_field(2)
device_id: str = aristaproto.string_field(3)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigRequest(aristaproto.Message):
request: "ConfigRequest" = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigResponse(aristaproto.Message):
config: str = aristaproto.string_field(1, group="response")
error: "CvpConfigError" = aristaproto.message_field(2, group="response")
config_filter_codes: "ConfigFilterCodes" = aristaproto.message_field(
3, group="response"
)
sources: "ConfigSources" = aristaproto.message_field(6, group="response")
[docs]
@dataclass(eq=False, repr=False)
class GetProposedConfigRequest(aristaproto.Message):
configlet_ids: List[str] = aristaproto.string_field(1)
device_id: str = aristaproto.string_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetProposedConfigResponse(aristaproto.Message):
config: str = aristaproto.string_field(1, group="response")
error: "CvpConfigError" = aristaproto.message_field(2, group="response")
partial_config: str = aristaproto.string_field(3, group="response")
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffRequest(aristaproto.Message):
lhs: "ConfigRequest" = aristaproto.message_field(1)
rhs: "ConfigRequest" = aristaproto.message_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffResponse(aristaproto.Message):
diff: "ConfigDiff" = aristaproto.message_field(1, group="response")
summary: "ConfigDiffSummary" = aristaproto.message_field(2, group="response")
lhs: "CvpConfigError" = aristaproto.message_field(3, group="response")
rhs: "CvpConfigError" = aristaproto.message_field(4, group="response")
sources: "ConfigSources" = aristaproto.message_field(5, group="response")
"""sources contains the left-hand-side configuration sources."""
[docs]
@dataclass(eq=False, repr=False)
class ConfigDiffRawRequest(aristaproto.Message):
lhs: str = aristaproto.string_field(1, group="request")
rhs: str = aristaproto.string_field(2, group="request")
device_id: str = aristaproto.string_field(3, group="request")
reconcile_all: bool = aristaproto.bool_field(4, group="request")
"""
reconcile_all resolves conflicts in favor of the right-hand side when
true and the left-hand side when false.
"""
exclude_reconciled_managed_config: bool = aristaproto.bool_field(5, group="request")
[docs]
@dataclass(eq=False, repr=False)
class ConfigDiffRawResponse(aristaproto.Message):
diff_entries: "ConfigDiff" = aristaproto.message_field(1, group="response")
reconciled_config: str = aristaproto.string_field(2, group="response")
error: "CvpConfigError" = aristaproto.message_field(3, group="response")
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffForTaskRequest(aristaproto.Message):
task_id: str = aristaproto.string_field(1)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffForTaskResponse(aristaproto.Message):
diff: "ConfigDiff" = aristaproto.message_field(1, group="response")
error: "CvpConfigError" = aristaproto.message_field(2, group="response")
sources: "ConfigSources" = aristaproto.message_field(3, group="response")
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffSummaryForTaskRequest(aristaproto.Message):
task_id: str = aristaproto.string_field(1)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffSummaryForTaskResponse(aristaproto.Message):
summary: "ConfigDiffSummary" = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class ImageDiff(aristaproto.Message):
running_image: str = aristaproto.string_field(1)
running_image_for_peer_sup: str = aristaproto.string_field(2)
running_extensions: List["ExtensionInfo"] = aristaproto.message_field(3)
running_extensions_for_peer_sup: List["ExtensionInfo"] = aristaproto.message_field(
4
)
designed_image: str = aristaproto.string_field(5)
designed_extensions: List["ExtensionInfo"] = aristaproto.message_field(6)
image_reboot_required: bool = aristaproto.bool_field(7)
image_reboot_required_for_peer_sup: bool = aristaproto.bool_field(8)
extension_reboot_required: bool = aristaproto.bool_field(9)
extension_reboot_required_for_peer_sup: bool = aristaproto.bool_field(10)
dual_sup: bool = aristaproto.bool_field(11)
target_image_bundle: str = aristaproto.string_field(12)
digest: str = aristaproto.string_field(13)
running_image_version: str = aristaproto.string_field(14)
running_image_version_for_peer_sup: str = aristaproto.string_field(15)
designed_image_version: str = aristaproto.string_field(16)
running_image_metadata: "ImageMetadata" = aristaproto.message_field(17)
running_image_metadata_for_peer_sup: "ImageMetadata" = aristaproto.message_field(18)
designed_image_metadata: "ImageMetadata" = aristaproto.message_field(19)
source: "ImageSource" = aristaproto.enum_field(20)
[docs]
@dataclass(eq=False, repr=False)
class ImageInfo(aristaproto.Message):
image: str = aristaproto.string_field(1)
image_for_peer_sup: str = aristaproto.string_field(2)
extensions: List["ExtensionInfo"] = aristaproto.message_field(3)
extensions_for_peer_sup: List["ExtensionInfo"] = aristaproto.message_field(4)
dual_sup: bool = aristaproto.bool_field(5)
target_image_bundle: str = aristaproto.string_field(6)
"""target_image_bundle is set only for a designed image."""
image_version: str = aristaproto.string_field(7)
image_version_for_peer_sup: str = aristaproto.string_field(8)
image_metadata: "ImageMetadata" = aristaproto.message_field(9)
image_metadata_for_peer_sup: "ImageMetadata" = aristaproto.message_field(10)
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffForTaskRequest(aristaproto.Message):
task_id: str = aristaproto.string_field(1)
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffForTaskResponse(aristaproto.Message):
diff: "ImageDiff" = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class ImageStatus(aristaproto.Message):
dual_sup: bool = aristaproto.bool_field(1)
image_compliance: bool = aristaproto.bool_field(2)
extension_compliance: bool = aristaproto.bool_field(3)
extension_compliance_for_peer_sup: bool = aristaproto.bool_field(4)
error: str = aristaproto.string_field(5)
image_compliance_for_peer_sup: bool = aristaproto.bool_field(6)
[docs]
@dataclass(eq=False, repr=False)
class GetDeviceStatusRequest(aristaproto.Message):
timestamp: datetime = aristaproto.message_field(1)
device_id: str = aristaproto.string_field(2)
task_type: "TaskType" = aristaproto.enum_field(3)
[docs]
@dataclass(eq=False, repr=False)
class GetDeviceStatusResponse(aristaproto.Message):
config_summary: "ConfigDiffSummary" = aristaproto.message_field(1)
image_status: "ImageStatus" = aristaproto.message_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffRequest(aristaproto.Message):
timestamp: datetime = aristaproto.message_field(1)
device_id: str = aristaproto.string_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffResponse(aristaproto.Message):
diff: "ImageDiff" = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class ImageRequest(aristaproto.Message):
type: "ImageType" = aristaproto.enum_field(1)
timestamp: datetime = aristaproto.message_field(2)
device_id: str = aristaproto.string_field(3)
[docs]
@dataclass(eq=False, repr=False)
class ComplianceStatus(aristaproto.Message):
"""
ComplianceStatus indicates the compliance status for a software image,
TerminAttr, and extensions.
"""
software_image_compliance_code: "SoftwareComplianceCode" = aristaproto.enum_field(1)
"""
software_image_compliance_code is the compliance code for software images.
"""
terminattr_compliance_code: "SoftwareComplianceCode" = aristaproto.enum_field(2)
"""terminattr_compliance_code is the compliance code for TerminAttr."""
extensions_compliance_code: "SoftwareComplianceCode" = aristaproto.enum_field(3)
"""extensions_compliance_code is the compliance code for extensions."""
[docs]
@dataclass(eq=False, repr=False)
class ComplianceStatusBySup(aristaproto.Message):
"""
ComplianceStatusBySup is a map that indicates the compliance code for each
supervisor.
"""
values: Dict[str, "ComplianceStatus"] = aristaproto.map_field(
1, aristaproto.TYPE_STRING, aristaproto.TYPE_MESSAGE
)
"""values is the mapping of supervisor type to compliance code."""
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffRequestV2(aristaproto.Message):
lhs: "ImageRequest" = aristaproto.message_field(1)
rhs: "ImageRequest" = aristaproto.message_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffResponseV2(aristaproto.Message):
lhs: "ImageInfo" = aristaproto.message_field(1)
rhs: "ImageInfo" = aristaproto.message_field(2)
image_reboot_required: bool = aristaproto.bool_field(3)
image_reboot_required_for_peer_sup: bool = aristaproto.bool_field(4)
extension_reboot_required: bool = aristaproto.bool_field(5)
extension_reboot_required_for_peer_sup: bool = aristaproto.bool_field(6)
digest: str = aristaproto.string_field(7)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffSummaryRequest(aristaproto.Message):
lhs: "ConfigRequest" = aristaproto.message_field(1)
rhs: "ConfigRequest" = aristaproto.message_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetConfigDiffSummaryResponse(aristaproto.Message):
summary: "ConfigDiffSummary" = aristaproto.message_field(1)
[docs]
@dataclass(eq=False, repr=False)
class SoftwareImage(aristaproto.Message):
"""SoftwareImage describes a running or designed EOS image."""
name: str = aristaproto.string_field(1)
"""name is the name of the EOS image."""
version: str = aristaproto.string_field(2)
"""version is the version of the EOS image."""
metadata: "ImageMetadata" = aristaproto.message_field(3)
"""metadata is the metadata for the EOS image."""
[docs]
@dataclass(eq=False, repr=False)
class Extension(aristaproto.Message):
"""
Extension provides information about a running or designed extension.
"""
name: str = aristaproto.string_field(1)
"""name is the name of the extension."""
version: str = aristaproto.string_field(2)
"""version is the version of the extension."""
reboot_required: bool = aristaproto.bool_field(3)
"""
reboot_required indicates whether applying or deleting this extension would
require a reboot.
"""
present: bool = aristaproto.bool_field(4)
"""present indicates whether the extension is present on the device."""
installed: "ExtensionInstallStatus" = aristaproto.enum_field(5)
"""
installed indicates whether the extension is installed, not installed, or
force-installed.
"""
status_detail: str = aristaproto.string_field(6)
"""status_detail describes the extension status."""
is_embedded: bool = aristaproto.bool_field(7)
"""
is_embedded indicates whether the extension is embedded in the EOS software
image.
"""
arch: str = aristaproto.string_field(8)
"""arch is the extension architecture."""
[docs]
@dataclass(eq=False, repr=False)
class RebootRequired(aristaproto.Message):
"""
RebootRequired indicates switch-wide reboot requirements for software images,
TerminAttr, and extensions.
"""
software_image_reboot_required: bool = aristaproto.bool_field(1)
"""
software_image_reboot_required indicates whether applying the software
image requires a reboot.
"""
terminattr_reboot_required: bool = aristaproto.bool_field(2)
"""
terminattr_reboot_required indicates whether applying or deleting
TerminAttr requires a reboot.
"""
extension_reboot_required: bool = aristaproto.bool_field(3)
"""
extension_reboot_required indicates whether applying or deleting extensions
requires a reboot.
"""
[docs]
@dataclass(eq=False, repr=False)
class SoftwareImageDiff(aristaproto.Message):
"""SoftwareImageDiff is the diff between running and designed images."""
code: "ImageDiffOp" = aristaproto.enum_field(1)
"""
code is the operation performed to get from one side of the diff to the other.
"""
a: "SoftwareImage" = aristaproto.message_field(2)
"""a is the software image on side A (the left-hand side)."""
b: "SoftwareImage" = aristaproto.message_field(3)
"""b is the software image on side B (the right-hand side)."""
text_code: "ImageDiffOp" = aristaproto.enum_field(4)
"""text_code is the color in the diff view page."""
[docs]
@dataclass(eq=False, repr=False)
class SoftwareImageDiffsBySup(aristaproto.Message):
"""
SoftwareImageDiffsBySup is software image diff information for each
supervisor.
"""
values: Dict[str, "SoftwareImageDiff"] = aristaproto.map_field(
1, aristaproto.TYPE_STRING, aristaproto.TYPE_MESSAGE
)
"""values maps each supervisor type to its image diff."""
[docs]
@dataclass(eq=False, repr=False)
class ExtensionDiff(aristaproto.Message):
"""ExtensionDiff is the diff between running and designed extensions."""
code: "ImageDiffOp" = aristaproto.enum_field(1)
"""
code is the operation performed to get from one side of the diff to the other.
"""
a: "Extension" = aristaproto.message_field(2)
"""a is the extension on side A (the left-hand side)."""
b: "Extension" = aristaproto.message_field(3)
"""b is the extension on side B (the right-hand side)."""
text_code: "ImageDiffOp" = aristaproto.enum_field(4)
"""text_code is the color in the diff view page."""
[docs]
@dataclass(eq=False, repr=False)
class TerminAttrDiffsBySup(aristaproto.Message):
"""
TerminAttrDiffsBySup contains TerminAttr diff information for each supervisor.
"""
values: Dict[str, "ExtensionDiff"] = aristaproto.map_field(
1, aristaproto.TYPE_STRING, aristaproto.TYPE_MESSAGE
)
"""values maps each supervisor type to its TerminAttr diff."""
[docs]
@dataclass(eq=False, repr=False)
class ExtensionDiffs(aristaproto.Message):
"""
ExtensionDiffs is a list of extension diff information in the order they
will be applied.
"""
values: List["ExtensionDiff"] = aristaproto.message_field(1)
"""values is an ordered list of extension diffs applied to the device."""
[docs]
@dataclass(eq=False, repr=False)
class ExtensionDiffsBySup(aristaproto.Message):
"""
ExtensionDiffsBySup is the extension diff information for each supervisor.
"""
values: Dict[str, "ExtensionDiffs"] = aristaproto.map_field(
1, aristaproto.TYPE_STRING, aristaproto.TYPE_MESSAGE
)
"""values maps each supervisor type to its extension diffs."""
[docs]
@dataclass(eq=False, repr=False)
class ImageInfoV3(aristaproto.Message):
software_image_diff: "SoftwareImageDiffsBySup" = aristaproto.message_field(1)
"""software_image_diff contains the image diff for each supervisor."""
terminattr_diff: "TerminAttrDiffsBySup" = aristaproto.message_field(2)
"""terminattr_diff contains the TerminAttr diff for each supervisor."""
extensions_diff: "ExtensionDiffsBySup" = aristaproto.message_field(3)
"""extensions_diff contains the extension diffs for each supervisor."""
compliance: "ComplianceStatusBySup" = aristaproto.message_field(4)
"""compliance provides compliance information for each supervisor."""
compliance_status: "SoftwareComplianceCode" = aristaproto.enum_field(5)
"""
compliance_status is the aggregate status for active and standby
supervisors, images, TerminAttr, and extensions.
"""
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffRequestV3(aristaproto.Message):
a: "ImageRequest" = aristaproto.message_field(1)
b: "ImageRequest" = aristaproto.message_field(2)
[docs]
@dataclass(eq=False, repr=False)
class GetImageDiffResponseV3(aristaproto.Message):
image_info: "ImageInfoV3" = aristaproto.message_field(1)
dual_sup_a: bool = aristaproto.bool_field(2)
dual_sup_b: bool = aristaproto.bool_field(3)
reboot_required: "RebootRequired" = aristaproto.message_field(4)
digest: str = aristaproto.string_field(5)
source_a: "ImageSource" = aristaproto.enum_field(6)
source_b: "ImageSource" = aristaproto.enum_field(7)
[docs]
class ComplianceStub(aristaproto.ServiceStub):
"""
Compliance provides configuration and image compliance information.
To get the current view of an entity, leave the timestamp field unset in the
corresponding request.
"""
[docs]
async def get_config_diff(
self,
get_config_diff_request: "GetConfigDiffRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetConfigDiffResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetConfigDiff",
get_config_diff_request,
GetConfigDiffResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_config(
self,
get_config_request: "GetConfigRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetConfigResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetConfig",
get_config_request,
GetConfigResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_device_status(
self,
get_device_status_request: "GetDeviceStatusRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetDeviceStatusResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetDeviceStatus",
get_device_status_request,
GetDeviceStatusResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_image_diff(
self,
get_image_diff_request: "GetImageDiffRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetImageDiffResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetImageDiff",
get_image_diff_request,
GetImageDiffResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_config_diff_for_task(
self,
get_config_diff_for_task_request: "GetConfigDiffForTaskRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetConfigDiffForTaskResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetConfigDiffForTask",
get_config_diff_for_task_request,
GetConfigDiffForTaskResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_config_diff_summary_for_task(
self,
get_config_diff_summary_for_task_request: "GetConfigDiffSummaryForTaskRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetConfigDiffSummaryForTaskResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetConfigDiffSummaryForTask",
get_config_diff_summary_for_task_request,
GetConfigDiffSummaryForTaskResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_image_diff_for_task(
self,
get_image_diff_for_task_request: "GetImageDiffForTaskRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetImageDiffForTaskResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetImageDiffForTask",
get_image_diff_for_task_request,
GetImageDiffForTaskResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_proposed_config(
self,
get_proposed_config_request: "GetProposedConfigRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetProposedConfigResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetProposedConfig",
get_proposed_config_request,
GetProposedConfigResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def config_diff_raw(
self,
config_diff_raw_request_iterator: "Union[AsyncIterable[ConfigDiffRawRequest], Iterable[ConfigDiffRawRequest]]", # noqa: E501
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[ConfigDiffRawResponse]":
async for response in self._stream_stream(
"/compliancecheck.Compliance/ConfigDiffRaw",
config_diff_raw_request_iterator,
ConfigDiffRawRequest,
ConfigDiffRawResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_config_diff_summary(
self,
get_config_diff_summary_request: "GetConfigDiffSummaryRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetConfigDiffSummaryResponse]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetConfigDiffSummary",
get_config_diff_summary_request,
GetConfigDiffSummaryResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_image_diff_v2(
self,
get_image_diff_request_v2: "GetImageDiffRequestV2",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetImageDiffResponseV2]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetImageDiffV2",
get_image_diff_request_v2,
GetImageDiffResponseV2,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
async def get_image_diff_v3(
self,
get_image_diff_request_v3: "GetImageDiffRequestV3",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None,
) -> "AsyncIterator[GetImageDiffResponseV3]":
async for response in self._unary_stream(
"/compliancecheck.Compliance/GetImageDiffV3",
get_image_diff_request_v3,
GetImageDiffResponseV3,
timeout=timeout,
deadline=deadline,
metadata=metadata,
):
yield response
[docs]
class ComplianceBase(ServiceBase):
"""
Compliance provides configuration and image compliance information.
To get the current view of an entity, leave the timestamp field unset in the
corresponding request.
"""
[docs]
async def get_config_diff(
self, get_config_diff_request: "GetConfigDiffRequest"
) -> AsyncIterator[GetConfigDiffResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_config(
self, get_config_request: "GetConfigRequest"
) -> AsyncIterator[GetConfigResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_device_status(
self, get_device_status_request: "GetDeviceStatusRequest"
) -> AsyncIterator[GetDeviceStatusResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_image_diff(
self, get_image_diff_request: "GetImageDiffRequest"
) -> AsyncIterator[GetImageDiffResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_config_diff_for_task(
self, get_config_diff_for_task_request: "GetConfigDiffForTaskRequest"
) -> AsyncIterator[GetConfigDiffForTaskResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_config_diff_summary_for_task(
self,
get_config_diff_summary_for_task_request: "GetConfigDiffSummaryForTaskRequest",
) -> AsyncIterator[GetConfigDiffSummaryForTaskResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_image_diff_for_task(
self, get_image_diff_for_task_request: "GetImageDiffForTaskRequest"
) -> AsyncIterator[GetImageDiffForTaskResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_proposed_config(
self, get_proposed_config_request: "GetProposedConfigRequest"
) -> AsyncIterator[GetProposedConfigResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def config_diff_raw(
self, config_diff_raw_request_iterator: AsyncIterator[ConfigDiffRawRequest]
) -> AsyncIterator[ConfigDiffRawResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_config_diff_summary(
self, get_config_diff_summary_request: "GetConfigDiffSummaryRequest"
) -> AsyncIterator[GetConfigDiffSummaryResponse]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_image_diff_v2(
self, get_image_diff_request_v2: "GetImageDiffRequestV2"
) -> AsyncIterator[GetImageDiffResponseV2]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
[docs]
async def get_image_diff_v3(
self, get_image_diff_request_v3: "GetImageDiffRequestV3"
) -> AsyncIterator[GetImageDiffResponseV3]:
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
async def __rpc_get_config_diff(
self,
stream: "grpclib.server.Stream[GetConfigDiffRequest, GetConfigDiffResponse]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_config_diff,
stream,
request,
)
async def __rpc_get_config(
self, stream: "grpclib.server.Stream[GetConfigRequest, GetConfigResponse]"
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_config,
stream,
request,
)
async def __rpc_get_device_status(
self,
stream: "grpclib.server.Stream[GetDeviceStatusRequest, GetDeviceStatusResponse]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_device_status,
stream,
request,
)
async def __rpc_get_image_diff(
self, stream: "grpclib.server.Stream[GetImageDiffRequest, GetImageDiffResponse]"
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_image_diff,
stream,
request,
)
async def __rpc_get_config_diff_for_task(
self,
stream: "grpclib.server.Stream[GetConfigDiffForTaskRequest, GetConfigDiffForTaskResponse]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_config_diff_for_task,
stream,
request,
)
async def __rpc_get_config_diff_summary_for_task(
self,
stream: "grpclib.server.Stream[GetConfigDiffSummaryForTaskRequest, GetConfigDiffSummaryForTaskResponse]", # noqa: E501
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_config_diff_summary_for_task,
stream,
request,
)
async def __rpc_get_image_diff_for_task(
self,
stream: "grpclib.server.Stream[GetImageDiffForTaskRequest, GetImageDiffForTaskResponse]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_image_diff_for_task,
stream,
request,
)
async def __rpc_get_proposed_config(
self,
stream: "grpclib.server.Stream[GetProposedConfigRequest, GetProposedConfigResponse]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_proposed_config,
stream,
request,
)
async def __rpc_config_diff_raw(
self,
stream: "grpclib.server.Stream[ConfigDiffRawRequest, ConfigDiffRawResponse]",
) -> None:
request = stream.__aiter__()
await self._call_rpc_handler_server_stream(
self.config_diff_raw,
stream,
request,
)
async def __rpc_get_config_diff_summary(
self,
stream: "grpclib.server.Stream[GetConfigDiffSummaryRequest, GetConfigDiffSummaryResponse]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_config_diff_summary,
stream,
request,
)
async def __rpc_get_image_diff_v2(
self,
stream: "grpclib.server.Stream[GetImageDiffRequestV2, GetImageDiffResponseV2]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_image_diff_v2,
stream,
request,
)
async def __rpc_get_image_diff_v3(
self,
stream: "grpclib.server.Stream[GetImageDiffRequestV3, GetImageDiffResponseV3]",
) -> None:
request = await stream.recv_message()
await self._call_rpc_handler_server_stream(
self.get_image_diff_v3,
stream,
request,
)
def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
return {
"/compliancecheck.Compliance/GetConfigDiff": grpclib.const.Handler(
self.__rpc_get_config_diff,
grpclib.const.Cardinality.UNARY_STREAM,
GetConfigDiffRequest,
GetConfigDiffResponse,
),
"/compliancecheck.Compliance/GetConfig": grpclib.const.Handler(
self.__rpc_get_config,
grpclib.const.Cardinality.UNARY_STREAM,
GetConfigRequest,
GetConfigResponse,
),
"/compliancecheck.Compliance/GetDeviceStatus": grpclib.const.Handler(
self.__rpc_get_device_status,
grpclib.const.Cardinality.UNARY_STREAM,
GetDeviceStatusRequest,
GetDeviceStatusResponse,
),
"/compliancecheck.Compliance/GetImageDiff": grpclib.const.Handler(
self.__rpc_get_image_diff,
grpclib.const.Cardinality.UNARY_STREAM,
GetImageDiffRequest,
GetImageDiffResponse,
),
"/compliancecheck.Compliance/GetConfigDiffForTask": grpclib.const.Handler(
self.__rpc_get_config_diff_for_task,
grpclib.const.Cardinality.UNARY_STREAM,
GetConfigDiffForTaskRequest,
GetConfigDiffForTaskResponse,
),
"/compliancecheck.Compliance/GetConfigDiffSummaryForTask": grpclib.const.Handler(
self.__rpc_get_config_diff_summary_for_task,
grpclib.const.Cardinality.UNARY_STREAM,
GetConfigDiffSummaryForTaskRequest,
GetConfigDiffSummaryForTaskResponse,
),
"/compliancecheck.Compliance/GetImageDiffForTask": grpclib.const.Handler(
self.__rpc_get_image_diff_for_task,
grpclib.const.Cardinality.UNARY_STREAM,
GetImageDiffForTaskRequest,
GetImageDiffForTaskResponse,
),
"/compliancecheck.Compliance/GetProposedConfig": grpclib.const.Handler(
self.__rpc_get_proposed_config,
grpclib.const.Cardinality.UNARY_STREAM,
GetProposedConfigRequest,
GetProposedConfigResponse,
),
"/compliancecheck.Compliance/ConfigDiffRaw": grpclib.const.Handler(
self.__rpc_config_diff_raw,
grpclib.const.Cardinality.STREAM_STREAM,
ConfigDiffRawRequest,
ConfigDiffRawResponse,
),
"/compliancecheck.Compliance/GetConfigDiffSummary": grpclib.const.Handler(
self.__rpc_get_config_diff_summary,
grpclib.const.Cardinality.UNARY_STREAM,
GetConfigDiffSummaryRequest,
GetConfigDiffSummaryResponse,
),
"/compliancecheck.Compliance/GetImageDiffV2": grpclib.const.Handler(
self.__rpc_get_image_diff_v2,
grpclib.const.Cardinality.UNARY_STREAM,
GetImageDiffRequestV2,
GetImageDiffResponseV2,
),
"/compliancecheck.Compliance/GetImageDiffV3": grpclib.const.Handler(
self.__rpc_get_image_diff_v3,
grpclib.const.Cardinality.UNARY_STREAM,
GetImageDiffRequestV3,
GetImageDiffResponseV3,
),
}