22 lines
507 B
Python
22 lines
507 B
Python
from typing import Protocol
|
|
|
|
from .adapters import (
|
|
ApplyResult,
|
|
Capability,
|
|
DiscoveredObject,
|
|
Endpoint,
|
|
NormalizedObject,
|
|
PlanAction,
|
|
)
|
|
|
|
|
|
class AdapterPlugin(Protocol):
|
|
name: str
|
|
endpoint: Endpoint
|
|
capabilities: frozenset[Capability]
|
|
|
|
def connect(self) -> None: ...
|
|
def discover(self, object_type: str) -> list[DiscoveredObject]: ...
|
|
def apply(self, action: PlanAction) -> ApplyResult | None: ...
|
|
def verify(self, object: NormalizedObject) -> bool: ...
|