Maintain VFC instance occurrences values 46/129346/4
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>
Mon, 23 May 2022 13:30:11 +0000 (14:30 +0100)
committerMichael Morris <michael.morris@est.tech>
Wed, 25 May 2022 13:54:55 +0000 (13:54 +0000)
When a VFC is added to a component and occurrences value is set on that VFC instance, those values should be maintained if the VFC instance version is changed

Issue-ID: SDC-4015
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Change-Id: I2a6e19db3737670182c07df4113e09fec4f10a3a

catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java

index ef55381..0b28422 100644 (file)
@@ -2869,6 +2869,9 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic {
                 newComponentInstance.setPosX(resResourceInfo.getPosX());
                 newComponentInstance.setPosY(resResourceInfo.getPosY());
                 newComponentInstance.setDescription(resResourceInfo.getDescription());
+                newComponentInstance.setInstanceCount(resResourceInfo.getInstanceCount());
+                newComponentInstance.setMaxOccurrences(resResourceInfo.getMaxOccurrences());
+                newComponentInstance.setMinOccurrences(resResourceInfo.getMinOccurrences());
 
                 ComponentInstance updatedComponentInstance =
                     createComponentInstanceOnGraph(containerComponent, origComponent, newComponentInstance, user);