[pve-devel] r5976 - qemu-server/pve2/PVE/API2

svn-commits at proxmox.com svn-commits at proxmox.com
Fri May 13 11:59:00 CEST 2011


Author: dietmar
Date: 2011-05-13 11:59:00 +0200 (Fri, 13 May 2011)
New Revision: 5976

Modified:
   qemu-server/pve2/PVE/API2/Qemu.pm
Log:
fix status


Modified: qemu-server/pve2/PVE/API2/Qemu.pm
===================================================================
--- qemu-server/pve2/PVE/API2/Qemu.pm	2011-05-13 08:34:49 UTC (rev 5975)
+++ qemu-server/pve2/PVE/API2/Qemu.pm	2011-05-13 09:59:00 UTC (rev 5976)
@@ -540,20 +540,16 @@
 	    vmid => get_standard_option('pve-vmid'),
 	},
     },
-    returns => {},
+    returns => { type => 'object' },
     code => sub {
 	my ($param) = @_;
 
+	# test if VM exists
 	my $conf = PVE::QemuServer::load_config ($param->{vmid});
 
-	# fixme: that should not be added to the config
-	delete $conf->{disksize};
-	delete $conf->{disktype};
-	delete $conf->{diskinfo};
+	my $vmstatus =  PVE::QemuServer::vmstatus();
 
-	# fixme:
-
-	return $conf;
+	return $vmstatus->{$param->{vmid}};
     }});
 
 __PACKAGE__->register_method ({




More information about the pve-devel mailing list