ModelInstanceName is required in SNIROHomingv2 to 75/92575/1
authorGamboa, Gilbert <gilbert.g.gamboa@att.com>
Fri, 2 Aug 2019 14:11:17 +0000 (10:11 -0400)
committerBenjamin, Max (mb388a) <mb388a@att.com>
Fri, 2 Aug 2019 14:11:18 +0000 (10:11 -0400)
ModelInstanceName is required in SNIROHomingv2 to build placement
demand. The source service does not have a modelInstanceName attribute,
we need to set it to the service proxy modelInstanceName.

Issue-ID: SO-2188
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I85c0940b17349c8dd5dc171954acf9f884ccff9f

bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java

index 41cd87e..573925f 100644 (file)
@@ -581,6 +581,9 @@ public class BBInputSetupMapperLayer {
 
     protected ModelInfoServiceProxy mapServiceProxyCustomizationToServiceProxy(
             ServiceProxyResourceCustomization serviceProxyCustomization) {
-        return modelMapper.map(serviceProxyCustomization.getSourceService(), ModelInfoServiceProxy.class);
+        ModelInfoServiceProxy modelInfoServiceProxy =
+                modelMapper.map(serviceProxyCustomization.getSourceService(), ModelInfoServiceProxy.class);
+        modelInfoServiceProxy.setModelInstanceName(serviceProxyCustomization.getModelInstanceName());
+        return modelInfoServiceProxy;
     }
 }
index bff13f8..c90ebfb 100644 (file)
@@ -2072,6 +2072,7 @@ public class BBInputSetupTest {
         expected.setType("TRANSPORT");
         expected.setModelInfoServiceProxy(new ModelInfoServiceProxy());
         expected.getModelInfoServiceProxy().setModelUuid("modelUUID");
+        expected.getModelInfoServiceProxy().setModelInstanceName("modelInstanceName");
         expected.setServiceInstance(new ServiceInstance());
         expected.getServiceInstance().setModelInfoServiceInstance(new ModelInfoServiceInstance());
         expected.getServiceInstance().getModelInfoServiceInstance().setModelUuid("modelUUID");
@@ -2079,6 +2080,7 @@ public class BBInputSetupTest {
         Service service = new Service();
         ServiceProxyResourceCustomization serviceProxyCatalog = new ServiceProxyResourceCustomization();
         serviceProxyCatalog.setModelCustomizationUUID("modelCustomizationUUID");
+        serviceProxyCatalog.setModelInstanceName("modelInstanceName");
         Service sourceService = new Service();
         sourceService.setModelUUID("modelUUID");
         sourceService.setServiceType("TRANSPORT");