From b297918ce282e8cf082828102cf9ff8a9d046521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 10 Sep 2021 09:48:19 +0200 Subject: [PATCH] api: return UPID in template call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as reported on the forum, this is currently missing, making status queries via the API impossible: https://forum.proxmox.com/threads/create-vm-via-api-interface.95942/#post-416084 Signed-off-by: Fabian Grünbichler Reviewed-by: Fabian Ebner --- PVE/API2/Qemu.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index ef0d8776..0a23525f 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -4336,7 +4336,10 @@ __PACKAGE__->register_method({ }, }, - returns => { type => 'null'}, + returns => { + type => 'string', + description => "the task ID.", + }, code => sub { my ($param) = @_; @@ -4375,8 +4378,7 @@ __PACKAGE__->register_method({ return $rpcenv->fork_worker('qmtemplate', $vmid, $authuser, $realcmd); }; - PVE::QemuConfig->lock_config($vmid, $updatefn); - return; + return PVE::QemuConfig->lock_config($vmid, $updatefn); }}); __PACKAGE__->register_method({