Skip to content

Commit

Permalink
pick greg's turbo nit
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jan 12, 2024
1 parent 88be8ab commit 5d165ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions crates/propolis-api-types/src/instance_spec/v0/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ pub struct DeviceSpecV0 {
pub serial_ports: HashMap<SpecKey, components::devices::SerialPort>,
pub pci_pci_bridges: HashMap<SpecKey, components::devices::PciPciBridge>,

/// This field has a default value (`None`) to allow for
/// backwards-compatibility when upgrading from a Propolis
/// version that does not support this device. If the pvpanic device was not
/// present in the spec being deserialized, a `None` will be produced,
/// rather than rejecting the spec.
// This field has a default value (`None`) to allow for
// backwards-compatibility when upgrading from a Propolis
// version that does not support this device. If the pvpanic device was not
// present in the spec being deserialized, a `None` will be produced,
// rather than rejecting the spec.
#[serde(default)]
/// Skip serializing this field if it is `None`. This is so that Propolis
/// versions with support for this device are backwards-compatible with
/// older versions that don't, as long as the spec doesn't define a pvpanic
/// device --- if there is no panic device, skipping the field from the spec
/// means that the older version will still accept the spec.
// Skip serializing this field if it is `None`. This is so that Propolis
// versions with support for this device are backwards-compatible with
// older versions that don't, as long as the spec doesn't define a pvpanic
// device --- if there is no panic device, skipping the field from the spec
// means that the older version will still accept the spec.
#[serde(skip_serializing_if = "Option::is_none")]
pub qemu_pvpanic: Option<components::devices::QemuPvpanic>,

Expand Down
1 change: 0 additions & 1 deletion openapi/propolis-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@
},
"qemu_pvpanic": {
"nullable": true,
"description": "This field has a default value (`None`) to allow for backwards-compatibility when upgrading from a Propolis version that does not support this device. If the pvpanic device was not present in the spec being deserialized, a `None` will be produced, rather than rejecting the spec. Skip serializing this field if it is `None`. This is so that Propolis versions with support for this device are backwards-compatible with older versions that don't, as long as the spec doesn't define a pvpanic device --- if there is no panic device, skipping the field from the spec means that the older version will still accept the spec.",
"allOf": [
{
"$ref": "#/components/schemas/QemuPvpanic"
Expand Down

0 comments on commit 5d165ec

Please sign in to comment.