aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INFO.yaml5
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderConfiguration.java9
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java3
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy12
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy60
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTask.java17
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImplTest.java5
10 files changed, 95 insertions, 46 deletions
diff --git a/INFO.yaml b/INFO.yaml
index f6b8b4eebb..065bea8128 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -110,4 +110,9 @@ tsc:
name: 'Subhash Kumar Singh'
name: 'Lukasz Muszkieta'
link: 'https://lists.onap.org/g/onap-tsc/message/4320'
+ - type: 'removal'
+ name: 'Rob Daugherty'
+ - type: 'addition'
+ name: 'Max Benjamin'
+ link: 'https://lists.onap.org/g/onap-tsc/message/4981?p=,,,20,0,0,0::Created,,committer,20,2,0,31638681'
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderConfiguration.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderConfiguration.java
index 164f12ea29..2aee1c06e3 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderConfiguration.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderConfiguration.java
@@ -20,6 +20,10 @@
package org.onap.so.adapters.vnfmadapter.extclients.vnfm;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import com.google.gson.Gson;
+import java.util.Iterator;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.JSON;
import org.onap.so.configuration.rest.BasicHttpHeadersProvider;
import org.onap.so.configuration.rest.HttpHeadersProvider;
import org.onap.so.rest.service.HttpRestServiceProvider;
@@ -32,8 +36,6 @@ import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.GsonHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;
-import java.util.Iterator;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
/**
* Configures the HttpRestServiceProvider for REST call to a VNFM.
@@ -60,7 +62,8 @@ public class VnfmServiceProviderConfiguration {
iterator.remove();
}
}
- restTemplate.getMessageConverters().add(new GsonHttpMessageConverter());
+ final Gson gson = new JSON().getGson();
+ restTemplate.getMessageConverters().add(new GsonHttpMessageConverter(gson));
}
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java
index 73a49e9c40..b48de30f88 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java
@@ -52,6 +52,7 @@ import org.onap.aai.domain.yang.RelationshipData;
import org.onap.aai.domain.yang.RelationshipList;
import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
import org.onap.so.adapters.vnfmadapter.extclients.SdcPackageProvider;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.JSON;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse2001;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
@@ -115,7 +116,7 @@ public class VnfmAdapterControllerTest {
@Autowired
VnfmAdapterController controller;
- Gson gson = new Gson();
+ Gson gson = new JSON().getGson();
@Before
public void setUp() throws Exception {
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy
index 07d8ec9b8e..e261fb9fdd 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy
@@ -519,12 +519,14 @@ public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
String vnfKey = entry.getKey()
String vnfValue = entry.getValue()
paramsMap.put("$vnfKey", "$vnfValue")
- if (pcnt > 0) {
- userDirectivesBuilder.append(",")
+ if (!"oof_directives".equals(vnfKey)) {
+ if (pcnt > 0) {
+ userDirectivesBuilder.append(",")
+ }
+ pcnt++
+ userDirectivesBuilder.append("{\"attribute_name\":\"${vnfKey}\",")
+ userDirectivesBuilder.append("\"attribute_value\":\"${vnfValue}\"}")
}
- pcnt++
- userDirectivesBuilder.append("{\"attribute_name\":\"${vnfKey}\",")
- userDirectivesBuilder.append("\"attribute_value\":\"${vnfValue}\"}")
}
if (pcnt > 0) {
userDirectives = userDirectivesBuilder.append("]}").toString()
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn
index 13bd107fdb..38bbdc1134 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0x13ohc" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0x13ohc" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.3">
<bpmn:process id="EtsiVnfInstantiateBB" name="&#10;EtsiVnfInstantiateBB" isExecutable="true">
<bpmn:serviceTask id="ServiceTask_02e82t2" name="Create &#10;CreateVnfRequest&#10;" camunda:expression="${VnfmAdapterCreateVnfTask.buildCreateVnfRequest(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_18fsqzd</bpmn:incoming>
@@ -25,16 +25,22 @@
<bpmn:sequenceFlow id="SequenceFlow_0hp0ka1" sourceRef="ServiceTask_06ao4xu" targetRef="CallActivity_0fuqfru" />
<bpmn:callActivity id="CallActivity_0fuqfru" name="Monitor Instantiation Job" calledElement="MonitorVnfmCreateJob">
<bpmn:extensionElements>
- <camunda:in source="SDNCRequest" target="SDNCRequest" />
- <camunda:out source="SDNCResponse" target="SDNCResponse" />
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
+ <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
+ <camunda:in source="createVnfResponse" target="createVnfResponse" />
+ <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0hp0ka1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1owx4yu</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="SequenceFlow_1owx4yu" sourceRef="CallActivity_0fuqfru" targetRef="CallActivity_0agszsb" />
<bpmn:callActivity id="CallActivity_0agszsb" name="Monitor Create Node Status" calledElement="MonitorVnfmCreateNodeStatus">
+ <bpmn:extensionElements>
+ <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
+ <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
+ </bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1owx4yu</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0n57z81</bpmn:outgoing>
</bpmn:callActivity>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index 3f9d10eaa4..b0749ded86 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -232,24 +232,27 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String incomingRequest = resourceInputObj.getRequestsInputs()
String serviceParameters = JsonUtils.getJsonValue(incomingRequest, "service.parameters")
String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs")
- String cvlan = "10"
- String svlan = "100"
- String accessId = "AC9.0234.0337"
+ String cvlan = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.cvlan")
+ String svlan = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.svlan")
+ String remoteId = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.edgeinternetprofile_ip_remote_id")
String manufacturer = jsonUtil.getJsonValue(serInput,
"service.parameters.requestInputs.ont_ont_manufacturer")
String ontsn = jsonUtil.getJsonValue(serInput,
"service.parameters.requestInputs.ont_ont_serial_num")
- String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.CVLAN", cvlan)
- uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.SVLAN", svlan)
- uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.accessID", accessId)
+ String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.c_vlan", cvlan)
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.s_vlan", svlan)
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.remote_id", remoteId)
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.manufacturer", manufacturer)
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ONTSN", ontsn)
- msoLogger.debug("old resource input:" + resourceInputObj.toString())
+ logger.debug("old resource input:" + resourceInputObj.toString())
resourceInputObj.setResourceParameters(uResourceInput)
execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString())
- msoLogger.debug("new resource Input :" + resourceInputObj.toString())
+ logger.debug("new resource Input :" + resourceInputObj.toString())
break
case ~/[\w\s\W]*InternetProfile[\w\s\W]*/ :
@@ -260,23 +263,38 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs")
JSONObject inputParameters = new JSONObject(requestInputs)
- String cvlan = "100"
- String svlan = "1000"
+ String cvlan = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.cvlan")
+ String svlan = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.svlan")
String manufacturer = jsonUtil.getJsonValue(serInput,
"service.parameters.requestInputs.ont_ont_manufacturer")
- String accessId = "AC9.0234.0337"
+ String remoteId = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.edgeinternetprofile_ip_remote_id")
String ontsn = jsonUtil.getJsonValue(serInput,
"service.parameters.requestInputs.ont_ont_serial_num")
+ String serviceType = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.edgeinternetprofile_ip_service_type")
+ String macAddr = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.edgeinternetprofile_ip_rg_mac_addr")
+ String upStream = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.edgeinternetprofile_ip_upstream_speed")
+ String downStream = jsonUtil.getJsonValue(serInput,
+ "service.parameters.requestInputs.edgeinternetprofile_ip_downstream_speed")
String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.c_vlan", cvlan)
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.s_vlan", svlan)
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.manufacturer", manufacturer)
- uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_access_id", accessId)
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_remote_id", remoteId)
uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ont_sn", ontsn)
- msoLogger.debug("old resource input:" + resourceInputObj.toString())
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_service_type", serviceType)
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_rg_mac_addr", macAddr)
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_upstream_speed", upStream)
+ uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_downstream_speed", downStream)
+ logger.debug("old resource input:" + resourceInputObj.toString())
resourceInputObj.setResourceParameters(uResourceInput)
execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString())
- msoLogger.debug("new resource Input :" + resourceInputObj.toString())
+ logger.debug("new resource Input :" + resourceInputObj.toString())
break
@@ -308,13 +326,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
def vpnName = StringUtils.containsIgnoreCase(modelName, "sotnvpnattachment") ? "sotnvpnattachmentvf_sotncondition_sotnVpnName" : "sdwanvpnattachmentvf_sdwancondition_sdwanVpnName"
String parentServiceName = jsonUtil.getJsonValueForKey(resourceInputObj.getRequestsInputs(), vpnName)
- AAIResourcesClient client = new AAIResourcesClient()
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer, serviceType).queryParam("service-instance-name", parentServiceName)
- ServiceInstances sis = client.get(uri).asBean(ServiceInstances.class).get()
- ServiceInstance si = sis.getServiceInstance().get(0)
+ AAIResourcesClient client = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer, serviceType).queryParam("service-instance-name", parentServiceName)
+ ServiceInstances sis = client.get(uri).asBean(ServiceInstances.class).get()
+ ServiceInstance si = sis.getServiceInstance().get(0)
- def parentServiceInstanceId = si.getServiceInstanceId()
- execution.setVariable("parentServiceInstanceId", parentServiceInstanceId)
+ def parentServiceInstanceId = si.getServiceInstanceId()
+ execution.setVariable("parentServiceInstanceId", parentServiceInstanceId)
break
default:
@@ -646,7 +664,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
val = response."response-data"."RequestData"."output"."connection-attachment-response-information"."instance-id"
break
- // for SDWANConnectivity and SOTNConnectivity and default:
+ // for SDWANConnectivity and SOTNConnectivity and default:
default:
val = response."response-data"."RequestData"."output"."network-response-information"."instance-id"
break
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTask.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTask.java
index 4645680fc2..4c84bcaa1f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTask.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmCreateJobTask.java
@@ -55,11 +55,18 @@ public class MonitorVnfmCreateJobTask extends MonitorVnfmJobTask {
* @param execution {@link org.onap.so.bpmn.common.DelegateExecutionImpl}
*/
public void getCurrentOperationStatus(final BuildingBlockExecution execution) {
- LOGGER.debug("Executing getCurrentOperationStatus ...");
- final CreateVnfResponse vnfInstantiateResponse = execution.getVariable(CREATE_VNF_RESPONSE_PARAM_NAME);
- execution.setVariable(OPERATION_STATUS_PARAM_NAME,
- getOperationStatus(execution, vnfInstantiateResponse.getJobId()));
- LOGGER.debug("Finished executing getCurrentOperationStatus ...");
+ try {
+ LOGGER.debug("Executing getCurrentOperationStatus ...");
+ final CreateVnfResponse vnfInstantiateResponse = execution.getVariable(CREATE_VNF_RESPONSE_PARAM_NAME);
+ execution.setVariable(OPERATION_STATUS_PARAM_NAME,
+ getOperationStatus(execution, vnfInstantiateResponse.getJobId()));
+ LOGGER.debug("Finished executing getCurrentOperationStatus ...");
+ } catch (final Exception exception) {
+ final String message = "Unable to invoke get current Operation status";
+ LOGGER.error(message);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1209, message);
+
+ }
}
/**
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java
index e91f362d53..34e3efa8f5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/MonitorVnfmDeleteJobTask.java
@@ -56,10 +56,18 @@ public class MonitorVnfmDeleteJobTask extends MonitorVnfmJobTask {
* @param execution {@link org.onap.so.bpmn.common.DelegateExecutionImpl}
*/
public void getCurrentOperationStatus(final BuildingBlockExecution execution) {
- LOGGER.debug("Executing getCurrentOperationStatus ...");
- final DeleteVnfResponse deleteVnfResponse = execution.getVariable(Constants.DELETE_VNF_RESPONSE_PARAM_NAME);
- execution.setVariable(OPERATION_STATUS_PARAM_NAME, getOperationStatus(execution, deleteVnfResponse.getJobId()));
- LOGGER.debug("Finished executing getCurrentOperationStatus ...");
+ try {
+ LOGGER.debug("Executing getCurrentOperationStatus ...");
+ final DeleteVnfResponse deleteVnfResponse = execution.getVariable(Constants.DELETE_VNF_RESPONSE_PARAM_NAME);
+ execution.setVariable(OPERATION_STATUS_PARAM_NAME,
+ getOperationStatus(execution, deleteVnfResponse.getJobId()));
+ LOGGER.debug("Finished executing getCurrentOperationStatus ...");
+ } catch (final Exception exception) {
+ final String message = "Unable to invoke get current Operation status";
+ LOGGER.error(message);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 1216, message);
+
+ }
}
/**
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
index f193967a32..4a51891184 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
@@ -145,7 +145,7 @@ public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvide
return Optional.of(response.getBody());
} catch (final RestProcessingException | InvalidRestRequestException httpInvocationException) {
LOGGER.error("Unexpected error while processing job request", httpInvocationException);
- return Optional.absent();
+ throw httpInvocationException;
}
}
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImplTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImplTest.java
index 7bd6435b60..e94d7c2923 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImplTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImplTest.java
@@ -228,7 +228,7 @@ public class VnfmAdapterServiceProviderImplTest {
assertFalse(actual.isPresent());
}
- @Test
+ @Test(expected = RestProcessingException.class)
public void testGetInstantiateOperationJobStatus_Exception() {
when(mockedHttpServiceProvider.getHttpResponse(eq(TestConstants.JOB_STATUS_EXPECTED_URL),
@@ -237,8 +237,7 @@ public class VnfmAdapterServiceProviderImplTest {
final VnfmAdapterServiceProvider objUnderTest =
new VnfmAdapterServiceProviderImpl(getVnfmAdapterUrlProvider(), mockedHttpServiceProvider);
- final Optional<QueryJobResponse> actual = objUnderTest.getInstantiateOperationJobStatus(DUMMY_JOB_ID);
- assertFalse(actual.isPresent());
+ objUnderTest.getInstantiateOperationJobStatus(DUMMY_JOB_ID);
}
private QueryJobResponse getQueryJobResponse() {