]> git.proxmox.com Git - pve-storage.git/commitdiff
api: content listing: add comment and verification fields
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 12 Nov 2020 15:26:01 +0000 (16:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 12 Nov 2020 16:16:55 +0000 (17:16 +0100)
for now only for PBS, since we do not have such info elsewhere

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Storage/Content.pm
PVE/Storage/PBSPlugin.pm

index f2e3e573c104a311359fb8b354f8aa0e3e76e99a..8d2ff3269ca35c274bffa71e397c02618089c318 100644 (file)
@@ -87,6 +87,26 @@ __PACKAGE__->register_method ({
                    minimum => 0,
                    optional => 1,
                },
+               comment => {
+                   description => "An optional Comment.",
+                   type => 'string',
+                   optional => 1,
+               },
+               verification => {
+                   description => "Last backup verification result, only useful for PBS storages.",
+                   type => 'object',
+                   properties => {
+                       state => {
+                           description => "Last backup verification state.",
+                           type => 'string',
+                       },
+                       upid => {
+                           description => "Last backup verification UPID.",
+                           type => 'string',
+                       },
+                   },
+                   optional => 1,
+               },
            },
        },
        links => [ { rel => 'child', href => "{volid}" } ],
index e4c431e2441b2a09ec14ae39b404c38053ecf0fe..f3bf01620de4161836aebeb3bacaee9afd1febd8 100644 (file)
@@ -525,6 +525,9 @@ sub list_volumes {
            ctime => $epoch,
        };
 
+       $info->{verification} = $item->{verification} if defined($item->{verification});
+       $info->{comment} = $item->{comment} if defined($item->{comment});
+
        push @$res, $info;
     }