brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbouron <>
Subject [GitHub] brooklyn-server pull request #849: Retrieve the right AWS metadata for priva...
Date Mon, 02 Oct 2017 14:16:59 GMT
Github user tbouron commented on a diff in the pull request:
    --- Diff: locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/
    @@ -2957,7 +2957,7 @@ String getHostnameAws(HostAndPort hostAndPort, LoginCredentials
                         "get public AWS hostname",
    -                            "echo `curl --silent --retry 20`;
    +                            "echo `curl --silent --retry 20"+(privateHost
? "local-hostname" : "public-hostname")+"`; exit"));
    --- End diff --
    @andreaturli In you code example, ``
will always return a `200` (as an EC2 instance always as a private IP) so your if statement
will always go one way which is not what we want here.
    It would may be easier to read (although I'm not sure about that) but will also introduce
some code duplication which I would be reluctant do to, especially in this huge file.


View raw message