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

    https://github.com/apache/brooklyn-library/pull/66#discussion_r82832610
  
    --- Diff: 
software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
 ---
    @@ -317,6 +331,8 @@ protected void computePortsAndUrls() {
     
             sensors().set(PROTOCOL, inferProtocol());
             sensors().set(MAIN_URI, URI.create(inferUrl()));
    +        sensors().set(MAIN_URI_MAPPED_SUBNET, URI.create(inferUrl()));
    --- End diff --
    
    I was thinking we'd add an `inferUrlSubnet()` which would use 
`getAddress(Attributes.SUBNET_ADDRESS)` (so a similar implementation to 
`inferUrlPublic()`).
    
    But maybe that is too much duplication from `inferUrl()`.
    
    The current code in `inferUrl(false)` calls 
`Machines.findSubnetHostname(entity)`. On the face of it, that seems 
reasonable. But the implementation of `findSubnetHostname()` is a bit strange! 
I'd have thought we'd just want to use the sensor `Attributes.SUBNET_ADDRESS` 
for this. All that other code should only be executed when we are deciding how 
to populate the sensor.


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