Skip to main content

proxmox_api/generated/nodes/node/capabilities/qemu/
migration.rs

1#[derive(Debug, Clone)]
2pub struct MigrationClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> MigrationClient<T>
7where
8    T: crate::client::Client,
9{
10    pub fn new(client: T, parent_path: &str) -> Self {
11        Self {
12            client,
13            path: format!("{}{}", parent_path, "/migration"),
14        }
15    }
16}
17impl<T> MigrationClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "Get node-specific QEMU migration capabilities of the node. Requires the 'Sys.Audit' permission on '/nodes/\\<node\\>'."]
22    #[doc = ""]
23    #[doc = "Permission check: perm(\"/nodes/{node}\", [\"Sys.Audit\"])"]
24    pub async fn get(&self) -> Result<GetOutput, T::Error> {
25        let path = self.path.to_string();
26        self.client.get(&path, &()).await
27    }
28}
29impl GetOutput {
30    pub fn new(has_dbus_vmstate: bool) -> Self {
31        Self { has_dbus_vmstate }
32    }
33}
34#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
35pub struct GetOutput {
36    #[serde(rename = "has-dbus-vmstate")]
37    #[serde(
38        serialize_with = "crate::types::serialize_bool",
39        deserialize_with = "crate::types::deserialize_bool"
40    )]
41    #[doc = "Whether the host supports live-migrating additional VM state via the dbus-vmstate helper."]
42    #[doc = ""]
43    pub has_dbus_vmstate: bool,
44}