You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2016/06/23 10:46:42 UTC

[GitHub] brooklyn-server issue #209: Test relative entities

Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/209
  
    Great idea. Good to merge.
    Some thoughts I had while reading the code:
    * Do we really need to have a spec of the child test? Could set TARGET_ENTITY on self and let that propagate to children through the inheritance chain. This will allow nesting children using `brooklyn.children`.
    * `target` and `targetId` are reserved in the framework for the actual target. Could rename the config in the test to `ROOT_ENTITY` or `ANCHOR_ENTITY`. This is kind of related to the above, allowing target inheritance.
    * Could pull the functionality up in `TargetableTestComponentImpl`, letting any entity use the scoping.
    
    ---
    
    Spending some more time on it I now see that it's all designed to work together with the looping test case, so the above points are mute.
    
    ---
    
    One final thing. Instead of configuring `DslComponent.Scope` could directly pass `DslComponent` as the configuration and evaluate that against the target. This would allow for more complex queries like `$brooklyn:ancestor("anchor-id").descendant("scoped-id")`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---