brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [3/3] brooklyn-server git commit: Closes #379
Date Wed, 12 Oct 2016 06:47:24 GMT
Closes #379

OnPublicNetworkEnricher config with sensor

I'm not entirely sure what the best way is to wire in and use the `OnPublicNetworkEnricher`.
Two of the use-cases are:

1. in an environment with port-mappings (e.g. cloud's DNAT, or docker), look up the registered
port mapping in the `PortForwardManager`. This is the existing behaviour.

2. Where a sensor (e.g. URI or hostAndPort) has been published with the subnet-address, publish
an equivalent sensor using the public IP (so using the same port).

It is this second use-case that this PR enables.

For "normal clouds" (i.e. without DNAT), then option 2 is an obvious way to go. However:

* what if there isn't a public address? The "host.address" sensor would normally be populated
with the private ip instead, so that would be used for the public url - but is that too misleading
for a value of `main.uri.mapped.public`?

* what if there really is a DNAT rule set up for accessing this VM's port? Should our `OnPublicNetworkEnricher`
prefer the DNAT rule (i.e. the entry in `PortForwardManager`) if it exists, but fall back
to the "host.address" if it's not?


Branch: refs/heads/master
Commit: a77b338782c0241e1aa6f0c43e49f5af4c72efef
Parents: 01fe891 2a4e6ea
Author: Svetoslav Neykov <>
Authored: Wed Oct 12 09:47:03 2016 +0300
Committer: Svetoslav Neykov <>
Committed: Wed Oct 12 09:47:03 2016 +0300

 .../core/network/   | 23 +++++++++-
 .../network/    | 45 ++++++++++++++++++++
 .../network/    | 16 +++++++
 3 files changed, 82 insertions(+), 2 deletions(-)

View raw message