aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorGamboa, Gilbert <gilbert.g.gamboa@att.com>2019-08-02 10:11:17 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-08-02 10:11:18 -0400
commit9c632f6d74987732e916c597fdb1a4449ae16455 (patch)
treea679739adced27e99b9a4e9d1705da2088750bfb /bpmn/MSOCommonBPMN
parent8b02fbc54e6db36d969b233d136f90b8d6615f80 (diff)
ModelInstanceName is required in SNIROHomingv2 to
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
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 41cd87e874..573925ff3f 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -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;
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index bff13f8dbd..c90ebfb973 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -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");