Class DriftDetector

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

public final class DriftDetector extends Object
Compares a plan with a LiveState snapshot. A pure function: no I/O.

Matching, first hit wins: the uuid recorded in the checkpoint (when one is given); for a connection, the PlanMarker ("eqxSdkDeployment" equal to the plan's deployment name and "eqxSdkKey" equal to the step key); the exact planned name; for a routing protocol, the only live protocol of the planned type on the matched connection. A live resource that is DEPROVISIONING/DEPROVISIONED (or a CANCELLED connection) never matches.

Compared fields. Cloud Router: name, metro, package, notification recipients, project. Connection: name, type, bandwidth, A-side router, Z-side router (backbone), Z-side service profile, seller region, peering type, notification recipients. Routing protocol: DIRECT interface address; BGP customer peer address (compared without the prefix length), customer ASN and BFD. Patchable in place, per the Fabric v4 spec's PATCH examples: router name, package and notifications; connection name, bandwidth and notifications. Everything else is reported, never forced.

  • Method Details

    • diff

      public static PlanDiff diff(DeploymentPlan plan, LiveState live, Checkpoint checkpoint)
      Diffs a plan against live state.
      Parameters:
      plan - the plan
      live - the snapshot
      checkpoint - the deployment's checkpoint, or null
      Returns:
      the diff