netx/netx_api/collection_schemas.py
oliver a5a3a4f156 Add topology classify inventory, fabric lifecycle, and broader collect targets.
Treat Fabric as an inventory sheet for role/region tagging and slices; detach fabric links on managed/UME delete instead of cascading map deletes. Extend collection to all managed and UME NEs, show NE source in management, and refine canvas vendor icon tones.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 11:09:58 +08:00

43 lines
932 B
Python

from __future__ import annotations
from datetime import datetime
from pydantic import BaseModel, Field
class CollectionJobCreate(BaseModel):
title: str = ""
commands: str = Field(min_length=1)
ne_ids: list[str] = Field(default_factory=list)
ume_ne_ids: list[str] = Field(default_factory=list)
class CollectionRunOut(BaseModel):
id: str
job_id: str
ne_id: str
ne_source: str = "managed"
ne_name: str
ne_ip: str
status: str
message: str
output_rel_path: str
has_output: bool
started_at: datetime | None
ended_at: datetime | None
class CollectionJobOut(BaseModel):
id: str
title: str
commands: str
status: str
ne_count: int
success_count: int
fail_count: int
output_count: int = 0
error_message: str
created_at: datetime
started_at: datetime | None
ended_at: datetime | None
last_run_at: datetime | None = None