You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Richard Downer <ri...@apache.org> on 2017/04/27 16:16:20 UTC

Cross-entity references within a DynamicRegionFabric region

Hi all,

I'm using DynamicRegionFabric, and *within* a region I have two entities
where the first depends on the sensor of the second (web app depending on a
database). Normally I'd use an `id` field on the database entity and then
`$brooklyn:entity("otherid")` in a config key on the web app entity.

However this doesn't seem to work in a fabric; there's two database
entities in different regions with the same ID, and the webserver entities
can end up referring to the wrong one.

Is there a DSL method or a workaround that would allow me to refer to an
entity only within the scope of the current region instead of the global
scope?

I tried this:
$brooklyn:component("parent", "").component("parent",
"").component("child", "db")
to move up two levels (webapp -> cluster -> region) and then search for the
child but it did not work: the blueprint was accepted by the parser but the
deployment hung when trying to resolve the value and eventually timed out.

Thanks for any help.