@@ -186,33 +186,11 @@ class BuildConfig:
186186
187187 build_defaults : BuildDefaults = field (default_factory = BuildDefaults )
188188 build_overrides : dict [str , dict [str , Any ]] = field (default_factory = dict )
189- # Capacity allocation policy
190- # Hardware-aware capacity allocation is disabled by default for
191- # strict backward compatibility.
192- capacity_allocation : "BuildCapacityAllocationConfig" = field ( # type: ignore[name-defined]
193- default_factory = lambda : BuildCapacityAllocationConfig ()
194- )
195189 tm_sizing : "BuildTmSizingConfig" = field ( # type: ignore[name-defined]
196190 default_factory = lambda : BuildTmSizingConfig ()
197191 )
198192
199193
200- @dataclass
201- class BuildCapacityAllocationConfig :
202- """Hardware-aware capacity allocation settings.
203-
204- When enabled, capacity allocation for dc_to_pop, intra_metro, and
205- inter_metro links becomes aware of platform capacities. Base capacities
206- from configuration are treated as minimums. Remaining capacity is
207- allocated to inter-metro links in discrete increments.
208-
209- Attributes:
210- enabled: Turn on HW-aware allocation. Default False.
211- """
212-
213- enabled : bool = False
214-
215-
216194@dataclass
217195class BuildTmSizingConfig :
218196 """Traffic-matrix-based capacity sizing configuration.
@@ -626,17 +604,12 @@ def _from_dict(cls, config_dict: dict[str, Any]) -> TopologyConfig:
626604
627605 build_defaults_dict = build_dict .get ("build_defaults" , {})
628606 build_overrides_list = build_dict .get ("build_overrides" , [])
629- capacity_alloc_dict = build_dict .get ("capacity_allocation" , {})
630607 tm_sizing_dict = build_dict .get ("tm_sizing" , {})
631608
632609 if not isinstance (build_defaults_dict , dict ):
633610 raise ValueError ("'build_defaults' must be a dictionary" )
634611 if not isinstance (build_overrides_list , list ):
635612 raise ValueError ("'build_overrides' must be a list of override entries" )
636- if capacity_alloc_dict is None :
637- capacity_alloc_dict = {}
638- if not isinstance (capacity_alloc_dict , dict ):
639- raise ValueError ("'capacity_allocation' must be a dictionary if provided" )
640613 if tm_sizing_dict is None :
641614 tm_sizing_dict = {}
642615 if not isinstance (tm_sizing_dict , dict ):
@@ -698,18 +671,6 @@ def _from_dict(cls, config_dict: dict[str, Any]) -> TopologyConfig:
698671 inter_metro_link = inter_metro_link ,
699672 dc_to_pop_link = dc_to_pop_link ,
700673 )
701- # Capacity allocation configuration
702- # Strictly allow only the supported key 'enabled'
703- _allowed_ca_keys = {"enabled" }
704- _extra_keys = set (capacity_alloc_dict .keys ()) - _allowed_ca_keys
705- if _extra_keys :
706- raise ValueError (
707- f"Unknown keys in 'build.capacity_allocation': { _extra_keys } . Allowed keys: { _allowed_ca_keys } "
708- )
709- capacity_allocation = BuildCapacityAllocationConfig (
710- enabled = bool (capacity_alloc_dict .get ("enabled" , False ))
711- )
712-
713674 # TM-based sizing configuration
714675 _allowed_tm_keys = {
715676 "enabled" ,
@@ -792,7 +753,6 @@ def _from_dict(cls, config_dict: dict[str, Any]) -> TopologyConfig:
792753 build = BuildConfig (
793754 build_defaults = build_defaults ,
794755 build_overrides = normalized_overrides ,
795- capacity_allocation = capacity_allocation ,
796756 tm_sizing = tm_sizing ,
797757 )
798758
0 commit comments