1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QemuMigrateVmRequest {
/// Override I/O bandwidth limit (in KiB/s).
#[serde(rename = "bwlimit", skip_serializing_if = "Option::is_none")]
pub bwlimit: Option<i64>,
/// Allow to migrate VMs which use local devices. Only root may use this option.
#[serde(rename = "force", skip_serializing_if = "Option::is_none")]
pub force: Option<models::PveBoolean>,
/// CIDR of the (sub) network that is used for migration.
#[serde(rename = "migration_network", skip_serializing_if = "Option::is_none")]
pub migration_network: Option<String>,
/// Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.
#[serde(rename = "migration_type", skip_serializing_if = "Option::is_none")]
pub migration_type: Option<models::PveMigrationTypeEnum>,
/// Use online/live migration if VM is running. Ignored if VM is stopped.
#[serde(rename = "online", skip_serializing_if = "Option::is_none")]
pub online: Option<models::PveBoolean>,
/// Target node.
#[serde(rename = "target")]
pub target: String,
/// Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.
#[serde(rename = "targetstorage", skip_serializing_if = "Option::is_none")]
pub targetstorage: Option<String>,
/// Whether to migrate conntrack entries for running VMs.
#[serde(rename = "with-conntrack-state", skip_serializing_if = "Option::is_none")]
pub with_conntrack_state: Option<models::PveBoolean>,
/// Enable live storage migration for local disk
#[serde(rename = "with-local-disks", skip_serializing_if = "Option::is_none")]
pub with_local_disks: Option<models::PveBoolean>,
}
impl QemuMigrateVmRequest {
pub fn new(target: String) -> QemuMigrateVmRequest {
QemuMigrateVmRequest {
bwlimit: None,
force: None,
migration_network: None,
migration_type: None,
online: None,
target,
targetstorage: None,
with_conntrack_state: None,
with_local_disks: None,
}
}
}