diff options
author | KrupaNagabhushan <krupa.nagabhushan@est.tech> | 2020-10-28 19:14:54 +0000 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2020-12-07 21:39:20 +0000 |
commit | 4ef4aa9051ea37b6de49811108319a005fbacb72 (patch) | |
tree | 3592ae5798fa12a09b18bbe315604982869db35c /catalog-be/src/main/java/org | |
parent | a85240fe7160862a0b9f8fb95eb48e0ac6c03fad (diff) |
Allow substitution_filter for a VF
Issue-ID: SDC-3365
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Change-Id: I5894bffbc8e605de26832d03c6f988f17413393b
Diffstat (limited to 'catalog-be/src/main/java/org')
2 files changed, 12 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogic.java index c02db7a9e3..0f55ddfff1 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentSubstitutionFilterBusinessLogic.java @@ -237,7 +237,7 @@ public class ComponentSubstitutionFilterBusinessLogic extends BaseBusinessLogic boolean wasLocked = false; try { if (shouldLock) { - lockComponent(component.getUniqueId(), component,"Add Node Filter on Component"); + lockComponent(component.getUniqueId(), component,"Delete substitution Filter on Component"); wasLocked = true; } final Either<SubstitutionFilterDataDefinition, StorageOperationStatus> result = substitutionFilterOperation diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java index 65c3b0e78e..d742fb3aea 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java @@ -378,6 +378,17 @@ public class UiComponentDataConverter { .getMetadataDataDefinition()); dataTransfer.setMetadata(metadata); break; + case SUBSTITUTION_FILTER: + if (resource.getSubstitutionFilter() == null) { + dataTransfer.setSubstitutionFilterForTopologyTemplate(null); + } else { + final SubstitutionFilterConverter substitutionFilterConverter = new SubstitutionFilterConverter(); + final Map<String, UINodeFilter> filterUiMap = new HashMap<>(); + filterUiMap.put(resource.getUniqueId(), + substitutionFilterConverter.convertToUi(resource.getSubstitutionFilter())); + dataTransfer.setSubstitutionFilterForTopologyTemplate(filterUiMap); + } + break; default: setUiTranferDataByFieldName(dataTransfer, resource, fieldName); |