synology_apm_repo.sdk.units.device_disk_fs module

DiskFsSibling: the units/content/disk_fs/-backed “filesystem inside a disk image” axis, additive to a disk-image leaf built by either of units/device.py’s two disk axes (VM’s own _object_nodes(), or units/device_pcps.py’s PcpsDiskTree) — the whole-image node keeps working unchanged either way: when Dissect can’t recognize any filesystem on a disk, this sibling is simply absent or shows one diagnostic leaf explaining why, never affecting the disk-image node itself.

Resolution goes through the owning DeviceProvider’s own unit (never duplicated here) so this class never needs to know whether the disk image it’s parsing came from the VM path or a PC/PS VirtualDiskContentSource — both already resolve to the same ContentSource shape through that one call.

synology_apm_repo.sdk.units.device_disk_fs.DiskKey = tuple[str, int] | tuple[str, str, str]

A disk-fs sibling’s own stable cache key — either ("object", object_id) (VM/FS, object_id a real object_table.object_id int) or ("pcps", disk_uuid, disk_index) (PC/PS, both real strings parsed out of the fragment filename by device_pcps._pcps_disk_key). This alias lets mypy catch a wrong-shape tuple introduced anywhere along that flow, even though the ultimate object_id value itself still originates from an untyped sqlite row unpack (a separate, much broader gap this alias doesn’t attempt to close).

synology_apm_repo.sdk.units.device_disk_fs.DISK_FS_SIBLING_REF_ATTR = 'disk_fs_sibling_ref'

Public Node.attrs key (unlike _DiskFsSharedAttrs’s own keys, this one is part of the cross-layer contract): set on a “<name> (filesystem)” sibling root to the disk-image Node’s own ref it sits beside. Lets a caller associate the two — e.g. a verbose-mode attrs dump, or a future CLI/TUI feature that wants to relate a disk image to its own parsed filesystem — without parsing name text or assuming list adjacency.

class synology_apm_repo.sdk.units.device_disk_fs.DiskFsSibling(provider)

Bases: object

One DeviceProvider’s disk-fs sibling axis: builds the “<name> (filesystem)” node next to a disk-image leaf, and lazily parses it via DiskFilesystem the first time someone navigates into it — never eagerly for every disk in a listing.

root_node(*, disk_key, source_node, name)

The “<name> (filesystem)” sibling next to a disk-image leaf — pure construction, no I/O (resolve is what actually parses). source_node is the disk-image Node the caller already built for the same disk — stashed here (not re-derived) so resolve can reuse the owning DeviceProvider’s own existing unit() dispatch to get that disk’s already-correct ContentSource, instead of duplicating VM/PC-PS resolution logic a third time.

async resolve(disk_key, node)
diagnostic_node(node)
async children(node, *, offset=0, limit=None)
async open_entry(node)