api: admin/datastore: enable streaming for some api calls

namely /admin/datastore/{store}/snapshots
and /nodes/{node}/tasks

since those are api calls where the result can get quite large
with this change, the serialization is now streaming instead of making
a `Value` in memory.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-04-12 16:15:10 +02:00 committed by Wolfgang Bumiller
parent 32e2b5abe6
commit b7c3eaa981
2 changed files with 2 additions and 0 deletions

View File

@ -375,6 +375,7 @@ pub fn delete_snapshot(
}
#[api(
streaming: true,
input: {
properties: {
store: {

View File

@ -380,6 +380,7 @@ fn stop_task(
}
#[api(
streaming: true,
input: {
properties: {
node: {