Github user andreaturli commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/849#discussion_r142172822
--- Diff:
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -2829,16 +2829,11 @@ protected String getPrivateHostname(NodeMetadata
node, Optional<HostAndPort> ssh
return getPublicHostname(node, sshHostAndPort,
userCredentials, setup);
}
- String provider = (setup != null) ? setup.get(CLOUD_PROVIDER) :
null;
- Boolean lookupAwsHostname = (setup != null) ?
setup.get(LOOKUP_AWS_HOSTNAME) : null;
- if (provider == null) provider = getProvider();
-
- // TODO Discouraged to do cloud-specific things; think of this
code for aws as an
- // exceptional situation rather than a pattern to follow. We need
a better way to
- // do cloud-specific things.
- if ("aws-ec2".equals(provider) &&
Boolean.TRUE.equals(lookupAwsHostname)) {
- Maybe<String> result = getHostnameAws(node, sshHostAndPort,
userCredentials, setup);
--- End diff --
looks much easier @tbouron -- can we remove `getHostnameAws` or is it used
elsewhere?
---