aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller/src/main')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java29
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 6c92224909..ebc705ce30 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);
@@ -1561,21 +1560,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;