[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [PATCH]: Add host memory in kb to the database



    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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]