From 15d5534416832bdad9afe3e7d1640f68d64bb9fe Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 20 Feb 2019 16:50:13 -0500 Subject: Fix for when Customization already exists - When the Customization already exists associate the new NetworkResource with it. Change-Id: Ia4d89a04d020dd2f2ba4a2f2d330bda9bff6da14 Issue-ID: SO-1540 Signed-off-by: Benjamin, Max (mb388a) --- .../onap/so/asdc/installer/heat/ToscaResourceInstaller.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java index d13fff4801..10b8ba7c16 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java @@ -1060,7 +1060,17 @@ public class ToscaResourceInstaller { } - if(networkResourceCustomization==null || !networkUUIDsMatch){ + if (networkResourceCustomization!=null && !networkUUIDsMatch){ + + NetworkResource networkResource = createNetworkResource(networkNodeTemplate, toscaResourceStructure, heatTemplate, + aicMax, aicMin); + + networkResourceCustomization.setNetworkResource(networkResource); + + networkCustomizationRepo.saveAndFlush(networkResourceCustomization); + + } + else if(networkResourceCustomization==null){ networkResourceCustomization = createNetworkResourceCustomization(networkNodeTemplate, toscaResourceStructure); -- cgit 1.2.3-korg