1 - transformation-for: nodeTemplate #block
2 name: PnfExtCp transformation #transformation name
3 description: converts any node template that has a type tosca.nodes.nfv.PnfExtCp #transformation description
4 query: # Block query. Searches for node_template(s) with the same attributes. Ignores the node_template name.
5 # Supports recursive structure of key (string): value (new map or string).
6 # Each lvl can contain more than one key that will be treated as an AND.
7 # Must have the same structure in the original node_template declaration, otherwise the node_template will not be found.
8 type: tosca.nodes.nfv.PnfExtCp
9 conversions: # List of conversions/transformations that will be applied to the node_template attributes.
10 - query: # Attribute query for "type". Finds one attribute inside the node_template(s) found with the block query.
11 # Supports recursive structure of key (string): value (new map or string).
12 # Each lvl can only contain one key.
13 # If the attribute is found, the transformation strategy defined in this element will be applied.
14 # Must have the same structure in the original node_template declaration, otherwise the attribute will not be found.
16 to-name: type # New attribute name.
18 # Replace transformation strategy: replaces the old value for a new one. Must have this structure.
19 strategy: replace # Transformation strategy name.
20 from: tosca.nodes.nfv.PnfExtCp # Original attribute value.
21 to: org.openecomp.resource.cp.v2.extCP # New attribute value.
22 - query: # Another attribute query. This time for "properties/layer_protocols"
25 to-name: ip_requirements
27 # Replace in list strategy: replaces specific values of a list for new ones.
28 strategy: replaceInList
29 list: # List of values to be replaced
30 - from: ipv4 # Searches for "ipv4" value and...
31 to: #...replaces for the following map
32 assingment_method: dhcp
34 - from: ipv6 # Another list value search and replace
36 assingment_method: dhcp
38 # When a TOSCA { get_input: provided-input-name } function is found, the "provided-input-name"
39 # will be converted using the "transformation-for: getInputFunction" with name "ipRequirements".
40 to-get-input: ipRequirements
41 - transformation-for: getInputFunction # Transforms inputs called by get_input TOSCA function.
42 name: ipRequirements # Transformation name, used to be referred by "to-get-input" transformation attribute.
43 description: converts IpRequirements inputs when called by a get_input TOSCA function
44 conversions: #this part works exactly the same as the correspondent node_template transformation declarations.
62 to: org.openecomp.datatypes.network.IpRequirements
67 strategy: replaceInList
71 assingment_method: dhcp
75 assingment_method: dhcp