You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2012/11/12 17:33:26 UTC

[3/3] git commit: CIMI - make sure integer values for memory/storage units

CIMI - make sure integer values for memory/storage units


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/1cf35c79
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/1cf35c79
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/1cf35c79

Branch: refs/heads/master
Commit: 1cf35c790881cb2e6f4cab5d54858bc18ade8cbb
Parents: 798dfe9
Author: marios <ma...@redhat.com>
Authored: Mon Nov 12 17:30:07 2012 +0200
Committer: marios <ma...@redhat.com>
Committed: Mon Nov 12 17:30:07 2012 +0200

----------------------------------------------------------------------
 server/lib/cimi/helpers/cimi_helper.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1cf35c79/server/lib/cimi/helpers/cimi_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/helpers/cimi_helper.rb b/server/lib/cimi/helpers/cimi_helper.rb
index b61c7d2..f5e2dc3 100644
--- a/server/lib/cimi/helpers/cimi_helper.rb
+++ b/server/lib/cimi/helpers/cimi_helper.rb
@@ -34,9 +34,9 @@ module CIMI
     def to_kibibyte(value, unit)
       case unit
       when "GB"
-        value*1024*1024
+        (value*1024*1024).to_i
       when "MB"
-        value*1024
+        (value*1024).to_i
       else
         nil # should probably be exploding something here...
       end