sheepdog : add volume_snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2012-09-06 10:27:53 +02:00
committed by Dietmar Maurer
parent 7dcb06977e
commit 50a19c0987

View File

@ -242,4 +242,15 @@ sub volume_resize {
return undef;
}
sub volume_snapshot {
my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
return 1 if $running;
my $cmd = &$collie_cmd($scfg, 'vdi', 'snapshot', '-s', $snap, $volname);
run_command($cmd, errmsg => "sheepdog snapshot $volname' error");
return undef;
}
1;