plugin: dir: implement import content type
in DirPlugin and not Plugin (because of cyclic dependency of Plugin -> OVF -> Storage -> Plugin otherwise) only ovf is currently supported (though ova will be shown in import listing), expects the files to not be in a subdir, and adjacent to the ovf file. listed will be all ovf/qcow2/raw/vmdk files. ovf because it can be imported, and the rest because they can be used in the 'import-from' part of qemu-server. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
4e97c507d2
commit
d955a46a32
@ -190,6 +190,14 @@ my @tests = (
|
||||
'local:vztmpl/debian-10.0-standard_10.0-1_amd64.tar.xz',
|
||||
],
|
||||
},
|
||||
{
|
||||
description => 'Import, ovf',
|
||||
volname => "$storage_dir/import/import.ovf",
|
||||
expected => [
|
||||
'import',
|
||||
'local:import/import.ovf',
|
||||
],
|
||||
},
|
||||
|
||||
# no matches, path or files with failures
|
||||
{
|
||||
@ -237,6 +245,11 @@ my @tests = (
|
||||
volname => "$storage_dir/images/ssss/vm-1234-disk-0.qcow2",
|
||||
expected => [''],
|
||||
},
|
||||
{
|
||||
description => 'Import, non ova/ovf/disk image in import dir',
|
||||
volname => "$storage_dir/import/test.foo",
|
||||
expected => [''],
|
||||
},
|
||||
);
|
||||
|
||||
plan tests => scalar @tests + 1;
|
||||
|
||||
Reference in New Issue
Block a user