Class LiveStateReader

java.lang.Object
com.eqixiac.equinix.design.plan.LiveStateReader

public final class LiveStateReader extends Object
Reads the live Fabric resources relevant to a plan. Read-only: it issues searches and GETs only.

Scope. When the plan names a project, routers and connections are searched with /project/projectId = <project>; otherwise by /name IN <planned names> (a plan with no project cannot see unmanaged resources, and the snapshot says so). From the results it keeps the routers whose name is planned or carries the plan's name prefix, and the connections whose additionalInfo carries the plan's deployment marker (PlanMarker), or whose name is planned or carries the prefix and whose own project is the plan's: a shared project's other resources are not the plan's business.

The server-side project filter is not trusted for connections. Observed read-only on 2026-11-12: POST /fabric/v4/connections/search with /project/projectId = returned 86 connections from 14 other projects, while the router search honours the filter. The project is therefore re-checked on every connection client-side, and connections recorded in a checkpoint are read by uuid (GET /fabric/v4/connections/{uuid}; HTTP 404 means gone), which does not depend on any search filter. Routing protocols are listed only for the connections kept; a failure to list them (for example a 403 on a connection owned by someone else) becomes a note, not an error.

  • Method Details

    • read

      public static LiveState read(FabricGateway fabric, DeploymentPlan plan)
      Reads the live state for a plan.
      Parameters:
      fabric - the Fabric client
      plan - the plan
      Returns:
      the snapshot
      Throws:
      EquinixServiceException - when a search itself fails
    • read

      public static LiveState read(FabricGateway fabric, DeploymentPlan plan, Checkpoint checkpoint)
      Reads the live state for a plan, also reading every connection the checkpoint records by uuid.
      Parameters:
      fabric - the Fabric client
      plan - the plan
      checkpoint - the deployment's checkpoint, or null
      Returns:
      the snapshot
      Throws:
      EquinixServiceException - when a search itself fails