Bump typify from `d6d8599` to `b0df7aa` (#648)

* Bump typify from `d6d8599` to `b0df7aa`

Bumps [typify](https://github.com/oxidecomputer/typify) from `d6d8599` to `b0df7aa`.
- [Commits](d6d85998d2...b0df7aa37a)

---
updated-dependencies:
- dependency-name: typify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixtures

* update fixtures

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <ahl@oxide.computer>
This commit is contained in:
dependabot[bot] 2023-12-13 01:14:28 -08:00 committed by GitHub
parent 2be396b6da
commit cbdd704d73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 26437 additions and 11 deletions

6
Cargo.lock generated
View File

@ -2341,7 +2341,7 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]]
name = "typify"
version = "0.0.14"
source = "git+https://github.com/oxidecomputer/typify#d6d85998d29825cfcf07072423f567a085db3ee0"
source = "git+https://github.com/oxidecomputer/typify#b0df7aa37ae13b61705161075146250224df24f2"
dependencies = [
"typify-impl",
"typify-macro",
@ -2350,7 +2350,7 @@ dependencies = [
[[package]]
name = "typify-impl"
version = "0.0.14"
source = "git+https://github.com/oxidecomputer/typify#d6d85998d29825cfcf07072423f567a085db3ee0"
source = "git+https://github.com/oxidecomputer/typify#b0df7aa37ae13b61705161075146250224df24f2"
dependencies = [
"heck",
"log",
@ -2367,7 +2367,7 @@ dependencies = [
[[package]]
name = "typify-macro"
version = "0.0.14"
source = "git+https://github.com/oxidecomputer/typify#d6d85998d29825cfcf07072423f567a085db3ee0"
source = "git+https://github.com/oxidecomputer/typify#b0df7aa37ae13b61705161075146250224df24f2"
dependencies = [
"proc-macro2",
"quote",

View File

@ -526,10 +526,10 @@ impl Generator {
pub fn space_out_items(content: String) -> Result<String> {
// Add newlines after end-braces at <= two levels of indentation.
Ok(if cfg!(not(windows)) {
let regex = regex::Regex::new(r#"(})(\n\s{0,8}[^} ])"#).unwrap();
let regex = regex::Regex::new(r#"(\n\s*})(\n\s{0,8}[^} ])"#).unwrap();
regex.replace_all(&content, "$1\n$2").to_string()
} else {
let regex = regex::Regex::new(r#"(})(\r\n\s{0,8}[^} ])"#).unwrap();
let regex = regex::Regex::new(r#"(\n\s*})(\r\n\s{0,8}[^} ])"#).unwrap();
regex.replace_all(&content, "$1\r\n$2").to_string()
})
}

View File

@ -7,6 +7,43 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///Task
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "output_rules",
/// "script",
/// "state"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// },
/// "state": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Task {
pub id: String,
@ -28,6 +65,39 @@ pub mod types {
}
}
///TaskEvent
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "payload",
/// "seq",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "payload": {
/// "type": "string"
/// },
/// "seq": {
/// "type": "integer",
/// "format": "uint",
/// "minimum": 0.0
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskEvent {
pub payload: String,
@ -48,6 +118,34 @@ pub mod types {
}
}
///TaskOutput
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "path",
/// "size"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "path": {
/// "type": "string"
/// },
/// "size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskOutput {
pub id: String,
@ -67,6 +165,34 @@ pub mod types {
}
}
///TaskSubmit
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name",
/// "script"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskSubmit {
pub name: String,
@ -87,6 +213,24 @@ pub mod types {
}
}
///TaskSubmitResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskSubmitResult {
pub id: String,
@ -104,6 +248,24 @@ pub mod types {
}
}
///UploadedChunk
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct UploadedChunk {
pub id: String,
@ -121,6 +283,24 @@ pub mod types {
}
}
///UserCreate
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct UserCreate {
pub name: String,
@ -138,6 +318,32 @@ pub mod types {
}
}
///UserCreateResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "token"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "token": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct UserCreateResult {
pub id: String,
@ -157,6 +363,28 @@ pub mod types {
}
}
///WhoamiResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WhoamiResult {
pub id: String,
@ -175,6 +403,46 @@ pub mod types {
}
}
///Worker
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "deleted",
/// "id",
/// "recycle",
/// "tasks"
/// ],
/// "properties": {
/// "deleted": {
/// "type": "boolean"
/// },
/// "id": {
/// "type": "string"
/// },
/// "instance_id": {
/// "type": "string"
/// },
/// "lastping": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "recycle": {
/// "type": "boolean"
/// },
/// "tasks": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/WorkerTask"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Worker {
pub deleted: bool,
@ -199,6 +467,36 @@ pub mod types {
}
}
///WorkerAddOutput
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "chunks",
/// "path",
/// "size"
/// ],
/// "properties": {
/// "chunks": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "path": {
/// "type": "string"
/// },
/// "size": {
/// "type": "integer",
/// "format": "int64"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerAddOutput {
pub chunks: Vec<String>,
@ -218,6 +516,33 @@ pub mod types {
}
}
///WorkerAppendTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "payload",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "payload": {
/// "type": "string"
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerAppendTask {
pub payload: String,
@ -237,6 +562,28 @@ pub mod types {
}
}
///WorkerBootstrap
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "bootstrap",
/// "token"
/// ],
/// "properties": {
/// "bootstrap": {
/// "type": "string"
/// },
/// "token": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerBootstrap {
pub bootstrap: String,
@ -255,6 +602,24 @@ pub mod types {
}
}
///WorkerBootstrapResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerBootstrapResult {
pub id: String,
@ -272,6 +637,24 @@ pub mod types {
}
}
///WorkerCompleteTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "failed"
/// ],
/// "properties": {
/// "failed": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerCompleteTask {
pub failed: bool,
@ -289,6 +672,27 @@ pub mod types {
}
}
///WorkerPingResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "poweroff"
/// ],
/// "properties": {
/// "poweroff": {
/// "type": "boolean"
/// },
/// "task": {
/// "$ref": "#/components/schemas/WorkerPingTask"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerPingResult {
pub poweroff: bool,
@ -308,6 +712,35 @@ pub mod types {
}
}
///WorkerPingTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "output_rules",
/// "script"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerPingTask {
pub id: String,
@ -327,6 +760,32 @@ pub mod types {
}
}
///WorkerTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "owner"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "owner": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerTask {
pub id: String,
@ -346,6 +805,27 @@ pub mod types {
}
}
///WorkersResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "workers"
/// ],
/// "properties": {
/// "workers": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/Worker"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkersResult {
pub workers: Vec<Worker>,

View File

