brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetoslav Neykov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (BROOKLYN-381) Support nested DSL in $brooklyn:entity
Date Tue, 08 Nov 2016 16:03:58 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647963#comment-15647963
] 

Svetoslav Neykov edited comment on BROOKLYN-381 at 11/8/16 4:03 PM:
--------------------------------------------------------------------

Adding another useful case:
{noformat}
$brooklyn:entity(attributeWhenReady("cluster.member.first")).attributeWhenReady("main.uri")
{noformat}
This will allow for chaining attributeWhenReady when the intermediate values are entities.



was (Author: svet):
Adding another useful case:
{noformat}
$brooklyn:entity(attributeWhenReady("cluster.member.first")).attributeWhenReady("main.uri")
$brooklyn:entity(attributeWhenReady("cluster.member.first")).attributeWhenReady("main.uri")
{noformat}
This will allow for chaining attributeWhenReady when the intermediate values are entities.


> Support nested DSL in $brooklyn:entity
> --------------------------------------
>
>                 Key: BROOKLYN-381
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-381
>             Project: Brooklyn
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Aled Sage
>
> When using the yaml DSL to look up values on other entities, it would be useful to be
able to make this more dynamic by getting the entity id from the DSL (e.g. from another attribute).
> For example, a slightly simplified example below - note the DSL for "url", to retrieve
the URL from an entity whose id is set dynamically on the {{TestHttpCall}} entity:
> {noformat}
> services:
> - type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
>   id: target-app
> ...
> - type: loop-test-case
>   name: "Value replicated on all Riak nodes"
>   brooklyn.config:
>     target: $brooklyn:component("target-app")
>     testSpec:
>       $brooklyn:entitySpec:
>         type: test-http-status-200
>         brooklyn.config:
>           url: $brooklyn:entity(config("targetId")).attributeWhenReady("main.uri")
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message