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>
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 ];
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;