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: object

One DeviceProvider’s PC/PS disk listing/assembly — resolves copy_target_version → copy_target_file → file_meta (FORMAT-SPEC.md: dedup data mapping chain) into disk nodes, and assembles a disk’s fragments into one ContentSource only when opened.

async object_nodes(*, offset=0, limit=None)

List this PC/PS version’s disks. Any registered fid that never resolved in file_meta is summarized in one diagnostic node, appended on the first page only and only when it fits within limit.

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 in details["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.