@ -7,6 +7,43 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///Task
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "output_rules",
/// "script",
/// "state"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// },
/// "state": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct Task {
pub id: String,
@ -28,6 +65,39 @@ pub mod types {
}
}
///TaskEvent
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "payload",
/// "seq",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "payload": {
/// "type": "string"
/// },
/// "seq": {
/// "type": "integer",
/// "format": "uint",
/// "minimum": 0.0
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct TaskEvent {
pub payload: String,
@ -48,6 +118,34 @@ pub mod types {
}
}
///TaskOutput
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "path",
/// "size"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "path": {
/// "type": "string"
/// },
/// "size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct TaskOutput {
pub id: String,
@ -67,6 +165,34 @@ pub mod types {
}
}
///TaskSubmit
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name",
/// "script"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct TaskSubmit {
pub name: String,
@ -87,6 +213,24 @@ pub mod types {
}
}
///TaskSubmitResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct TaskSubmitResult {
pub id: String,
@ -104,6 +248,24 @@ pub mod types {
}
}
///UploadedChunk
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct UploadedChunk {
pub id: String,
@ -121,6 +283,24 @@ pub mod types {
}
}
///UserCreate
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct UserCreate {
pub name: String,
@ -138,6 +318,32 @@ pub mod types {
}
}
///UserCreateResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "token"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "token": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct UserCreateResult {
pub id: String,
@ -157,6 +363,28 @@ pub mod types {
}
}
///WhoamiResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WhoamiResult {
pub id: String,
@ -175,6 +403,46 @@ pub mod types {
}
}
///Worker
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "deleted",
/// "id",
/// "recycle",
/// "tasks"
/// ],
/// "properties": {
/// "deleted": {
/// "type": "boolean"
/// },
/// "id": {
/// "type": "string"
/// },
/// "instance_id": {
/// "type": "string"
/// },
/// "lastping": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "recycle": {
/// "type": "boolean"
/// },
/// "tasks": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/WorkerTask"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct Worker {
pub deleted: bool,
@ -199,6 +467,36 @@ pub mod types {
}
}
///WorkerAddOutput
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "chunks",
/// "path",
/// "size"
/// ],
/// "properties": {
/// "chunks": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "path": {
/// "type": "string"
/// },
/// "size": {
/// "type": "integer",
/// "format": "int64"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerAddOutput {
pub chunks: Vec<String>,
@ -218,6 +516,33 @@ pub mod types {
}
}
///WorkerAppendTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "payload",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "payload": {
/// "type": "string"
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerAppendTask {
pub payload: String,
@ -237,6 +562,28 @@ pub mod types {
}
}
///WorkerBootstrap
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "bootstrap",
/// "token"
/// ],
/// "properties": {
/// "bootstrap": {
/// "type": "string"
/// },
/// "token": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerBootstrap {
pub bootstrap: String,
@ -255,6 +602,24 @@ pub mod types {
}
}
///WorkerBootstrapResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerBootstrapResult {
pub id: String,
@ -272,6 +637,24 @@ pub mod types {
}
}
///WorkerCompleteTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "failed"
/// ],
/// "properties": {
/// "failed": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerCompleteTask {
pub failed: bool,
@ -289,6 +672,27 @@ pub mod types {
}
}
///WorkerPingResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "poweroff"
/// ],
/// "properties": {
/// "poweroff": {
/// "type": "boolean"
/// },
/// "task": {
/// "$ref": "#/components/schemas/WorkerPingTask"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerPingResult {
pub poweroff: bool,
@ -308,6 +712,35 @@ pub mod types {
}
}
///WorkerPingTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "output_rules",
/// "script"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerPingTask {
pub id: String,
@ -327,6 +760,32 @@ pub mod types {
}
}
///WorkerTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "owner"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "owner": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkerTask {
pub id: String,
@ -346,6 +805,27 @@ pub mod types {
}
}
///WorkersResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "workers"
/// ],
/// "properties": {
/// "workers": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/Worker"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct WorkersResult {
pub workers: Vec<Worker>,

View File

@ -957,7 +957,6 @@ pub trait CliOverride {
}
impl CliOverride for () {}
#[derive(Copy, Clone, Debug)]
pub enum CliCommand {
ControlHold,

View File

@ -7,6 +7,43 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///Task
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "output_rules",
/// "script",
/// "state"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// },
/// "state": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Task {
pub id: String,
@ -22,6 +59,39 @@ pub mod types {
}
}
///TaskEvent
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "payload",
/// "seq",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "payload": {
/// "type": "string"
/// },
/// "seq": {
/// "type": "integer",
/// "format": "uint",
/// "minimum": 0.0
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskEvent {
pub payload: String,
@ -36,6 +106,34 @@ pub mod types {
}
}
///TaskOutput
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "path",
/// "size"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "path": {
/// "type": "string"
/// },
/// "size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskOutput {
pub id: String,
@ -49,6 +147,34 @@ pub mod types {
}
}
///TaskSubmit
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name",
/// "script"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskSubmit {
pub name: String,
@ -63,6 +189,24 @@ pub mod types {
}
}
///TaskSubmitResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TaskSubmitResult {
pub id: String,
@ -74,6 +218,24 @@ pub mod types {
}
}
///UploadedChunk
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct UploadedChunk {
pub id: String,
@ -85,6 +247,24 @@ pub mod types {
}
}
///UserCreate
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct UserCreate {
pub name: String,
@ -96,6 +276,32 @@ pub mod types {
}
}
///UserCreateResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "token"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "token": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct UserCreateResult {
pub id: String,
@ -109,6 +315,28 @@ pub mod types {
}
}
///WhoamiResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WhoamiResult {
pub id: String,
@ -121,6 +349,46 @@ pub mod types {
}
}
///Worker
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "deleted",
/// "id",
/// "recycle",
/// "tasks"
/// ],
/// "properties": {
/// "deleted": {
/// "type": "boolean"
/// },
/// "id": {
/// "type": "string"
/// },
/// "instance_id": {
/// "type": "string"
/// },
/// "lastping": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "recycle": {
/// "type": "boolean"
/// },
/// "tasks": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/WorkerTask"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Worker {
pub deleted: bool,
@ -139,6 +407,36 @@ pub mod types {
}
}
///WorkerAddOutput
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "chunks",
/// "path",
/// "size"
/// ],
/// "properties": {
/// "chunks": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "path": {
/// "type": "string"
/// },
/// "size": {
/// "type": "integer",
/// "format": "int64"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerAddOutput {
pub chunks: Vec<String>,
@ -152,6 +450,33 @@ pub mod types {
}
}
///WorkerAppendTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "payload",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "payload": {
/// "type": "string"
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerAppendTask {
pub payload: String,
@ -165,6 +490,28 @@ pub mod types {
}
}
///WorkerBootstrap
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "bootstrap",
/// "token"
/// ],
/// "properties": {
/// "bootstrap": {
/// "type": "string"
/// },
/// "token": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerBootstrap {
pub bootstrap: String,
@ -177,6 +524,24 @@ pub mod types {
}
}
///WorkerBootstrapResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerBootstrapResult {
pub id: String,
@ -188,6 +553,24 @@ pub mod types {
}
}
///WorkerCompleteTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "failed"
/// ],
/// "properties": {
/// "failed": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerCompleteTask {
pub failed: bool,
@ -199,6 +582,27 @@ pub mod types {
}
}
///WorkerPingResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "poweroff"
/// ],
/// "properties": {
/// "poweroff": {
/// "type": "boolean"
/// },
/// "task": {
/// "$ref": "#/components/schemas/WorkerPingTask"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerPingResult {
pub poweroff: bool,
@ -212,6 +616,35 @@ pub mod types {
}
}
///WorkerPingTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "output_rules",
/// "script"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "output_rules": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// },
/// "script": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerPingTask {
pub id: String,
@ -225,6 +658,32 @@ pub mod types {
}
}
///WorkerTask
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "name",
/// "owner"
/// ],
/// "properties": {
/// "id": {
/// "type": "string"
/// },
/// "name": {
/// "type": "string"
/// },
/// "owner": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkerTask {
pub id: String,
@ -238,6 +697,27 @@ pub mod types {
}
}
///WorkersResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "workers"
/// ],
/// "properties": {
/// "workers": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/Worker"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct WorkersResult {
pub workers: Vec<Worker>,

