brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Put user metadata into SL notes.
Date Tue, 16 Jun 2015 16:35:18 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/688#discussion_r32540089
  
    --- Diff: locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
---
    @@ -1222,8 +1224,16 @@ protected void customizeTemplate(ConfigBag setup, ComputeService
computeService,
                         tags.add(AbstractCloudMachineNamer.sanitize(entry.getKey())+":"+AbstractCloudMachineNamer.sanitize(entry.getValue()));
                     }
                     slT.tags(tags);
    +
    +                if (!md.containsKey("notes")) {
    +                    String notes = "User Metadata\n=============\n\n  * " + Joiner.on("\n
 * ").withKeyValueSeparator(": ").join(md);
    +                    if (notes.length() > NOTES_MAX_LENGTH) {
    +                        String truncatedMsg = "...\n<truncated>";
    --- End diff --
    
    Agree, but then the truncate point depends on the length of the message which depends
on the truncate point :). Not worth the effort of getting it right. I can easily add the total
length so don't mind doing it.


---
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