Repository navigation
About requirement refinement #377
Replies: 5 comments
|
I see no reason why the keynames must be repeated in a derivation. |
|
The spec does address this issue, but only in the general derivation rules rather than in 8.4.1. Section 6.4.2 (Type Derivation) says:
So the That said, I agree that the discussion in 8.4.1 could be clearer. Section 8.2.1 already restates the rule for capability refinements ("the type keyname is no longer mandatory"), but 8.4.1 has no matching sentence. We should clarify that in future versions, for example as follows:
Your workaround is harmless, but i would still rather keep the profiles as they are, since they follow the spec and more clearly indicate a refinement rather than a new definition. |
|
I also wish this could be automatically derived, as it is unnecessarily verbose to include it. Unfortunately the spec shows many keynames as "mandatory" in the table of keynames. This doesn't leave much room for implementors to decide what to do unless they want to break this "mandatory" specification. I wrestles with this and decided to stick to the spec. I think we should relax this "mandatory" in future versions of TOSCA. E.g., the column can say "mandatory if not derived" or similar. There are several places in the spec where this makes sense. |
|
I think the general rule is extremely simple: in a derivation, none of the keywords are mandatory, under the assumption that they are extending an entity definition that was already valid in its own right, in which case all the mandatory keynames are already present in the entity definition that is being extended. |
|
This is a good general rule to put forth, but I think it would still be nice to provide more details on keynames that could be potentially be derived, for additional clarity for implementors. Because there are indeed keynames that are always mandatory vs. those that in same cases are not. |
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
the abstract profiles from the community have been recently updated and, in some of the node types defined in application and platform profiles now we have a requirement refinement.
For example, the ServerPlatform node type defined in the platform profile derives from Platform, which in turn derives from the Base node type defined in the base profile.
Basenode defines ahostrequirement, which is refined in theServerPlatformnode type by adding anodedefinition, as shown below:The refinement is allowed by the standard, but it is not clear whether the mandatory keynames used in requirement definition (i.e.
capabilityandrelationship, see sec. 8.4) must be repeated or not in the refinement (sec. 8.4.1). The text just states that:"the type of the [capability|relationship] must be derived from (or the same as) the [capability|relationship] type in the requirement definition in the parent node type definition"
As a matter of fact, I think that today ubicity and puccini behaves differently when parsing the latest revisions of abstract profiles. I assume that ubicity accepts them without problems (@lauwers correct me if I'm wrong), while puccini originates a parsing error:
I think that both behaviors are compatible with the content of sec. 8.4.1, since the text is slightly ambiguous. However, this is something that shall be agreed on and clarified explicitly in an errata doc or in a later version of the standard.
In the short term, I propose to modify the profiles by repeating in the refinement the
relationshipandcapabilityalready defined in theBasetype, such as in the example below:Any comment/observation from the community?
All reactions