summaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-08-17 14:49:28 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-08-19 07:58:01 +0000
commitdbb9bbdf95ad1ff28678f6a71f1f216a4f4d83f9 (patch)
tree89d3df396c08f53dfd2a07f6e71c9acd0f26292e /catalog-be/src
parent7d8c3dcdd6cba92258286cfdc2ac9bdd837ce9be (diff)
Allow ETSI VNF without other node template
With 'other' meaning not the node template for the VNF node type Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4136 Change-Id: Ieaa3fa4d0bb4b0e9b46090a9ec7ddd8d45ae3947
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
index b923cbc3a1..99d7dddcdd 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
@@ -1512,14 +1512,16 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
createResourcePropertiesOnGraph(resource);
final Map<String, UploadComponentInstanceInfo> instancesToCreate = getInstancesToCreate(parsedToscaYamlInfo, resource.getModel());
-
- log.trace("************* Going to create nodes, RI's and Relations from yaml {}", yamlName);
- loggerSupportability
- .log(LoggerSupportabilityActions.CREATE_RESOURCE_FROM_YAML, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
- "Start create nodes, RI and Relations from yaml: {}", yamlName);
- resource = createRIAndRelationsFromYaml(yamlName, resource, instancesToCreate, topologyTemplateYaml,
- nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName,
- parsedToscaYamlInfo.getSubstitutionMappingNodeType());
+
+ if (MapUtils.isNotEmpty(instancesToCreate)) {
+ log.trace("************* Going to create nodes, RI's and Relations from yaml {}", yamlName);
+ loggerSupportability
+ .log(LoggerSupportabilityActions.CREATE_RESOURCE_FROM_YAML, resource.getComponentMetadataForSupportLog(), StatusCode.STARTED,
+ "Start create nodes, RI and Relations from yaml: {}", yamlName);
+ resource = createRIAndRelationsFromYaml(yamlName, resource, instancesToCreate, topologyTemplateYaml,
+ nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeTypesArtifactsToCreate, nodeName,
+ parsedToscaYamlInfo.getSubstitutionMappingNodeType());
+ }
} else {
final Resource genericResource = fetchAndSetDerivedFromGenericType(resource, null);
resource = createResourceTransaction(resource, csarInfo.getModifier(), isNormative);