api: return UPID in template call

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 <f.gruenbichler@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-09-10 09:48:19 +02:00 committed by Thomas Lamprecht
parent 3e07c6d54b
commit b297918ce2

View File

@ -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({