Skip to content

Read adapter: diracx RSS calls + response translation #891

@aldbr

Description

@aldbr

Description

Build a self-contained read adapter module that calls the diracx RSS API (phase 1 routes) and returns data in the legacy format expected by the ResourceStatus and SiteStatus singletons' cache refresh methods.

The module owns two responsibilities:

  1. Client calls to the diracx RSS endpoints using the generated diracx client, including iterating over all configured VOs and merging results to match the current vO="all" behavior.
  2. Response translation from diracx AllowedStatus / BannedStatus Pydantic models into the legacy-shaped structures the singletons build their cache entries from.

The adapter is a temporary shim that will be replaced by a standard legacy adapter once phase 3 ships the write API.

Scope

  • All element types currently handled by the singletons: StorageElement (with its 4 access types — read, write, check, remove), ComputingElement, FTS, and Site.
  • Mapping from diracx AllowedStatus / BannedStatus to the structures the singletons build their cache entries from.
  • VO handling: iterate over all configured VOs and merge results.

Non-goals

  • No wiring into the singletons (that's sub-issue C).
  • No feature flag (that's sub-issue C).
  • No caching inside the adapter — the singletons' existing RSSCache stays on top.

Reference

Acceptance criteria

  • Module exposes a function per element type, accepting a diracx client and returning legacy-shaped data.
  • Unit tests against a mocked diracx client cover every element type.
  • Golden tests compare output to the format currently produced by the legacy RPC path.
  • No dependency on DIRAC singletons, or the DIRAC CS.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions