hi Valentin,

Regarding the issue of those common tags, would it not be possible when
doing the 'decoration' to add those tags to the along with the ones
specified in YAML?

That way you'd be consistent with other entities but still let the user
supply general purpose Objects.

What do you think?
Geoff

On Fri, 31 Mar 2017 at 09:49 Valentin Aitken <
[email protected]> wrote:

> Hi,
>
> 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
> /v1/applications/<appId>/entities/<entityId>/tags.
>
> Example usage in a YAML blueprint:
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
>    brooklyn.tags:
>    - 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
> org.apache.brooklyn.core.mgmt.BrooklynTags.newNotesTag
> in order to keep existing pattern with "kind" and "contents" fields for
> every tag.
>
>
> [1] https://issues.apache.org/jira/browse/BROOKLYN-460
> [2] https://github.com/apache/brooklyn-server/pull/612
>
> --
> Valentin Aitken
> Software Engineer
> Cloudsoft Corporation Ltd.
> www.cloudsoft.io
>
>

Reply via email to