incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1100184 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
Date Fri, 06 May 2011 12:11:00 GMT
Author: mfojtik
Date: Fri May  6 12:10:59 2011
New Revision: 1100184

URL: http://svn.apache.org/viewvc?rev=1100184&view=rev
Log:
Fixed wrong memory calculation when hwp_memory parameter in RHEV-M driver

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb?rev=1100184&r1=1100183&r2=1100184&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb Fri May
 6 12:10:59 2011
@@ -58,7 +58,7 @@ module RHEVM
           template_(:id => template_id)
           cluster(:id => opts[:realm_id] || clusters.first.id)
           type_ opts[:hwp_id] || 'desktop'
-          memory opts[:hwp_memory] || (512*1024*1024).to_s
+          memory opts[:hwp_memory] ? (opts[:hwp_memory].to_i*1024*1024).to_s || (512*1024*1024).to_s
           cpu {
             topology( :cores => (opts[:hwp_cpu] || '1'), :sockets => '1' )
           }



Mime
View raw message