diff options
Diffstat (limited to 'adapters/mso-openstack-adapters/src')
2 files changed, 11 insertions, 13 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java index 949027f7c1..b99e34eb9d 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java @@ -221,7 +221,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { } } catch (Exception e) { // might be ok - both are just blank - logger.debug("ERROR trying to parse the volumeGroupHeatStackId " + volumeGroupHeatStackId,e); + logger.debug("ERROR trying to parse the volumeGroupHeatStackId {}", volumeGroupHeatStackId,e); } this.createVfModule(cloudSiteId, cloudOwner, @@ -520,7 +520,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { } } - private void heatbridge(StackInfo heatStack, String cloudSiteId, String tenantId, String genericVnfName, + private void heatbridge(StackInfo heatStack, String cloudOwner, String cloudSiteId, String tenantId, String genericVnfName, String vfModuleId) { try { CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId).orElseThrow( @@ -528,7 +528,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { CloudIdentity cloudIdentity = cloudSite.getIdentityService(); String heatStackId = heatStack.getCanonicalName().split("/")[1]; - String cloudOwner = "CloudOwner";//cloud owner needs to come from bpmn-adapter List<String> oobMgtNetNames = new ArrayList<>(); HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, @@ -586,9 +585,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { final Object obj = JSON_MAPPER.treeToValue(node, Object.class); return JSON_MAPPER.writeValueAsString(obj); } catch (JsonParseException jpe) { - logger.debug("Error converting json to string " + jpe.getMessage(),jpe); + logger.debug("Error converting json to string: {}", jpe.getMessage(),jpe); } catch (Exception e) { - logger.debug("Error converting json to string " + e.getMessage(),e); + logger.debug("Error converting json to string: {}", e.getMessage(),e); } return "[Error converting json to string]"; } @@ -1345,7 +1344,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { } logger.debug ("VF Module {} successfully created", vfModuleName); //call heatbridge - heatbridge(heatStack, cloudSiteId, tenantId, genericVnfName, vfModuleId); + heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId); return; } catch (Exception e) { logger.debug("unhandled exception in create VF",e); @@ -1904,14 +1903,13 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { jsonNode = JSON_MAPPER.readTree(jsonString); } catch (JsonParseException jpe) { //TODO - what to do here? - //for now - send the error to debug, but just leave it as a String - String errorMessage = jpe.getMessage(); - logger.debug("Json Error Converting " + parm.getParamName() + " - " + errorMessage,jpe); + //for now - send the error to debug + logger.debug("Json Error Converting {} - {}", parm.getParamName(), jpe.getMessage(), jpe); hasJson = false; jsonNode = null; } catch (Exception e) { // or here? - logger.debug("Json Error Converting " + parm.getParamName() + " " + e.getMessage(), e); + logger.debug("Json Error Converting {} {}", parm.getParamName(), e.getMessage(), e); hasJson = false; jsonNode = null; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java index 2b49290727..62c373bea8 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java @@ -415,21 +415,21 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { String str = "" + stackOutputs.get(key); stringOutputs.put(key, str); } catch (Exception e) { - logger.debug("Unable to add " + key + " to outputs", e); + logger.debug("Unable to add {} to outputs", key, e); } } else if (stackOutputs.get(key) instanceof JsonNode) { try { String str = this.convertNode((JsonNode) stackOutputs.get(key)); stringOutputs.put(key, str); } catch (Exception e) { - logger.debug("Unable to add " + key + " to outputs - exception converting JsonNode", e); + logger.debug("Unable to add {} to outputs - exception converting JsonNode", key, e); } } else if (stackOutputs.get(key) instanceof java.util.LinkedHashMap) { try { String str = JSON_MAPPER.writeValueAsString(stackOutputs.get(key)); stringOutputs.put(key, str); } catch (Exception e) { - logger.debug("Unable to add " + key + " to outputs - exception converting LinkedHashMap", e); + logger.debug("Unable to add {} to outputs - exception converting LinkedHashMap", key, e); } } else { try { |