rbd : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
f884fe1125
commit
774f21b9ee
@ -352,4 +352,18 @@ sub volume_snapshot_delete {
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
1;
|
||||||
|
|||||||
Reference in New Issue
Block a user