synology_apm_repo.sdk.units.device_pcps module¶
PcpsDiskTree: DeviceProvider’s PC/PS disk listing and
assembly. One physical disk can land as several fragment objects — see
_pcps_disk_key() for the grouping rule and PcpsDiskTree.open_disk
for reassembling a group into one VirtualDiskContentSource.
- class synology_apm_repo.sdk.units.device_pcps.PcpsDiskTree(provider)¶
Bases:
objectOne
DeviceProvider’s PC/PS disk listing/assembly — resolvescopy_target_version→copy_target_file→file_meta(FORMAT-SPEC.md: dedup data mapping chain) into disk nodes, and assembles a disk’s fragments into oneContentSourceonly when opened.- async object_nodes(*, offset=0, limit=None)¶
List this PC/PS version’s disks. Any registered
fidthat never resolved infile_metais summarized in one diagnostic node, appended on the first page only and only when it fits withinlimit.
- async open_disk(node, handle)¶
Assemble one PC/PS disk’s fragments into a
VirtualDiskContentSource, resolving them concurrently.Fragments that fail to resolve make the unit
degraded(the technical detail goes indetails["missing_fragments"]) instead of failing the whole disk; reads in their range come back as a hole. A successful assembly is cached per disk; a failed one is retried on the next call.- Raises:
NotFoundError – Every fragment failed to resolve.