brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Aitken <>
Subject [PROPOSAL] BROOKLYN-460 Brooklyn Camp syntax for adding tags to an entity spec
Date Fri, 31 Mar 2017 08:49:39 GMT

I'd like to bring attention to a new feature I suggested in BROOKLYN-460 
[1] and [2].
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 

Example usage in a YAML blueprint:
- type:
   - tag1
   - "2"
   - hello world

Please shout if you have further requirements for brooklyn.tags.

Main concern raised in [2] comments is whether that syntax should 
support any Object as a tag.

My concern is that although Object is allowed
in Apache Brooklyn only classes defined in 
org.apache.brooklyn.core.mgmt.BrooklynTags are used as a tag.
Every entity has this tag at the moment:
[{"kind":"yaml_spec","contents":"services:\n- type......"}]

That is good since REST query for tags in every entity will have "kind" 
field which someone can rely on.
Good use case is to very easy filter out kind -> yaml_spec and making 
sure user can retrieve only tags assigned in YAML.
That's why I decided to follow the same pattern and in YAML and accept
string values only which are then passed to 
in order to keep existing pattern with "kind" and "contents" fields for 
every tag.


Valentin Aitken
Software Engineer
Cloudsoft Corporation Ltd.

View raw message