You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This struct is almost a 1:1 duplication of `struct MachineConfig`, with
only a single deviation when it comes to CPU template handling (see
below). This makes it very annoying to add new fields to the
/machine-config endpoint, because counter-intuitively we have to
hand-edit at least 3 structs to add new fields to.
We can get rid of this duplication by merging VmConfig and MachineConfig
into just `MachineConfig` (that's what the endpoint is called, so having
the struct be the same makes sense). We now need to handle a bit of
nasty-ness when it comes to CPU templates, because /machine-config can
only be used for specifying static cpu templates, while a VmConfig is
used to hold whatever CPU template is stored, in whatever way. However,
we can handle this at the serde layer, by making serialize/deserialize
ignore the field if it doesnt contain a static template. This is ugly,
but since static templates are deprecated, we have line of sight to
getting rid of this weirdness when we release 2.0.
While we're at it, opportunistically rename functions etc to uniformly
call this thing a "machine config" instead of a "vm config".
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments