brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [09/13] git commit: code review cleanup for minram / mindisk - correctly uses 1000 when converting to jclouds settings
Date Fri, 24 Oct 2014 11:54:34 GMT
code review cleanup for minram / mindisk - correctly uses 1000 when converting to jclouds settings


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/2da8245d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/2da8245d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/2da8245d

Branch: refs/heads/master
Commit: 2da8245d6c3d3bfbc542e855e1c5353cb1295e6e
Parents: e157fde
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Fri Oct 24 12:47:24 2014 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Fri Oct 24 12:47:24 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/brooklyn/location/jclouds/JcloudsLocation.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/2da8245d/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
index f10cca3..5f8fbb7 100644
--- a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
+++ b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
@@ -790,7 +790,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation
im
                     }})
             .put(MIN_RAM, new CustomizeTemplateBuilder() {
                     public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
-                        tb.minRam( (int)(ByteSizeStrings.parse(""+v, "m")/1024/1024) );
+                        tb.minRam( (int)(ByteSizeStrings.parse(Strings.toString(v), "mb")/1000/1000)
);
                     }})
             .put(MIN_CORES, new CustomizeTemplateBuilder() {
                     public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
@@ -798,7 +798,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation
im
                     }})
             .put(MIN_DISK, new CustomizeTemplateBuilder() {
                     public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
-                        tb.minDisk( (int)(ByteSizeStrings.parse(""+v, "g")/1024/1024/1024)
);
+                        tb.minDisk( (int)(ByteSizeStrings.parse(Strings.toString(v), "gb")/1000/1000/1000)
);
                     }})
             .put(HARDWARE_ID, new CustomizeTemplateBuilder() {
                     public void apply(TemplateBuilder tb, ConfigBag props, Object v) {


Mime
View raw message