OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tosca message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [tosca] "type" keywords should be conditional, not mandatory


Quick follow up --

The artifact definition supports a short notation, by which only the "file" keyword is provided. This is clearly a situation in which we assume "type" is conditional and thus can be calculated. So, are we assuming a refinement is possible only in node types, by which we inherit the artifact definition from the parent node type? And we are assuming that in the case of node templates it's always a replacement, meaning that this short notation can't be used there?

See, I think it's not so trivial and worth revisiting.

On Thu, Feb 3, 2022 at 12:17 PM Tal Liron <tliron@redhat.com> wrote:
On Thu, Feb 3, 2022 at 12:10 PM Chris Lauwers <lauwers@ubicity.com> wrote:
You are correct about the type keyword being optional in refinements. In fact, in refinements *ALL* keywords must be optional, under the assumption that refinements refine already valid definitions, which already have all the mandatory keywords. The Version 2.0 spec states this in Section 5.1, but we could probably improve on the language to make this even more clear.

Let's use the word "conditional" rather than "optional" (as we've been using until now) because "optional" implies it's up to the user, which is not true. In some cases the keyword is absolutely mandatory.
Â

That said, you chose the one example where this rule doesnât hold, since artifacts are treated differently from most other entities in TOSCA. Artifacts donât have definitions and associated assignments. Instead, they are just directly associated with (or attached to) either a node type or on a node template. If a derived type defines an artifact with the same name as an artifact on a base type, then that artifact just replaces (or overrides) the artifact in the base type. It doesnât refine it, it just redefines it. This is spelled out in Section 5.3.7.2.3 of the Version 2 specification.


I remember us discussing this but I don't remember us finalizing it, exactly because of this compilation. :) How would you know if the intent is to refine or not? If the designer is using the same artifact name as in node type, doesn't it mean that they intend to refine it? I agree it's a complex case, but the discussion of the conditionality of "type" might be a great way to tease out the complications.

I would like us to put it on the TODO list to be revisited. (Or maybe we'll include it in the discussion about what to do with artifacts generally.)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]