]> git.proxmox.com Git - pve-container.git/commitdiff
vmstatus: add dummy values
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 16 Apr 2015 14:19:49 +0000 (16:19 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 16 Apr 2015 14:31:05 +0000 (16:31 +0200)
src/PVE/API2/LXC.pm
src/PVE/LXC.pm

index 121173bb12386e5abecc83e7246b82b1f83d4a13..ae62e1ccaa7ee20a649c5ef7bbb348a6f0aa248a 100644 (file)
@@ -394,7 +394,7 @@ __PACKAGE__->register_method({
        my ($param) = @_;
 
        # test if VM exists
-       my $conf = PVE::OpenVZ::load_config($param->{vmid});
+       my $conf = PVE::LXC::load_config($param->{vmid});
 
        my $res = [
            { subdir => 'config' },
index e3367ccbfa57bd859d65e670212fc2357ab7a1ef..82ce12befc40f63c3d30d7aed00c3ea19f456233 100644 (file)
@@ -378,9 +378,25 @@ sub vmstatus {
 
        my $cfspath = cfs_config_path($vmid);
        if (my $conf = PVE::Cluster::cfs_read_file($cfspath)) {
-           print Dumper($conf);
            $d->{name} = $conf->{'lxc.utsname'} || "CT$vmid";
            $d->{name} =~ s/[\s]//g;
+           
+           $d->{cpus} = 1;
+
+           $d->{disk} = 0;
+           $d->{maxdisk} = 1;
+
+           $d->{mem} = 0;
+           $d->{maxmem} = 1024;
+
+           $d->{uptime} = 0;
+           $d->{cpu} = 0;
+
+           $d->{netout} = 0;
+           $d->{netin} = 0;
+
+           $d->{diskread} = 0;
+           $d->{diskwrite} = 0;
 
        }
     }