cadrumo.application.storage_management.models module¶
Typed reports the storage-management service returns.
Every model here is an operator-facing projection of the core storage taxonomy plus what the filesystem currently holds.
See also
STORAGE_TAXONOMYThe declaration these rows project.
- class StorageAreaDisposition(*values)[source]¶
Bases:
StrEnumAggregate lifecycle character of an operator-facing storage area.
- DURABLE¶
- RECLAIMABLE¶
- MIXED¶
- class StorageCheckIssueKind(*values)[source]¶
Bases:
StrEnumPublic, topology-neutral storage check issue kinds.
- MISSING_PATH¶
- PATH_TYPE_MISMATCH¶
- PERMISSIONS_DRIFTED¶
- class StorageOccupancy(*values)[source]¶
Bases:
StrEnumWhat a declared location currently holds on disk.
UNRESOLVEDis a distinct outcome fromABSENTand the distinction is load-bearing: a bucket-scoped member with no active profile has no single path to look at, which is not the same fact as a path that was looked at and found missing. Collapsing the two would report every per-bucket member as absent on a machine that simply has no profile logged in.- UNRESOLVED¶
- ABSENT¶
- EMPTY¶
- POPULATED¶
- class StorageAreaInventoryRow(**data)[source]¶
Bases:
_StorageReportAggregate disk use and lifecycle disposition for one public area.
- Parameters:
data (Any)
- area: StorageArea¶
- occupancy: StorageOccupancy¶
- disposition: StorageAreaDisposition¶
- reclaimable: bool¶
- resolved_paths: NonNegativeInt¶
- entry_count: NonNegativeInt¶
- footprint_bytes: NonNegativeInt¶
- class StorageAreaInventoryReport(**data)[source]¶
Bases:
_StorageReportOne aggregate row for each stable operator-facing storage area.
- Parameters:
data (Any)
- storage_root: Path¶
- rows: tuple[StorageAreaInventoryRow, ...]¶
- class StorageTreeIssueKind(*values)[source]¶
Bases:
StrEnumThe ways the materialised tree can disagree with its declaration.
- MISSING_DIRECTORY¶
- FILE_WHERE_DIRECTORY_EXPECTED¶
- DIRECTORY_WHERE_FILE_EXPECTED¶
- ROOT_PERMISSIONS_DRIFTED¶
- class StorageTreeIssue(**data)[source]¶
Bases:
_StorageReportOne disagreement between the declared tree and the tree on disk.
- Parameters:
data (Any)
- kind: StorageTreeIssueKind¶
- path: Path¶
- area: StorageArea | None¶
- detail: str¶
- class StorageTreeCheckReport(**data)[source]¶
Bases:
_StorageReportRead-only verdict on the materialised tree.
root_mode_enforcedrecords whether the host implements POSIX mode bits at all. A permission finding is only meaningful where it can be enforced, so the flag travels with the verdict instead of a silent absence of findings standing in for “checked and clean” on a platform that never checks.- Parameters:
data (Any)
- storage_root: Path¶
- healthy: bool¶
- root_mode_enforced: bool¶
- checked_locations: NonNegativeInt¶
- issues: tuple[StorageTreeIssue, ...]¶
- class StorageInitReport(**data)[source]¶
Bases:
_StorageReportOutcome of materialising the declared tree.
creatednames only the directories this call brought into existence, so a repeat run reports an empty tuple rather than restating the whole tree.- Parameters:
data (Any)
- storage_root: Path¶
- created: tuple[Path, ...]¶
- already_present: int¶
- class StorageReclaimReport(**data)[source]¶
Bases:
_StorageReportOutcome of reclaiming every regenerable target in one public area.
- Parameters:
data (Any)
- area: StorageArea¶
- target_count: NonNegativeInt¶
- removed_entries: NonNegativeInt¶
- retained_entries: int¶
- retained_paths: tuple[Path, ...]¶
The entries that survived, so a caller can say why rather than only how many.
Deliberately not on the wire payload. A count is what the operator needs in the result; the paths exist so the boundary can identify a benign, every-time retention – an open log file – and word its warning accordingly, instead of raising the same alarm for a locked file and a failed delete.