summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstance.java2
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstance.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstance.java
index fd4feeb035..0057b71a27 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstance.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstance.java
@@ -70,7 +70,7 @@ public class ComponentInstance extends ComponentInstanceDataDefinition implement
}
public String getActualComponentUid() {
- return getIsProxy() ? getSourceModelUid() : getComponentUid();
+ return getIsProxy() || isServiceSubstitution() ? getSourceModelUid() : getComponentUid();
}
public boolean isArtifactExists(ArtifactGroupTypeEnum groupType, String artifactLabel) {
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
index 4832e8b690..afcc0e6d9f 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
@@ -289,6 +289,10 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition {
Boolean isProxy = (Boolean) getToscaPresentationValue(JsonPresentationFields.CI_IS_PROXY);
return (isProxy != null) ? isProxy : false;
}
+
+ public Boolean isServiceSubstitution() {
+ return getOriginType() == OriginTypeEnum.ServiceSubstitution;
+ }
public void setOriginArchived(Boolean originArchived) {
if (originArchived == null) {