brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbouron <...@git.apache.org>
Subject [GitHub] brooklyn-library pull request #66: Add more sensors for main.uri, based on t...
Date Tue, 11 Oct 2016 20:06:29 GMT
Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-library/pull/66#discussion_r82877268
  
    --- 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("http://" + sensors().get(SUBNET_ADDRESS)
+ ":" + sensors().get(PROXY_HTTP_PORT) + "/"));
    +        sensors().set(MAIN_URI_MAPPED_PUBLIC, URI.create(inferUrlPublic()));
    --- End diff --
    
    @neykov Interesting approach, I didn't know about those enrichers. I did a quick test
and the  `OnSubnetNetworkEnricher` works whereas `OnPublicNetworkEnricher` does as @aledsage
explained.
    
    Although, using enrichers would probably be a cleaner solution, we can go back to it later.


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