synology_apm_repo.sdk.units.saas.raw_object module

RawObjectProvider: the SaaS fallback UnitProvider, listing the named objects of a version’s object-name index raw, with no service DB.

dispatch.py falls back to it when no application-layer provider recognizes a version (or its sub_type is unknown); Catalog.provider’s raw view requests it directly. It exposes internal index names and object ids, so it is a diagnostic view.

class synology_apm_repo.sdk.units.saas.raw_object.RawObjectProvider(repo, version)

Bases: AsyncClosing

UnitProvider over one SaaS Version’s raw object-name-index entries: a flat list under the version root, one leaf per index entry (or, given object_db_id, one per object in that ObjectDB), each a byte range of the version’s saas_obj. Build one with create.

async classmethod create(repo, version, saas_streams, *, object_db_id=None, shared=None)

Open the version’s saas_obj and its object-name index.

Parameters:
  • repo (DedupRepo) – The repository version belongs to.

  • version (Version) – The SaaS version to list.

  • saas_streams (SaasStreamCache) – Borrowed, not owned; the saas_obj stays cached there.

  • object_db_id (str | None) – List this ObjectDB’s objects by id instead of the index’s named entries.

  • shared (SharedSaasContext | None) – The version’s resolved stream object and index, when units/dispatch.py already resolved them; resolved here otherwise.

Raises:

NotFoundError – object_db_id is malformed or names another stream, or shared is omitted and the version’s saas_obj can’t be located.

async close()

Close the object_db_id ObjectDB and release this provider’s hold on the index’s; the borrowed stream stays open. Safe after a partial create() and more than once.

root()
async children(node, offset=0, limit=None)
async unit(node)

Open node as a restorable unit.

Raises: