From 604eb703b47caa81fdf6e7806d5fec8761b6da32 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Fri, 17 May 2013 19:22:35 +0200 Subject: [PATCH] feature #1977: Deal with ruby 1.8.7 --- src/vmm_mad/remotes/vmware/vi_driver.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm_mad/remotes/vmware/vi_driver.rb b/src/vmm_mad/remotes/vmware/vi_driver.rb index ac94fc7bf7..ca010a0a48 100644 --- a/src/vmm_mad/remotes/vmware/vi_driver.rb +++ b/src/vmm_mad/remotes/vmware/vi_driver.rb @@ -223,7 +223,7 @@ class VIDriver # -------------------------------------------------------------------------# def get_host_used_cpu overallCpuUsage = @host.summary.quickStats.overallCpuUsage.to_f - (overallCpuUsage / (@cpuMhz * @numCpuCores)).round(3)*100 + (overallCpuUsage / (@cpuMhz * @numCpuCores)).round() end # -------------------------------------------------------------------------# @@ -257,7 +257,7 @@ class VIDriver # Get percentage of the CPU used by a VM in a host def get_used_cpu(vm) overallCpuUsage = vm.summary.quickStats.overallCpuUsage.to_f - ((overallCpuUsage / (@cpuMhz * @numCpuCores)).round(3)*100).to_s + ((overallCpuUsage / (@cpuMhz * @numCpuCores)).round()).to_s end # -------------------------------------------------------------------------#