synology_apm_repo.sdk.units.saas.composite_provider module

CompositeSaasProvider: bundles more than one already-built sub-provider behind one dispatch surface — composition, not one more workload built on provider.py’s own SaasWorkloadProvider base (see the class docstring for the shape this covers). See units/dispatch.py for its one construction site.

class synology_apm_repo.sdk.units.saas.composite_provider.CompositeSaasProvider(repo, version, sub_providers)

Bases: object

UnitProvider for the one shape no single-app provider covers: M365’s USER_EXCHANGE/ GROUP_EXCHANGE sub_types bundle Mail, Contacts and Calendars as three independently-populated services within the same version, all reachable at once — not alternatives to pick between. Every other SaaS sub_type maps 1:1 to one provider; this class is what a caller gets instead when more than one sub-provider recognizes the same version: a synthetic root ("Exchange") whose children are each sub-provider’s own root as siblings, with every deeper children()/unit() call routed back to whichever sub-provider owns that node.

Ref/key prefixing, not object identity: every Node handed out gets attrs["key"] rewritten to (tag, *original_key) (and its ref rebuilt to match), with the tag segment stripped back off before a node reaches the sub-provider that built it — a NodeRef round-tripped through str()/parse() carries this prefix as an ordinary extra segment, so it resolves correctly on a fresh lookup like any other multi-segment ref.

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