From 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 31 Dec 2018 17:21:27 +0200 Subject: Merge from ECOMP's repository Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern --- .../changeManagement/ChangeManagementRequest.java | 21 +++++++++------------ .../vid/changeManagement/CloudConfiguration.java | 10 +++------- .../changeManagement/LeanCloudConfiguration.java | 9 ++++++++- .../org/onap/vid/changeManagement/ModelInfo.java | 13 +++++-------- .../ModelInfoOfRelatedInstance.java | 10 +++------- .../onap/vid/changeManagement/RequestDetails.java | 5 +++++ .../org/onap/vid/changeManagement/RequestInfo.java | 10 +++------- .../vid/changeManagement/UpdateRequestInfo.java | 4 ++-- .../org/onap/vid/changeManagement/VnfDetails.java | 1 - .../changeManagement/VnfDetailsWithWorkflows.java | 10 ++++++++-- .../onap/vid/changeManagement/WorkflowsDetail.java | 1 - 11 files changed, 46 insertions(+), 48 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap/vid/changeManagement') diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java index 1d866eecd..abfcd6f32 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java @@ -1,13 +1,10 @@ package org.onap.vid.changeManagement; -import java.util.List; +import com.fasterxml.jackson.annotation.*; + import java.util.HashMap; +import java.util.List; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonPropertyOrder({ "requestDetails", @@ -17,17 +14,17 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; public class ChangeManagementRequest { public static class MsoChangeManagementRequest { - public final static String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate"; + public static final String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate"; public static final String REPLACE = "replace"; - public final static String CONFIG_UPDATE = "applyUpdatedConfig"; + public static final String CONFIG_UPDATE = "applyUpdatedConfig"; } - public final static String VNF_IN_PLACE_SOFTWARE_UPDATE = "vnf in place software update"; + public static final String VNF_IN_PLACE_SOFTWARE_UPDATE = "vnf in place software update"; public static final String UPDATE = "update"; public static final String REPLACE = "replace"; - public final static String CONFIG_UPDATE = "vnf config update"; - public final static String SCALE_OUT = "vnf scale out"; + public static final String CONFIG_UPDATE = "vnf config update"; + public static final String SCALE_OUT = "vnf scale out"; @JsonProperty("requestDetails") private List requestDetails; @@ -36,7 +33,7 @@ public class ChangeManagementRequest { private String requestType; @JsonIgnore - private Map additionalProperties = new HashMap(); + private Map additionalProperties = new HashMap<>(); @JsonProperty("requestDetails") public List getRequestDetails() { diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java index 43d6a6a0a..b7435795c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java @@ -1,13 +1,9 @@ package org.onap.vid.changeManagement; +import com.fasterxml.jackson.annotation.*; + import java.util.HashMap; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ @@ -20,7 +16,7 @@ public class CloudConfiguration { @JsonProperty("tenantId") private String tenantId; @JsonIgnore - private Map additionalProperties = new HashMap(); + private Map additionalProperties = new HashMap<>(); @JsonProperty("lcpCloudRegionId") public String getLcpCloudRegionId() { diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java index 6011c7ebb..480ef1258 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java @@ -1,20 +1,27 @@ package org.onap.vid.changeManagement; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.onap.vid.mso.model.CloudConfiguration; + /** * Created by Oren on 9/5/17. */ +@JsonInclude(JsonInclude.Include.NON_EMPTY) public class LeanCloudConfiguration { public LeanCloudConfiguration() { } - public LeanCloudConfiguration(org.onap.vid.domain.mso.CloudConfiguration cloudConfiguration) { + public LeanCloudConfiguration(CloudConfiguration cloudConfiguration) { this.tenantId = cloudConfiguration.getTenantId(); this.lcpCloudRegionId = cloudConfiguration.getLcpCloudRegionId(); + this.cloudOwner = cloudConfiguration.getCloudOwner(); } public String lcpCloudRegionId; public String tenantId; + public String cloudOwner; + } diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java index 8f44a4bf6..ebb0ba3e3 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java @@ -1,12 +1,9 @@ package org.onap.vid.changeManagement; + +import com.fasterxml.jackson.annotation.*; + import java.util.HashMap; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ @@ -24,7 +21,7 @@ public class ModelInfo { } - public ModelInfo(org.onap.vid.domain.mso.ModelInfo modelInfo){ + public ModelInfo(org.onap.vid.mso.model.ModelInfo modelInfo){ this.setModelType(modelInfo.getModelType().toString()); this.setModelInvariantId(modelInfo.getModelInvariantId()); this.setModelVersionId(modelInfo.getModelNameVersionId()); @@ -50,7 +47,7 @@ public class ModelInfo { @JsonProperty("modelCustomizationId") private String modelCustomizationId; @JsonIgnore - private Map additionalProperties = new HashMap(); + private Map additionalProperties = new HashMap<>(); @JsonProperty("modelType") public String getModelType() { diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java index 7e8760987..7c9b709d9 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java @@ -1,13 +1,9 @@ package org.onap.vid.changeManagement; +import com.fasterxml.jackson.annotation.*; + import java.util.HashMap; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ @@ -37,7 +33,7 @@ public class ModelInfoOfRelatedInstance { @JsonProperty("modelCustomizationId") private String modelCustomizationId; @JsonIgnore - private Map additionalProperties = new HashMap(); + private Map additionalProperties = new HashMap<>(); @JsonProperty("modelType") public String getModelType() { diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java index 8e1a40833..25951f257 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java @@ -57,4 +57,9 @@ public class RequestDetails extends org.onap.vid.mso.rest.RequestDetails{ public boolean equals(Object other) { return super.equals(other); } + + @Override + public int hashCode() { + return super.hashCode(); + } } diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java index 4aa3724af..8ecb39e4c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java @@ -1,13 +1,9 @@ package org.onap.vid.changeManagement; +import com.fasterxml.jackson.annotation.*; + import java.util.HashMap; import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ @@ -23,7 +19,7 @@ public class RequestInfo { @JsonProperty("requestorId") private String requestorId; @JsonIgnore - private Map additionalProperties = new HashMap(); + private Map additionalProperties = new HashMap<>(); @JsonProperty("source") public String getSource() { diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java index 024e9c3c1..394c8ffaf 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java @@ -1,6 +1,6 @@ package org.onap.vid.changeManagement; -import org.onap.vid.domain.mso.*; +import org.onap.vid.mso.model.RequestInfo; /** * Created by Oren on 9/5/17. @@ -11,7 +11,7 @@ public class UpdateRequestInfo { } - public UpdateRequestInfo(org.onap.vid.domain.mso.RequestInfo requestInfo) { + public UpdateRequestInfo(RequestInfo requestInfo) { this.requestorId = requestInfo.getRequestorId(); this.suppressRollback = requestInfo.getSuppressRollback(); this.source = requestInfo.getSource(); diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java index 5cc2f4d32..c5a067112 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java @@ -1,7 +1,6 @@ package org.onap.vid.changeManagement; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.MoreObjects; public class VnfDetails { diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java index 4e172a10c..9971df913 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java @@ -33,7 +33,13 @@ public class VnfDetailsWithWorkflows extends VnfDetails { this.workflows = workflows; } - public boolean equals(VnfDetailsWithWorkflows vnfDetailsWithWorkflows){ - return this.workflows.equals(vnfDetailsWithWorkflows.getWorkflows()); + @Override + public boolean equals(Object o) { + return super.equals(o); + } + + @Override + public int hashCode() { + return super.hashCode(); } } diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java index e833ecb28..0883411ee 100644 --- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java @@ -1,7 +1,6 @@ package org.onap.vid.changeManagement; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.MoreObjects; public class WorkflowsDetail { -- cgit 1.2.3-korg