Github user alasdairhodge commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/790#discussion_r36397160
  
    --- Diff: 
locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java 
---
    @@ -2664,6 +2664,59 @@ private String getPublicHostnameAws(HostAndPort 
sshHostAndPort, ConfigBag setup)
             }
         }
     
    +    /**
    +     * Attempts to obtain the private hostname or IP of the node, as 
advertised by the cloud provider.
    +     * 
    +     * For some clouds (e.g. aws-ec2), it will attempt to find the 
hostname (as that works in public+private).
    +     */
    +    protected String getPrivateHostname(NodeMetadata node, 
Optional<HostAndPort> sshHostAndPort, ConfigBag setup) {
    +        String provider = (setup != null) ? setup.get(CLOUD_PROVIDER) : 
null;
    +        if (provider == null) provider= getProvider();
    +
    +        if ("aws-ec2".equals(provider)) {
    --- End diff --
    
    Might be tidier to encapsulate the AWS-specific steps in a separate private 
method alongside `getPrivateHostnameGeneric`.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to