Skip to content

Commit

Permalink
Merge pull request #4 from cdot65/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
cdot65 authored Jan 16, 2024
2 parents 3236db9 + e646318 commit f92c062
Show file tree
Hide file tree
Showing 7 changed files with 335 additions and 164 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,6 @@ cython_debug/
.env

# ignore my personal snapshots
snapshots/
assurance/snapshots/
assurance/reports/
assurance/readiness_checks/
File renamed without changes.
Empty file added assurance/reports/.gitkeep
Empty file.
Empty file added assurance/snapshots/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from .arp_table import ArpTableEntry

# trunk-ignore(ruff/F401)
from .content_version import ContentVersion
from .assurance_report import ReadinessCheckReport, SnapshotReport

# trunk-ignore(ruff/F401)
from .assurance_report import AssuranceReport
from .content_version import ContentVersion

# trunk-ignore(ruff/F401)
from .ip_sec_tunnel import IPSecTunnelEntry
Expand Down
25 changes: 24 additions & 1 deletion models/assurance_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .session_stats import SessionStats


class AssuranceReport(BaseModel):
class SnapshotReport(BaseModel):
hostname: str
arp_table: Optional[Dict[str, ArpTableEntry]] = None
content_version: Optional[ContentVersion] = None
Expand All @@ -20,3 +20,26 @@ class AssuranceReport(BaseModel):
nics: Optional[Dict[str, NetworkInterfaceStatus]] = None
routes: Optional[Dict[str, RouteEntry]] = None
session_stats: Optional[SessionStats] = None


class ReadinessCheckResult(BaseModel):
state: bool
reason: str


class ReadinessCheckReport(BaseModel):
active_support: Optional[ReadinessCheckResult] = None
arp_entry_exist: Optional[ReadinessCheckResult] = None
candidate_config: Optional[ReadinessCheckResult] = None
certificates_requirements: Optional[ReadinessCheckResult] = None
content_version: Optional[ReadinessCheckResult] = None
dynamic_updates: Optional[ReadinessCheckResult] = None
expired_licenses: Optional[ReadinessCheckResult] = None
free_disk_space: Optional[ReadinessCheckResult] = None
ha: Optional[ReadinessCheckResult] = None
ip_sec_tunnel_status: Optional[ReadinessCheckResult] = None
jobs: Optional[ReadinessCheckResult] = None
ntp_sync: Optional[ReadinessCheckResult] = None
panorama: Optional[ReadinessCheckResult] = None
planes_clock_sync: Optional[ReadinessCheckResult] = None
session_exist: Optional[ReadinessCheckResult] = None
Loading

0 comments on commit f92c062

Please sign in to comment.