You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by Avia Efrat <av...@cloudify.co> on 2017/09/11 15:49:00 UTC

Substitution Mappings Property Mappings in TOSCA v1.2

I'm not sure I see a use case of the new properties field that is newly
defined under substitution_mappings in v1.2.

The description is:

"A property mapping allows to map the property of a substituted node type
to a property definition or value (mapped as a constant value property
definition) within the topology template.

A property mapping may refer to an input of the topology, to the property
of a node template in the topology or be assigned to a constant value."


So, as it seems, it allows to assign values, within the substitution
template, to properties defined in the substitution type.

In v1.0 and v1.1, the only use of substitution type properties was in the
top-level template, where the properties (that were defined in the
substitution node type) were assigned values. These values were passed as
inputs during the instantiation of the substituting template.


The only usage of these properties was during the substituting template
instantiating. These properties weren't 'real' in the sense of regular node
properties. The substitutable node isn't a real node in the sense that it
is not instantiated in itself, but only the nodes that it represents.


TOSCA v1.2 introduced the notion of property mapping in substitution
mappings, similar to the notions of capability and requirement mappings in
v1.0.


But, why should we use this property mapping ability, if the only thing
substitution_mappings properties are used for is a medium to transfer input
values?