Github user tbouron commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1020#issuecomment-156368715
> i'm not sure we want to bake TOSCA (or any standard) in to the api
project -- brooklyn thus far has been entirely neutral. (all things
camp-specific are contributed through a plugin / services mechanism.)
That make sense. What about creating a `tosca` module similar to the `camp`
module? Would that work for you?
> also as we move towards entities being written in yaml i think we'd want
a way to specify tosca derived-from types in yaml.
It's already done, see the example in the PR description.
> i'd suggest instead we:
> - add support for tags on catalog items in brooklyn (which you've mostly
done)
> - redefine the items you care about using yaml in the downstream
brooklyn-tosca project including a string tag "tosca-derived-from: xxxx", e.g.
> ```
> id: brooklyn.tosca.nodes.MySql
> tags: [ "tosca-derived-from: tosca.nodes.Database" ]
> item:
> type: o.a.b...MySqlNode
>```
Regarding your first point, I added support for each TOSCA metadata rather
than tags. I did that because it makes more sense to me to specify each
metadata as a property of catalog items, I also find it easier to use and
document rather than wrap it into a `tags` object. The underlying
implementation (using the `BrooklynToscaTag`) is something behind the hood and
blueprint writer should not be aware of it.
Regarding your second point, we want to use existing entities defined in
Brooklyn as they get imported by the A4C plugin. We also want to be able to
specify TOSCA metadata on Java entities hence the `@Tosca` annotation and the
change within the `MysqlNode` entity. We could use only `brooklyn-tosca`
project to specify those, add them to the catalog and then import them. But the
first approach makes things way easier to test and use.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---