diff options
Diffstat (limited to 'asdc-controller/src/main/java/org/onap')
-rw-r--r-- | asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java | 29 |
1 files changed, 7 insertions, 22 deletions
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 7951e9be76..fe41aae4cd 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 @@ -545,11 +545,7 @@ public class ToscaResourceInstaller { if (serviceProxyResourceList != null) { for (NodeTemplate spNode : serviceProxyResourceList) { serviceProxy = createServiceProxy(spNode, service, toscaResourceStruct); - - ServiceProxyResourceCustomization serviceProxyResource = findExistingServiceProxyResource(serviceProxyList, serviceProxy.getModelCustomizationUUID()); - - if(serviceProxyResource == null){ - + serviceProxyList.add(serviceProxy); for (NodeTemplate configNode : configurationNodeTemplatesList) { @@ -564,8 +560,6 @@ public class ToscaResourceInstaller { } } } - - } } } @@ -928,7 +922,12 @@ public class ToscaResourceInstaller { spCustomizationResource.setModelCustomizationUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); spCustomizationResource.setModelInstanceName(nodeTemplate.getName()); spCustomizationResource.setToscaNodeType(nodeTemplate.getType()); - spCustomizationResource.setSourceService(service); + + String sourceServiceUUID = spMetadata.getValue("sourceModelUuid"); + + Service sourceService = serviceRepo.findOneByModelUUID(sourceServiceUUID); + + spCustomizationResource.setSourceService(sourceService); spCustomizationResource.setToscaNodeType(nodeTemplate.getType()); serviceProxyCustomizationSet.add(spCustomizationResource); @@ -1546,21 +1545,7 @@ public class ToscaResourceInstaller { return configResource; } - - protected ServiceProxyResourceCustomization findExistingServiceProxyResource(List<ServiceProxyResourceCustomization> serviceProxyList, String modelCustomizationUUID) { - ServiceProxyResourceCustomization serviceProxyResourceCustomization = null; - for(ServiceProxyResourceCustomization serviceProxyResourceCustom : serviceProxyList){ - if (serviceProxyResourceCustom != null - && serviceProxyResourceCustom.getModelCustomizationUUID().equals(modelCustomizationUUID)) { - serviceProxyResourceCustomization = serviceProxyResourceCustom; - } - } - if(serviceProxyResourceCustomization==null) - serviceProxyResourceCustomization = serviceProxyCustomizationRepo.findResourceByModelCustomizationUUID(modelCustomizationUUID); - return serviceProxyResourceCustomization; - } - protected VfModuleCustomization findExistingVfModuleCustomization(VnfResourceCustomization vnfResource, String vfModuleModelCustomizationUUID) { VfModuleCustomization vfModuleCustomization = null; |