From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7EF301FF178 for ; Mon, 1 Dec 2025 16:00:38 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E822020246; Mon, 1 Dec 2025 16:01:02 +0100 (CET) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Date: Mon, 1 Dec 2025 16:00:14 +0100 Message-ID: <20251201150058.3461083-2-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251201150058.3461083-1-d.csapak@proxmox.com> References: <20251201150058.3461083-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.029 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH proxmox 2/2] fix #7080: pve-api-types: mark 'has-dbus-vmstate' optional X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" this was introduced in PVE9. Since PVE8 does not return this at all, de-serialization fails on PDM. To work around this, mark it as optional in the api type so de-serialization works again. (We currently don't use this value in PDM anyway) Signed-off-by: Dominik Csapak --- pve-api-types/generate.pl | 4 ++++ pve-api-types/src/generated/types.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pve-api-types/generate.pl b/pve-api-types/generate.pl index f72a776a..e92f776d 100755 --- a/pve-api-types/generate.pl +++ b/pve-api-types/generate.pl @@ -244,6 +244,10 @@ api(PUT => '/nodes/{node}/qemu/{vmid}/resize', 'qemu_resize', 'param-name' => 'Q api(POST => '/nodes/{node}/qemu/{vmid}/status/start', 'start_qemu_async', 'output-type' => 'PveUpid', 'param-name' => 'StartQemu'); api(POST => '/nodes/{node}/qemu/{vmid}/status/stop', 'stop_qemu_async', 'output-type' => 'PveUpid', 'param-name' => 'StopQemu'); api(POST => '/nodes/{node}/qemu/{vmid}/status/shutdown', 'shutdown_qemu_async', 'output-type' => 'PveUpid', 'param-name' => 'ShutdownQemu'); + +# PVE9 introduced a non-optional return value, mark it optional manually so we can still use it with PVE8 +my $r = (Schema2Rust::get_return_type(GET => '/nodes/{node}/qemu/{vmid}/migrate'))->{properties}; +$r->{'has-dbus-vmstate'}->{optional} = '1'; api(GET => '/nodes/{node}/qemu/{vmid}/migrate', 'qemu_migrate_preconditions', 'return-name' => 'QemuMigratePreconditions'); Schema2Rust::derive('QemuMigratePreconditionsNotAllowedNodesBlockingHaResources' => 'Clone', 'PartialEq'); Schema2Rust::derive('QemuMigratePreconditionsNotAllowedNodes' => 'Clone', 'PartialEq'); diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs index 01c7f0cd..557f90f7 100644 --- a/pve-api-types/src/generated/types.rs +++ b/pve-api-types/src/generated/types.rs @@ -13047,6 +13047,7 @@ serde_plain::derive_fromstr_from_deserialize!(QemuConfigVirtiofsCache); }, "has-dbus-vmstate": { default: false, + optional: true, }, local_disks: { items: { @@ -13098,8 +13099,9 @@ pub struct QemuMigratePreconditions { /// Whether the VM host supports migrating additional VM state, such as /// conntrack entries. #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] + #[serde(default, skip_serializing_if = "Option::is_none")] #[serde(rename = "has-dbus-vmstate")] - pub has_dbus_vmstate: bool, + pub has_dbus_vmstate: Option, /// List local disks including CD-Rom, unused and not referenced disks pub local_disks: Vec, -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel