Class FabricCatalogLoader

java.lang.Object
com.eqixiac.equinix.design.optimizer.context.FabricCatalogLoader

public final class FabricCatalogLoader extends Object
Builds a CatalogDesignContext from live Fabric data, read-only, once per run: every page of GET /fabric/v4/metros (coordinates, region, country, geo scopes and zones, measured connectedMetros.avgLatency) and, when the spec names clouds, every page of the service profile search (which metros each cloud is reachable from).

Both traversals are bounded (100 pages). A traversal that stops on the bound or on a paging failure keeps what it read and says so in CatalogDesignContext.dataNotes(); a partial catalogue is never presented as complete.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Most pages read from one catalogue (100 items per page).
  • Method Summary

    Modifier and Type
    Method
    Description
    load(FabricGateway fabric, DesignSpec spec, CostModel costModel)
     
    static Set<String>
    zonesOf(Metro metro)
    The zones a metro belongs to, upper-case: each Fabric geo scope by name and by its ISO-style alias (SWITZERLAND and CH, CONUS and US...), plus each geo zone's code and name, plus zones derived from the metro's country: its ISO country code (so SG or IE can be named directly), EU for a member state and UK for GB.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MAX_PAGES

      public static final int MAX_PAGES
      Most pages read from one catalogue (100 items per page).
      See Also:
  • Method Details

    • load

      public static CatalogDesignContext load(FabricGateway fabric, DesignSpec spec, CostModel costModel)
      Parameters:
      fabric - the Fabric API (only read)
      spec - the design
      costModel - the cost model the context hands to plug-ins; may be null
      Returns:
      the context
    • zonesOf

      public static Set<String> zonesOf(Metro metro)
      The zones a metro belongs to, upper-case: each Fabric geo scope by name and by its ISO-style alias (SWITZERLAND and CH, CONUS and US...), plus each geo zone's code and name, plus zones derived from the metro's country: its ISO country code (so SG or IE can be named directly), EU for a member state and UK for GB. The derived zones matter because 20 of the 67 live metros carried no geo scope or zone on 2026-11-12. The geoZones constraint matches against these.
      Parameters:
      metro - a live metro
      Returns:
      the zone names