28 lines
596 B
Python
28 lines
596 B
Python
from __future__ import annotations
|
|
|
|
from app.models.common import APIModel, DiskStatus, OverallStatus, SourceStatus, TimestampedResponse
|
|
|
|
|
|
class StorageSummary(APIModel):
|
|
overall_status: OverallStatus
|
|
source_status: SourceStatus
|
|
critical_disks: int
|
|
warning_disks: int
|
|
total_disks: int
|
|
|
|
|
|
class StorageDisk(APIModel):
|
|
name: str
|
|
mount: str
|
|
used_gb: float
|
|
total_gb: float
|
|
free_gb: float
|
|
usage_percent: float
|
|
status: DiskStatus
|
|
|
|
|
|
class StorageResponse(TimestampedResponse):
|
|
summary: StorageSummary
|
|
root: StorageDisk
|
|
disks: list[StorageDisk]
|