mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 05:30:46 +08:00
Add LLDP collect retry for failed and weak-evidence NEs.
Mirror config-sync retry_failed so operators can re-collect hard failures and empty/stub LLDP results without re-running the full scope. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
527472976a
commit
dcdf4147a6
10 changed files with 423 additions and 23 deletions
|
|
@ -3,7 +3,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
from typing import Any, Literal
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
|
@ -43,6 +43,8 @@ class LldpCollectJobSummary(BaseModel):
|
|||
status: str = ""
|
||||
total: int = 0
|
||||
done: int = 0
|
||||
success_count: int = 0
|
||||
fail_count: int = 0
|
||||
edges_added: int = 0
|
||||
edges_updated: int = 0
|
||||
edges_stale: int = 0 # legacy alias of edges_missing
|
||||
|
|
@ -66,6 +68,11 @@ class LldpCollectDashboardOut(BaseModel):
|
|||
next_due_at: datetime | None = None
|
||||
|
||||
|
||||
class LldpCollectStartBody(BaseModel):
|
||||
mode: Literal["full", "retry_failed"] = "full"
|
||||
job_id: str | None = None
|
||||
|
||||
|
||||
class LldpCollectStartOut(BaseModel):
|
||||
ok: bool = True
|
||||
job: dict[str, Any] = Field(default_factory=dict)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue