summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-22 11:56:59 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-24 18:02:10 -0500
commit58709fc696d250f4f4358c036bc8dfd7d7ef1fab (patch)
tree0588aff0f12d85d4d596254b0eb59b119791d23b /bpmn/so-bpmn-tasks/src/main
parent303b11fd56f09afea5ae125ee0bdc69c6ceac141 (diff)
Removed deprecated Matcher imports
replaced org.mockito.Matchers with ArgumentMatchers Change-Id: I2feb4d4fb314cd14aca0719c4cc29b1a0510cbf7 Issue-ID: SO-1413 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index 3ace03ee0a..352d4ec7d1 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -23,6 +23,7 @@ package org.onap.so.client.adapter.vnf.mapper;
import static java.util.Arrays.asList;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -35,6 +36,7 @@ import java.util.Optional;
import javax.annotation.PostConstruct;
+import org.apache.commons.lang3.StringUtils;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiSubInterfaceNetworkData;
@@ -443,7 +445,6 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
}
private void buildVfModuleNetworkInformation(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
@@ -780,16 +781,26 @@ public class VnfAdapterVfModuleObjectMapper {
deleteVfModuleRequest.setTenantId(cloudRegion.getTenantId());
deleteVfModuleRequest.setVnfId(genericVnf.getVnfId());
deleteVfModuleRequest.setVfModuleId(vfModule.getVfModuleId());
- deleteVfModuleRequest.setVfModuleStackId(vfModule.getHeatStackId());//DoDVfMod_heatStackId
- deleteVfModuleRequest.setSkipAAI(true);
- String messageId = vnfAdapterObjectMapperUtils.getRandomUuid();
- deleteVfModuleRequest.setMessageId(messageId);
- deleteVfModuleRequest.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId));
+ if (!StringUtils.isEmpty(vfModule.getHeatStackId())){
+ deleteVfModuleRequest.setVfModuleStackId(vfModule.getHeatStackId());//DoDVfMod_heatStackId
+ } else
+ {
+ deleteVfModuleRequest.setVfModuleStackId(vfModule.getVfModuleName());
+ }
+
+ deleteVfModuleRequest.setSkipAAI(true);
+ setIdAndUrl(deleteVfModuleRequest);
MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance);
deleteVfModuleRequest.setMsoRequest(msoRequest);
return deleteVfModuleRequest;
}
+ protected void setIdAndUrl(DeleteVfModuleRequest deleteVfModuleRequest) throws UnsupportedEncodingException{
+ String messageId = vnfAdapterObjectMapperUtils.getRandomUuid();
+ deleteVfModuleRequest.setMessageId(messageId);
+ deleteVfModuleRequest.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId));
+ }
+
private String convertToString(Object obj) {
String json;
try {
@@ -814,4 +825,4 @@ public class VnfAdapterVfModuleObjectMapper {
}
return baseVfModule;
}
-}
+} \ No newline at end of file