Add host drives section for non-enclosure drives

This commit is contained in:
2026-03-07 05:16:30 +00:00
parent 927a5ccf3a
commit 798308d2bf
4 changed files with 257 additions and 0 deletions

View File

@@ -76,12 +76,34 @@ class EnclosureWithDrives(BaseModel):
slots: list[SlotWithDrive]
class HostDrive(BaseModel):
device: str
drive_type: str = "disk"
model: str | None = None
serial: str | None = None
wwn: str | None = None
firmware: str | None = None
capacity_bytes: int | None = None
smart_healthy: bool | None = None
smart_supported: bool = True
temperature_c: int | None = None
power_on_hours: int | None = None
reallocated_sectors: int | None = None
pending_sectors: int | None = None
uncorrectable_errors: int | None = None
zfs_pool: str | None = None
zfs_vdev: str | None = None
zfs_state: str | None = None
health_status: str = "healthy"
class Overview(BaseModel):
healthy: bool
drive_count: int
warning_count: int
error_count: int
enclosures: list[EnclosureWithDrives]
host_drives: list[HostDrive] = []
class HealthCheck(BaseModel):