Class EveryMetroUsedConstraint

java.lang.Object
com.eqixiac.equinix.design.constraint.EveryMetroUsedConstraint
All Implemented Interfaces:
Constraint

public final class EveryMetroUsedConstraint extends Object implements Constraint
Every metro of a design must carry a workload (primary or standby) or a cloud connection. A metro that carries nothing costs nothing in the model and would otherwise be added for free; it is not a real deployment. Applies only when the spec has workloads or clouds.
  • Field Details

  • Constructor Details

    • EveryMetroUsedConstraint

      public EveryMetroUsedConstraint()
  • Method Details

    • id

      public String id()
      Specified by:
      id in interface Constraint
      Returns:
      a stable id, lower_snake_case (for example max_latency)
    • check

      public ConstraintVerdict check(MetroPortfolio portfolio, DesignContext context)
      Description copied from interface: Constraint
      Checks a whole portfolio.
      Specified by:
      check in interface Constraint
      Parameters:
      portfolio - the candidate design
      context - the facts of this run
      Returns:
      the verdict with its reason