summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/model/AnsibleMessageParser.java7
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ReleaseFunction.java5
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java3
3 files changed, 10 insertions, 5 deletions
diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/model/AnsibleMessageParser.java b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/model/AnsibleMessageParser.java
index 6e2244ff9..427149ccb 100644
--- a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/model/AnsibleMessageParser.java
+++ b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/model/AnsibleMessageParser.java
@@ -67,6 +67,7 @@ public class AnsibleMessageParser {
private static final String VERSION_OPT_KEY = "Version";
private static final String ACTION_OPT_KEY = "Action";
+ private String jsonException = "JSON exception";
private static final Logger LOGGER = LoggerFactory.getLogger(AnsibleMessageParser.class);
/**
@@ -153,7 +154,7 @@ public class AnsibleMessageParser {
ansibleResult = new AnsibleResult(code, msg);
} catch (JSONException e) {
- LOGGER.error("JSON exception", e);
+ LOGGER.error(jsonException, e);
ansibleResult = new AnsibleResult(600, "Error parsing response = " + input + ". Error = " + e.getMessage());
}
return ansibleResult;
@@ -171,7 +172,7 @@ public class AnsibleMessageParser {
JSONObject postResponse = new JSONObject(input);
ansibleResult = parseGetResponseNested(ansibleResult, postResponse);
} catch (JSONException e) {
- LOGGER.error("JSON exception", e);
+ LOGGER.error(jsonException, e);
ansibleResult = new AnsibleResult(AnsibleResultCodes.INVALID_PAYLOAD.getValue(),
"Error parsing response = " + input + ". Error = " + e.getMessage(), "");
}
@@ -222,7 +223,7 @@ public class AnsibleMessageParser {
finalCode = AnsibleResultCodes.REQ_FAILURE.getValue();
}
} catch (JSONException e) {
- LOGGER.error("JSON exception", e);
+ LOGGER.error(jsonException, e);
ansibleResult.setStatusCode(AnsibleResultCodes.INVALID_RESPONSE.getValue());
ansibleResult.setStatusMessage(String.format(
"Error processing response message = %s from host %s", results.getString(host), host));
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ReleaseFunction.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ReleaseFunction.java
index 17641845f..b26c54cfa 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ReleaseFunction.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/comp/ReleaseFunction.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +42,9 @@ class ReleaseFunction extends SynchronizedFunction {
private ResourceDao resourceDao;
- private String resourceSetId, resourceUnionId, assetId;
+ private String resourceSetId;
+ private String resourceUnionId;
+ private String assetId;
public ReleaseFunction(LockHelper lockHelper, ResourceDao resourceDao, String resourceSetId, String resourceUnionId,
String assetId, Collection<String> lockNames, int lockTimeout) {
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java
index fcde0f8f1..2a62c63a3 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -110,7 +111,7 @@ public class AllocationItemJdbcDaoImpl implements AllocationItemJdbcDao {
}
if (resourceShareGroupFilter != null) {
- if (resourceShareGroupFilter.equalsIgnoreCase("null")) {
+ if (("null").equalsIgnoreCase(resourceShareGroupFilter)) {
sql += " AND resource_share_group_list IS NULL";
} else {
sql += " AND resource_share_group_list LIKE '" + resourceShareGroupFilter + "'";