From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] api: migration preconditions: add more return type information
Date: Wed, 18 Dec 2024 12:54:23 +0100 [thread overview]
Message-ID: <20241218115423.2310155-1-d.csapak@proxmox.com> (raw)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
PVE/API2/Qemu.pm | 49 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index c7f45051..db356b7e 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -4581,27 +4581,74 @@ __PACKAGE__->register_method({
returns => {
type => "object",
properties => {
- running => { type => 'boolean' },
+ running => {
+ type => 'boolean',
+ description => "Determines if the VM is running.",
+ },
allowed_nodes => {
type => 'array',
+ items => {
+ type => 'string',
+ description => "An allowed node",
+ },
optional => 1,
description => "List nodes allowed for offline migration, only passed if VM is offline"
},
not_allowed_nodes => {
type => 'object',
optional => 1,
+ properties => {
+ unavailable_storages => {
+ type => 'array',
+ optional => 1,
+ description => 'A list of not available storages.',
+ items => {
+ type => 'string',
+ description => 'A storage',
+ },
+ },
+ },
description => "List not allowed nodes with additional information, only passed if VM is offline"
},
local_disks => {
type => 'array',
+ items => {
+ type => 'object',
+ properties => {
+ size => {
+ type => 'integer',
+ description => 'The size of the disk in bytes.',
+ },
+ volid => {
+ type => 'string',
+ description => 'The volid of the disk.',
+ },
+ cdrom => {
+ type => 'boolean',
+ description => 'True if the disk is a cdrom.',
+ },
+ is_unused => {
+ type => 'boolean',
+ description => 'True if the disk is unused.',
+ },
+ },
+ },
description => "List local disks including CD-Rom, unused and not referenced disks"
},
local_resources => {
type => 'array',
+ items => {
+ type => 'string',
+ description => "A local resource",
+ },
description => "List local resources e.g. pci, usb"
},
'mapped-resources' => {
type => 'array',
+ items => {
+ type => 'string',
+ description => "A mapped resource",
+ },
description => "List of mapped resources e.g. pci, usb"
},
},
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2024-12-18 11:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 11:54 Dominik Csapak [this message]
2024-12-18 12:44 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241218115423.2310155-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox