...
TOSCA 1.2 extended the substituting mappings construct and made possible to map the properties of a node type to the inputs of the implementing topology in a clear, declarative and standard way.
Casablanca property-to-input mapping based on TOSCA 1.1
Node type definition (VNF) | Implementing topology template | Notes |
node_types:
|
---|
org.openecomp.resource.vf.Vnf1:
|
---|
org.openecomp.resource.abstract.nodes.VF
|
---|
tosca.capabilities.network.Linkable
|
---|
tosca.relationships.network.LinksTo
|
---|
org.openecomp.resource.vf.Vnf1
|
---|
virtualLink
| - the virtualLink requirement of the internal node extcp0
is explicitly mapped onto an external requirement using the standard TOSCA substitution mapping syntax - the nf_role input of the implementing topology is
implicitly mapped onto an external property using the "same name" naming convention, because the TOSCA 1.1 syntax does not support this kind of mapping
|
---|
Dublin property-to-input mapping based on TOSCA 1.2
Node type definition (VNF) | Implementing topology template | Notes |
node_types:
org.openecomp.resource.vf.Vnf1:
derived_from: org.openecomp.resource.abstract.nodes.VF
properties:
nf_role:
type: string
## other properties omitted for brevity
requirements:
- extcp0.virtualLink:
occurrences: [1, UNBOUNDED]
capability: tosca.capabilities.network.Linkable
relationship: tosca.relationships.network.LinksTo
## other capabilities and requirements omitted for brevity
| topology template:
inputs:
nf_roleXXX:
type: string
## other inputs omitted for brevity
node_templates:
extcp0:
# ... has a requirement named extcp0.virtualLink
substitution_mappings:
type: org.openecomp.resource.vf.Vnf1
requirements:
extcp0.virtualLink:
- extcp0
- virtualLink
properties:
nf_role: nf_role_XXX
| - the virtualLink requirement of the internal node extcp0
is explicitly mapped onto an external requirement using the standard TOSCA substitution mapping syntax - the nf_roleXXX input of the implementing topology is
explicitly mapped onto an external property using the property mapping syntax introduced in TOSCA 1.2.
The paired input and property do not have to have the same name now.
|
---|