From 9108bf793ead93fee85d676d24d2674da829b5c6 Mon Sep 17 00:00:00 2001 From: Luca Giommi Date: Mon, 29 Jul 2024 11:07:50 +0200 Subject: [PATCH] Fix log messages when find an IAM client and S3 bucket node and when skipping their creation --- .../service/deployment/providers/ImServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/it/reply/orchestrator/service/deployment/providers/ImServiceImpl.java b/src/main/java/it/reply/orchestrator/service/deployment/providers/ImServiceImpl.java index 0e5ca8ef73..d46fe1f021 100644 --- a/src/main/java/it/reply/orchestrator/service/deployment/providers/ImServiceImpl.java +++ b/src/main/java/it/reply/orchestrator/service/deployment/providers/ImServiceImpl.java @@ -292,16 +292,18 @@ public boolean doDeploy(DeploymentMessage deploymentMessage) { for (Resource resource : resources.get(false)) { if (resource.getToscaNodeType().equals(IAM_TOSCA_NODE_TYPE)) { String nodeName = resource.getToscaNodeName(); + LOG.info("Found node of type: {}. Node name: {}", IAM_TOSCA_NODE_TYPE, nodeName); // If resource metadata is not empty means that the IAM client is already created. // If it is, fill iamTemplateOutput with resource metadata info, then continue to next // resource if (resource.getMetadata() != null) { + LOG.info("Found an IAM client already created for the {} tosca node. Loading it.", + nodeName); iamTemplateOutput.put(nodeName, resource.getMetadata()); continue; } - LOG.info("Found node of type: {}. Node name: {}", IAM_TOSCA_NODE_TYPE, nodeName); String scopes; String issuerNode; String tokenCredentials = null; @@ -427,11 +429,15 @@ public boolean doDeploy(DeploymentMessage deploymentMessage) { // Manage creation of an S3 bucket if (resource.getToscaNodeType().equals(toscaService.getS3ToscaNodeType())) { String nodeName = resource.getToscaNodeName(); + LOG.info("Found node of type: {}. Node name: {}", toscaService.getS3ToscaNodeType(), + nodeName); // If resource metadata is not empty means that the S3 bucket is already created. // If it is, fill s3TemplateOutput with resource metadata info, then continue to next // resource if (resource.getMetadata() != null) { + LOG.info("Found an S3 bucket already created for the {} tosca node. Loading it.", + nodeName); s3TemplateOutput.put(nodeName, resource.getMetadata()); continue; } @@ -442,8 +448,6 @@ public boolean doDeploy(DeploymentMessage deploymentMessage) { String s3Url = null; String enableVersioning = null; Map resourceMetadata = new HashMap<>(); - LOG.info("Found node of type: {}. Node name: {}", toscaService.getS3ToscaNodeType(), - nodeName); if (s3TemplateInput == null) { s3TemplateInput = toscaService.getS3Properties(ar);