storage plugins: add 'import' content type
Add a new 'import' content type which will be the corner stone for a better API and UI integrated way to import virtual guests into Proxmox VE. For starters this will be used to implement a ESXi adapter, so that those VMs can get imported nicely. Later we want to integrate the OVF/OVA import skeletons we got in qemu-server to something more usable here. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> [ TL: add more commit message with some background ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
eaf6995afd
commit
bf453532b0
@ -1107,7 +1107,7 @@ sub template_list {
|
||||
sub volume_list {
|
||||
my ($cfg, $storeid, $vmid, $content) = @_;
|
||||
|
||||
my @ctypes = qw(rootdir images vztmpl iso backup snippets);
|
||||
my @ctypes = qw(rootdir images vztmpl iso backup snippets import);
|
||||
|
||||
my $cts = $content ? [ $content ] : [ @ctypes ];
|
||||
|
||||
|
||||
@ -319,7 +319,9 @@ PVE::JSONSchema::register_format('pve-storage-content', \&verify_content);
|
||||
sub verify_content {
|
||||
my ($ct, $noerr) = @_;
|
||||
|
||||
my $valid_content = valid_content_types('dir'); # dir includes all types
|
||||
return $ct if $ct eq 'import';
|
||||
|
||||
my $valid_content = valid_content_types('dir'); # dir includes all other types
|
||||
|
||||
if (!$valid_content->{$ct}) {
|
||||
return undef if $noerr;
|
||||
|
||||
Reference in New Issue
Block a user