fdfb9edfb0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
679 B
Python
43 lines
679 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class NodeConfig(BaseModel):
|
|
name: str
|
|
host: str
|
|
agent_port: int = 8889
|
|
|
|
|
|
class NodeStatus(BaseModel):
|
|
name: str
|
|
host: str
|
|
healthy: bool
|
|
containers_total: int = 0
|
|
error: str | None = None
|
|
|
|
|
|
class ServiceRef(BaseModel):
|
|
node: str
|
|
container: str
|
|
|
|
|
|
class Group(BaseModel):
|
|
id: str
|
|
name: str
|
|
services: list[ServiceRef] = []
|
|
|
|
|
|
class GroupsData(BaseModel):
|
|
groups: list[Group] = []
|
|
|
|
|
|
class ServiceInfo(BaseModel):
|
|
id: str
|
|
name: str
|
|
node: str
|
|
status: str
|
|
image: str
|
|
created: str
|
|
uptime: str | None = None
|
|
is_swarm: bool = False
|
|
swarm_service: str | None = None
|