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_ida realobject_table.object_idint) or("pcps", disk_uuid, disk_index)(PC/PS, both real strings parsed out of the fragment filename bydevice_pcps._pcps_disk_key). This alias lets mypy catch a wrong-shape tuple introduced anywhere along that flow, even though the ultimateobject_idvalue 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.attrskey (unlike_DiskFsSharedAttrs’s own keys, this one is part of the cross-layer contract): set on a “<name>(filesystem)” sibling root to the disk-imageNode’s ownrefit 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 parsingnametext or assuming list adjacency.
- class synology_apm_repo.sdk.units.device_disk_fs.DiskFsSibling(provider)¶
Bases:
objectOne
DeviceProvider’s disk-fs sibling axis: builds the “<name>(filesystem)” node next to a disk-image leaf, and lazily parses it viaDiskFilesystemthe 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 (resolveis what actually parses).source_nodeis the disk-imageNodethe caller already built for the same disk — stashed here (not re-derived) soresolvecan reuse the owningDeviceProvider’s own existingunit()dispatch to get that disk’s already-correctContentSource, 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)¶