Hello all.
I have a catalog item for an entity type. This has a number of parameters,
including one parameter which is intended to hold a reference to an
entity.
This works fine; I can see in the "config" pane of the entity this:
consul.serverReference Consul Server (bootstrap)
What I want to do is extract some of the referenced entity's attributes
and
use them in my entity's blueprint. I'm struggling to find out how to do
that. While experimenting, I've ended up with this in my blueprint:
consul.join1: $brooklyn:config("consul.serverReference")
consul.join2: $brooklyn:entity(config("consu
l.serverReference"))
consul.join3:
$brooklyn:component(config("consul.serverReference"))
consul.join4:
$brooklyn:config("consul.serverReference").attributeWhenReady("entity.id
")
consul.join5:
$brooklyn:entity(config("consul.serverReference")).attributeWhenReady("
entity.id")
consul.join6:
$brooklyn:component(config("consul.serverReference")).attrib
uteWhenReady("
entity.id")
None of those are resolving. They appear in the config pane looking like
this:
consul.join1
{"component":{"componentId":"","componentIdSupplier":null,"s
copeComponent":null,"scope":"THIS"},"keyName":"consul.serverReference"}
consul.join2
{"componentId":null,"componentIdSupplier":{"component":{"
componentId":"","componentIdSupplier":null,"scopeComponent":
null,"scope":"THIS"},"keyName":"consul.serverReference"},"sc
opeComponent":null,"scope":"GLOBAL"}
consul.join3
{"componentId":null,"componentIdSupplier":{"component":{"
componentId":"","componentIdSupplier":null,"scopeComponent":
null,"scope":"THIS"},"keyName":"consul.serverReference"},"sc
opeComponent":null,"scope":"GLOBAL"}
consul.join4
{"object":{"component":{"componentId":"","componentIdSupplie
r":null,"scopeComponent":null,"scope":"THIS"},"keyName":"
consul.serverReference"},"fnName":"attributeWhenReady","args":["
entity.id"]}
consul.join5
{"component":{"componentId":null,"componentIdSupplier":{"com
ponent":{"componentId":"","componentIdSupplier":null,"scopeC
omponent":null,"scope":"THIS"},"keyName":"consul.serverRefer
ence"},"scopeComponent":null,"scope":"GLOBAL"},"sensorName":"
entity.id"}
consul.join6
{"component":{"componentId":null,"componentIdSupplier":{"com
ponent":{"componentId":"","componentIdSupplier":null,"scopeC
omponent":null,"scope":"THIS"},"keyName":"consul.serverRefer
ence"},"scopeComponent":null,"scope":"GLOBAL"},"sensorName":"
entity.id"}
Is it possible to do what I want?
Thanks
Richard.