From 265db461c6368dcc243d97f59a71457f179c2e21 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 7 Oct 2016 10:51:13 +0200 Subject: [PATCH] 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 --- PVE/CLI/qm.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index e513f33b..a0e0ba56 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI/qm.pm @@ -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 }],