-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: CSD05
-
Fix Version/s: None
-
Component/s: Spec
-
Labels:None
-
Resolution:
It is stated in the specification that a deployment artifact specified with the Node Template under definition overrides any deployment artifact of the same name and the same type of the referenced Artifact Template specified with the Node Type given as value of the type attribute of the Node Template under definition. Consider the following case.
<ServiceTemplate id="myExample" name="My Service"
xmlns: ba="http://www.example.com/BaseArtifactTypes">
<Import importType="http://docs.oasis-open.org/tosca/ns/2011/12"
Namespace="http://www.example.com/BaseArtifactTypes"/>
<NodeTemplate id="exampleTemplate" nodeType="A">
......
<DeploymentArtifacts>
<DeploymentArtifact name="exampleDA"
artifactType="http://www.example.com/ns
/tosca/2011/12/DeploymentArtifactTypes
/ RPMPackage
artifactRef=" RPMPackageTemplate">
</DeploymentArtifact>
</DeploymentArtifacts>
</NodeTemplate>
<NodeType name="A">
......
<DeploymentArtifacts>
<DeploymentArtifact name="exampleDA"
artifactType="http://www.example.com/ns
/tosca/2011/12/DeploymentArtifactTypes
/OSPackage" >
</DeploymentArtifact>
</DeploymentArtifacts>
</NodeType>
<ArtifactTypes>
<ArtifactType name=" RPMPackage">
<DerivedFrom typeRef=" ba:OSPackage"/>
......
<ArtifactType>
......
</ArtifactTypes>
</ServiceTemplate>
In the above case, the Deployment Artifact specified in the Node Template cannot substitute the Deployment Artifact specified in the Node Type, although they have the same name and the artifactType of the former one is derived from the artifactType of the latter one. So I suggest making some modification to the statements about overriding rules in the specification as following.
"Note, that a deployment artifact specified with the Node Template under definition overrides any deployment artifact of the same name and the same artifactType (or any artifactType this artifactType is derived from) of the referenced Artifact Template specified with the Node Type given as value of the artifactType attribute of the Node Template under definition."
This overriding rule should also be applied to the Implementation Artifact as well.
"Note, that an implementation artifact specified with the Node Template under definition overrides any implementation artifact with the same operationName and the same artifactType (or any artifactType this artifactType is derived from) of the referenced Artifact Template specified with the Node Type given as value of the artifactType attribute of the Node Template under definition."