* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
try {
LOGGER.debug("Current stack " + this.getOutputsAsStringBuilder(heatStack).toString());
} catch (Exception e) {
- LOGGER.debug("an error occurred trying to print out the current outputs of the stack");
+ LOGGER.debug("an error occurred trying to print out the current outputs of the stack", e);
}
if ("CREATE_IN_PROGRESS".equals (heatStack.getStackStatus ())) {
} catch (MsoException me2) {
// We got an exception on the delete - don't throw this exception - throw the original - just log.
- LOGGER.debug("Exception thrown trying to delete " + canonicalName + " on a create->rollback: " + me2.getContextMessage());
+ LOGGER.debug("Exception thrown trying to delete " + canonicalName + " on a create->rollback: " + me2.getContextMessage(), me2);
LOGGER.warn(MessageEnum.RA_CREATE_STACK_ERR, "Create Stack errored, then stack deletion FAILED - exception thrown", "", "", MsoLogger.ErrorCode.BusinessProcesssError, me2.getContextMessage());
}
String str = this.convertNode((JsonNode) obj);
inputs.put(key, str);
} catch (Exception e) {
- LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode "+ key);
+ LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for JsonNode "+ key, e);
//effect here is this value will not have been copied to the inputs - and therefore will error out downstream
}
} else if (obj instanceof java.util.LinkedHashMap) {
String str = JSON_MAPPER.writeValueAsString(obj);
inputs.put(key, str);
} catch (Exception e) {
- LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap "+ key);
+ LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for LinkedHashMap "+ key, e);
}
} else if (obj instanceof Integer) {
try {
String str = "" + obj;
inputs.put(key, str);
} catch (Exception e) {
- LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Integer "+ key);
+ LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Integer "+ key, e);
}
} else {
try {
String str = obj.toString();
inputs.put(key, str);
} catch (Exception e) {
- LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Other "+ key +" (" + e.getMessage() + ")");
+ LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for Other "+ key +" (" + e.getMessage() + ")", e);
//effect here is this value will not have been copied to the inputs - and therefore will error out downstream
}
}
String str = params.get(key).toString();
sb.append("\n" + key + "=" + str);
} catch (Exception e) {
- //non fatal
+ LOGGER.debug("Exception :",e);
}
}
}
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
} catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage());
+ LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
- LOGGER.debug("Error converting json to string " + e.getMessage());
+ LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
return "[Error converting json to string]";
}
String str = JSON_MAPPER.writeValueAsString(obj);
sb.append(str + " (a java.util.LinkedHashMap)");
} catch (Exception e) {
+ LOGGER.debug("Exception :",e);
sb.append("(a LinkedHashMap value that would not convert nicely)");
}
} else if (obj instanceof Integer) {
try {
str = obj.toString() + " (an Integer)\n";
} catch (Exception e) {
+ LOGGER.debug("Exception :",e);
str = "(an Integer unable to call .toString() on)";
}
sb.append(str);
try {
str = obj.toString() + " (an ArrayList)";
} catch (Exception e) {
+ LOGGER.debug("Exception :",e);
str = "(an ArrayList unable to call .toString() on?)";
}
sb.append(str);
try {
str = obj.toString() + " (a Boolean)";
} catch (Exception e) {
+ LOGGER.debug("Exception :",e);
str = "(an Boolean unable to call .toString() on?)";
}
sb.append(str);
try {
str = obj.toString() + " (unknown Object type)";
} catch (Exception e) {
+ LOGGER.debug("Exception :",e);
str = "(a value unable to call .toString() on?)";
}
sb.append(str);
String jsonString = lhm.toString();
jsonNode = new ObjectMapper().readTree(jsonString);
} catch (Exception e) {
- LOGGER.debug("Unable to convert " + lhm.toString() + " to a JsonNode " + e.getMessage());
+ LOGGER.debug("Unable to convert " + lhm.toString() + " to a JsonNode " + e.getMessage(), e);
jsonNode = null;
}
return jsonNode;
Set<HeatTemplateParam> paramSet = template.getParameters();
LOGGER.debug("paramSet has " + paramSet.size() + " entries");
} catch (Exception e) {
- LOGGER.debug("Exception occurred in convertInputMap:" + e.getMessage());
+ LOGGER.debug("Exception occurred in convertInputMap:" + e.getMessage(), e);
}
for (HeatTemplateParam htp : template.getParameters()) {
try {
anInteger = Integer.parseInt(integerString);
} catch (Exception e) {
- LOGGER.debug("Unable to convert " + integerString + " to an integer!!");
+ LOGGER.debug("Unable to convert " + integerString + " to an integer!!", e);
anInteger = null;
}
if (anInteger != null) {
try {
jsonNode = new ObjectMapper().readTree(jsonString);
} catch (Exception e) {
- LOGGER.debug("Unable to convert " + jsonString + " to a JsonNode!!");
+ LOGGER.debug("Unable to convert " + jsonString + " to a JsonNode!!", e);
jsonNode = null;
}
if (jsonNode != null) {
else
newInputs.put(key, anArrayList);
} catch (Exception e) {
- LOGGER.debug("Unable to convert " + commaSeparated + " to an ArrayList!!");
+ LOGGER.debug("Unable to convert " + commaSeparated + " to an ArrayList!!", e);
if (alias)
newInputs.put(realName, commaSeparated);
else
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
try {
LOGGER.debug("Current stack " + this.getOutputsAsStringBuilder(heatStack).toString());
} catch (Exception e) {
- LOGGER.debug("an error occurred trying to print out the current outputs of the stack");
+ LOGGER.debug("an error occurred trying to print out the current outputs of the stack", e);
}
String str = JSON_MAPPER.writeValueAsString(obj);
sb.append(str + " (a java.util.LinkedHashMap)");
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
sb.append("(a LinkedHashMap value that would not convert nicely)");
}
} else if (obj instanceof Integer) {
try {
str = obj.toString() + " (an Integer)\n";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(an Integer unable to call .toString() on)";
}
sb.append(str);
try {
str = obj.toString() + " (an ArrayList)";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(an ArrayList unable to call .toString() on?)";
}
sb.append(str);
try {
str = obj.toString() + " (a Boolean)";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(an Boolean unable to call .toString() on?)";
}
sb.append(str);
try {
str = obj.toString() + " (unknown Object type)";
} catch (Exception e) {
+ LOGGER.debug("Exception :", e);
str = "(a value unable to call .toString() on?)";
}
sb.append(str);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
} catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage());
+ LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
- LOGGER.debug("Error converting json to string " + e.getMessage());
+ LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
return "[Error converting json to string]";
}
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.openecomp.mso.adapters.vnfrest;
+import org.openecomp.mso.logger.MsoLogger;
+
import java.util.Map;
import org.codehaus.jackson.map.ObjectMapper;
import org.jboss.resteasy.annotations.providers.NoJackson;
-
+import org.openecomp.mso.logger.MsoLogger;
import org.openecomp.mso.openstack.beans.VnfStatus;
@XmlRootElement(name = "queryVfModuleResponse")
@NoJackson
public class QueryVfModuleResponse {
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
private String vnfId;
private String vfModuleId;
private String vfModuleStackId;
ObjectMapper mapper = new ObjectMapper();
jsonString = mapper.writeValueAsString(this);
}
- catch (Exception e) {}
+ catch (Exception e) {
+ LOGGER.debug("Exception :",e);
+ }
return jsonString;
}
}
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.codehaus.jackson.map.SerializationConfig;
import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.openecomp.mso.logger.MsoLogger;
+
import org.openecomp.mso.openstack.beans.VnfStatus;
@XmlRootElement(name = "queryVolumeGroupResponse")
@NoJackson
public class QueryVolumeGroupResponse {
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
private String volumeGroupId;
private String volumeGroupStackId;
private VnfStatus volumeGroupStatus;
mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
jsonString = mapper.writeValueAsString(this);
}
- catch (Exception e) {}
+ catch (Exception e) {
+ LOGGER.debug("Exception :",e);
+ }
return jsonString;
}
}
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
+import org.openecomp.mso.logger.MsoLogger;
+
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
* except for QueryVfModuleResponse and QueryVolumeGroupResponse.
*/
public abstract class VfResponseCommon {
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
private String messageId;
public VfResponseCommon() {
jsonString = mapper.writeValueAsString(this);
return jsonString;
} catch (Exception e) {
- // Shouldn't happen...
- e.printStackTrace();
+ LOGGER.debug("Exception :",e);
return "";
}
}
marshaller.marshal(this, bs);
return bs.toString();
} catch (Exception e) {
- // Shouldn't happen...
- e.printStackTrace();
+ LOGGER.debug("Exception :",e);
return "";
}
}
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
try {
EntityUtils.consume(httpResponse.getEntity());
} catch (Exception e) {
- // Ignore
+ LOGGER.debug("Exception :",e);
}
}
try {
method.reset();
} catch (Exception e) {
- // Ignore
+ LOGGER.debug("Exception :",e);
}
}
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
contentType = ContentType.parse(contentTypeHeader);
} catch (Exception e) {
// If we don't get a valid one, we handle it below.
+ LOGGER.debug("Exception :",e);
}
}
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
try {
return UriUtils.encodePathSegment(pathSegment, "UTF-8");
} catch (UnsupportedEncodingException e) {
- throw new RuntimeException("UTF-8 encoding is not supported");
+ throw new RuntimeException("UTF-8 encoding is not supported",e);
}
}