addressing comments from code review on enhancing yaml
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5bf55f54 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5bf55f54 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5bf55f54 Branch: refs/heads/0.7.0-incubating Commit: 5bf55f54474e66c5ce50831cbe83d160479d2cb1 Parents: c67638a Author: Alex Heneveld <[email protected]> Authored: Wed Apr 15 20:31:19 2015 -0500 Committer: Alex Heneveld <[email protected]> Committed: Wed Apr 15 20:33:14 2015 -0500 ---------------------------------------------------------------------- docs/guide/yaml/yaml-reference.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5bf55f54/docs/guide/yaml/yaml-reference.md ---------------------------------------------------------------------- diff --git a/docs/guide/yaml/yaml-reference.md b/docs/guide/yaml/yaml-reference.md index 71993ae..64c81a5 100644 --- a/docs/guide/yaml/yaml-reference.md +++ b/docs/guide/yaml/yaml-reference.md @@ -146,13 +146,15 @@ Dependency injection other powerful references and types can be built up within concise DSL defined here: * `$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 + until the given `sensor` from this entity "truthy" (i.e. non-trivial, non-empty, non-zero) value + (see below on `component` for looking up values on other sensors) * `$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, - using the same syntax as defined above but with a different reference entity: + using the same syntax as defined above but with a different reference entity, + e.g. `$brooklyn:component("ID").attributeWhenReady("sensor")`: * `.attributeWhenReady("sensor")` * `.config("key")` * `.sensor("sensor.name")` @@ -172,6 +174,8 @@ concise DSL defined here: but as an `EntitySpec` suitable for setting as the value of `ConfigKey<EntitySpec>` config items (such as `memberSpec` in `DynamicCluster`) +<!-- TODO examples for object and entitySpec --> + Parameters above can be supplied either as strings or as lists and maps in YAML, and the `$brooklyn:` syntax can be used within those parameters.
