brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: allow units to be passed for `min...
Date Wed, 22 Oct 2014 10:43:27 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/265#discussion_r19205283
  
    --- Diff: locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
---
    @@ -797,7 +798,7 @@ public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
                         }})
                 .put(MIN_DISK, new CustomizeTemplateBuilder() {
                         public void apply(TemplateBuilder tb, ConfigBag props, Object v)
{
    -                        tb.minDisk(TypeCoercions.coerce(v, Double.class));
    +                        tb.minDisk( (int)(ByteSizeStrings.parse(""+v, "g")/1024/1024/1024)
);
    --- End diff --
    
    Ah, I see we have ByteSizeStrings in an overloaded `ByteSizeStrings.parse`. Should we
be using that, rather than relying on careful units (e.g. 1kB versus 1k etc)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message