summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-02-01 13:16:10 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-01 13:16:10 +0000
commit3d46775fa205e66c24da18473bf2e9de9f3ec0b4 (patch)
treefdef9b901fa111b5b7e46e6f1ccab070c91a14bf
parentb7ea3fe50e6c685a21f8c119d690ea3b1458ac6f (diff)
parent72bc10590df0973ac954d7490bb7be02042bd782 (diff)
Merge "Removed check for ServiceProxyCustomization"
-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 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;