Use crate name when emitting derive for tests (#641)
This commit is contained in:
parent
c3d4077f0c
commit
2fd9260fc4
|
@ -7,7 +7,7 @@ pub mod types {
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct Task {
|
pub struct Task {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -28,7 +28,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct TaskEvent {
|
pub struct TaskEvent {
|
||||||
pub payload: String,
|
pub payload: String,
|
||||||
pub seq: u32,
|
pub seq: u32,
|
||||||
|
@ -48,7 +48,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct TaskOutput {
|
pub struct TaskOutput {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub path: String,
|
pub path: String,
|
||||||
|
@ -67,7 +67,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct TaskSubmit {
|
pub struct TaskSubmit {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
|
@ -87,7 +87,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct TaskSubmitResult {
|
pub struct TaskSubmitResult {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct UploadedChunk {
|
pub struct UploadedChunk {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct UserCreate {
|
pub struct UserCreate {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct UserCreateResult {
|
pub struct UserCreateResult {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -157,7 +157,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WhoamiResult {
|
pub struct WhoamiResult {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -175,7 +175,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct Worker {
|
pub struct Worker {
|
||||||
pub deleted: bool,
|
pub deleted: bool,
|
||||||
pub id: String,
|
pub id: String,
|
||||||
|
@ -199,7 +199,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerAddOutput {
|
pub struct WorkerAddOutput {
|
||||||
pub chunks: Vec<String>,
|
pub chunks: Vec<String>,
|
||||||
pub path: String,
|
pub path: String,
|
||||||
|
@ -218,7 +218,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerAppendTask {
|
pub struct WorkerAppendTask {
|
||||||
pub payload: String,
|
pub payload: String,
|
||||||
pub stream: String,
|
pub stream: String,
|
||||||
|
@ -237,7 +237,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerBootstrap {
|
pub struct WorkerBootstrap {
|
||||||
pub bootstrap: String,
|
pub bootstrap: String,
|
||||||
pub token: String,
|
pub token: String,
|
||||||
|
@ -255,7 +255,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerBootstrapResult {
|
pub struct WorkerBootstrapResult {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerCompleteTask {
|
pub struct WorkerCompleteTask {
|
||||||
pub failed: bool,
|
pub failed: bool,
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerPingResult {
|
pub struct WorkerPingResult {
|
||||||
pub poweroff: bool,
|
pub poweroff: bool,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -308,7 +308,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerPingTask {
|
pub struct WorkerPingTask {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub output_rules: Vec<String>,
|
pub output_rules: Vec<String>,
|
||||||
|
@ -327,7 +327,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkerTask {
|
pub struct WorkerTask {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -346,7 +346,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct WorkersResult {
|
pub struct WorkersResult {
|
||||||
pub workers: Vec<Worker>,
|
pub workers: Vec<Worker>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ pub mod types {
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct EnrolBody {
|
pub struct EnrolBody {
|
||||||
pub host: String,
|
pub host: String,
|
||||||
pub key: String,
|
pub key: String,
|
||||||
|
@ -25,7 +25,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct GlobalJobsResult {
|
pub struct GlobalJobsResult {
|
||||||
pub summary: Vec<ReportSummary>,
|
pub summary: Vec<ReportSummary>,
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct OutputRecord {
|
pub struct OutputRecord {
|
||||||
pub msg: String,
|
pub msg: String,
|
||||||
pub stream: String,
|
pub stream: String,
|
||||||
|
@ -61,7 +61,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct PingResult {
|
pub struct PingResult {
|
||||||
pub host: String,
|
pub host: String,
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
|
@ -79,7 +79,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct ReportFinishBody {
|
pub struct ReportFinishBody {
|
||||||
pub duration_millis: usize,
|
pub duration_millis: usize,
|
||||||
pub end_time: chrono::DateTime<chrono::offset::Utc>,
|
pub end_time: chrono::DateTime<chrono::offset::Utc>,
|
||||||
|
@ -99,7 +99,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct ReportId {
|
pub struct ReportId {
|
||||||
pub host: String,
|
pub host: String,
|
||||||
pub job: String,
|
pub job: String,
|
||||||
|
@ -120,7 +120,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct ReportOutputBody {
|
pub struct ReportOutputBody {
|
||||||
pub id: ReportId,
|
pub id: ReportId,
|
||||||
pub record: OutputRecord,
|
pub record: OutputRecord,
|
||||||
|
@ -138,7 +138,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct ReportResult {
|
pub struct ReportResult {
|
||||||
pub existed_already: bool,
|
pub existed_already: bool,
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct ReportStartBody {
|
pub struct ReportStartBody {
|
||||||
pub id: ReportId,
|
pub id: ReportId,
|
||||||
pub script: String,
|
pub script: String,
|
||||||
|
@ -174,7 +174,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct ReportSummary {
|
pub struct ReportSummary {
|
||||||
pub age_seconds: usize,
|
pub age_seconds: usize,
|
||||||
pub duration_seconds: usize,
|
pub duration_seconds: usize,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@ pub mod types {
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct CrucibleOpts {
|
pub struct CrucibleOpts {
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub cert_pem: Option<String>,
|
pub cert_pem: Option<String>,
|
||||||
|
@ -39,7 +39,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct DiskAttachment {
|
pub struct DiskAttachment {
|
||||||
pub disk_id: uuid::Uuid,
|
pub disk_id: uuid::Uuid,
|
||||||
pub generation_id: u64,
|
pub generation_id: u64,
|
||||||
|
@ -58,7 +58,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub enum DiskAttachmentState {
|
pub enum DiskAttachmentState {
|
||||||
Detached,
|
Detached,
|
||||||
Destroyed,
|
Destroyed,
|
||||||
|
@ -78,7 +78,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct DiskRequest {
|
pub struct DiskRequest {
|
||||||
pub device: String,
|
pub device: String,
|
||||||
pub gen: u64,
|
pub gen: u64,
|
||||||
|
@ -101,7 +101,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Error information from a response.
|
///Error information from a response.
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct Error {
|
pub struct Error {
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub error_code: Option<String>,
|
pub error_code: Option<String>,
|
||||||
|
@ -121,7 +121,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct Instance {
|
pub struct Instance {
|
||||||
pub disks: Vec<DiskAttachment>,
|
pub disks: Vec<DiskAttachment>,
|
||||||
pub nics: Vec<NetworkInterface>,
|
pub nics: Vec<NetworkInterface>,
|
||||||
|
@ -141,7 +141,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceEnsureRequest {
|
pub struct InstanceEnsureRequest {
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub cloud_init_bytes: Option<String>,
|
pub cloud_init_bytes: Option<String>,
|
||||||
|
@ -166,7 +166,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceEnsureResponse {
|
pub struct InstanceEnsureResponse {
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub migrate: Option<InstanceMigrateInitiateResponse>,
|
pub migrate: Option<InstanceMigrateInitiateResponse>,
|
||||||
|
@ -184,7 +184,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceGetResponse {
|
pub struct InstanceGetResponse {
|
||||||
pub instance: Instance,
|
pub instance: Instance,
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceMigrateInitiateRequest {
|
pub struct InstanceMigrateInitiateRequest {
|
||||||
pub migration_id: uuid::Uuid,
|
pub migration_id: uuid::Uuid,
|
||||||
pub src_addr: String,
|
pub src_addr: String,
|
||||||
|
@ -220,7 +220,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceMigrateInitiateResponse {
|
pub struct InstanceMigrateInitiateResponse {
|
||||||
pub migration_id: uuid::Uuid,
|
pub migration_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceMigrateStatusRequest {
|
pub struct InstanceMigrateStatusRequest {
|
||||||
pub migration_id: uuid::Uuid,
|
pub migration_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceMigrateStatusResponse {
|
pub struct InstanceMigrateStatusResponse {
|
||||||
pub state: MigrationState,
|
pub state: MigrationState,
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceProperties {
|
pub struct InstanceProperties {
|
||||||
///ID of the bootrom used to initialize this Instance.
|
///ID of the bootrom used to initialize this Instance.
|
||||||
pub bootrom_id: uuid::Uuid,
|
pub bootrom_id: uuid::Uuid,
|
||||||
|
@ -303,7 +303,17 @@ pub mod types {
|
||||||
|
|
||||||
///Current state of an Instance.
|
///Current state of an Instance.
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize,
|
Clone,
|
||||||
|
Copy,
|
||||||
|
Debug,
|
||||||
|
Deserialize,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
|
Ord,
|
||||||
|
PartialEq,
|
||||||
|
PartialOrd,
|
||||||
|
Serialize,
|
||||||
|
schemars :: JsonSchema,
|
||||||
)]
|
)]
|
||||||
pub enum InstanceState {
|
pub enum InstanceState {
|
||||||
Creating,
|
Creating,
|
||||||
|
@ -381,7 +391,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceStateMonitorRequest {
|
pub struct InstanceStateMonitorRequest {
|
||||||
pub gen: u64,
|
pub gen: u64,
|
||||||
}
|
}
|
||||||
|
@ -398,7 +408,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct InstanceStateMonitorResponse {
|
pub struct InstanceStateMonitorResponse {
|
||||||
pub gen: u64,
|
pub gen: u64,
|
||||||
pub state: InstanceState,
|
pub state: InstanceState,
|
||||||
|
@ -417,7 +427,17 @@ pub mod types {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize,
|
Clone,
|
||||||
|
Copy,
|
||||||
|
Debug,
|
||||||
|
Deserialize,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
|
Ord,
|
||||||
|
PartialEq,
|
||||||
|
PartialOrd,
|
||||||
|
Serialize,
|
||||||
|
schemars :: JsonSchema,
|
||||||
)]
|
)]
|
||||||
pub enum InstanceStateRequested {
|
pub enum InstanceStateRequested {
|
||||||
Run,
|
Run,
|
||||||
|
@ -478,7 +498,17 @@ pub mod types {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize,
|
Clone,
|
||||||
|
Copy,
|
||||||
|
Debug,
|
||||||
|
Deserialize,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
|
Ord,
|
||||||
|
PartialEq,
|
||||||
|
PartialOrd,
|
||||||
|
Serialize,
|
||||||
|
schemars :: JsonSchema,
|
||||||
)]
|
)]
|
||||||
pub enum MigrationState {
|
pub enum MigrationState {
|
||||||
Sync,
|
Sync,
|
||||||
|
@ -556,7 +586,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct NetworkInterface {
|
pub struct NetworkInterface {
|
||||||
pub attachment: NetworkInterfaceAttachmentState,
|
pub attachment: NetworkInterfaceAttachmentState,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -574,7 +604,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub enum NetworkInterfaceAttachmentState {
|
pub enum NetworkInterfaceAttachmentState {
|
||||||
Detached,
|
Detached,
|
||||||
Faulted,
|
Faulted,
|
||||||
|
@ -593,7 +623,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct NetworkInterfaceRequest {
|
pub struct NetworkInterfaceRequest {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub slot: Slot,
|
pub slot: Slot,
|
||||||
|
@ -613,7 +643,7 @@ pub mod types {
|
||||||
|
|
||||||
///A stable index which is translated by Propolis into a PCI BDF, visible
|
///A stable index which is translated by Propolis into a PCI BDF, visible
|
||||||
/// to the guest.
|
/// to the guest.
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
pub struct Slot(pub u8);
|
pub struct Slot(pub u8);
|
||||||
impl std::ops::Deref for Slot {
|
impl std::ops::Deref for Slot {
|
||||||
type Target = u8;
|
type Target = u8;
|
||||||
|
@ -674,7 +704,7 @@ pub mod types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
pub enum VolumeConstructionRequest {
|
pub enum VolumeConstructionRequest {
|
||||||
#[serde(rename = "volume")]
|
#[serde(rename = "volume")]
|
||||||
|
|
|
@ -66,7 +66,7 @@ fn verify_apis(openapi_file: &str) {
|
||||||
GenerationSettings::default()
|
GenerationSettings::default()
|
||||||
.with_interface(InterfaceStyle::Builder)
|
.with_interface(InterfaceStyle::Builder)
|
||||||
.with_tag(TagStyle::Merged)
|
.with_tag(TagStyle::Merged)
|
||||||
.with_derive("JsonSchema")
|
.with_derive("schemars::JsonSchema")
|
||||||
.with_patch("Name", TypePatch::default().with_derive("Hash"))
|
.with_patch("Name", TypePatch::default().with_derive("Hash"))
|
||||||
.with_conversion(
|
.with_conversion(
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
|
|
Loading…
Reference in New Issue