brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Make YAML more powerful
Date Thu, 16 Apr 2015 01:27:43 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/595#discussion_r28478242
  
    --- Diff: docs/guide/yaml/yaml-reference.md ---
    @@ -142,11 +145,17 @@ However you can combine locations using `multi`:
     Dependency injection other powerful references and types can be built up within the YAML
using the
     concise DSL defined here:
      
    -* `$brooklyn:component("ID")` refers to a Brooklyn component with the given ID; you can
then access the following subfields:
    -  * `.attributeWhenReady("sensor")` will store a future which will be blocked when it
is accessed,
    -    until the given `sensor` from the component `ID` has a "truthy" (i.e. non-trivial,
non-empty, non-zero) value
    -  * `.config("key")` will insert the value set against the given key at this entity (or
nearest ancestor);
    -    can be used to supply config at the root which is used in multiple places in the
plan
    +* `$brooklyn:attributeWhenReady("sensor")` will store a future which will be blocked
when it is accessed,
    +  until the given `sensor` from the component `ID` has a "truthy" (i.e. non-trivial,
non-empty, non-zero) value
    +* `$brooklyn:config("key")` will insert the value set against the given key at this entity
(or nearest ancestor);
    +  can be used to supply config at the root which is used in multiple places in the plan
    +* `$brooklyn:sensor("sensor.name")` returns the given sensor on the current entity if
found, or an untyped (Object) sensor;
    +  `$brooklyn:sensor("io.brooklyn.ContainingEntityClass", "sensor.name")` returns the
strongly typed sensor defined in the given class
    +* `$brooklyn:component("ID")` refers to a Brooklyn component with the given ID; you can
then access the following subfields,
    --- End diff --
    
    agree with these, esp for `attributeWhenReady` -- have fixed text and added explicit example
for `component...attributeWhenReady`.  (`config` in contrast in my experience is mostly used
for local refs.)


---
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.
---

Mime
View raw message