+1 

Using this in a couple of blueprints at the moment and would be really nice to 
have a concise method.

-- 
David Bush • Systems Integrator • Cloudsoft Corporation • 
http://www.cloudsoftcorp.com <http://www.cloudsoftcorp.com/>
T: 07834 127195 • SKYPE: david.c.bush

> On 6 May 2016, at 01:44, Mike Zaccardo <[email protected]> 
> wrote:
> 
> Hi all,
> 
> I've encountered the following task numerous times when authoring
> `DynamicCluster` blueprints: write a sensor that returns a comma separated
> list of values for each member of a cluster (e.g. the host address of each
> member).
> 
> This is currently how to achieve such a task:
> 
>      brooklyn.enrichers:
>      - type: org.apache.brooklyn.enricher.stock.Aggregator
>        brooklyn.config:
>          uniqueTag: member-address-aggregator
>          enricher.aggregator.excludeBlank: true
>          enricher.aggregating.fromMembers: true
>          enricher.sourceSensor: $brooklyn:sensor("member.host.address")
>          enricher.targetSensor:
> $brooklyn:sensor("member.host.address.list")
> 
>      - type: org.apache.brooklyn.enricher.stock.Joiner
>        brooklyn.config:
>          uniqueTag: member-address-joiner
>          enricher.sourceSensor:
> $brooklyn:sensor("member.host.address.list")
>          enricher.targetSensor:
> $brooklyn:sensor("member.host.address.list.comma_separated")
>          minimum: $brooklyn:config("cluster.size")
>          separator: ","
>          quote: false
> 
> And here[1] is a specific example in a real blueprint.
> 
> That's pretty verbose for a commonly required task.  Instead, it would be
> nice to have something resembling the following:
> 
>      brooklyn.enrichers:
>      - type: org.apache.brooklyn.enricher.stock.ClusterListGenerator
>        brooklyn.config:
>          uniqueTag: member-address-list-generator
>          enricher.sourceSensor: $brooklyn:sensor("member.host.address")
>          enricher.targetSensor:
> $brooklyn:sensor("member.host.address.list")
> 
> Short and sweet!  WDYT?
> 
> -Mike
> 
> [1]
> https://github.com/cloudsoft/brooklyn-tendermint/blob/master/tendermint-mintnet.bom#L82

Reply via email to