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: "type" keywords should be conditional, not mandatory


I think we've discussed this briefly in the past, I just want to make sure it's on our TODO so that the whole spec is consistent.

The issue is this -- up to TOSCA 1.3 we've marked "type" keywords as mandatory. For example, look at TOSCA 1.3 artifact definition (3.6.7.1). You'll see something similar for "type" keywords in almost all other entities.

But in TOSCA 2.0 we've acknowledged that some keywords are "conditional". That is, they would only be mandatory if certain conditions hold. In the case of "type", I think the condition would be "if the type can't be otherwise calculated", and I think that follows with pretty much all the "type" keywords in TOSCA, because often they can be calculated.

Let's look specifically at the artifact definition:

1) Let's say it's called "banner" and attached to a node type named WebServer. That node type is derived from Application. Application does not have an artifact named "banner". That means this is the first occurrence in the type hierarchy of this artifact. For that reason, we absolutely need to specify "type".

2) Let's say that Application does have an artifact named "banner". In this case, we are refining (through inheritance) the definition. The artifact "type" in WebServer, if unrefined, should be the same as the artifact type in Application. So, I would say that it should be unnecessary to specify it. (It's not an error to specify it. Of course, refinement rules mean that it can only be the same artifact type or a type derived from it.)

3) Now let's say we have a node template named "frontend" of type WebServer, and we attach an artifact named "banner". This is considered a refinement of "banner" in the WebServer node type. So, again, it should not be mandatory (and have the same refinement rules as #2).

4) We're also allowed to attach ad hoc artifacts to node templates (that are not declared at the node type). So let's say we attach an artifact named "footer". The "type" should be mandatory here because it has not been declared anywhere else. As a rule, all ad hoc artifacts need "type".



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