Skip to content

Commit 208ad03

Browse files
authored
Merge pull request #402 from rackerlabs/flavor-cpu-model
feat(schema): switch cpu_models to cpu_model
2 parents 33b075b + a12a662 commit 208ad03

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

python/ironic-understack/ironic_understack/flavor_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def from_yaml(yaml_str: str) -> "FlavorSpec":
3434
model=data["model"],
3535
memory_gb=data["memory_gb"],
3636
cpu_cores=data["cpu_cores"],
37-
cpu_model=data.get("cpu_model", data.get("cpu_models", [""]).pop()),
37+
cpu_model=data["cpu_model"],
3838
drives=data["drives"],
3939
pci=data.get("pci", []),
4040
)

schema/flavor.schema.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@
2525
"description": "Processor model",
2626
"type": "string"
2727
},
28-
"cpu_models": {
29-
"description": "Processor models",
30-
"type": "array",
31-
"items": {
32-
"type": "string",
33-
"description": "Processor model"
34-
},
35-
"minItems": 1,
36-
"maxItems": 1
37-
},
3828
"memory_gb": {
3929
"description": "Total memory in GB",
4030
"type": "number"
@@ -80,5 +70,5 @@
8070
}
8171
}
8272
},
83-
"required": [ "name", "manufacturer", "model", "cpu_cores", "cpu_models", "memory_gb", "drives" ]
73+
"required": [ "name", "manufacturer", "model", "cpu_cores", "cpu_model", "memory_gb", "drives" ]
8474
}

0 commit comments

Comments
 (0)