]> git.proxmox.com Git - qemu-server.git/commitdiff
include additional info in snapshot list
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 13 Sep 2012 07:45:48 +0000 (09:45 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 13 Sep 2012 07:45:48 +0000 (09:45 +0200)
Makefile
PVE/API2/Qemu.pm

index 1b775e2948a42e4ac9c0ac8880245d24fc000852..cd927f4a920e2e4b49768cd54e652ef7f24161ab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-RELEASE=2.1
+RELEASE=2.2
 
 VERSION=2.0
 PACKAGE=qemu-server
index 5d69ca33f194876ff3c78879084855e552929422..a4b84e9fca641f73e3e43f74abc82926ec50267e 100644 (file)
@@ -1912,7 +1912,9 @@ __PACKAGE__->register_method({
     code => sub {
        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 $res = [];
@@ -1922,6 +1924,7 @@ __PACKAGE__->register_method({
            my $item = { 
                name => $name, 
                snaptime => $d->{snaptime} || 0, 
+               vmstate => $d->{vmstate} ? 1 : 0,
                description => $d->{description} || '',
            };
            $item->{parent} = $d->{parent} if $d->{parent};
@@ -1929,7 +1932,8 @@ __PACKAGE__->register_method({
            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};
 
        push @$res, $current;