introduce 'pve-storage-image-format' standard option for image format
The new 'pve-storage-image-format' standard option uses a simple enum instead of a subroutine verifier. Since the 'pve-storage-format' format that is replaced by it was used in pve-guest-common's StorageTunnel, the format cannot be removed without a versioned breaks. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
559867f79b
commit
2569cb4604
@ -6,7 +6,7 @@ use warnings;
|
||||
use PVE::SafeSyslog;
|
||||
use PVE::Cluster;
|
||||
use PVE::Storage;
|
||||
use PVE::Storage::Plugin; # for 'pve-storage-format' format
|
||||
use PVE::Storage::Common; # for 'pve-storage-image-format' standard option
|
||||
use PVE::INotify;
|
||||
use PVE::Exception qw(raise_param_exc);
|
||||
use PVE::RPCEnvironment;
|
||||
@ -178,12 +178,10 @@ __PACKAGE__->register_method ({
|
||||
type => 'string',
|
||||
pattern => '\d+[MG]?',
|
||||
},
|
||||
'format' => {
|
||||
type => 'string',
|
||||
format => 'pve-storage-format',
|
||||
format => get_standard_option('pve-storage-image-format', {
|
||||
requires => 'size',
|
||||
optional => 1,
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
returns => {
|
||||
|
||||
Reference in New Issue
Block a user