summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-31 23:03:34 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-31 23:06:10 -0500
commit72bc10590df0973ac954d7490bb7be02042bd782 (patch)
tree46e592488353ad8c99c21619f829b34eb0152831 /asdc-controller/src/main
parentcd0963d829a73dc22b345be12379a2f8dd3a83e8 (diff)
Removed check for ServiceProxyCustomization
- Added test records for the testServiceProxy testcase - Removed check for existing ServiceProxyCustomization since multiple services can associate to the same customization record. Change-Id: Iedf9958759139484a678b29d75291bf143507667 Issue-ID: SO-1454 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
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 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;