summaryrefslogtreecommitdiffstats
path: root/appc-adapters
diff options
context:
space:
mode:
authordinesha <dineshgs@in.ibm.com>2019-07-29 13:09:51 +0530
committerTakamune Cho <takamune.cho@att.com>2019-07-31 14:13:04 +0000
commitaead9be9cd5aad06f30f15a8c99d68a7108971c2 (patch)
treeb9b2d36a1854fafd4dedfe7d1bad1b9e4c98b331 /appc-adapters
parent51011e010362d1acd57e59d0458c3da925df621a (diff)
Sonar Fix- AnsibleServerEmulator.java
Fixed Sonar issues accross the file Issue-ID: APPC-1669 Change-Id: I49db3c6c23f5cf61fe8d898662abaeb14f7c4422 Signed-off-by: dinesha <dineshgs@in.ibm.com>
Diffstat (limited to 'appc-adapters')
-rw-r--r--appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/impl/AnsibleAdapterImpl.java4
-rw-r--r--appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleServerEmulator.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/impl/AnsibleAdapterImpl.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/impl/AnsibleAdapterImpl.java
index 971730eba..0ef64d5ce 100644
--- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/impl/AnsibleAdapterImpl.java
+++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/impl/AnsibleAdapterImpl.java
@@ -495,7 +495,7 @@ public class AnsibleAdapterImpl implements AnsibleAdapter {
httpClientLocal.close();
}
} else {
- testResult = testServer.Post(agentUrl, payload);
+ testResult = testServer.post(agentUrl, payload);
}
return testResult;
}
@@ -527,7 +527,7 @@ public class AnsibleAdapterImpl implements AnsibleAdapter {
httpClientLocal.close();
}
} else {
- testResult = testServer.Get(agentUrl);
+ testResult = testServer.get(agentUrl);
}
if (testResult.getStatusCode() != AnsibleResultCodes.IO_EXCEPTION.getValue()
&& testResult.getStatusCode() != AnsibleResultCodes.PENDING.getValue()) {
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleServerEmulator.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleServerEmulator.java
index a7e6af8ee..ccba34a53 100644
--- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleServerEmulator.java
+++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleServerEmulator.java
@@ -55,7 +55,7 @@ public class AnsibleServerEmulator {
* Returns an ansible object result. The response code is always the http code 200 (i.e connection successful)
* payload is json string as would be sent back by Ansible Server
**/
- public AnsibleResult Post(String agentUrl, String payload) {
+ public AnsibleResult post(String agentUrl, String payload) {
AnsibleResult result = new AnsibleResult();
try {
@@ -85,7 +85,7 @@ public class AnsibleServerEmulator {
* payload is json string as would be sent back by Ansible Server
*
**/
- public AnsibleResult Get(String agentUrl) {
+ public AnsibleResult get(String agentUrl) {
Pattern pattern = Pattern.compile(".*?\\?Id=(.*?)&Type.*");
Matcher matcher = pattern.matcher(agentUrl);
@@ -118,11 +118,11 @@ public class AnsibleServerEmulator {
return getResult;
}
- private void rejectRequest(AnsibleResult result, String Message) {
+ private void rejectRequest(AnsibleResult result, String message) {
result.setStatusCode(200);
JSONObject response = new JSONObject();
response.put(STATUS_CODE, AnsibleResultCodes.REJECTED.getValue());
- response.put(STATUS_MESSAGE, Message);
+ response.put(STATUS_MESSAGE, message);
result.setStatusMessage(response.toString());
}