Skip to content

Commit 05edf97

Browse files
committed
regen openapi + fix up PHD
1 parent eb3a76a commit 05edf97

File tree

13 files changed

+489
-2687
lines changed

13 files changed

+489
-2687
lines changed

lib/propolis-client/src/instance_spec.rs

Lines changed: 0 additions & 265 deletions
This file was deleted.

lib/propolis-client/src/lib.rs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@
44

55
//! A client for the Propolis hypervisor frontend's server API.
66
7-
#[cfg(not(feature = "falcon"))]
87
progenitor::generate_api!(
98
spec = "../../openapi/propolis-server.json",
109
interface = Builder,
1110
tags = Separate,
1211
patch = {
1312
// Add `Default` to types related to instance specs
1413
InstanceSpecV0 = { derives = [Default] },
15-
BackendSpecV0 = { derives = [Default] },
16-
DeviceSpecV0 = { derives = [Default] },
1714
Board = { derives = [Default] },
1815

1916
// Some Crucible-related bits are re-exported through simulated
2017
// sled-agent and thus require JsonSchema
2118
BootOrderEntry = { derives = [schemars::JsonSchema] },
22-
BootSettings = { derives = [schemars::JsonSchema] },
19+
BootSettings = { derives = [Default, schemars::JsonSchema] },
2320
DiskRequest = { derives = [schemars::JsonSchema] },
2421
VolumeConstructionRequest = { derives = [schemars::JsonSchema] },
2522
CrucibleOpts = { derives = [schemars::JsonSchema] },
@@ -33,32 +30,4 @@ progenitor::generate_api!(
3330
}
3431
);
3532

36-
#[cfg(feature = "falcon")]
37-
progenitor::generate_api!(
38-
spec = "../../openapi/propolis-server-falcon.json",
39-
interface = Builder,
40-
tags = Separate,
41-
patch = {
42-
// Add `Default` to types related to instance specs
43-
InstanceSpecV0 = { derives = [Default] },
44-
BackendSpecV0 = { derives = [Default] },
45-
DeviceSpecV0 = { derives = [Default] },
46-
Board = { derives = [Default] },
47-
48-
// Some Crucible-related bits are re-exported through simulated
49-
// sled-agent and thus require JsonSchema
50-
DiskRequest = { derives = [schemars::JsonSchema] },
51-
VolumeConstructionRequest = { derives = [schemars::JsonSchema] },
52-
CrucibleOpts = { derives = [schemars::JsonSchema] },
53-
Slot = { derives = [schemars::JsonSchema] },
54-
55-
PciPath = { derives = [
56-
Copy, Ord, Eq, PartialEq, PartialOrd
57-
] },
58-
59-
InstanceMetadata = { derives = [ PartialEq ] },
60-
}
61-
);
62-
63-
pub mod instance_spec;
6433
pub mod support;

lib/propolis-client/src/support.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ use tokio_tungstenite::tungstenite::{Error as WSError, Message as WSMessage};
1818
// re-export as an escape hatch for crate-version-matching problems
1919
pub use tokio_tungstenite::{tungstenite, WebSocketStream};
2020

21-
use crate::types::{
22-
Chipset, I440Fx, NetworkDeviceV0, PciPath, StorageDeviceV0,
23-
};
21+
use crate::types::{Chipset, I440Fx, PciPath};
2422
use crate::Client as PropolisClient;
2523

2624
const PCI_DEV_PER_BUS: u8 = 32;
@@ -48,22 +46,6 @@ impl Default for Chipset {
4846
}
4947
}
5048

51-
impl NetworkDeviceV0 {
52-
pub fn pci_path(&self) -> PciPath {
53-
match self {
54-
NetworkDeviceV0::VirtioNic(dev) => dev.pci_path,
55-
}
56-
}
57-
}
58-
impl StorageDeviceV0 {
59-
pub fn pci_path(&self) -> PciPath {
60-
match self {
61-
StorageDeviceV0::VirtioDisk(dev) => dev.pci_path,
62-
StorageDeviceV0::NvmeDisk(dev) => dev.pci_path,
63-
}
64-
}
65-
}
66-
6749
/// Clone of `InstanceSerialConsoleControlMessage` type defined in
6850
/// `propolis_api_types`, with which this must be kept in sync.
6951
///

0 commit comments

Comments
 (0)