summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be')
-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);