View File

@ -7,6 +7,29 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///EnrolBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "EnrolBody",
/// "type": "object",
/// "required": [
/// "host",
/// "key"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "key": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EnrolBody {
pub host: String,
@ -25,6 +48,28 @@ pub mod types {
}
}
///GlobalJobsResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "GlobalJobsResult",
/// "type": "object",
/// "required": [
/// "summary"
/// ],
/// "properties": {
/// "summary": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/ReportSummary"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct GlobalJobsResult {
pub summary: Vec<ReportSummary>,
@ -42,6 +87,33 @@ pub mod types {
}
}
///OutputRecord
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "msg",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "msg": {
/// "type": "string"
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct OutputRecord {
pub msg: String,
@ -61,6 +133,29 @@ pub mod types {
}
}
///PingResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "PingResult",
/// "type": "object",
/// "required": [
/// "host",
/// "ok"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "ok": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PingResult {
pub host: String,
@ -79,6 +174,40 @@ pub mod types {
}
}
///ReportFinishBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportFinishBody",
/// "type": "object",
/// "required": [
/// "duration_millis",
/// "end_time",
/// "exit_status",
/// "id"
/// ],
/// "properties": {
/// "duration_millis": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "end_time": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "exit_status": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportFinishBody {
pub duration_millis: i32,
@ -99,6 +228,43 @@ pub mod types {
}
}
///ReportId
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "host",
/// "job",
/// "pid",
/// "time",
/// "uuid"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "job": {
/// "type": "string"
/// },
/// "pid": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "uuid": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportId {
pub host: String,
@ -120,6 +286,29 @@ pub mod types {
}
}
///ReportOutputBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportOutputBody",
/// "type": "object",
/// "required": [
/// "id",
/// "record"
/// ],
/// "properties": {
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// },
/// "record": {
/// "$ref": "#/components/schemas/OutputRecord"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportOutputBody {
pub id: ReportId,
@ -138,6 +327,25 @@ pub mod types {
}
}
///ReportResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportResult",
/// "type": "object",
/// "required": [
/// "existed_already"
/// ],
/// "properties": {
/// "existed_already": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportResult {
pub existed_already: bool,
@ -155,6 +363,34 @@ pub mod types {
}
}
///ReportStartBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportStartBody",
/// "type": "object",
/// "required": [
/// "id",
/// "script",
/// "start_time"
/// ],
/// "properties": {
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// },
/// "script": {
/// "type": "string"
/// },
/// "start_time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportStartBody {
pub id: ReportId,
@ -174,6 +410,48 @@ pub mod types {
}
}
///ReportSummary
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "age_seconds",
/// "duration_seconds",
/// "host",
/// "job",
/// "status",
/// "when"
/// ],
/// "properties": {
/// "age_seconds": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "duration_seconds": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "host": {
/// "type": "string"
/// },
/// "job": {
/// "type": "string"
/// },
/// "status": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "when": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportSummary {
pub age_seconds: i32,

View File

@ -7,6 +7,29 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///EnrolBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "EnrolBody",
/// "type": "object",
/// "required": [
/// "host",
/// "key"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "key": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct EnrolBody {
pub host: String,
@ -25,6 +48,28 @@ pub mod types {
}
}
///GlobalJobsResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "GlobalJobsResult",
/// "type": "object",
/// "required": [
/// "summary"
/// ],
/// "properties": {
/// "summary": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/ReportSummary"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct GlobalJobsResult {
pub summary: Vec<ReportSummary>,
@ -42,6 +87,33 @@ pub mod types {
}
}
///OutputRecord
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "msg",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "msg": {
/// "type": "string"
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct OutputRecord {
pub msg: String,
@ -61,6 +133,29 @@ pub mod types {
}
}
///PingResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "PingResult",
/// "type": "object",
/// "required": [
/// "host",
/// "ok"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "ok": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct PingResult {
pub host: String,
@ -79,6 +174,40 @@ pub mod types {
}
}
///ReportFinishBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportFinishBody",
/// "type": "object",
/// "required": [
/// "duration_millis",
/// "end_time",
/// "exit_status",
/// "id"
/// ],
/// "properties": {
/// "duration_millis": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "end_time": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "exit_status": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct ReportFinishBody {
pub duration_millis: usize,
@ -99,6 +228,43 @@ pub mod types {
}
}
///ReportId
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "host",
/// "job",
/// "pid",
/// "time",
/// "uuid"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "job": {
/// "type": "string"
/// },
/// "pid": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "uuid": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct ReportId {
pub host: String,
@ -120,6 +286,29 @@ pub mod types {
}
}
///ReportOutputBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportOutputBody",
/// "type": "object",
/// "required": [
/// "id",
/// "record"
/// ],
/// "properties": {
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// },
/// "record": {
/// "$ref": "#/components/schemas/OutputRecord"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct ReportOutputBody {
pub id: ReportId,
@ -138,6 +327,25 @@ pub mod types {
}
}
///ReportResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportResult",
/// "type": "object",
/// "required": [
/// "existed_already"
/// ],
/// "properties": {
/// "existed_already": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct ReportResult {
pub existed_already: bool,
@ -155,6 +363,34 @@ pub mod types {
}
}
///ReportStartBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportStartBody",
/// "type": "object",
/// "required": [
/// "id",
/// "script",
/// "start_time"
/// ],
/// "properties": {
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// },
/// "script": {
/// "type": "string"
/// },
/// "start_time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct ReportStartBody {
pub id: ReportId,
@ -174,6 +410,48 @@ pub mod types {
}
}
///ReportSummary
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "age_seconds",
/// "duration_seconds",
/// "host",
/// "job",
/// "status",
/// "when"
/// ],
/// "properties": {
/// "age_seconds": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "duration_seconds": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "host": {
/// "type": "string"
/// },
/// "job": {
/// "type": "string"
/// },
/// "status": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "when": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct ReportSummary {
pub age_seconds: usize,

View File

