aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java6
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java4
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java40
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java6
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql4
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java19
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java11
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java12
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql3
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java3
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java13
12 files changed, 60 insertions, 63 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
index b634b0c3a5..c323bb699d 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
@@ -253,7 +253,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {
protected Stack createStack(CreateStackParam stack, String cloudSiteId, String tenantId) throws MsoException {
try {
OpenStackRequest<Stack> request = getHeatClient(cloudSiteId, tenantId).getStacks().create(stack);
- saveStackRequest(request, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID), stack.getStackName());
+ saveStackRequest(stack, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID), stack.getStackName());
return executeAndRecordOpenstackRequest(request);
} catch (OpenStackResponseException e) {
if (e.getStatus() == 409) {
@@ -341,11 +341,11 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {
}
}
- protected void saveStackRequest(OpenStackRequest<Stack> request, String requestId, String stackName) {
+ protected void saveStackRequest(CreateStackParam request, String requestId, String stackName) {
try {
ObjectMapper mapper = new ObjectMapper();
InfraActiveRequests foundRequest = requestDBClient.getInfraActiveRequestbyRequestId(requestId);
- String stackRequest = mapper.writeValueAsString(request.entity());
+ String stackRequest = mapper.writeValueAsString(request.getParameters());
CloudApiRequests cloudReq = new CloudApiRequests();
cloudReq.setCloudIdentifier(stackName);
cloudReq.setRequestBody(stackRequest);
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java
index df173c002d..625b584257 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java
@@ -28,8 +28,8 @@ public class StackStatusHandler {
String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID);
String stackStatus = mapper.writeValueAsString(stack);
RequestProcessingData requestProcessingData =
- requestDBClient.getRequestProcessingDataBySoRequestIdAndNameAndGrouping(requestId, stack.getId(),
- stack.getStackName());
+ requestDBClient.getRequestProcessingDataBySoRequestIdAndNameAndGrouping(requestId,
+ stack.getStackName(), stack.getId());
if (requestProcessingData == null) {
requestProcessingData = new RequestProcessingData();
requestProcessingData.setGroupingId(stack.getId());
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
index 28ad069f8b..6673e69a09 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
@@ -34,7 +34,9 @@ import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.times;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -52,7 +54,6 @@ import org.onap.so.openstack.exceptions.MsoException;
import org.onap.so.openstack.exceptions.MsoOpenstackException;
import org.onap.so.openstack.exceptions.MsoStackAlreadyExists;
import org.springframework.core.env.Environment;
-import com.woorea.openstack.base.client.Entity;
import com.woorea.openstack.base.client.OpenStackResponseException;
import com.woorea.openstack.heat.Heat;
import com.woorea.openstack.heat.StackResource;
@@ -122,7 +123,6 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
latestStack.setStackName("stackName");
latestStack.setStackStatus("CREATE_COMPLETE");
latestStack.setStackStatusReason("Stack Finished");
- doNothing().when(stackStatusHandler).updateStackStatus(stack);
doReturn(latestStack).when(heatUtils).queryHeatStack(isA(Heat.class), eq("stackName/id"));
doReturn(heatClient).when(heatUtils).getHeatClient(cloudSiteId, tenantId);
Stack actual = heatUtils.pollStackForStatus(1, stack, "CREATE_IN_PROGRESS", cloudSiteId, tenantId);
@@ -397,26 +397,23 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
heatUtils.createStack(createStackParam, cloudSiteId, tenantId);
Mockito.verify(stackResource, times(1)).create(createStackParam);
- Mockito.verify(heatUtils, times(1)).saveStackRequest(eq(mockCreateStack), isNull(), eq("stackName"));
+ Mockito.verify(heatUtils, times(1)).saveStackRequest(eq(createStackParam), isNull(), eq("stackName"));
Mockito.verify(heatClient, times(1)).getStacks();
Mockito.verify(stackResource, times(1)).create(createStackParam);
}
@Test
public final void saveStack_Test() throws MsoException, IOException, NovaClientException {
- Stack stack = new Stack();
- stack.setId("id");
- stack.setStackName("stackName");
- stack.setStackStatus("CREATE_FAILED");
- stack.setStackStatusReason(
- "Resource CREATE failed: Conflict: resources.my_keypair: Key pair 'hst3bbfnm0011vm001' already exists. (HTTP 409) (Request-ID: req-941b0af6-63ae-4d6a-afbc-90b728bacf82");
- Entity<Stack> entity = new Entity(stack, "application/json");
- doReturn(entity).when(mockCreateStack).entity();
+ CreateStackParam createStackParam = new CreateStackParam();
+ createStackParam.setStackName("stackName");
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put("test", "value");
+ createStackParam.setParameters(parameters);
InfraActiveRequests request = new InfraActiveRequests();
request.setRequestId("requestId");
doReturn(request).when(requestDbClient).getInfraActiveRequestbyRequestId("requestId");
doNothing().when(requestDbClient).updateInfraActiveRequests(request);
- heatUtils.saveStackRequest(mockCreateStack, "requestId", "stackName");
+ heatUtils.saveStackRequest(createStackParam, "requestId", "stackName");
Mockito.verify(requestDbClient, times(1)).updateInfraActiveRequests(request);
assertNotNull(request.getCloudApiRequests().get(0));
assertEquals(request.getCloudApiRequests().get(0).getRequestId(), "requestId");
@@ -424,14 +421,11 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
@Test
public final void saveStack__Exists_Test() throws MsoException, IOException, NovaClientException {
- Stack stack = new Stack();
- stack.setId("id");
- stack.setStackName("stackName");
- stack.setStackStatus("CREATE_FAILED");
- stack.setStackStatusReason(
- "Resource CREATE failed: Conflict: resources.my_keypair: Key pair 'hst3bbfnm0011vm001' already exists. (HTTP 409) (Request-ID: req-941b0af6-63ae-4d6a-afbc-90b728bacf82");
- Entity<Stack> entity = new Entity(stack, "application/json");
- doReturn(entity).when(mockCreateStack).entity();
+ CreateStackParam createStackParam = new CreateStackParam();
+ createStackParam.setStackName("stackName");
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put("test", "value");
+ createStackParam.setParameters(parameters);
InfraActiveRequests request = new InfraActiveRequests();
request.setRequestId("requestId");
CloudApiRequests cloudRequest = new CloudApiRequests();
@@ -441,7 +435,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
request.getCloudApiRequests().add(cloudRequest);
doReturn(request).when(requestDbClient).getInfraActiveRequestbyRequestId("requestId");
doNothing().when(requestDbClient).updateInfraActiveRequests(request);
- heatUtils.saveStackRequest(mockCreateStack, "requestId", "stackName");
+ heatUtils.saveStackRequest(createStackParam, "requestId", "stackName");
Mockito.verify(requestDbClient, times(1)).updateInfraActiveRequests(request);
assertNotNull(request.getCloudApiRequests().get(0));
assertEquals("requestId", request.getCloudApiRequests().get(0).getRequestId());
@@ -463,7 +457,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
exceptionRule.expectMessage("Unknown Error");
heatUtils.createStack(createStackParam, cloudSiteId, tenantId);
Mockito.verify(stackResource, times(1)).create(createStackParam);
- Mockito.verify(heatUtils, times(1)).saveStackRequest(eq(mockCreateStack), isNull(), eq("stackName"));
+ Mockito.verify(heatUtils, times(1)).saveStackRequest(eq(createStackParam), isNull(), eq("stackName"));
Mockito.verify(heatClient, times(1)).getStacks();
Mockito.verify(stackResource, times(1)).create(createStackParam);
}
@@ -483,7 +477,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
exceptionRule.expectMessage("Stack stackName already exists in Tenant tenantId in Cloud cloudSiteId");
heatUtils.createStack(createStackParam, cloudSiteId, tenantId);
Mockito.verify(stackResource, times(1)).create(createStackParam);
- Mockito.verify(heatUtils, times(1)).saveStackRequest(eq(mockCreateStack), isNull(), eq("stackName"));
+ Mockito.verify(heatUtils, times(1)).saveStackRequest(eq(createStackParam), isNull(), eq("stackName"));
Mockito.verify(heatClient, times(1)).getStacks();
Mockito.verify(stackResource, times(1)).create(createStackParam);
}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java
index 54e2bbf06d..0d5cd6a118 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/StackStatusHandlerTest.java
@@ -33,7 +33,7 @@ public class StackStatusHandlerTest {
requestProcessingData.setValue("testMe");
doReturn(requestProcessingData).when(requestDBClient)
- .getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "id", "stackName");
+ .getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "stackName", "id");
Stack latestStack = new Stack();
latestStack.setId("id");
latestStack.setStackName("stackName");
@@ -48,8 +48,8 @@ public class StackStatusHandlerTest {
@Test
public final void record_Not_Exists_Test() throws MsoException, IOException {
ArgumentCaptor<RequestProcessingData> requestCaptor = ArgumentCaptor.forClass(RequestProcessingData.class);
- doReturn(null).when(requestDBClient).getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "id",
- "stackName");
+ doReturn(null).when(requestDBClient).getRequestProcessingDataBySoRequestIdAndNameAndGrouping(null, "stackName",
+ "id");
Stack latestStack = new Stack();
latestStack.setId("id");
latestStack.setStackName("stackName");
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql
new file mode 100644
index 0000000000..e76dbbe883
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql
@@ -0,0 +1,4 @@
+use requestdb;
+
+ALTER TABLE infra_active_requests ADD COLUMN IF NOT EXISTS EXT_SYSTEM_ERROR_SOURCE varchar(80);
+ALTER TABLE archived_infra_requests ADD COLUMN IF NOT EXISTS EXT_SYSTEM_ERROR_SOURCE varchar(80); \ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index 296ab64df3..251464a34d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -22,16 +22,8 @@
package org.onap.so.bpmn.core.plugins;
-import java.io.IOException;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
import org.camunda.bpm.engine.RepositoryService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
@@ -39,26 +31,15 @@ import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
-import org.camunda.bpm.engine.impl.context.Context;
-import org.camunda.bpm.engine.impl.interceptor.Command;
-import org.camunda.bpm.engine.impl.interceptor.CommandContext;
import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
import org.camunda.bpm.engine.impl.util.xml.Element;
import org.camunda.bpm.engine.impl.variable.VariableDeclaration;
-import org.camunda.bpm.model.bpmn.impl.instance.FlowNodeImpl;
-import org.camunda.bpm.model.bpmn.instance.EndEvent;
-import org.camunda.bpm.model.bpmn.instance.FlowNode;
-import org.camunda.bpm.model.bpmn.instance.StartEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.AbstractEnvironment;
-import org.springframework.core.env.Environment;
-import org.springframework.core.env.MapPropertySource;
-import org.springframework.core.env.PropertySource;
import org.springframework.stereotype.Component;
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
index ab21c0807e..42c6ef059f 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
@@ -32,7 +32,6 @@ import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior;
import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
-import org.camunda.bpm.engine.impl.bpmn.parser.FieldDeclaration;
import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
@@ -58,6 +57,8 @@ import org.slf4j.LoggerFactory;
public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
private static final Logger logger = LoggerFactory.getLogger(WorkflowExceptionPlugin.class);
+ private static final String WORKFLOW_EXCEPTION = "WorkflowException";
+
@Override
public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
List<BpmnParseListener> preParseListeners = processEngineConfiguration.getCustomPreBPMNParseListeners();
@@ -131,7 +132,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
*/
public static class WorkflowExceptionResetListener implements ExecutionListener {
public void notify(DelegateExecution execution) throws Exception {
- Object workflowException = execution.getVariable("WorkflowException");
+ Object workflowException = execution.getVariable(WORKFLOW_EXCEPTION);
if (workflowException instanceof WorkflowException) {
int index = 1;
@@ -140,10 +141,10 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
saveName = "SavedWorkflowException" + (++index);
}
- logger.debug("WorkflowExceptionResetTask is moving WorkflowException to " + saveName);
+ logger.debug("WorkflowExceptionResetTask is moving WorkflowException to {}", saveName);
execution.setVariable(saveName, workflowException);
- execution.setVariable("WorkflowException", null);
+ execution.setVariable(WORKFLOW_EXCEPTION, null);
}
}
}
@@ -153,7 +154,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
*/
public static class WorkflowExceptionTriggerTask implements JavaDelegate {
public void execute(DelegateExecution execution) throws Exception {
- if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ if (execution.getVariable(WORKFLOW_EXCEPTION) instanceof WorkflowException) {
logger.debug("WorkflowExceptionTriggerTask is generating a MSOWorkflowException event");
throw new BpmnError("MSOWorkflowException");
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
index 9497ab970e..093fba089d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
@@ -124,7 +124,7 @@ public class MSOInfrastructureApplication {
logger.debug("Attempting to deploy custom workflows");
try {
List<Workflow> workflows = catalogDbClient.findWorkflowBySource(SDC_SOURCE);
- if (workflows != null && workflows.size() != 0) {
+ if (workflows != null && !workflows.isEmpty()) {
for (Workflow workflow : workflows) {
String workflowName = workflow.getName();
String workflowBody = workflow.getBody();
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
index 7cb78a10e5..8010ce62ab 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
@@ -5,6 +5,7 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2018 Nokia.
+ * Modifications Copyright (c) 2019 Samsung
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,15 +36,18 @@ public final class JsonUtilForPnfCorrelationId {
private static final String JSON_PNF_CORRELATION_ID_FIELD_NAME = "correlationId";
+ private JsonUtilForPnfCorrelationId() {
+ throw new IllegalStateException("Utility class");
+ }
+
static List<String> parseJsonToGelAllPnfCorrelationId(String json) {
JsonElement je = new JsonParser().parse(json);
JsonArray array = je.getAsJsonArray();
List<String> list = new ArrayList<>();
Spliterator<JsonElement> spliterator = array.spliterator();
- spliterator.forEachRemaining(jsonElement -> {
- handleEscapedCharacters(jsonElement).ifPresent(jsonObject -> getPnfCorrelationId(jsonObject)
- .ifPresent(pnfCorrelationId -> list.add(pnfCorrelationId)));
- });
+ spliterator.forEachRemaining(jsonElement -> handleEscapedCharacters(jsonElement)
+ .ifPresent(jsonObject -> getPnfCorrelationId(jsonObject)
+ .ifPresent(pnfCorrelationId -> list.add(pnfCorrelationId))));
return list;
}
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
index ef13df5cbd..a47e1c44af 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
@@ -97,7 +97,8 @@ CREATE TABLE IF NOT EXISTS PUBLIC.INFRA_ACTIVE_REQUESTS(
INSTANCE_GROUP_ID VARCHAR SELECTIVITY 1,
INSTANCE_GROUP_NAME VARCHAR SELECTIVITY 1,
REQUEST_URL VARCHAR SELECTIVITY 1,
- ORIGINAL_REQUEST_ID VARCHAR SELECTIVITY 1
+ ORIGINAL_REQUEST_ID VARCHAR SELECTIVITY 1,
+ EXT_SYSTEM_ERROR_SOURCE VARCHAR SELECTIVITY 1
);
INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, AIC_CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
index 9aa04ea8b2..9da6ff21ac 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
@@ -88,6 +88,7 @@ public class InfraActiveRequests extends InfraRequests {
.append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
.append("operationalEnvName", getOperationalEnvName()).append("requestUrl", getRequestUrl())
- .append("originalRequestId", getOriginalRequestId()).toString();
+ .append("originalRequestId", getOriginalRequestId())
+ .append("extSystemErrorSource", getExtSystemErrorSource()).toString();
}
}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
index 5b40e40eb9..ecc4f46149 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
@@ -155,6 +155,8 @@ public abstract class InfraRequests implements java.io.Serializable {
private String requestUrl;
@Column(name = "ORIGINAL_REQUEST_ID", length = 45)
private String originalRequestId;
+ @Column(name = "EXT_SYSTEM_ERROR_SOURCE", length = 80)
+ private String extSystemErrorSource;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "SO_REQUEST_ID", referencedColumnName = "REQUEST_ID")
@@ -580,6 +582,14 @@ public abstract class InfraRequests implements java.io.Serializable {
this.originalRequestId = originalRequestId;
}
+ public String getExtSystemErrorSource() {
+ return this.extSystemErrorSource;
+ }
+
+ public void setExtSystemErrorSource(String extSystemErrorSource) {
+ this.extSystemErrorSource = extSystemErrorSource;
+ }
+
@PrePersist
protected void onCreate() {
if (requestScope == null)
@@ -642,6 +652,7 @@ public abstract class InfraRequests implements java.io.Serializable {
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
.append("operationalEnvName", getOperationalEnvName()).append("instanceGroupId", getInstanceGroupId())
.append("instanceGroupName", getInstanceGroupName()).append("requestUrl", getRequestUrl())
- .append("originalRequestId", originalRequestId).toString();
+ .append("originalRequestId", originalRequestId).append("extSystemErrorSource", extSystemErrorSource)
+ .toString();
}
}