nexenta: has_feature

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2012-12-27 16:07:17 +01:00
committed by Dietmar Maurer
parent c0235499b3
commit 767132f72a

View File

@ -380,4 +380,18 @@ sub volume_snapshot_delete {
nexenta_request($scfg, 'destroy', 'snapshot', "$scfg->{pool}/$volname\@$snap", '');
}
sub volume_has_feature {
my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
my $features = {
snapshot => { current => 1, snap => 1},
clone => { snap => 1},
};
my $snap = $snapname ? 'snap' : 'current';
return 1 if $features->{$feature}->{$snap};
return undef;
}
1;