mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 18:45:29 +00:00
add qm listsnapshot call
the api call is already there, just not used in qm.pm copied mostly from pct.pm Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
b799312f2f
commit
265db461c6
@ -490,6 +490,17 @@ our $cmddef = {
|
||||
|
||||
delsnapshot => [ "PVE::API2::Qemu", 'delsnapshot', ['vmid', 'snapname'], { node => $nodename } , $upid_exit ],
|
||||
|
||||
listsnapshot => [ "PVE::API2::Qemu", 'snapshot_list', ['vmid'], { node => $nodename },
|
||||
sub {
|
||||
my $res = shift;
|
||||
foreach my $e (@$res) {
|
||||
my $headline = $e->{description} || 'no-description';
|
||||
$headline =~ s/\n.*//sg;
|
||||
my $parent = $e->{parent} // 'no-parent';
|
||||
printf("%-20s %-20s %s\n", $e->{name}, $parent, $headline);
|
||||
}
|
||||
}],
|
||||
|
||||
rollback => [ "PVE::API2::Qemu", 'rollback', ['vmid', 'snapname'], { node => $nodename } , $upid_exit ],
|
||||
|
||||
template => [ "PVE::API2::Qemu", 'template', ['vmid'], { node => $nodename }],
|
||||
|
Loading…
Reference in New Issue
Block a user