aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-tasks')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java81
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfHealthCheckTasks.java185
-rwxr-xr-x[-rw-r--r--]bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java5
-rwxr-xr-x[-rw-r--r--]bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java4
-rwxr-xr-x[-rw-r--r--]bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateRequest.java72
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateResponse.java36
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstance.java32
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceRequest.java38
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceResponse.java57
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckResponse.java28
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckInstanceResponse.java57
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckResponse.java28
13 files changed, 624 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java
index f49cf48ff5..2dda26718f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java
@@ -35,6 +35,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.adapter.cnf.CnfAdapterClient;
+import org.onap.so.client.adapter.cnf.entities.CnfAaiUpdateRequest;
+import org.onap.so.client.adapter.cnf.entities.CnfAaiUpdateResponse;
import org.onap.so.client.adapter.cnf.entities.InstanceRequest;
import org.onap.so.client.adapter.cnf.entities.InstanceResponse;
import org.onap.so.client.adapter.vnf.mapper.AttributeNameValue;
@@ -47,6 +49,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -54,6 +57,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
public class CnfAdapterCreateTasks {
private static final Logger logger = LoggerFactory.getLogger(CnfAdapterCreateTasks.class);
public static final String SDNCQUERY_RESPONSE = "SDNCQueryResponse_";
+ private static final String CNF_ADAPTER_MESSAGE_TYPE = "CNFCallback";
+ private static final String CNF_ADAPTER_CALLBACK_TIMEOUT = "PT30M";
@Autowired
private ExtractPojosForBB extractPojosForBB;
@@ -122,4 +127,80 @@ public class CnfAdapterCreateTasks {
return request;
}
+ public void prepareForCnfUpdateOrDelete(BuildingBlockExecution execution) {
+
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+
+ String heatStackId = execution.getVariable("heatStackId");
+
+ logger.debug("heatStackId: {}", heatStackId);
+ CloudRegion cloudRegion = gBBInput.getCloudRegion();
+ String requestId = execution.getVariable("mso-request-id");
+
+ String callbackUrl =
+ "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/" + CNF_ADAPTER_MESSAGE_TYPE + "/" + requestId;
+
+ CnfAaiUpdateRequest aaiRequest = createCnfAaiUpdateRequest(heatStackId, cloudRegion, callbackUrl);
+ logger.debug("aaiRequest: {}", aaiRequest);
+
+ String cnfRequestPayload = "";
+ try {
+ cnfRequestPayload = mapper.writeValueAsString(aaiRequest);
+ } catch (JsonProcessingException e) {
+ logger.error("Exception occurred", e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e);
+ }
+
+ // Prepare values to pass in execution variable for CNF Adapter async Handling
+ execution.setVariable("messageType", CNF_ADAPTER_MESSAGE_TYPE);
+ execution.setVariable("correlator", requestId);
+ execution.setVariable("timeout", CNF_ADAPTER_CALLBACK_TIMEOUT);
+
+ String currentFlow = execution.getFlowToBeCalled();
+ logger.debug("currentFlow: {}", currentFlow);
+
+ String apiPath = "http://so-cnf-adapter:8090";
+ if ("CreateVfModuleBB".equals(currentFlow)) {
+ apiPath = apiPath + "/api/cnf-adapter/v1/aai-update/";
+ } else if ("DeleteVfModuleBB".equals(currentFlow)) {
+ apiPath = apiPath + "/api/cnf-adapter/v1/aai-delete/";
+ }
+
+ // Set variables in execution variable\
+ execution.setVariable("apiPath", apiPath);
+ execution.setVariable("cnfRequestPayload", cnfRequestPayload);
+ }
+
+ public void processCnfUpdateOrDeleteAsyncResponse(BuildingBlockExecution execution) {
+
+ String asyncResponse = execution.getVariable("asyncCallbackResponse");
+
+ CnfAaiUpdateResponse response = new CnfAaiUpdateResponse();
+
+ logger.debug("asyncResponse: {}", asyncResponse);
+
+ try {
+ response = mapper.readValue(asyncResponse, CnfAaiUpdateResponse.class);
+ } catch (JsonProcessingException e) {
+ logger.error("Error in parsing Cnf AAI update Response");
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e);
+ }
+
+ if (!"COMPLETED".equalsIgnoreCase(response.getStatus())) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, new RuntimeException("Cannot update in AAI"));
+ }
+ }
+
+ protected CnfAaiUpdateRequest createCnfAaiUpdateRequest(String heatStackId, CloudRegion cloudRegion,
+ String callbackUrl) {
+ CnfAaiUpdateRequest request = new CnfAaiUpdateRequest();
+ request.setCallbackUrl(callbackUrl);
+ request.setCloudOwner(cloudRegion.getCloudOwner());
+ request.setCloudRegion(cloudRegion.getLcpCloudRegionId());
+ request.setTenantId(cloudRegion.getTenantId());
+ request.setInstanceId(heatStackId);
+
+ return request;
+ }
+
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfHealthCheckTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfHealthCheckTasks.java
new file mode 100755
index 0000000000..e6545cb800
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfHealthCheckTasks.java
@@ -0,0 +1,185 @@
+package org.onap.so.bpmn.infrastructure.adapter.cnf.tasks;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import org.onap.logging.filter.base.ONAPComponents;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.client.adapter.cnf.entities.HealthcheckInstance;
+import org.onap.so.client.adapter.cnf.entities.HealthcheckInstanceRequest;
+import org.onap.so.client.adapter.cnf.entities.HealthcheckInstanceResponse;
+import org.onap.so.client.adapter.cnf.entities.HealthcheckResponse;
+import org.onap.so.client.adapter.cnf.entities.StatusCheckInstanceResponse;
+import org.onap.so.client.adapter.cnf.entities.StatusCheckResponse;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Component
+public class CnfHealthCheckTasks {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CnfHealthCheckTasks.class);
+ private static final String BUILDING_BLOCK = "buildingBlock";
+ private static final String HEALTH_CHECK_SCOPE = "health-check";
+ private static final String STATUS_CHECK_SCOPE = "status-check";
+ private static final String CNF_ADAPTER_MESSAGE_TYPE = "CNFCallback";
+
+ @Autowired
+ private ExceptionBuilder exceptionUtil;
+
+ private ObjectMapper mapper = new ObjectMapper();
+
+ public void prepareCnfAdaperRequest(BuildingBlockExecution execution) {
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+ ServiceInstance serviceInstance = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0);
+ GenericVnf genericVnf = serviceInstance.getVnfs().get(0);
+ List<VfModule> listOfVfModules = genericVnf.getVfModules();
+ List<String> listOfHeatStackIds =
+ listOfVfModules.stream().map(x -> x.getHeatStackId()).collect(Collectors.toList());
+ LOGGER.debug("listOfHeatStackIds from prepareCnfAdaperRequest: {}", listOfHeatStackIds);
+
+ // Prepare values to pass in execution variable for CNF Adapter async Handling
+ String requestId = execution.getVariable("mso-request-id");
+ execution.setVariable("messageType", CNF_ADAPTER_MESSAGE_TYPE);
+ execution.setVariable("correlator", requestId);
+ execution.setVariable("timeout", "PT30M");
+ // Replace with environment values
+ String callBackUrl =
+ "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/" + CNF_ADAPTER_MESSAGE_TYPE + "/" + requestId;
+ HealthcheckInstanceRequest request = new HealthcheckInstanceRequest();
+ try {
+ request = createStatusCheckRequest(listOfHeatStackIds, callBackUrl);
+ } catch (JsonProcessingException e) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 6822, e);
+ }
+ LOGGER.debug("request: {}", request);
+
+ String requestPayload = "";
+ try {
+ requestPayload = mapper.writeValueAsString(request);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("Error in JSON");
+ }
+ execution.setVariable("cnfRequestPayload", requestPayload);
+
+ ExecuteBuildingBlock executeBuildingBlock = execution.getVariable(BUILDING_BLOCK);
+ BuildingBlock buildingBlock = executeBuildingBlock.getBuildingBlock();
+ String action = Optional.ofNullable(buildingBlock.getBpmnAction()).orElseThrow(
+ () -> new NullPointerException("BPMN Action is NULL in the orchestration_flow_reference table "));
+
+ // Replace values with environment values
+ String uri = "http://so-cnf-adapter:8090";
+ String apiPath = "";
+
+ if (STATUS_CHECK_SCOPE.equals(action)) {
+ apiPath = uri + "/api/cnf-adapter/v1/statuscheck/";
+ } else if (HEALTH_CHECK_SCOPE.equals(action)) {
+ apiPath = uri + "/api/cnf-adapter/v1/healthcheck/";
+ }
+
+ LOGGER.debug("apiPath: {}", apiPath);
+
+ execution.setVariable("apiPath", apiPath);
+ }
+
+ public void processAsyncResponse(BuildingBlockExecution execution) {
+ // Value from CNF Async Handler activity
+ String asyncResponse = execution.getVariable("asyncCallbackResponse");
+
+ ExecuteBuildingBlock executeBuildingBlock = execution.getVariable(BUILDING_BLOCK);
+ BuildingBlock buildingBlock = executeBuildingBlock.getBuildingBlock();
+ String action = Optional.ofNullable(buildingBlock.getBpmnAction()).orElseThrow(
+ () -> new NullPointerException("BPMN Action is NULL in the orchestration_flow_reference table "));
+
+ LOGGER.debug("action: {}", action);
+
+ if (asyncResponse.contains("error")) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, asyncResponse, ONAPComponents.SO);
+ }
+
+ if (STATUS_CHECK_SCOPE.equals(action)) {
+ StatusCheckResponse statusCheckResponse = new StatusCheckResponse();
+
+ try {
+ statusCheckResponse = mapper.readValue(asyncResponse, StatusCheckResponse.class);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("Error in parsing JSON response");
+ }
+
+ LOGGER.debug("statusCheckResponse: {}", statusCheckResponse);
+
+ List<StatusCheckInstanceResponse> listOfStatusInstanceResponse = statusCheckResponse.getInstanceResponse();
+
+ for (StatusCheckInstanceResponse statusCheckInstanceResponse : listOfStatusInstanceResponse) {
+ if (!statusCheckInstanceResponse.isStatus()) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, asyncResponse, ONAPComponents.SO);
+ }
+ }
+
+ String statusCheckResponseJson = "";
+ try {
+ statusCheckResponseJson = mapper.writeValueAsString(statusCheckResponse);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("Error in PARSING statusCheckResponse");
+ }
+
+ execution.setVariable("StatusMessage", statusCheckResponseJson);
+
+ } else if (HEALTH_CHECK_SCOPE.equals(action)) {
+ HealthcheckResponse healthCheckResponse = new HealthcheckResponse();
+ try {
+ healthCheckResponse = mapper.readValue(asyncResponse, HealthcheckResponse.class);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("Error in parsing JSON");
+ }
+
+ List<HealthcheckInstanceResponse> listOfHealthcheckInstanceResponses =
+ healthCheckResponse.getInstanceResponse();
+
+ for (HealthcheckInstanceResponse healthcheckInstanceResponse : listOfHealthcheckInstanceResponses) {
+ if ("Failed".equalsIgnoreCase(healthcheckInstanceResponse.getStatus())
+ || "Unknown".equalsIgnoreCase(healthcheckInstanceResponse.getStatus())) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, asyncResponse, ONAPComponents.SO);
+ }
+ }
+
+ String healthCheckResponseJson = "";
+ try {
+ healthCheckResponseJson = mapper.writeValueAsString(healthCheckResponse);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("Error in PARSING statusCheckResponse");
+ }
+
+ execution.setVariable("StatusMessage", healthCheckResponseJson);
+
+ LOGGER.debug("healthCheckResponse: {}", healthCheckResponse);
+ }
+
+ }
+
+ protected HealthcheckInstanceRequest createStatusCheckRequest(List<String> listOfHeatStackIds, String callBackUrl)
+ throws JsonProcessingException {
+ HealthcheckInstanceRequest healthcheckInstanceRequest = new HealthcheckInstanceRequest();
+ List<HealthcheckInstance> listOfHealthcheckInstance = new ArrayList<>();
+
+ listOfHeatStackIds.stream().forEach(x -> listOfHealthcheckInstance.add(new HealthcheckInstance(x)));
+ LOGGER.debug("listOfHealthcheckInstance: {}", listOfHealthcheckInstance);
+
+ healthcheckInstanceRequest.setInstances(listOfHealthcheckInstance);
+ healthcheckInstanceRequest.setCallbackUrl(callBackUrl);
+ LOGGER.debug("healthcheckInstanceRequest: {}", healthcheckInstanceRequest);
+
+ return healthcheckInstanceRequest;
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
index 2bd0f2c786..920369784e 100644..100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
@@ -54,6 +54,7 @@ public class ExecuteBuildingBlockBuilder {
private static final String PNF = "Pnf";
private static final String VFMODULE = "VfModule";
private static final String NETWORK = "Network";
+ private static final String HEALTH_CHECK = "HealthCheckBB";
protected List<ExecuteBuildingBlock> buildExecuteBuildingBlockList(List<OrchestrationFlow> orchFlows,
List<Resource> originalResourceList, String requestId, String apiVersion, String resourceId,
@@ -119,6 +120,10 @@ public class ExecuteBuildingBlockBuilder {
|| (orchFlow.getFlowName().contains(CONTROLLER) && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
+ } else if ((orchFlow.getFlowName().equalsIgnoreCase(HEALTH_CHECK))
+ && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope())) {
+ addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
+ resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
} else if (orchFlow.getFlowName().contains(PNF)
|| (orchFlow.getFlowName().contains(CONTROLLER) && (PNF).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.PNF, orchFlow, requestId, apiVersion,
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 02508b8867..f36c5a2915 100644..100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -38,6 +38,7 @@ import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConst
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.REPLACEINSTANCERETAINASSIGNMENTS;
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.SERVICE;
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.UPDATE_INSTANCE;
+import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.HEALTH_CHECK;
import static org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionConstants.WORKFLOW_ACTION_ERROR_MESSAGE;
import java.io.IOException;
import java.util.ArrayList;
@@ -298,6 +299,9 @@ public class WorkflowAction {
} else if (resourceType == WorkflowType.VNF && UPDATE_INSTANCE.equalsIgnoreCase(requestAction)) {
vnfEBBLoader.customTraverseAAIVnf(execution, resourceList, workflowResourceIds.getServiceInstanceId(),
workflowResourceIds.getVnfId(), aaiResourceIds);
+ } else if (resourceType == WorkflowType.VNF && HEALTH_CHECK.equalsIgnoreCase(requestAction)) {
+ vnfEBBLoader.customTraverseAAIVnf(execution, resourceList, workflowResourceIds.getServiceInstanceId(),
+ workflowResourceIds.getVnfId(), aaiResourceIds);
} else {
buildAndThrowException(execution, "Current Macro Request is not supported");
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
index 8c6fb2b38b..a41613982d 100644..100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
@@ -50,6 +50,7 @@ public final class WorkflowActionConstants {
public static final String UPDATE_INSTANCE = "updateInstance";
public static final String USER_PARAM_SERVICE = "service";
public static final String VOLUMEGROUP = "VolumeGroup";
+ public static final String HEALTH_CHECK = "healthCheck";
public static final String WORKFLOW_ACTION_ERROR_MESSAGE = "WorkflowActionErrorMessage";
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateRequest.java
new file mode 100644
index 0000000000..4cc675f4e9
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateRequest.java
@@ -0,0 +1,72 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class CnfAaiUpdateRequest {
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ @JsonProperty("cloudRegion")
+ private String cloudRegion;
+
+ @JsonProperty("cloudOwner")
+ private String cloudOwner;
+
+ @JsonProperty("tenantId")
+ private String tenantId;
+
+ @JsonProperty("callbackUrl")
+ private String callbackUrl;
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ public String getCloudRegion() {
+ return cloudRegion;
+ }
+
+ public void setCloudRegion(String cloudRegion) {
+ this.cloudRegion = cloudRegion;
+ }
+
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ public void setCloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ }
+
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public String getCallbackUrl() {
+ return callbackUrl;
+ }
+
+ public void setCallbackUrl(String callbackUrl) {
+ this.callbackUrl = callbackUrl;
+ }
+
+ @Override
+ public String toString() {
+ return "CnfAaiUpdateRequest [instanceId=" + instanceId + ", cloudRegion=" + cloudRegion + ", cloudOwner="
+ + cloudOwner + ", tenantId=" + tenantId + ", callbackUrl=" + callbackUrl + "]";
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateResponse.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateResponse.java
new file mode 100644
index 0000000000..79d27abc35
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/CnfAaiUpdateResponse.java
@@ -0,0 +1,36 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class CnfAaiUpdateResponse {
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonProperty("statusMessage")
+ private String statusMessage;
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getStatusMessage() {
+ return statusMessage;
+ }
+
+ public void setStatusMessage(String statusMessage) {
+ this.statusMessage = statusMessage;
+ }
+
+ @Override
+ public String toString() {
+ return "CnfAaiUpdateResponse [status=" + status + ", statusMessage=" + statusMessage + "]";
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstance.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstance.java
new file mode 100755
index 0000000000..e3fc8b80df
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstance.java
@@ -0,0 +1,32 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class HealthcheckInstance {
+
+ public HealthcheckInstance() {}
+
+ public HealthcheckInstance(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ @Override
+ public String toString() {
+ return "InstanceRequest{" + "instanceId='" + instanceId + '\'' + '}';
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceRequest.java
new file mode 100755
index 0000000000..a89d18bb3d
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceRequest.java
@@ -0,0 +1,38 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class HealthcheckInstanceRequest {
+
+ @JsonProperty("requestedInstances")
+ private List<HealthcheckInstance> instances;
+
+ @JsonProperty("callbackUrl")
+ private String callbackUrl;
+
+ public List<HealthcheckInstance> getInstances() {
+ return instances;
+ }
+
+ public void setInstances(List<HealthcheckInstance> instances) {
+ this.instances = instances;
+ }
+
+ public String getCallbackUrl() {
+ return callbackUrl;
+ }
+
+ public void setCallbackUrl(String callbackUrl) {
+ this.callbackUrl = callbackUrl;
+ }
+
+ @Override
+ public String toString() {
+ return "CheckInstanceRequest{" + "instances=" + instances + ", callbackUrl='" + callbackUrl + '\'' + '}';
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceResponse.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceResponse.java
new file mode 100755
index 0000000000..ca8a1caad5
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckInstanceResponse.java
@@ -0,0 +1,57 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class HealthcheckInstanceResponse {
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ @JsonProperty("reason")
+ private String reason;
+
+ @JsonProperty("status")
+ private String status;
+
+ public HealthcheckInstanceResponse() {}
+
+ public HealthcheckInstanceResponse(String instanceId, String reason, String status) {
+ this.instanceId = instanceId;
+ this.reason = reason;
+ this.status = status;
+ }
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "HealthcheckInstanceResponse{" + "instanceId='" + instanceId + '\'' + ", reason='" + reason + '\''
+ + ", status=" + status + '}';
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckResponse.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckResponse.java
new file mode 100755
index 0000000000..175cb3a224
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/HealthcheckResponse.java
@@ -0,0 +1,28 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class HealthcheckResponse {
+
+ @JsonProperty("result")
+ private List<HealthcheckInstanceResponse> instanceResponse;
+
+ public List<HealthcheckInstanceResponse> getInstanceResponse() {
+ return instanceResponse;
+ }
+
+ public void setInstanceResponse(List<HealthcheckInstanceResponse> instanceResponse) {
+ this.instanceResponse = instanceResponse;
+ }
+
+ @Override
+ public String toString() {
+ return "HealthcheckResponse{" + "instanceResponse=" + instanceResponse + '}';
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckInstanceResponse.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckInstanceResponse.java
new file mode 100755
index 0000000000..cac589f90a
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckInstanceResponse.java
@@ -0,0 +1,57 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class StatusCheckInstanceResponse {
+
+ @JsonProperty("instanceId")
+ private String instanceId;
+
+ @JsonProperty("reason")
+ private String reason;
+
+ @JsonProperty("status")
+ private boolean status;
+
+ public StatusCheckInstanceResponse() {}
+
+ public StatusCheckInstanceResponse(String instanceId, String reason, boolean status) {
+ this.instanceId = instanceId;
+ this.reason = reason;
+ this.status = status;
+ }
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ public void setInstanceId(String instanceId) {
+ this.instanceId = instanceId;
+ }
+
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ public boolean isStatus() {
+ return status;
+ }
+
+ public void setStatus(boolean status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ return "StatusCheckInstanceResponse{" + "instanceId='" + instanceId + '\'' + ", reason='" + reason + '\''
+ + ", status=" + status + '}';
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckResponse.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckResponse.java
new file mode 100755
index 0000000000..aec2892e22
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/entities/StatusCheckResponse.java
@@ -0,0 +1,28 @@
+package org.onap.so.client.adapter.cnf.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = "true")
+public class StatusCheckResponse {
+
+ @JsonProperty("result")
+ private List<StatusCheckInstanceResponse> instanceResponse;
+
+ public List<StatusCheckInstanceResponse> getInstanceResponse() {
+ return instanceResponse;
+ }
+
+ public void setInstanceResponse(List<StatusCheckInstanceResponse> instanceResponse) {
+ this.instanceResponse = instanceResponse;
+ }
+
+ @Override
+ public String toString() {
+ return "StatusCheckResponse{" + "instanceResponse=" + instanceResponse + '}';
+ }
+
+}