mirror of
git://git.proxmox.com/git/pve-guest-common.git
synced 2025-03-11 16:58:18 +03:00
vzdump: schema: make storage for fleecing semi-optional
so it doesn't need to be set when explicitly disabling fleecing. Needs a custom verifier to enforce it being set when enabled. Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ceb527c870
commit
58c48f3ef0
@ -95,8 +95,20 @@ PVE::JSONSchema::register_format('backup-fleecing', {
|
||||
description => "Use this storage to storage fleecing images. For efficient space usage,"
|
||||
." it's best to use a local storage that supports discard and either thin provisioning"
|
||||
." or sparse files.",
|
||||
optional => 1,
|
||||
}),
|
||||
});
|
||||
}, \&verify_backup_fleecing);
|
||||
|
||||
sub verify_backup_fleecing {
|
||||
my ($param, $noerr) = @_;
|
||||
|
||||
if (!$param->{storage} && $param->{enabled}) {
|
||||
return if $noerr;
|
||||
die "'storage' parameter is required when 'enabled' is set\n";
|
||||
}
|
||||
|
||||
return $param;
|
||||
}
|
||||
|
||||
PVE::JSONSchema::register_format('backup-performance', {
|
||||
'max-workers' => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user