Fix VFs and Service not visible in SDC Dashboard
Change-Id: Ia42775388c3ad9539b7d0020476f0f7a91ce8bb9
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2938
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
index 7d4dfa7..bf1dfef 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
@@ -57,7 +57,7 @@
@Getter
@Setter
-@EqualsAndHashCode
+@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public abstract class Component implements PropertiesOwner {
protected List<AdditionalInformationDefinition> additionalInformation;
@@ -66,6 +66,7 @@
private Map<String, ArtifactDefinition> artifacts;
private Map<String, ArtifactDefinition> deploymentArtifacts;
private Map<String, ArtifactDefinition> toscaArtifacts;
+ @EqualsAndHashCode.Include
private List<CategoryDefinition> categories;
private List<ComponentInstance> componentInstances;
private List<RequirementCapabilityRelDef> componentInstancesRelations;
@@ -82,8 +83,6 @@
private String derivedFromGenericVersion;
private String toscaType;
private Map<String, CINodeFilterDataDefinition> nodeFilterComponents;
- private Map<String, List<UploadNodeFilterInfo>> nodeFilters;
- private Map<String, List<UploadNodeFilterInfo>> serviceFilters;
private Map<String, InterfaceDefinition> interfaces;
private List<DataTypeDefinition> dataTypes;
@@ -97,6 +96,7 @@
}
@Override
+ @EqualsAndHashCode.Include
public String getUniqueId() {
return componentMetadataDefinition.getMetadataDataDefinition().getUniqueId();
}
@@ -146,6 +146,7 @@
}
@Override
+ @EqualsAndHashCode.Include
public String getName() {
return componentMetadataDefinition.getMetadataDataDefinition().getName();
}
@@ -272,6 +273,7 @@
}
@Override
+ @EqualsAndHashCode.Include
public String getNormalizedName() {
return componentMetadataDefinition.getMetadataDataDefinition().getNormalizedName();
}
@@ -325,15 +327,6 @@
.collect(Collectors.toList());
}
- public Map<String, List<ComponentInstanceProperty>> getComponentInstancesProperties() {
- return componentInstancesProperties;
- }
-
- public void setComponentInstancesProperties(
- Map<String, List<ComponentInstanceProperty>> resourceInstancesProperties) {
- this.componentInstancesProperties = resourceInstancesProperties;
- }
-
public Map<String, List<ComponentInstanceProperty>> safeGetComponentInstancesProperties() {
return componentInstancesProperties == null ? emptyMap() : componentInstancesProperties;
}
@@ -611,6 +604,7 @@
return cmptInstanceProps == null ? emptyPropsList : cmptInstanceProps;
}
+
public void setSpecificComponetTypeArtifacts(Map<String, ArtifactDefinition> specificComponentTypeArtifacts) {
// Implement where needed
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java
index 8168e73..3040f6b 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Service.java
@@ -25,6 +25,7 @@
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
+import lombok.ToString;
import org.apache.commons.lang.StringUtils;
import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
@@ -36,6 +37,7 @@
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
+@ToString
public class Service extends Component {
private Map<String, ArtifactDefinition> serviceApiArtifacts;
@@ -156,16 +158,6 @@
}
@Override
- public String toString() {
- return "Service [componentMetadataDefinition=" + getComponentMetadataDefinition()
- // + ", resourceInstances=" + resourceInstances + ",
- // resourceInstancesRelations=" + resourceInstancesRelations + ",
- // resourceInstancesRelations="
- // + resourceInstancesRelations
- + " ]";
- }
-
- @Override
public void setSpecificComponetTypeArtifacts(Map<String, ArtifactDefinition> specificComponentTypeArtifacts) {
setServiceApiArtifacts(specificComponentTypeArtifacts);
}