rbd: sub path: add snapname argument

needed for qemu-img convert from src snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2013-05-02 05:51:51 +02:00
committed by Dietmar Maurer
parent 24cec3aa77
commit 38e6ec3fbd

View File

@ -224,9 +224,10 @@ sub parse_volname {
}
sub path {
my ($class, $scfg, $volname, $storeid) = @_;
my ($class, $scfg, $volname, $storeid, $snapname) = @_;
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
$name .= '@'.$snapname if $snapname;
my $monhost = addslashes($scfg->{monhost});
my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd';