aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authork.kedron <k.kedron@partner.samsung.com>2020-03-03 10:59:51 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-03-24 09:21:24 +0000
commit97930ffc459281aa11c8e3fb1ffacafdc3d161be (patch)
tree4d140b901360940f740a60fdd0b1b746a88cbe14 /catalog-be/src/main
parent91ac6b9f294828bec7e8e9200f5dabaf64f2a4f3 (diff)
Fixed updating VFC
Added checking that newProperty.path isn't null. Also added refreshing the returned property from the backend. Issue-ID: SDC-2800 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I82449d04f3151b5233cd99fb919b47f6d05a83fa
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java
index 51eb22d527..93e31e2ea2 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java
@@ -1697,15 +1697,18 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic {
}
Optional<CapabilityDefinition>
capPropDefinition = getPropertyCapabilityOfChildInstance(propertyParentUniqueId, foundResourceInstance.getCapabilities());
- if(capPropDefinition.isPresent()) {
+ if (capPropDefinition.isPresent()) {
updatedPropertyValue
.bimap(updatedValue -> updateCapabilityPropFromUpdateInstProp(property, updatedValue,
containerComponent, foundResourceInstance, capPropDefinition.get().getType(),
capPropDefinition.get().getName()), Either::right);
- }
- else {
- updatedPropertyValue.bimap(updatedValue -> updatePropertyOnContainerComponent(property, updatedValue,
- containerComponent, foundResourceInstance), Either::right);
+ } else {
+ updatedPropertyValue.bimap(
+ updatedValue -> {
+ componentInstanceProperty.setValue(updatedValue);
+ return updatePropertyOnContainerComponent(property, updatedValue,
+ containerComponent, foundResourceInstance);
+ }, Either::right);
updatedProperties.add(componentInstanceProperty);
}
}