Treat Dom0 differently than other VMs.

This commit is contained in:
Julien Fontanet 2013-05-16 11:52:52 +01:00
parent ee1d1f3852
commit 8f46aa2242

View File

@ -213,6 +213,7 @@ final class Application extends Base
$vms = $mgr_vms->get(array(
'resident_on' => $host->id,
'is_control_domain' => false,
));
$CPUs = array();
@ -230,7 +231,9 @@ final class Application extends Base
$memory = array(
'free' => $metrics->memory_free,
'total' => $metrics->memory_total,
'per_VM' => array(),
'per_VM' => array(
'dom0' => $dom0->memory_dynamic_max,
),
);
$os_version = $dom0_guest_metrics
@ -270,11 +273,14 @@ final class Application extends Base
);
}
$VMs = array();
$VMs = array(
'dom0' => array(
'name' => 'Dom0',
),
);
foreach ($vms as $VM)
{
$VMs[$VM->uuid] = array(
'is_control_domain' => $VM->is_control_domain,
'name' => $VM->name_label,
);
$memory['per_VM'][$VM->uuid] = $VM->memory_dynamic_max;