@ -431,7 +431,6 @@ pub trait CliOverride {
}
impl CliOverride for () {}
#[derive(Copy, Clone, Debug)]
pub enum CliCommand {
Enrol,

View File

@ -7,6 +7,29 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///EnrolBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "EnrolBody",
/// "type": "object",
/// "required": [
/// "host",
/// "key"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "key": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct EnrolBody {
pub host: String,
@ -19,6 +42,28 @@ pub mod types {
}
}
///GlobalJobsResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "GlobalJobsResult",
/// "type": "object",
/// "required": [
/// "summary"
/// ],
/// "properties": {
/// "summary": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/ReportSummary"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct GlobalJobsResult {
pub summary: Vec<ReportSummary>,
@ -30,6 +75,33 @@ pub mod types {
}
}
///OutputRecord
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "msg",
/// "stream",
/// "time"
/// ],
/// "properties": {
/// "msg": {
/// "type": "string"
/// },
/// "stream": {
/// "type": "string"
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct OutputRecord {
pub msg: String,
@ -43,6 +115,29 @@ pub mod types {
}
}
///PingResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "PingResult",
/// "type": "object",
/// "required": [
/// "host",
/// "ok"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "ok": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PingResult {
pub host: String,
@ -55,6 +150,40 @@ pub mod types {
}
}
///ReportFinishBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportFinishBody",
/// "type": "object",
/// "required": [
/// "duration_millis",
/// "end_time",
/// "exit_status",
/// "id"
/// ],
/// "properties": {
/// "duration_millis": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "end_time": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "exit_status": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportFinishBody {
pub duration_millis: i32,
@ -69,6 +198,43 @@ pub mod types {
}
}
///ReportId
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "host",
/// "job",
/// "pid",
/// "time",
/// "uuid"
/// ],
/// "properties": {
/// "host": {
/// "type": "string"
/// },
/// "job": {
/// "type": "string"
/// },
/// "pid": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "time": {
/// "type": "string",
/// "format": "date-time"
/// },
/// "uuid": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportId {
pub host: String,
@ -84,6 +250,29 @@ pub mod types {
}
}
///ReportOutputBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportOutputBody",
/// "type": "object",
/// "required": [
/// "id",
/// "record"
/// ],
/// "properties": {
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// },
/// "record": {
/// "$ref": "#/components/schemas/OutputRecord"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportOutputBody {
pub id: ReportId,
@ -96,6 +285,25 @@ pub mod types {
}
}
///ReportResult
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportResult",
/// "type": "object",
/// "required": [
/// "existed_already"
/// ],
/// "properties": {
/// "existed_already": {
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportResult {
pub existed_already: bool,
@ -107,6 +315,34 @@ pub mod types {
}
}
///ReportStartBody
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "title": "ReportStartBody",
/// "type": "object",
/// "required": [
/// "id",
/// "script",
/// "start_time"
/// ],
/// "properties": {
/// "id": {
/// "$ref": "#/components/schemas/ReportId"
/// },
/// "script": {
/// "type": "string"
/// },
/// "start_time": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportStartBody {
pub id: ReportId,
@ -120,6 +356,48 @@ pub mod types {
}
}
///ReportSummary
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "age_seconds",
/// "duration_seconds",
/// "host",
/// "job",
/// "status",
/// "when"
/// ],
/// "properties": {
/// "age_seconds": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "duration_seconds": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "host": {
/// "type": "string"
/// },
/// "job": {
/// "type": "string"
/// },
/// "status": {
/// "type": "integer",
/// "format": "int32"
/// },
/// "when": {
/// "type": "string",
/// "format": "date-time"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportSummary {
pub age_seconds: i32,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -13429,7 +13429,6 @@ pub trait CliOverride {
}
impl CliOverride for () {}
#[derive(Copy, Clone, Debug)]
pub enum CliCommand {
DiskViewById,

File diff suppressed because it is too large Load Diff

View File

@ -125,7 +125,6 @@ pub trait CliOverride {
}
impl CliOverride for () {}
#[derive(Copy, Clone, Debug)]
pub enum CliCommand {
KeyGet,

View File

@ -81,7 +81,6 @@ pub trait CliOverride {
}
impl CliOverride for () {}
#[derive(Copy, Clone, Debug)]
pub enum CliCommand {
KeyGet,

View File

@ -7,6 +7,78 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///CrucibleOpts
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "lossy",
/// "read_only",
/// "target"
/// ],
/// "properties": {
/// "cert_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "control": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "flush_timeout": {
/// "type": [
/// "integer",
/// "null"
/// ],
/// "format": "uint32",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "key": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "key_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "lossy": {
/// "type": "boolean"
/// },
/// "read_only": {
/// "type": "boolean"
/// },
/// "root_cert_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "target": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct CrucibleOpts {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -39,6 +111,35 @@ pub mod types {
}
}
///DiskAttachment
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "disk_id",
/// "generation_id",
/// "state"
/// ],
/// "properties": {
/// "disk_id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "generation_id": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "state": {
/// "$ref": "#/components/schemas/DiskAttachmentState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct DiskAttachment {
pub disk_id: uuid::Uuid,
@ -58,6 +159,38 @@ pub mod types {
}
}
///DiskAttachmentState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "string",
/// "enum": [
/// "Detached",
/// "Destroyed",
/// "Faulted"
/// ]
/// },
/// {
/// "type": "object",
/// "required": [
/// "Attached"
/// ],
/// "properties": {
/// "Attached": {
/// "type": "string",
/// "format": "uuid"
/// }
/// },
/// "additionalProperties": false
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub enum DiskAttachmentState {
Detached,
@ -78,6 +211,46 @@ pub mod types {
}
}
///DiskRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "device",
/// "gen",
/// "name",
/// "read_only",
/// "slot",
/// "volume_construction_request"
/// ],
/// "properties": {
/// "device": {
/// "type": "string"
/// },
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "name": {
/// "type": "string"
/// },
/// "read_only": {
/// "type": "boolean"
/// },
/// "slot": {
/// "$ref": "#/components/schemas/Slot"
/// },
/// "volume_construction_request": {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct DiskRequest {
pub device: String,
@ -101,6 +274,31 @@ pub mod types {
}
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -121,6 +319,42 @@ pub mod types {
}
}
///Instance
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "disks",
/// "nics",
/// "properties",
/// "state"
/// ],
/// "properties": {
/// "disks": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/DiskAttachment"
/// }
/// },
/// "nics": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/NetworkInterface"
/// }
/// },
/// "properties": {
/// "$ref": "#/components/schemas/InstanceProperties"
/// },
/// "state": {
/// "$ref": "#/components/schemas/InstanceState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Instance {
pub disks: Vec<DiskAttachment>,
@ -141,6 +375,51 @@ pub mod types {
}
}
///InstanceEnsureRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "properties"
/// ],
/// "properties": {
/// "cloud_init_bytes": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "disks": {
/// "default": [],
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/DiskRequest"
/// }
/// },
/// "migrate": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/InstanceMigrateInitiateRequest"
/// }
/// ]
/// },
/// "nics": {
/// "default": [],
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/NetworkInterfaceRequest"
/// }
/// },
/// "properties": {
/// "$ref": "#/components/schemas/InstanceProperties"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceEnsureRequest {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -166,6 +445,25 @@ pub mod types {
}
}
///InstanceEnsureResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "properties": {
/// "migrate": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/InstanceMigrateInitiateResponse"
/// }
/// ]
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceEnsureResponse {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -184,6 +482,24 @@ pub mod types {
}
}
///InstanceGetResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "instance"
/// ],
/// "properties": {
/// "instance": {
/// "$ref": "#/components/schemas/Instance"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceGetResponse {
pub instance: Instance,
@ -201,6 +517,34 @@ pub mod types {
}
}
///InstanceMigrateInitiateRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id",
/// "src_addr",
/// "src_uuid"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "src_addr": {
/// "type": "string"
/// },
/// "src_uuid": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateInitiateRequest {
pub migration_id: uuid::Uuid,
@ -220,6 +564,25 @@ pub mod types {
}
}
///InstanceMigrateInitiateResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateInitiateResponse {
pub migration_id: uuid::Uuid,
@ -237,6 +600,25 @@ pub mod types {
}
}
///InstanceMigrateStatusRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateStatusRequest {
pub migration_id: uuid::Uuid,
@ -254,6 +636,24 @@ pub mod types {
}
}
///InstanceMigrateStatusResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "state"
/// ],
/// "properties": {
/// "state": {
/// "$ref": "#/components/schemas/MigrationState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateStatusResponse {
pub state: MigrationState,
@ -271,6 +671,62 @@ pub mod types {
}
}
///InstanceProperties
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "bootrom_id",
/// "description",
/// "id",
/// "image_id",
/// "memory",
/// "name",
/// "vcpus"
/// ],
/// "properties": {
/// "bootrom_id": {
/// "description": "ID of the bootrom used to initialize this
/// Instance.", "type": "string",
/// "format": "uuid"
/// },
/// "description": {
/// "description": "Free-form text description of an Instance.",
/// "type": "string"
/// },
/// "id": {
/// "description": "Unique identifier for this Instance.",
/// "type": "string",
/// "format": "uuid"
/// },
/// "image_id": {
/// "description": "ID of the image used to initialize this Instance.",
/// "type": "string",
/// "format": "uuid"
/// },
/// "memory": {
/// "description": "Size of memory allocated to the Instance, in MiB.",
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "name": {
/// "description": "Human-readable name of the Instance.",
/// "type": "string"
/// },
/// "vcpus": {
/// "description": "Number of vCPUs to be allocated to the Instance.",
/// "type": "integer",
/// "format": "uint8",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceProperties {
///ID of the bootrom used to initialize this Instance.
@ -302,6 +758,28 @@ pub mod types {
}
///Current state of an Instance.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Current state of an Instance.",
/// "type": "string",
/// "enum": [
/// "Creating",
/// "Starting",
/// "Running",
/// "Stopping",
/// "Stopped",
/// "Rebooting",
/// "Migrating",
/// "Repairing",
/// "Failed",
/// "Destroyed"
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum InstanceState {
Creating,
@ -379,6 +857,26 @@ pub mod types {
}
}
///InstanceStateMonitorRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "gen"
/// ],
/// "properties": {
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceStateMonitorRequest {
pub gen: u64,
@ -396,6 +894,30 @@ pub mod types {
}
}
///InstanceStateMonitorResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "gen",
/// "state"
/// ],
/// "properties": {
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "state": {
/// "$ref": "#/components/schemas/InstanceState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceStateMonitorResponse {
pub gen: u64,
@ -414,6 +936,22 @@ pub mod types {
}
}
///InstanceStateRequested
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "string",
/// "enum": [
/// "Run",
/// "Stop",
/// "Reboot",
/// "MigrateStart"
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum InstanceStateRequested {
Run,
@ -473,6 +1011,28 @@ pub mod types {
}
}
///MigrationState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "string",
/// "enum": [
/// "Sync",
/// "RamPush",
/// "Pause",
/// "RamPushDirty",
/// "Device",
/// "Arch",
/// "Resume",
/// "RamPull",
/// "Finish",
/// "Error"
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum MigrationState {
Sync,
@ -550,6 +1110,28 @@ pub mod types {
}
}
///NetworkInterface
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "attachment",
/// "name"
/// ],
/// "properties": {
/// "attachment": {
/// "$ref": "#/components/schemas/NetworkInterfaceAttachmentState"
/// },
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NetworkInterface {
pub attachment: NetworkInterfaceAttachmentState,
@ -568,6 +1150,36 @@ pub mod types {
}
}
///NetworkInterfaceAttachmentState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "string",
/// "enum": [
/// "Detached",
/// "Faulted"
/// ]
/// },
/// {
/// "type": "object",
/// "required": [
/// "Attached"
/// ],
/// "properties": {
/// "Attached": {
/// "$ref": "#/components/schemas/Slot"
/// }
/// },
/// "additionalProperties": false
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub enum NetworkInterfaceAttachmentState {
Detached,
@ -587,6 +1199,28 @@ pub mod types {
}
}
///NetworkInterfaceRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name",
/// "slot"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// },
/// "slot": {
/// "$ref": "#/components/schemas/Slot"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NetworkInterfaceRequest {
pub name: String,
@ -607,6 +1241,18 @@ pub mod types {
///A stable index which is translated by Propolis into a PCI BDF, visible
/// to the guest.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "A stable index which is translated by Propolis into a
/// PCI BDF, visible to the guest.", "type": "integer",
/// "format": "uint8",
/// "minimum": 0.0
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Slot(pub u8);
impl std::ops::Deref for Slot {
@ -668,6 +1314,144 @@ pub mod types {
}
}
///VolumeConstructionRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "sub_volumes",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "read_only_parent": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// ]
/// },
/// "sub_volumes": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "volume"
/// ]
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "type",
/// "url"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "url"
/// ]
/// },
/// "url": {
/// "type": "string"
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "gen",
/// "opts",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "opts": {
/// "$ref": "#/components/schemas/CrucibleOpts"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "region"
/// ]
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "path",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "path": {
/// "type": "string"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "file"
/// ]
/// }
/// }
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(tag = "type")]
pub enum VolumeConstructionRequest {

View File

@ -7,6 +7,78 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///CrucibleOpts
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "lossy",
/// "read_only",
/// "target"
/// ],
/// "properties": {
/// "cert_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "control": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "flush_timeout": {
/// "type": [
/// "integer",
/// "null"
/// ],
/// "format": "uint32",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "key": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "key_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "lossy": {
/// "type": "boolean"
/// },
/// "read_only": {
/// "type": "boolean"
/// },
/// "root_cert_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "target": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct CrucibleOpts {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -39,6 +111,35 @@ pub mod types {
}
}
///DiskAttachment
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "disk_id",
/// "generation_id",
/// "state"
/// ],
/// "properties": {
/// "disk_id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "generation_id": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "state": {
/// "$ref": "#/components/schemas/DiskAttachmentState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct DiskAttachment {
pub disk_id: uuid::Uuid,
@ -58,6 +159,38 @@ pub mod types {
}
}
///DiskAttachmentState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "string",
/// "enum": [
/// "Detached",
/// "Destroyed",
/// "Faulted"
/// ]
/// },
/// {
/// "type": "object",
/// "required": [
/// "Attached"
/// ],
/// "properties": {
/// "Attached": {
/// "type": "string",
/// "format": "uuid"
/// }
/// },
/// "additionalProperties": false
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub enum DiskAttachmentState {
Detached,
@ -78,6 +211,46 @@ pub mod types {
}
}
///DiskRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "device",
/// "gen",
/// "name",
/// "read_only",
/// "slot",
/// "volume_construction_request"
/// ],
/// "properties": {
/// "device": {
/// "type": "string"
/// },
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "name": {
/// "type": "string"
/// },
/// "read_only": {
/// "type": "boolean"
/// },
/// "slot": {
/// "$ref": "#/components/schemas/Slot"
/// },
/// "volume_construction_request": {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct DiskRequest {
pub device: String,
@ -101,6 +274,31 @@ pub mod types {
}
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -121,6 +319,42 @@ pub mod types {
}
}
///Instance
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "disks",
/// "nics",
/// "properties",
/// "state"
/// ],
/// "properties": {
/// "disks": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/DiskAttachment"
/// }
/// },
/// "nics": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/NetworkInterface"
/// }
/// },
/// "properties": {
/// "$ref": "#/components/schemas/InstanceProperties"
/// },
/// "state": {
/// "$ref": "#/components/schemas/InstanceState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct Instance {
pub disks: Vec<DiskAttachment>,
@ -141,6 +375,51 @@ pub mod types {
}
}
///InstanceEnsureRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "properties"
/// ],
/// "properties": {
/// "cloud_init_bytes": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "disks": {
/// "default": [],
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/DiskRequest"
/// }
/// },
/// "migrate": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/InstanceMigrateInitiateRequest"
/// }
/// ]
/// },
/// "nics": {
/// "default": [],
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/NetworkInterfaceRequest"
/// }
/// },
/// "properties": {
/// "$ref": "#/components/schemas/InstanceProperties"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceEnsureRequest {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -166,6 +445,25 @@ pub mod types {
}
}
///InstanceEnsureResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "properties": {
/// "migrate": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/InstanceMigrateInitiateResponse"
/// }
/// ]
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceEnsureResponse {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -184,6 +482,24 @@ pub mod types {
}
}
///InstanceGetResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "instance"
/// ],
/// "properties": {
/// "instance": {
/// "$ref": "#/components/schemas/Instance"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceGetResponse {
pub instance: Instance,
@ -201,6 +517,34 @@ pub mod types {
}
}
///InstanceMigrateInitiateRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id",
/// "src_addr",
/// "src_uuid"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "src_addr": {
/// "type": "string"
/// },
/// "src_uuid": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceMigrateInitiateRequest {
pub migration_id: uuid::Uuid,
@ -220,6 +564,25 @@ pub mod types {
}
}
///InstanceMigrateInitiateResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceMigrateInitiateResponse {
pub migration_id: uuid::Uuid,
@ -237,6 +600,25 @@ pub mod types {
}
}
///InstanceMigrateStatusRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceMigrateStatusRequest {
pub migration_id: uuid::Uuid,
@ -254,6 +636,24 @@ pub mod types {
}
}
///InstanceMigrateStatusResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "state"
/// ],
/// "properties": {
/// "state": {
/// "$ref": "#/components/schemas/MigrationState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceMigrateStatusResponse {
pub state: MigrationState,
@ -271,6 +671,62 @@ pub mod types {
}
}
///InstanceProperties
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "bootrom_id",
/// "description",
/// "id",
/// "image_id",
/// "memory",
/// "name",
/// "vcpus"
/// ],
/// "properties": {
/// "bootrom_id": {
/// "description": "ID of the bootrom used to initialize this
/// Instance.", "type": "string",
/// "format": "uuid"
/// },
/// "description": {
/// "description": "Free-form text description of an Instance.",
/// "type": "string"
/// },
/// "id": {
/// "description": "Unique identifier for this Instance.",
/// "type": "string",
/// "format": "uuid"
/// },
/// "image_id": {
/// "description": "ID of the image used to initialize this Instance.",
/// "type": "string",
/// "format": "uuid"
/// },
/// "memory": {
/// "description": "Size of memory allocated to the Instance, in MiB.",
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "name": {
/// "description": "Human-readable name of the Instance.",
/// "type": "string"
/// },
/// "vcpus": {
/// "description": "Number of vCPUs to be allocated to the Instance.",
/// "type": "integer",
/// "format": "uint8",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceProperties {
///ID of the bootrom used to initialize this Instance.
@ -302,6 +758,28 @@ pub mod types {
}
///Current state of an Instance.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Current state of an Instance.",
/// "type": "string",
/// "enum": [
/// "Creating",
/// "Starting",
/// "Running",
/// "Stopping",
/// "Stopped",
/// "Rebooting",
/// "Migrating",
/// "Repairing",
/// "Failed",
/// "Destroyed"
/// ]
///}
/// ```
/// </details>
#[derive(
Clone,
Copy,
@ -391,6 +869,26 @@ pub mod types {
}
}
///InstanceStateMonitorRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "gen"
/// ],
/// "properties": {
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceStateMonitorRequest {
pub gen: u64,
@ -408,6 +906,30 @@ pub mod types {
}
}
///InstanceStateMonitorResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "gen",
/// "state"
/// ],
/// "properties": {
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "state": {
/// "$ref": "#/components/schemas/InstanceState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct InstanceStateMonitorResponse {
pub gen: u64,
@ -426,6 +948,22 @@ pub mod types {
}
}
///InstanceStateRequested
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "string",
/// "enum": [
/// "Run",
/// "Stop",
/// "Reboot",
/// "MigrateStart"
/// ]
///}
/// ```
/// </details>
#[derive(
Clone,
Copy,
@ -497,6 +1035,28 @@ pub mod types {
}
}
///MigrationState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "string",
/// "enum": [
/// "Sync",
/// "RamPush",
/// "Pause",
/// "RamPushDirty",
/// "Device",
/// "Arch",
/// "Resume",
/// "RamPull",
/// "Finish",
/// "Error"
/// ]
///}
/// ```
/// </details>
#[derive(
Clone,
Copy,
@ -586,6 +1146,28 @@ pub mod types {
}
}
///NetworkInterface
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "attachment",
/// "name"
/// ],
/// "properties": {
/// "attachment": {
/// "$ref": "#/components/schemas/NetworkInterfaceAttachmentState"
/// },
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct NetworkInterface {
pub attachment: NetworkInterfaceAttachmentState,
@ -604,6 +1186,36 @@ pub mod types {
}
}
///NetworkInterfaceAttachmentState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "string",
/// "enum": [
/// "Detached",
/// "Faulted"
/// ]
/// },
/// {
/// "type": "object",
/// "required": [
/// "Attached"
/// ],
/// "properties": {
/// "Attached": {
/// "$ref": "#/components/schemas/Slot"
/// }
/// },
/// "additionalProperties": false
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub enum NetworkInterfaceAttachmentState {
Detached,
@ -623,6 +1235,28 @@ pub mod types {
}
}
///NetworkInterfaceRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name",
/// "slot"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// },
/// "slot": {
/// "$ref": "#/components/schemas/Slot"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct NetworkInterfaceRequest {
pub name: String,
@ -643,6 +1277,18 @@ pub mod types {
///A stable index which is translated by Propolis into a PCI BDF, visible
/// to the guest.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "A stable index which is translated by Propolis into a
/// PCI BDF, visible to the guest.", "type": "integer",
/// "format": "uint8",
/// "minimum": 0.0
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
pub struct Slot(pub u8);
impl std::ops::Deref for Slot {
@ -704,6 +1350,144 @@ pub mod types {
}
}
///VolumeConstructionRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "sub_volumes",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "read_only_parent": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// ]
/// },
/// "sub_volumes": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "volume"
/// ]
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "type",
/// "url"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "url"
/// ]
/// },
/// "url": {
/// "type": "string"
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "gen",
/// "opts",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "opts": {
/// "$ref": "#/components/schemas/CrucibleOpts"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "region"
/// ]
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "path",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "path": {
/// "type": "string"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "file"
/// ]
/// }
/// }
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize, schemars :: JsonSchema)]
#[serde(tag = "type")]
pub enum VolumeConstructionRequest {

View File

@ -393,7 +393,6 @@ pub trait CliOverride {
}
impl CliOverride for () {}
#[derive(Copy, Clone, Debug)]
pub enum CliCommand {
InstanceGet,

View File

@ -7,6 +7,78 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///CrucibleOpts
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "id",
/// "lossy",
/// "read_only",
/// "target"
/// ],
/// "properties": {
/// "cert_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "control": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "flush_timeout": {
/// "type": [
/// "integer",
/// "null"
/// ],
/// "format": "uint32",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "key": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "key_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "lossy": {
/// "type": "boolean"
/// },
/// "read_only": {
/// "type": "boolean"
/// },
/// "root_cert_pem": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "target": {
/// "type": "array",
/// "items": {
/// "type": "string"
/// }
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct CrucibleOpts {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -33,6 +105,35 @@ pub mod types {
}
}
///DiskAttachment
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "disk_id",
/// "generation_id",
/// "state"
/// ],
/// "properties": {
/// "disk_id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "generation_id": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "state": {
/// "$ref": "#/components/schemas/DiskAttachmentState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct DiskAttachment {
pub disk_id: uuid::Uuid,
@ -46,6 +147,38 @@ pub mod types {
}
}
///DiskAttachmentState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "string",
/// "enum": [
/// "Detached",
/// "Destroyed",
/// "Faulted"
/// ]
/// },
/// {
/// "type": "object",
/// "required": [
/// "Attached"
/// ],
/// "properties": {
/// "Attached": {
/// "type": "string",
/// "format": "uuid"
/// }
/// },
/// "additionalProperties": false
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub enum DiskAttachmentState {
Detached,
@ -66,6 +199,46 @@ pub mod types {
}
}
///DiskRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "device",
/// "gen",
/// "name",
/// "read_only",
/// "slot",
/// "volume_construction_request"
/// ],
/// "properties": {
/// "device": {
/// "type": "string"
/// },
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "name": {
/// "type": "string"
/// },
/// "read_only": {
/// "type": "boolean"
/// },
/// "slot": {
/// "$ref": "#/components/schemas/Slot"
/// },
/// "volume_construction_request": {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct DiskRequest {
pub device: String,
@ -83,6 +256,31 @@ pub mod types {
}
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -97,6 +295,42 @@ pub mod types {
}
}
///Instance
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "disks",
/// "nics",
/// "properties",
/// "state"
/// ],
/// "properties": {
/// "disks": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/DiskAttachment"
/// }
/// },
/// "nics": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/NetworkInterface"
/// }
/// },
/// "properties": {
/// "$ref": "#/components/schemas/InstanceProperties"
/// },
/// "state": {
/// "$ref": "#/components/schemas/InstanceState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Instance {
pub disks: Vec<DiskAttachment>,
@ -111,6 +345,51 @@ pub mod types {
}
}
///InstanceEnsureRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "properties"
/// ],
/// "properties": {
/// "cloud_init_bytes": {
/// "type": [
/// "string",
/// "null"
/// ]
/// },
/// "disks": {
/// "default": [],
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/DiskRequest"
/// }
/// },
/// "migrate": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/InstanceMigrateInitiateRequest"
/// }
/// ]
/// },
/// "nics": {
/// "default": [],
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/NetworkInterfaceRequest"
/// }
/// },
/// "properties": {
/// "$ref": "#/components/schemas/InstanceProperties"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceEnsureRequest {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -130,6 +409,25 @@ pub mod types {
}
}
///InstanceEnsureResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "properties": {
/// "migrate": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/InstanceMigrateInitiateResponse"
/// }
/// ]
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceEnsureResponse {
#[serde(default, skip_serializing_if = "Option::is_none")]
@ -142,6 +440,24 @@ pub mod types {
}
}
///InstanceGetResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "instance"
/// ],
/// "properties": {
/// "instance": {
/// "$ref": "#/components/schemas/Instance"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceGetResponse {
pub instance: Instance,
@ -153,6 +469,34 @@ pub mod types {
}
}
///InstanceMigrateInitiateRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id",
/// "src_addr",
/// "src_uuid"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "src_addr": {
/// "type": "string"
/// },
/// "src_uuid": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateInitiateRequest {
pub migration_id: uuid::Uuid,
@ -166,6 +510,25 @@ pub mod types {
}
}
///InstanceMigrateInitiateResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateInitiateResponse {
pub migration_id: uuid::Uuid,
@ -177,6 +540,25 @@ pub mod types {
}
}
///InstanceMigrateStatusRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "migration_id"
/// ],
/// "properties": {
/// "migration_id": {
/// "type": "string",
/// "format": "uuid"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateStatusRequest {
pub migration_id: uuid::Uuid,
@ -188,6 +570,24 @@ pub mod types {
}
}
///InstanceMigrateStatusResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "state"
/// ],
/// "properties": {
/// "state": {
/// "$ref": "#/components/schemas/MigrationState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceMigrateStatusResponse {
pub state: MigrationState,
@ -199,6 +599,62 @@ pub mod types {
}
}
///InstanceProperties
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "bootrom_id",
/// "description",
/// "id",
/// "image_id",
/// "memory",
/// "name",
/// "vcpus"
/// ],
/// "properties": {
/// "bootrom_id": {
/// "description": "ID of the bootrom used to initialize this
/// Instance.", "type": "string",
/// "format": "uuid"
/// },
/// "description": {
/// "description": "Free-form text description of an Instance.",
/// "type": "string"
/// },
/// "id": {
/// "description": "Unique identifier for this Instance.",
/// "type": "string",
/// "format": "uuid"
/// },
/// "image_id": {
/// "description": "ID of the image used to initialize this Instance.",
/// "type": "string",
/// "format": "uuid"
/// },
/// "memory": {
/// "description": "Size of memory allocated to the Instance, in MiB.",
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "name": {
/// "description": "Human-readable name of the Instance.",
/// "type": "string"
/// },
/// "vcpus": {
/// "description": "Number of vCPUs to be allocated to the Instance.",
/// "type": "integer",
/// "format": "uint8",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceProperties {
///ID of the bootrom used to initialize this Instance.
@ -224,6 +680,28 @@ pub mod types {
}
///Current state of an Instance.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Current state of an Instance.",
/// "type": "string",
/// "enum": [
/// "Creating",
/// "Starting",
/// "Running",
/// "Stopping",
/// "Stopped",
/// "Rebooting",
/// "Migrating",
/// "Repairing",
/// "Failed",
/// "Destroyed"
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum InstanceState {
Creating,
@ -301,6 +779,26 @@ pub mod types {
}
}
///InstanceStateMonitorRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "gen"
/// ],
/// "properties": {
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceStateMonitorRequest {
pub gen: u64,
@ -312,6 +810,30 @@ pub mod types {
}
}
///InstanceStateMonitorResponse
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "gen",
/// "state"
/// ],
/// "properties": {
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "state": {
/// "$ref": "#/components/schemas/InstanceState"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InstanceStateMonitorResponse {
pub gen: u64,
@ -324,6 +846,22 @@ pub mod types {
}
}
///InstanceStateRequested
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "string",
/// "enum": [
/// "Run",
/// "Stop",
/// "Reboot",
/// "MigrateStart"
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum InstanceStateRequested {
Run,
@ -383,6 +921,28 @@ pub mod types {
}
}
///MigrationState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "string",
/// "enum": [
/// "Sync",
/// "RamPush",
/// "Pause",
/// "RamPushDirty",
/// "Device",
/// "Arch",
/// "Resume",
/// "RamPull",
/// "Finish",
/// "Error"
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub enum MigrationState {
Sync,
@ -460,6 +1020,28 @@ pub mod types {
}
}
///NetworkInterface
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "attachment",
/// "name"
/// ],
/// "properties": {
/// "attachment": {
/// "$ref": "#/components/schemas/NetworkInterfaceAttachmentState"
/// },
/// "name": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NetworkInterface {
pub attachment: NetworkInterfaceAttachmentState,
@ -472,6 +1054,36 @@ pub mod types {
}
}
///NetworkInterfaceAttachmentState
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "string",
/// "enum": [
/// "Detached",
/// "Faulted"
/// ]
/// },
/// {
/// "type": "object",
/// "required": [
/// "Attached"
/// ],
/// "properties": {
/// "Attached": {
/// "$ref": "#/components/schemas/Slot"
/// }
/// },
/// "additionalProperties": false
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub enum NetworkInterfaceAttachmentState {
Detached,
@ -491,6 +1103,28 @@ pub mod types {
}
}
///NetworkInterfaceRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "name",
/// "slot"
/// ],
/// "properties": {
/// "name": {
/// "type": "string"
/// },
/// "slot": {
/// "$ref": "#/components/schemas/Slot"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct NetworkInterfaceRequest {
pub name: String,
@ -505,6 +1139,18 @@ pub mod types {
///A stable index which is translated by Propolis into a PCI BDF, visible
/// to the guest.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "A stable index which is translated by Propolis into a
/// PCI BDF, visible to the guest.", "type": "integer",
/// "format": "uint8",
/// "minimum": 0.0
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Slot(pub u8);
impl std::ops::Deref for Slot {
@ -566,6 +1212,144 @@ pub mod types {
}
}
///VolumeConstructionRequest
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "oneOf": [
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "sub_volumes",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "read_only_parent": {
/// "allOf": [
/// {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// ]
/// },
/// "sub_volumes": {
/// "type": "array",
/// "items": {
/// "$ref": "#/components/schemas/VolumeConstructionRequest"
/// }
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "volume"
/// ]
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "type",
/// "url"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "url"
/// ]
/// },
/// "url": {
/// "type": "string"
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "gen",
/// "opts",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "gen": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "opts": {
/// "$ref": "#/components/schemas/CrucibleOpts"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "region"
/// ]
/// }
/// }
/// },
/// {
/// "type": "object",
/// "required": [
/// "block_size",
/// "id",
/// "path",
/// "type"
/// ],
/// "properties": {
/// "block_size": {
/// "type": "integer",
/// "format": "uint64",
/// "minimum": 0.0
/// },
/// "id": {
/// "type": "string",
/// "format": "uuid"
/// },
/// "path": {
/// "type": "string"
/// },
/// "type": {
/// "type": "string",
/// "enum": [
/// "file"
/// ]
/// }
/// }
/// }
/// ]
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(tag = "type")]
pub enum VolumeConstructionRequest {

View File

@ -7,6 +7,41 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///BodyWithDefaults
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "s"
/// ],
/// "properties": {
/// "forty-two": {
/// "default": 42,
/// "type": "integer",
/// "format": "uint32",
/// "minimum": 0.0
/// },
/// "s": {
/// "type": "string"
/// },
/// "something": {
/// "default": true,
/// "type": [
/// "boolean",
/// "null"
/// ]
/// },
/// "yes": {
/// "default": false,
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct BodyWithDefaults {
#[serde(rename = "forty-two", default = "defaults::default_u64::<u32, 42>")]
@ -31,6 +66,31 @@ pub mod types {
}
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]

View File

@ -7,6 +7,41 @@ pub mod types {
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use std::convert::TryFrom;
///BodyWithDefaults
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "type": "object",
/// "required": [
/// "s"
/// ],
/// "properties": {
/// "forty-two": {
/// "default": 42,
/// "type": "integer",
/// "format": "uint32",
/// "minimum": 0.0
/// },
/// "s": {
/// "type": "string"
/// },
/// "something": {
/// "default": true,
/// "type": [
/// "boolean",
/// "null"
/// ]
/// },
/// "yes": {
/// "default": false,
/// "type": "boolean"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct BodyWithDefaults {
#[serde(rename = "forty-two", default = "defaults::default_u64::<u32, 42>")]
@ -25,6 +60,31 @@ pub mod types {
}
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]

View File

@ -8,6 +8,31 @@ pub mod types {
#[allow(unused_imports)]
use std::convert::TryFrom;
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]

View File

@ -8,6 +8,31 @@ pub mod types {
#[allow(unused_imports)]
use std::convert::TryFrom;
///Error information from a response.
///
/// <details><summary>JSON schema</summary>
///
/// ```json
///{
/// "description": "Error information from a response.",
/// "type": "object",
/// "required": [
/// "message",
/// "request_id"
/// ],
/// "properties": {
/// "error_code": {
/// "type": "string"
/// },
/// "message": {
/// "type": "string"
/// },
/// "request_id": {
/// "type": "string"
/// }
/// }
///}
/// ```
/// </details>
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Error {
#[serde(default, skip_serializing_if = "Option::is_none")]