jobs: vzdump: fixup prune-schedule conf

when we parse the config, we get the 'prune-backup' decoded, but the
api call we use wants it as a property string, so encode it here again

this fixes having jobs with prune options

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-11-12 13:37:27 +01:00 committed by Thomas Lamprecht
parent 7aa5b131ff
commit 80ea4443a3

View File

@ -72,6 +72,12 @@ sub run {
delete $conf->{$opt} if !defined($props->{$opt});
}
# fixup prune-backups, we get it decoded but want it as string parameter
$conf->{'prune-backups'} = PVE::JSONSchema::print_property_string(
$conf->{'prune-backups'},
'prune-backups',
) if $conf->{'prune-backups'} && ref($conf->{'prune-backups'}) eq 'HASH';
$conf->{quiet} = 1; # do not write to stdout/stderr
PVE::Cluster::cfs_update(); # refresh vmlist