summaryrefslogtreecommitdiffstats
path: root/appc-adapters
diff options
context:
space:
mode:
authorTaka <tc012c@att.com>2017-12-20 13:07:21 -0500
committerSkip Wonnell <skip@att.com>2017-12-21 16:02:38 +0000
commit02fa7b3c5a6726902ff76bcce50a1b239969a8e2 (patch)
tree6fc6a4f99d9805d24eabafd554703d0140d9764b /appc-adapters
parentf602f93440893507068a2e4e76816bdcdb6a39ad (diff)
Fix sonar issues for APPC
Change-Id: I386f6794215eb69b8547fa06193ad78f951b327b Issue-ID: APPC-323 Signed-off-by: Taka <tc012c@att.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/model/AnsibleResult.java36
-rw-r--r--appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResultCodes.java10
-rw-r--r--appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleServerEmulator.java3
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/TenantCache.java4
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/openstack/heat/StackResource.java3
5 files changed, 23 insertions, 33 deletions
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResult.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResult.java
index a4bbcbef8..6b7369cfb 100644
--- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResult.java
+++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResult.java
@@ -27,59 +27,59 @@ package org.onap.appc.adapter.ansible.model;
/* Simple class to store code and message returned by POST/GET to an Ansible Server */
public class AnsibleResult{
- private int StatusCode;
- private String StatusMessage;
- private String Results;
+ private int statusCode;
+ private String statusMessage;
+ private String results;
public AnsibleResult(){
- StatusCode = -1;
- StatusMessage = "UNKNOWN";
- Results = "UNKNOWN";
+ statusCode = -1;
+ statusMessage = "UNKNOWN";
+ results = "UNKNOWN";
}
// constructor
public AnsibleResult(int code, String message, String result){
- StatusCode = code;
- StatusMessage = message;
- Results = result;
+ statusCode = code;
+ statusMessage = message;
+ results = result;
}
//*************************************************
// Various set methods
public void setStatusCode(int code){
- this.StatusCode = code;
+ this.statusCode = code;
}
public void setStatusMessage(String message){
- this.StatusMessage = message;
+ this.statusMessage = message;
}
public void setResults(String results){
- this.Results = results;
+ this.results = results;
}
void set(int code, String message, String results){
- this.StatusCode = code;
- this.StatusMessage = message;
- this.Results = results;
+ this.statusCode = code;
+ this.statusMessage = message;
+ this.results = results;
}
//*********************************************
// Various get methods
public int getStatusCode(){
- return this.StatusCode;
+ return this.statusCode;
}
public String getStatusMessage(){
- return this.StatusMessage;
+ return this.statusMessage;
}
public String getResults(){
- return this.Results;
+ return this.results;
}
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResultCodes.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResultCodes.java
index 986ad3e6a..5d44f6dae 100644
--- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResultCodes.java
+++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/onap/appc/adapter/ansible/model/AnsibleResultCodes.java
@@ -53,9 +53,9 @@ public enum AnsibleResultCodes{
INITRESPONSE(0),
FINALRESPONSE(1);
- private final Set<Integer> InitCodes = new HashSet<Integer>(Arrays.asList(100, 101));
- private final Set<Integer> FinalCodes = new HashSet<Integer>(Arrays.asList(200, 500));
- private final ArrayList<Set<Integer>>CodeSets = new ArrayList<Set<Integer>>(Arrays.asList(InitCodes, FinalCodes));
+ private final Set<Integer> initCodes = new HashSet<Integer>(Arrays.asList(100, 101));
+ private final Set<Integer> finalCodes = new HashSet<Integer>(Arrays.asList(200, 500));
+ private final ArrayList<Set<Integer>>codeSets = new ArrayList<Set<Integer>>(Arrays.asList(initCodes, finalCodes));
private final Set<String> MessageSet = new HashSet<String>(Arrays.asList("PENDING", "FINISHED", "TERMINATED"));
@@ -72,7 +72,7 @@ public enum AnsibleResultCodes{
public boolean checkValidCode(int Type, int Code){
- Set<Integer>CodeSet = CodeSets.get(Type);
+ Set<Integer>CodeSet = codeSets.get(Type);
if (CodeSet.contains(Code)){
return true;
}
@@ -83,7 +83,7 @@ public enum AnsibleResultCodes{
public String getValidCodes(int Type){
- Set<Integer>CodeSet = CodeSets.get(Type);
+ Set<Integer>CodeSet = codeSets.get(Type);
Iterator iter = CodeSet.iterator();
String ValidCodes = "[ ";
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 c430743ad..7b7d95580 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
@@ -35,12 +35,9 @@ package org.onap.appc.adapter.ansible.model;
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
-import com.google.common.base.Strings;
import org.json.JSONObject;
-import org.json.JSONArray;
import org.json.JSONException;
-import org.onap.appc.exceptions.APPCException;
import org.onap.appc.adapter.ansible.model.AnsibleResult;
public class AnsibleServerEmulator {
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/TenantCache.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/TenantCache.java
index 659202d1c..3f5950332 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/TenantCache.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/TenantCache.java
@@ -28,8 +28,6 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.onap.appc.Constants;
import org.onap.appc.configuration.Configuration;
import org.onap.appc.configuration.ConfigurationFactory;
@@ -45,9 +43,7 @@ import com.att.cdp.zones.ContextFactory;
import com.att.cdp.zones.Provider;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-import com.woorea.openstack.connector.JaxRs20Connector;
// import com.sun.jersey.api.client.ClientHandlerException;
-import com.woorea.openstack.keystone.model.Access.Service.Endpoint;
/**
* This class maintains a cache of tenants within a specific provider.
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/openstack/heat/StackResource.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/openstack/heat/StackResource.java
index 5add047f7..302943b54 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/openstack/heat/StackResource.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/openstack/heat/StackResource.java
@@ -24,9 +24,6 @@
package org.onap.appc.adapter.openstack.heat;
-import org.onap.appc.adapter.openstack.heat.model.CreateSnapshotParams;
-import org.onap.appc.adapter.openstack.heat.model.Snapshot;
-import com.woorea.openstack.base.client.Entity;
import com.woorea.openstack.base.client.HttpMethod;
import com.woorea.openstack.base.client.OpenStackClient;
import com.woorea.openstack.base.client.OpenStackRequest;