mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-14 05:53:35 +00:00
include additional info in snapshot list
This commit is contained in:
parent
d191446898
commit
6aa4651b89
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
RELEASE=2.1
|
RELEASE=2.2
|
||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=qemu-server
|
PACKAGE=qemu-server
|
||||||
|
@ -1912,7 +1912,9 @@ __PACKAGE__->register_method({
|
|||||||
code => sub {
|
code => sub {
|
||||||
my ($param) = @_;
|
my ($param) = @_;
|
||||||
|
|
||||||
my $conf = PVE::QemuServer::load_config($param->{vmid});
|
my $vmid = $param->{vmid};
|
||||||
|
|
||||||
|
my $conf = PVE::QemuServer::load_config($vmid);
|
||||||
my $snaphash = $conf->{snapshots} || {};
|
my $snaphash = $conf->{snapshots} || {};
|
||||||
|
|
||||||
my $res = [];
|
my $res = [];
|
||||||
@ -1922,6 +1924,7 @@ __PACKAGE__->register_method({
|
|||||||
my $item = {
|
my $item = {
|
||||||
name => $name,
|
name => $name,
|
||||||
snaptime => $d->{snaptime} || 0,
|
snaptime => $d->{snaptime} || 0,
|
||||||
|
vmstate => $d->{vmstate} ? 1 : 0,
|
||||||
description => $d->{description} || '',
|
description => $d->{description} || '',
|
||||||
};
|
};
|
||||||
$item->{parent} = $d->{parent} if $d->{parent};
|
$item->{parent} = $d->{parent} if $d->{parent};
|
||||||
@ -1929,7 +1932,8 @@ __PACKAGE__->register_method({
|
|||||||
push @$res, $item;
|
push @$res, $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $current = { name => 'current', digest => $conf->{digest} };
|
my $running = PVE::QemuServer::check_running($vmid, 1) ? 1 : 0;
|
||||||
|
my $current = { name => 'current', digest => $conf->{digest}, running => $running };
|
||||||
$current->{parent} = $conf->{parent} if $conf->{parent};
|
$current->{parent} = $conf->{parent} if $conf->{parent};
|
||||||
|
|
||||||
push @$res, $current;
|
push @$res, $current;
|
||||||
|
Loading…
Reference in New Issue
Block a user