mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-08 11:33:21 +00:00
pass 'digest', so that GUI can detect changes easily
Also use 'current' instead of '__current'
This commit is contained in:
parent
a3222b9184
commit
d191446898
@ -1929,11 +1929,10 @@ __PACKAGE__->register_method({
|
|||||||
push @$res, $item;
|
push @$res, $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->{parent}) {
|
my $current = { name => 'current', digest => $conf->{digest} };
|
||||||
push @$res, { name => '__current', parent => $conf->{parent} };
|
$current->{parent} = $conf->{parent} if $conf->{parent};
|
||||||
} else {
|
|
||||||
push @$res, { name => '__current' };
|
push @$res, $current;
|
||||||
}
|
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}});
|
}});
|
||||||
@ -1988,6 +1987,9 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
my $snapname = extract_param($param, 'snapname');
|
my $snapname = extract_param($param, 'snapname');
|
||||||
|
|
||||||
|
die "unable to use snapshot name 'current' (reserved name)\n"
|
||||||
|
if $snapname eq 'current';
|
||||||
|
|
||||||
my $realcmd = sub {
|
my $realcmd = sub {
|
||||||
PVE::Cluster::log_msg('info', $authuser, "snapshot VM $vmid: $snapname");
|
PVE::Cluster::log_msg('info', $authuser, "snapshot VM $vmid: $snapname");
|
||||||
PVE::QemuServer::snapshot_create($vmid, $snapname, $param->{vmstate},
|
PVE::QemuServer::snapshot_create($vmid, $snapname, $param->{vmstate},
|
||||||
|
Loading…
Reference in New Issue
Block a user