]> git.proxmox.com Git - pve-storage.git/commit
api: import-metadata: make warnings structured & merge ignored-volumes
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 10 Mar 2024 18:25:34 +0000 (19:25 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Mar 2024 14:29:35 +0000 (15:29 +0100)
commit1a94dceb6f60c49f3cd0a3ae00f2e023f01de207
tree801767071ae5d1ede64a0a9dbb78d87bf90536e8
parentb628964289996c09f0ed1c02e906b6b7f8108b8a
api: import-metadata: make warnings structured & merge ignored-volumes

This allows the frontends to translate them and avoids somewhat
duplicated info by having some warnings explicitly (ignored-volumes)
while others are in the warnings array.

By passing along the key and the value the frontend can also show the
warnings in-line, e.g. by marking a disk-entry in a grid as having
potential problems.

Ideally we'd have a central list of known types used for the API
return schema enum and to check when calling the $warn closure, but as
we only got three warnings keep this as is and only add a comment.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/Storage/Status.pm
src/PVE/Storage/ESXiPlugin.pm