]> git.proxmox.com Git - qemu-server.git/commitdiff
api: return UPID in template call
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 10 Sep 2021 07:48:19 +0000 (09:48 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 Oct 2021 07:46:52 +0000 (09:46 +0200)
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>
PVE/API2/Qemu.pm

index ef0d877681972e14c365763295dad902a45352dc..0a23525fe3e4e2990ad4c036625c77f374b416de 100644 (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({