]> git.proxmox.com Git - qemu-server.git/commit
cloudinit: fix 'pending' api endpoint
authorLeo Nunner <l.nunner@proxmox.com>
Thu, 11 May 2023 08:03:17 +0000 (10:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jun 2023 16:32:42 +0000 (18:32 +0200)
commit3a704639b7123d43ad9ef192eb9d842b7b17327e
treef3ac189c524e9c89f5a7ee86f098d0201182ce82
parentefa3355d3b17170e073258331bfa9e2b99f3fa43
cloudinit: fix 'pending' api endpoint

This patch partially reverts commit 1b5706cd168fedc5e494e24300069ee4ff25761f,
by reintroducing the old format for return values (key, value, pending,
delete), but drops the "force-delete" return value. Right now, this
endpoint does not conform to its own format, because the return values
are as follows:

{
    key => {
old => 'foo',
new => 'bar',
    },
    […]
}

While the format specified is

[
    {
key => 'baz',
old => 'foo',
new => 'bar',
    },
    […]
]

This leads to the endpoint being broken when used through 'qm' and
'pvesh'. Using the API works fine, because the format doesn't get
verified there. Reverting this change brings the advantage that we can
also use PVE::GuestHelpers::format_pending when calling the endpoint
through qm again.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
PVE/API2/Qemu.pm