[pve-devel] [PATCH manager] API: Tasks: add more fields to return schema

Dominik Csapak d.csapak at proxmox.com
Fri Jul 9 16:09:29 CEST 2021


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 at proxmox.com>
---
 PVE/API2/Tasks.pm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/PVE/API2/Tasks.pm b/PVE/API2/Tasks.pm
index 085f9b95..056b698b 100644
--- a/PVE/API2/Tasks.pm
+++ b/PVE/API2/Tasks.pm
@@ -418,6 +418,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 {
-- 
2.30.2






More information about the pve-devel mailing list