rbd : add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
50a19c0987
commit
788dd8e182
@ -278,4 +278,14 @@ sub volume_resize {
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub volume_snapshot {
|
||||||
|
my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
|
||||||
|
|
||||||
|
return 1 if $running;
|
||||||
|
|
||||||
|
my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'create', '--snap', $snap, $volname);
|
||||||
|
run_command($cmd, errmsg => "rbd snapshot $volname' error", errfunc => sub {});
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
Reference in New Issue
Block a user