Hub-and-Spoke Umbau: Multi-Tenant Zentrale + Satellite-Agent
- Backend: Customer/Satellite Models, customer_id auf Server/Job/Audit - Satellite-API: heartbeat, poll (atomares Claiming), logs, result, scan-result, health-report - Auth via X-Api-Key (SHA-256 gehasht) - Job-Queue: pending/claimed/running/success/failed + Stale-Janitor - Batch-Trigger: ein Job pro Server, Satellite arbeitet sequenziell ab - Credentials bleiben lokal: nur symbolische credential_ref zentral - Neues Paket satellite/: Pull-Loop, WinRM/SSH/CAU/Scanner, PyInstaller-tauglich - Frontend: Kunden-Switcher, Satelliten-View, Polling statt WebSocket - Entfernt: WebSocket/Socket.io, Redis, zentrale Credentials, JobRunner - Docs: README/AGENTS/PROMPT auf neue Architektur aktualisiert
This commit is contained in:
@@ -8,13 +8,14 @@ from app.models.server import ServerType
|
||||
|
||||
|
||||
class ServerCreate(BaseModel):
|
||||
customer_id: int
|
||||
name: str = Field(min_length=1, max_length=255)
|
||||
hostname: str = Field(min_length=1, max_length=255)
|
||||
port: int = 5985
|
||||
type: ServerType = ServerType.WINDOWS
|
||||
description: str | None = None
|
||||
tags: str | None = None
|
||||
credential_id: int | None = None
|
||||
credential_ref: str | None = None
|
||||
|
||||
|
||||
class ServerUpdate(BaseModel):
|
||||
@@ -24,29 +25,24 @@ class ServerUpdate(BaseModel):
|
||||
type: ServerType | None = None
|
||||
description: str | None = None
|
||||
tags: str | None = None
|
||||
credential_id: int | None = None
|
||||
credential_ref: str | None = None
|
||||
|
||||
|
||||
class ServerRead(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: int
|
||||
customer_id: int
|
||||
name: str
|
||||
hostname: str
|
||||
port: int
|
||||
type: ServerType
|
||||
description: str | None
|
||||
tags: str | None
|
||||
credential_id: int | None
|
||||
credential_ref: str | None
|
||||
last_health_at: datetime | None
|
||||
last_health_ok: bool | None
|
||||
last_health_message: str | None
|
||||
discovered_by_scan: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
|
||||
class HealthCheckResult(BaseModel):
|
||||
server_id: int
|
||||
ok: bool
|
||||
latency_ms: float | None = None
|
||||
message: str
|
||||
checked_at: datetime
|
||||
|
||||
Reference in New Issue
Block a user