Skip to content

Commit b15308a

Browse files
committed
feat(schema): GREEN — rule 18, remote onprem systems must itemize product_nodes
check_deployment_rules now raises for deployment=onprem + storage_location remote/remote_and_local when product_nodes is absent or empty. Once the section exists, rules 2 and 6 already enforce the per-node/per-switch power blocks, so rule 18 closes the only gap that let a remote-storage system publish a blank Provisioned Power (W) cell. storage_location 'local' is exempt (drives draw through client PSUs, excluded from the power sum by definition; Chassis.rack_units ge=1 + rule 11's total of 0 make product-side entries inexpressible), as is cloud (power fields are forbidden there). Verified against the live tree: fires on Everpure FBEXA + TuringData F9200 (message names the fix), silent on FarmGPU potato + SAMSUNG MEMORY_AE which are otherwise fully schema-valid. Surfaces through system_yaml_schema_checks as an ERROR under the 2.1.7 mapping.
1 parent 45fda49 commit b15308a

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

mlpstorage_py/system_description/schema_validator.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,26 @@ class SystemUnderTest(StrictModel):
334334

335335
@model_validator(mode='after')
336336
def check_deployment_rules(self) -> 'SystemUnderTest':
337-
# Rules 1–6 (onprem) and 7–10 (cloud)
337+
# Rules 1–6 + 18 (onprem) and 7–10 (cloud)
338338
if self.deployment == DeploymentMode.onprem:
339+
# Rule 18: external storage must be itemized. The results
340+
# table's Provisioned Power (W) cell derives from the power
341+
# blocks on product_nodes/product_switches; a remote-storage
342+
# system without a product_nodes section silently publishes a
343+
# blank cell. 'local' systems are exempt — their storage draws
344+
# through client PSUs (excluded from the power sum by
345+
# definition) and rule 11 pins their rack-unit total to 0.
346+
storage_loc = self.solution.architecture.storage_location
347+
if (storage_loc in (StorageLocation.remote,
348+
StorageLocation.remote_and_local)
349+
and not self.product_nodes):
350+
raise ValueError(
351+
f"product_nodes is required for onprem deployment when "
352+
f"storage_location is '{storage_loc.value}' — the "
353+
f"storage-side hardware and its power supplies must be "
354+
f"itemized (the results table's Provisioned Power (W) "
355+
f"cell is derived from them)"
356+
)
339357
for i, node in enumerate(self.product_nodes or []):
340358
if node.chassis.rack_units is None:
341359
raise ValueError(f"product_nodes[{i}].chassis.rack_units is required for onprem deployment")

0 commit comments

Comments
 (0)