api: status: rely on get_formats() method for determining format-related info
Rely on get_formats() rather than just the static plugin data in the 'status' API call. This removes the need for the special casing for LVM storages without the 'snapshot-as-volume-chain' option. It also fixes the issue that the 'format' storage configuration option to override the default format was previously ignored there. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
dd2efb7846
commit
ad20e4faef
@ -1511,9 +1511,10 @@ sub storage_info {
|
||||
|
||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
if ($includeformat) {
|
||||
my $formats = $plugin->get_formats($scfg, $storeid);
|
||||
$info->{$storeid}->{format} = [$formats->{valid}, $formats->{default}];
|
||||
|
||||
my $pd = $plugin->plugindata();
|
||||
$info->{$storeid}->{format} = $pd->{format}
|
||||
if $pd->{format};
|
||||
$info->{$storeid}->{select_existing} = $pd->{select_existing}
|
||||
if $pd->{select_existing};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user