Hi Richard, Have you tried entity instead of component ... I had a similar blueprint a few weeks ago and I think that's how I solved it, but I'm nowhere near my laptop at the minute to verify so YMMV.
M On Mon, 1 May 2017, 15:26 Richard Downer, <[email protected]> wrote: > Hi all, > > In my blueprint, I have a group of MariaDBs, and I want to get the > host.name > of one entity in the group. The group exposes a sensor > `cluster.first.entity`, so I want to get that entity, and then get its > sensor `host.name`. > > Here's a fragment of my blueprint where I try to do this (reduced to as > simple a blueprint as will demonstrate the problem): > > - type: > 'org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess:4.5.0' > location: localhost > brooklyn.config: > example: $brooklyn:formatString("mysql://%s", > > component("group").attributeWhenReady("cluster.first.entity").attributeWhenReady(" > host.name")) > install.command: echo $EXAMPLE > shell.env: > EXAMPLE: '$brooklyn:config("example")' > > So I would expect this to echo out a valid hostname, if I go into the > Activity view and find the SSH task stdout. > > What I actually get is something like this: > > > mysql://$brooklyn:entity(org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.BrooklynDslCommon$DslFacades$EntitySupplier@30c91bfc > ).attributeWhenReady("host.name") > > Is this kind of thing supposed to work? Am I doing something wrong? > > Thanks > Richard. > -- *Mark McKenna* *twitter:* @m4rkmckenna <https://twitter.com/m4rkmckenna> * pgp:* A7A9 24DE 638C 681A 8DEA FAD4 2B5D C759 B1EB 76A7 <https://pgp.mit.edu/pks/lookup?op=get&search=0x2B5DC759B1EB76A7>
