-
Story
-
Resolution: Done
-
Medium
-
None
-
None
Currently a requirement is displayed in the topology template substitution mapping even when no assignment is made for that requirement in the node template
Proposed solution
- When adding requirements to the substitution mapping in the topology template, check if the requirement is assigned in the node template
- If is not assigned, do not add the requirement to the substitution mapping
Impacted Module
- sdc/catalog-be
Example:
Create a VF which contains three VFCs. Each VFC exposes a requirement, the node type for the VF looks like:
node_types:
org.openecomp.resource.vf.Myvf:
derived_from: org.openecomp.resource.abstract.nodes.VF
requirements:
- nodea0.dependency:
occurrences:
- 0
- UNBOUNDED
capability: tosca.capabilities.Node
node: tosca.nodes.Root
relationship: tosca.relationships.DependsOn
- nodeb0.dependency:
occurrences:
- 0
- UNBOUNDED
capability: tosca.capabilities.Node
node: tosca.nodes.Root
relationship: tosca.relationships.DependsOn
- nodec0.dependency:
occurrences:
- 0
- UNBOUNDED
capability: tosca.capabilities.Node
node: tosca.nodes.Root
relationship: tosca.relationships.DependsOn
In the toplogy for the VF, the requirement for "NodeA 0" is assigned to a capability in "NodeB 0". The requirements for "NodeB 0" and "NodeC 0" are not assigned.
topology_template:
node_templates:
NodeA 0:
type: org.openecomp.resource.vfc.NodeA
requirements:
- dependency:
capability: feature
node: NodeB 0
NodeB 0:
type: org.openecomp.resource.vfc.NodeB
NodeC 0:
type: org.openecomp.resource.vfc.NodeB
substitution_mappings:
node_type: org.openecomp.resource.vf.Myvf
capabilities:
nodeA.feature:
- NodeA 0
- feature
nodeB.feature:
- NodeB 0
- feature
nodeC.feature:
- NodeC 0
- feature
requirements:
nodea0.dependency:
- NodeA 0
- dependency
nodeb0.dependency:
- NodeB 0
}}{{- dependency
nodec0.dependency:
- NodeC 0
- dependency
As "nodeb0.dependency" and "nodec0.dependency" in the VF are not assigned in any of the node templates they should not appear in the substitution mapping, i.e. the topology template should be:
topology_template:
node_templates:
NodeA 0:
type: org.openecomp.resource.vfc.NodeA
requirements:
- dependency:
capability: feature
node: NodeB 0
NodeB 0:
type: org.openecomp.resource.vfc.NodeB
NodeC 0:
type: org.openecomp.resource.vfc.NodeB
substitution_mappings:
node_type: org.openecomp.resource.vf.Myvf
capabilities:
nodeA.feature:
- NodeA 0
- feature
nodeB.feature:
- NodeB 0
- feature
nodeC.feature:
- NodeC 0
- feature
requirements:
nodea0.dependency:
- NodeA 0
- dependency
<Other requirements omitted here>
- relates to
-
SDC-3580 Enable selection of instance capabilities to expose
- Closed