[Ovirt-devel] [PATCH]: Add host memory in kb to the database
Chris Lalancette
clalance at redhat.com
Mon Aug 11 13:16:29 UTC 2008
When inserting memory values into the database, ovirt-identify-node is
sending over values in kilobytes. The database is also in kilobytes.
Don't run a non-sensical "mb_to_kb" conversion on the memory value
before sticking it into the database.
Signed-off-by: Chris Lalancette <clalance at redhat.com>
diff --git a/wui/src/host-browser/host-browser.rb b/wui/src/host-browser/host-browser.rb
index a1bda3d..881b2ae 100755
--- a/wui/src/host-browser/host-browser.rb
+++ b/wui/src/host-browser/host-browser.rb
@@ -219,7 +219,7 @@ class HostBrowser
"hostname" => host_info['HOSTNAME'],
"hypervisor_type" => host_info['HYPERVISOR_TYPE'],
"arch" => host_info['ARCH'],
- "memory_in_mb" => host_info['MEMSIZE'],
+ "memory" => host_info['MEMSIZE'],
"is_disabled" => 0,
"hardware_pool" => HardwarePool.get_default_pool,
# Let host-status mark it available when it
@@ -232,7 +232,7 @@ class HostBrowser
host.uuid = host_info['UUID']
host.hostname = host_info['HOSTNAME']
host.arch = host_info['ARCH']
- host.memory_in_mb = host_info['MEMSIZE']
+ host.memory = host_info['MEMSIZE']
end
# delete an existing CPUs and create new ones based on the data
More information about the ovirt-devel
mailing list