]> git.proxmox.com Git - pve-manager.git/commitdiff
API: Tasks: add more fields to return schema
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 9 Jul 2021 14:09:29 +0000 (16:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 13 Jul 2021 04:54:31 +0000 (06:54 +0200)
so that they are documented and get displayed by pvesh/pvenode
all those fields must exists (since they come from the upid)
aside from the exitstatus, so marking that as optional

forum user reported that they are missing:
https://forum.proxmox.com/threads/ergebnis-eines-tasks-per-api-abfragen.92267/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
(cherry picked from commit 9777a9c4ae69b2f799c132bbc4086214d01b6ce8)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Tasks.pm

index 8f6ab60303e2d3a6cfd57ad8ce6a8e5fe9a1d484..29da1005eded49f18be198b4f4c6d017c3782347 100644 (file)
@@ -375,6 +375,28 @@ __PACKAGE__->register_method({
            status => {
                type => 'string', enum => ['running', 'stopped'],
            },
+           type => {
+               type => 'string',
+           },
+           id => {
+               type => 'string',
+           },
+           user => {
+               type => 'string',
+           },
+           exitstatus => {
+               type => 'string',
+               optional => 1,
+           },
+           upid => {
+               type => 'string',
+           },
+           starttime => {
+               type => 'number',
+           },
+           node => {
+               type => 'string',
+           },
        },
     },
     code => sub {