]> git.proxmox.com Git - pve-common.git/commit
api dump: do not skip indexed params with only one index
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 23 Jul 2018 10:11:09 +0000 (12:11 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 23 Jul 2018 14:11:21 +0000 (16:11 +0200)
commit34d8999638d548e09f4d20707bd41231cef537b1
tree118855c598ccb939694af30aeca73cc5d9a99466
parentf4265f248fa5254274e80795f190819bf04b220f
api dump: do not skip indexed params with only one index

We transform indexed parameters (like scsi0 scsi1 ...) to a single
scsi[n]. The check if we should transform did not handle the case
where a parameter was indexed but (currently) only index 0 existed.
Such definitions where simply skipped and seemed then to miss from
places using the API dump, like the api-viewer.

We now only skip those parameters with an index > 0 where the same
parameter with index 0 is defined.

This fixes a missing efidisk0 entry in an API dump[0].

[0]: https://forum.proxmox.com/threads/efidisk0-creation-missing-from-api.45624/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/RESTHandler.pm