diff options
Diffstat (limited to 'adapters/mso-adapter-utils')
7 files changed, 15 insertions, 17 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java index f717144562..35c928c3b5 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java @@ -72,9 +72,7 @@ public class KeystoneV3Authentication { OpenStackRequest<Token> v3Request = keystoneTenantClient.tokens().authenticate(v3Credentials); - KeystoneAuthHolder holder = makeRequest(v3Request, type, region); - - return holder; + return makeRequest(v3Request, type, region); } protected KeystoneAuthHolder makeRequest(OpenStackRequest<Token> v3Request, String type, String region) { diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java index 02ace5665d..072bf404e7 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java @@ -72,22 +72,22 @@ public final class DeploymentInfoBuilder { this.errorMessage = execution.getError(); // Compute the status based on the last workflow - if (lastAction.equals("install")) { - if (actionStatus.equals("terminated")) { + if (("install").equals(lastAction)) { + if (("terminated").equals(actionStatus)) { this.deploymentStatus = DeploymentStatus.INSTALLED; - } else if (actionStatus.equals("failed")) { + } else if (("failed").equals(actionStatus)) { this.deploymentStatus = DeploymentStatus.FAILED; - } else if (actionStatus.equals("started") || actionStatus.equals("pending")) { + } else if (("started").equals(actionStatus) || ("pending").equals(actionStatus)) { this.deploymentStatus = DeploymentStatus.INSTALLING; } else { this.deploymentStatus = DeploymentStatus.UNKNOWN; } - } else if (lastAction.equals("uninstall")) { - if (actionStatus.equals("terminated")) { + } else if (("uninstall").equals(lastAction)) { + if (("terminated").equals(actionStatus)) { this.deploymentStatus = DeploymentStatus.CREATED; - } else if (actionStatus.equals("failed")) { + } else if (("failed").equals(actionStatus)) { this.deploymentStatus = DeploymentStatus.FAILED; - } else if (actionStatus.equals("started") || actionStatus.equals("pending")) { + } else if (("started").equals(actionStatus) || ("pending").equals(actionStatus)) { this.deploymentStatus = DeploymentStatus.UNINSTALLING; } else { this.deploymentStatus = DeploymentStatus.UNKNOWN; diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java index 5c2348dffa..2251575671 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java @@ -38,8 +38,8 @@ public class MsoCloudifyWorkflowException extends MsoCloudifyException { super(0, "Workflow Exception", "Workflow " + workflowId + " failed on deployment " + deploymentId + ": " + message); this.workflowStatus = workflowStatus; - if (workflowStatus.equals("pending") || workflowStatus.equals("started") || workflowStatus.equals("cancelling") - || workflowStatus.equals("force_cancelling")) { + if (("pending").equals(workflowStatus) || ("started").equals(workflowStatus) + || ("cancelling").equals(workflowStatus) || ("force_cancelling").equals(workflowStatus)) { workflowStillRunning = true; } } diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java index bb15e58c88..fc08201bcb 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java @@ -30,7 +30,7 @@ import org.apache.commons.lang.builder.ToStringBuilder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"template_type", "workload_id", "template_response"}) public class MulticloudCreateResponse implements Serializable { - private final static long serialVersionUID = -5215028275577848311L; + private static final long serialVersionUID = -5215028275577848311L; @JsonProperty("template_type") private String templateType; diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java index 67cb73539d..67d1cbff4e 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java @@ -30,7 +30,7 @@ import org.apache.commons.lang.builder.ToStringBuilder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"stack"}) public class MulticloudCreateStackResponse implements Serializable { - private final static long serialVersionUID = -5215028275577848311L; + private static final long serialVersionUID = -5215028275577848311L; @JsonProperty("stack") private MulticloudCreateHeatResponse stack; diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudQueryResponse.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudQueryResponse.java index a22937aea3..ad37b39f30 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudQueryResponse.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudQueryResponse.java @@ -31,7 +31,7 @@ import org.apache.commons.lang.builder.ToStringBuilder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"template_type", "workload_id", "workload_status", "workload_status_reason"}) public class MulticloudQueryResponse implements Serializable { - private final static long serialVersionUID = -5215028275577848311L; + private static final long serialVersionUID = -5215028275577848311L; @JsonProperty("template_type") private String templateType; diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudRequest.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudRequest.java index b733552a2b..95dd48caa6 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudRequest.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudRequest.java @@ -33,7 +33,7 @@ import org.apache.commons.lang.builder.ToStringBuilder; "vf-module-model-customization-id", "oof_directives", "sdnc_directives", "user_directives", "template_type", "template_data"}) public class MulticloudRequest implements Serializable { - private final static long serialVersionUID = -5215028275577848311L; + private static final long serialVersionUID = -5215028275577848311L; @JsonProperty("generic-vnf-id") private String genericVnfId; |