[pve-devel] volume_has_feature question
Dietmar Maurer
dietmar at proxmox.com
Fri Feb 15 08:36:41 CET 2013
Hi Alexandre,
I don't really understand the code in 'PVE::Storage::Plugin::volume_has_feature'
----------------------------
sub volume_has_feature {
my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
my $features = {
snapshot => { current => { qcow2 => 1}, snap => { qcow2 => 1} },
clone => { base => {qcow2 => 1, raw => 1, vmdk => 1} },
copy => { base => {qcow2 => 1, raw => 1, vmdk => 1},
current => {qcow2 => 1, raw => 1, vmdk => 1},
snap => {qcow2 => 1} },
};
my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
$class->parse_volname($volname);
my (undef, $format) = parse_name_dir($name);
my $key = undef;
if($snapname){
$key = $snapname
------------------------------------
I thought that should be "$key = 'snap'"?
More information about the pve-devel
mailing list