]>
git.proxmox.com Git - pve-storage.git/blob - PVE/Storage/DirPlugin.pm
1 package PVE
::Storage
::DirPlugin
;
6 use PVE
::Storage
::Plugin
;
7 use PVE
::JSONSchema
qw(get_standard_option);
9 use base
qw(PVE::Storage::Plugin);
19 content
=> [ { images
=> 1, rootdir
=> 1, vztmpl
=> 1, iso
=> 1, backup
=> 1, none
=> 1 },
20 { images
=> 1, rootdir
=> 1 }],
21 format
=> [ { raw
=> 1, qcow2
=> 1, vmdk
=> 1, subvol
=> 1 } , 'raw' ],
28 description
=> "File system path.",
29 type
=> 'string', format
=> 'pve-storage-path',
32 description
=> "Create the directory if it doesn't exist.",
41 path
=> { fixed
=> 1 },
42 nodes
=> { optional
=> 1 },
43 shared
=> { optional
=> 1 },
44 disable
=> { optional
=> 1 },
45 maxfiles
=> { optional
=> 1 },
46 content
=> { optional
=> 1 },
47 format
=> { optional
=> 1 },
48 mkdir => { optional
=> 1 },
52 # Storage implementation
54 sub activate_storage
{
55 my ($class, $storeid, $scfg, $cache) = @_;
57 if (!defined($scfg->{mkdir}) || $scfg->{mkdir}) {
58 my $path = $scfg->{path
};
62 $class->SUPER::activate_storage
($storeid, $scfg, $cache);