Skip to main content

clientapi_pve/models/
lxc_remote_migrate_vm_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct LxcRemoteMigrateVmRequest {
16
17    /// Override I/O bandwidth limit (in KiB/s).
18    #[serde(rename = "bwlimit", skip_serializing_if = "Option::is_none")]
19    pub bwlimit: Option<f64>,
20
21    /// Delete the original CT and related data after successful migration. By default the original CT is kept on the source cluster in a stopped state.
22    #[serde(rename = "delete", skip_serializing_if = "Option::is_none")]
23    pub delete: Option<models::PveBoolean>,
24
25    /// Use online/live migration.
26    #[serde(rename = "online", skip_serializing_if = "Option::is_none")]
27    pub online: Option<models::PveBoolean>,
28
29    /// Use restart migration
30    #[serde(rename = "restart", skip_serializing_if = "Option::is_none")]
31    pub restart: Option<models::PveBoolean>,
32
33    /// Mapping from source to target bridges. Providing only a single bridge ID maps all source bridges to that bridge. Providing the special value '1' will map each source bridge to itself.
34    #[serde(rename = "target-bridge")]
35    pub target_bridge: String,
36
37    /// Remote target endpoint
38    #[serde(rename = "target-endpoint")]
39    pub target_endpoint: String,
40
41    /// 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.
42    #[serde(rename = "target-storage")]
43    pub target_storage: String,
44
45    /// The (unique) ID of the VM.
46    #[serde(rename = "target-vmid", skip_serializing_if = "Option::is_none")]
47    pub target_vmid: Option<i32>,
48
49    /// Timeout in seconds for shutdown for restart migration
50    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
51    pub timeout: Option<i64>,
52
53
54}
55
56impl LxcRemoteMigrateVmRequest {
57    pub fn new(target_bridge: String, target_endpoint: String, target_storage: String) -> LxcRemoteMigrateVmRequest {
58        LxcRemoteMigrateVmRequest {
59            
60            bwlimit: None,
61            
62            delete: None,
63            
64            online: None,
65            
66            restart: None,
67            
68            target_bridge,
69            
70            target_endpoint,
71            
72            target_storage,
73            
74            target_vmid: None,
75            
76            timeout: None,
77            
78        }
79    }
80}
81
82