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

ASF GitHub Bot commented on BROOKLYN-460:
-----------------------------------------

Github user drigodwin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-docs/pull/162#discussion_r110367663
  
    --- Diff: guide/yaml/yaml-reference.md ---
    @@ -79,38 +79,44 @@ the entity being defined, with these being the most 
common:
       * `default`: a default value; this will be coerced to the declared `type`
       * `pinned`: mark the parameter as pinned (always displayed) for the UI. 
The default is `true`
       * `constraints`: a list of constraints the parameter should meet;
    -    for details, see [Entity Configuration]({{ site.path.guide 
}}/yaml/entity-configuration.html#config-key-constraints). 
    +    for details, see [Entity Configuration]({{ site.path.guide 
}}/yaml/entity-configuration.html#config-key-constraints).
     
       A shorthand notation is also supported where just the name of the 
parameter is supplied
       as an item in the list, with the other values being unset or the default.
       See `displayName` in the following example for an illustration of this:
     
    -~~~ yaml
    -brooklyn.parameters:
    -# user.age parameter is required, pinned and fully specified
    -- name: user.age
    +  ~~~ yaml
    +  brooklyn.parameters:
    +  # user.age parameter is required, pinned and fully specified
    +  - name: user.age
       type: integer
       label: Age
       description: the age of the user
       pinned: true
       constraints:
       - required
    -# user.name is optional, is not pinned and has a default
    -- name: user.name
    +  # user.name is optional, is not pinned and has a default
    +  - name: user.name
       default: You
       pinned: false
    -# shorthand notation: displayName will be an optional config of type 
string with no default
    -- displayName
    -~~~
    -
    -Entities, policies, and initializers may accept additional key-value pairs,
    -usually documented in their documentation (e.g. javadoc), or in the case 
of Java
    -often as static fields in the underlying Java class.
    -Often there are config keys or flags (indicated by `@SetFromFlag`) 
declared on the class; 
    -these declared flags and config keys may be passed in at the root of the 
`ServiceSpecification` or in `brooklyn.config`.
    -(Undeclared config is only accepted in the `brooklyn.config` map.)
    -Referencing the parameters from within java classes is identical to using 
config keys. In yaml it's
    -usually referenced using `$brooklyn:scopeRoot().config("displayName")`. 
See below for more details on scopes.
    +  # shorthand notation: displayName will be an optional config of type 
string with no default
    +  - displayName
    +  ~~~
    +
    +  Entities, policies, and initializers may accept additional key-value 
pairs,
    +  usually documented in their documentation (e.g. javadoc), or in the case 
of Java
    +  often as static fields in the underlying Java class.
    +  Often there are config keys or flags (indicated by `@SetFromFlag`) 
declared on the class;
    +  these declared flags and config keys may be passed in at the root of the 
`ServiceSpecification` or in `brooklyn.config`.
    +  (Undeclared config is only accepted in the `brooklyn.config` map.)
    +  Referencing the parameters from within java classes is identical to 
using config keys. In yaml it's
    +  usually referenced using `$brooklyn:scopeRoot().config("displayName")`. 
See below for more details on scopes.
    +
    +* `brooklyn.tags`: documents list of tag objects which should be assigned 
to the entity.<br/>
    +  A tag can be an object which is not of type 
`org.apache.brooklyn.util.core.task.DeferredSupplier`.<br/>
    --- End diff --
    
    What does this mean? Why is it important it's not of that specific type?


> Brooklyn Camp syntax for adding tags to an entity spec
> ------------------------------------------------------
>
>                 Key: BROOKLYN-460
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-460
>             Project: Brooklyn
>          Issue Type: New Feature
>            Reporter: Valentin Aitken
>            Priority: Minor
>             Fix For: 0.11.0
>
>
> Current requirement is to be able to supply String tags in an entity spec in 
> YAML so it can be then retrieved via REST API with {{GET 
> /v1/applications/<appId>/entities/<entityId>/tags}}.
> Example usage in a YAML blueprint:
> {noformat}
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
>   brooklyn.tags:
>   - tag1
>   - tag2
> {noformat}
> Please shout if you have further requirements for {{brooklyn.tags}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to