summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManamohan <MS00534989@Techmahindra.com>2019-08-16 11:45:52 +0530
committerManamohan <MS00534989@Techmahindra.com>2019-08-16 11:45:52 +0530
commit35de0e3132b7bce8eb3c289456edafdbf4a17ba2 (patch)
tree82fcae05e311e22571a00d8e436cfaf3e16be7e5
parentf075d8a5830e36960036c18c28064e3959e03da4 (diff)
Javadoc and logging improvement
Added Javadocs and logging for these classes. Change-Id: I365fc0677c0d5136e4579de3947d0478b26c22d3 Issue-ID: SO-2052 Signed-off-by: Manamohan <MS00534989@Techmahindra.com>
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java17
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java9
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java87
5 files changed, 97 insertions, 31 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
index 9396f9dbfc..4285e9aa84 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
@@ -47,6 +47,7 @@ import static org.apache.commons.lang3.StringUtils.*;
@Component
public class VnfAdapterCreateTasks {
+ private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateTasks.class);
public static final String SDNCQUERY_RESPONSE = "SDNCQueryResponse_";
private static final String VNFREST_REQUEST = "VNFREST_Request";
@@ -85,7 +86,9 @@ public class VnfAdapterCreateTasks {
+ " exists in gBuildingBlock but does not have a selflink value");
}
} catch (BBObjectNotFoundException bbException) {
- // If there is not a vf module in the general building block (in aLaCarte case), we will not retrieve
+ logger.error("Exception occurred", bbException);
+ // If there is not a vf module in the general building block (in aLaCarte case),
+ // we will not retrieve
// the SDNCQueryResponse and proceed as normal without throwing an error
}
@@ -94,6 +97,7 @@ public class VnfAdapterCreateTasks {
genericVnf, volumeGroup, sdncVfModuleQueryResponse);
execution.setVariable(VNFREST_REQUEST, createVolumeGroupRequest.toXmlString());
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
@@ -117,6 +121,8 @@ public class VnfAdapterCreateTasks {
try {
volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID);
} catch (BBObjectNotFoundException bbException) {
+ logger.error("Exception occurred if bb objrct not found in VnfAdapterCreateTasks createVfModule ",
+ bbException);
}
CloudRegion cloudRegion = gBBInput.getCloudRegion();
RequestContext requestContext = gBBInput.getRequestContext();
@@ -129,9 +135,9 @@ public class VnfAdapterCreateTasks {
volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
execution.setVariable(VNFREST_REQUEST, createVfModuleRequest.toXmlString());
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
-
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
index 1dcdfa912c..b8f5c8629d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
@@ -96,6 +96,7 @@ public class SDNCAssignTasks extends AbstractSDNCTask {
sdncRequest.setTopology(SDNCTopology.SERVICE);
execution.setVariable(SDNC_REQUEST, sdncRequest);
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
@@ -117,7 +118,6 @@ public class SDNCAssignTasks extends AbstractSDNCTask {
Customer customer = gBBInput.getCustomer();
CloudRegion cloudRegion = gBBInput.getCloudRegion();
SDNCRequest sdncRequest = new SDNCRequest();
-
GenericResourceApiVnfOperationInformation req =
sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext,
Boolean.TRUE.equals(vnf.isCallHoming()), buildCallbackURI(sdncRequest));
@@ -125,10 +125,12 @@ public class SDNCAssignTasks extends AbstractSDNCTask {
sdncRequest.setTopology(SDNCTopology.VNF);
execution.setVariable(SDNC_REQUEST, sdncRequest);
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
+
/**
* BPMN access method to assigning the vfModule in SDNC.
*
@@ -160,6 +162,7 @@ public class SDNCAssignTasks extends AbstractSDNCTask {
sdncRequest.setTopology(SDNCTopology.VFMODULE);
execution.setVariable(SDNC_REQUEST, sdncRequest);
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
index 7478479a86..080d6d34b1 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
@@ -40,7 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
- * This class is used for quering the SDNC
+ * This class is used for querying the SDNC.
*/
@Component
public class SDNCQueryTasks {
@@ -78,16 +78,19 @@ public class SDNCQueryTasks {
String response = sdncVnfResources.queryVnf(genericVnf);
execution.setVariable(SDNCQUERY_RESPONSE + genericVnf.getVnfId(), response);
} catch (BadResponseException ex) {
+ logger.error("Exception occurred", ex);
if (!ex.getMessage().equals(NO_RESPONSE_FROM_SDNC)) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SDNC);
} else {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO);
}
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO);
}
}
+
/**
* BPMN access method to query the SDNC for fetching the VfModule details.
*
@@ -116,12 +119,14 @@ public class SDNCQueryTasks {
+ " exists in gBuildingBlock but does not have a selflink value");
}
} catch (BadResponseException ex) {
+ logger.error("Exception occurred for BadResponse ", ex);
if (!ex.getMessage().equals(NO_RESPONSE_FROM_SDNC)) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SDNC);
} else {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO);
}
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
@@ -144,20 +149,26 @@ public class SDNCQueryTasks {
+ " exists in gBuildingBlock but does not have a selflink value");
}
} catch (BBObjectNotFoundException bbException) {
- // If there is not a vf module in the general building block, we will not call SDNC and proceed as normal
+ logger.error("Error occurred if bb object not found in SDNCQueryTasks queryVfModuleForVolumeGroup ",
+ bbException);
+ // If there is not a vf module in the general building block, we will not call
+ // SDNC and proceed as normal
// without throwing an error
- // If we see a bb object not found exception for something that is not a vf module id, then we should throw
+ // If we see a bb object not found exception for something that is not a vf
+ // module id, then we should throw
// the error as normal
if (!ResourceKey.VF_MODULE_ID.equals(bbException.getResourceKey())) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, bbException, TargetEntity.SO);
}
} catch (BadResponseException ex) {
+ logger.error("Error occurred for BadResponseException in SDNCQueryTasks queryVfModuleForVolumeGroup ", ex);
if (!ex.getMessage().equals(NO_RESPONSE_FROM_SDNC)) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SDNC);
} else {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO);
}
} catch (Exception ex) {
+ logger.error("Exception occurred", ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
index 7eaf011c75..8822bc39dd 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
@@ -55,7 +55,6 @@ public class OrchestrationStatusValidator {
private static final String MULTI_STAGE_DESIGN_OFF = "false";
private static final String MULTI_STAGE_DESIGN_ON = "true";
-
@Autowired
private ExtractPojosForBB extractPojosForBB;
@Autowired
@@ -63,6 +62,7 @@ public class OrchestrationStatusValidator {
@Autowired
private CatalogDbClient catalogDbClient;
+
/**
* This method validate's the status of the OrchestrationStatus against the buildingBlockDetail ResourceType
*
@@ -137,7 +137,8 @@ public class OrchestrationStatusValidator {
OrchestrationStatusValidationDirective.VALIDATION_SKIPPED);
return;
default:
- // can't currently get here, so not tested. Added in case enum is expanded without a change to this
+ // can't currently get here, so not tested. Added in case enum is expanded
+ // without a change to this
// code
throw new OrchestrationStatusValidationException(
String.format(UNKNOWN_RESOURCE_TYPE, buildingBlockFlowName,
@@ -172,6 +173,9 @@ public class OrchestrationStatusValidator {
execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT,
orchestrationStatusStateTransitionDirective.getFlowDirective());
} catch (BBObjectNotFoundException ex) {
+ logger.error(
+ "Error occurred for bb object notfound in OrchestrationStatusValidator validateOrchestrationStatus ",
+ ex);
if (execution.getFlowToBeCalled().contains("Unassign")) {
execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT,
OrchestrationStatusValidationDirective.SILENT_SUCCESS);
@@ -179,6 +183,7 @@ public class OrchestrationStatusValidator {
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, ex);
}
} catch (Exception e) {
+ logger.error("Exception occurred", e);
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, e);
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index 5b827d9cf8..bc9c603192 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -440,7 +440,6 @@ public class ServiceInstances extends AbstractRestHandler {
requestHandlerUtils.getRequestUri(requestContext, uriPrefix));
}
-
@DELETE
@Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}")
@Consumes(MediaType.APPLICATION_JSON)
@@ -589,7 +588,6 @@ public class ServiceInstances extends AbstractRestHandler {
requestHandlerUtils.getRequestUri(requestContext, uriPrefix));
}
-
@POST
@Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups")
@Consumes(MediaType.APPLICATION_JSON)
@@ -762,6 +760,27 @@ public class ServiceInstances extends AbstractRestHandler {
requestHandlerUtils.getRequestUri(requestContext, uriPrefix));
}
+ /**
+ * This method is used for POST a request to the BPEL client (BPMN).
+ *
+ * Convert the requestJson to ServiceInstanceRequest(sir), create the msoRequest object, check whether this request
+ * is already being processed in requestdb for duplicate check.
+ *
+ * Based on the alacarte flag, sir and msoRequest will do the recipe lookup from the service and servicerecipe table
+ * of catalogdb, and get the OrchestrationURI.
+ *
+ * If the present request is not the duplicate request then this request will be saved in the requestdb. and will
+ * POST a request to the BPMN engine at the OrchestrationURI fetched.
+ *
+ * @param requestJSON Json fetched as body in the API call
+ * @param action Type of action to be performed
+ * @param instanceIdMap Map of instance ids of service/vnf/vf/configuration etc..
+ * @param version Supported version of API
+ * @param requestId Unique id for the request
+ * @param requestUri
+ * @return response object
+ * @throws ApiException
+ */
public Response serviceInstances(String requestJSON, Actions action, HashMap<String, String> instanceIdMap,
String version, String requestId, String requestUri) throws ApiException {
String serviceInstanceId;
@@ -864,6 +883,7 @@ public class ServiceInstances extends AbstractRestHandler {
try {
infraActiveRequestsClient.save(currentActiveReq);
} catch (Exception e) {
+ logger.error("Exception occurred", e);
ErrorLoggerInfo errorLoggerInfo =
new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
@@ -877,6 +897,7 @@ public class ServiceInstances extends AbstractRestHandler {
aLaCarte = false;
}
+
RequestClientParameter requestClientParameter = null;
try {
requestClientParameter = new RequestClientParameter.Builder().setRequestId(requestId)
@@ -889,6 +910,7 @@ public class ServiceInstances extends AbstractRestHandler {
.setApiVersion(apiVersion).setALaCarte(aLaCarte).setRequestUri(requestUri)
.setInstanceGroupId(instanceGroupId).build();
} catch (IOException e) {
+ logger.error("Exception occurred", e);
ErrorLoggerInfo errorLoggerInfo =
new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.SchemaError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
@@ -914,6 +936,21 @@ public class ServiceInstances extends AbstractRestHandler {
return action;
}
+ /**
+ * This method deletes the Instance Groups.
+ *
+ * This method will check whether the request is not duplicate in requestdb. if its not then will save as a new
+ * request. And will send a POST request to BEPL client to delete the Insatnce Groups.
+ *
+ * @param action
+ * @param instanceIdMap
+ * @param version
+ * @param requestId
+ * @param requestUri
+ * @param requestContext
+ * @return
+ * @throws ApiException
+ */
public Response deleteInstanceGroups(Actions action, HashMap<String, String> instanceIdMap, String version,
String requestId, String requestUri, ContainerRequestContext requestContext) throws ApiException {
String instanceGroupId = instanceIdMap.get(CommonConstants.INSTANCE_GROUP_INSTANCE_ID);
@@ -967,6 +1004,7 @@ public class ServiceInstances extends AbstractRestHandler {
try {
infraActiveRequestsClient.save(currentActiveReq);
} catch (Exception e) {
+ logger.error("Exception occurred", e);
ErrorLoggerInfo errorLoggerInfo =
new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
@@ -979,6 +1017,7 @@ public class ServiceInstances extends AbstractRestHandler {
.setRequestAction(action.toString()).setApiVersion(apiVersion).setALaCarte(aLaCarte)
.setRequestUri(requestUri).setInstanceGroupId(instanceGroupId).build();
+
return requestHandlerUtils.postBPELRequest(currentActiveReq, requestClientParameter,
recipeLookupResult.getOrchestrationURI(), requestScope);
}
@@ -992,7 +1031,8 @@ public class ServiceInstances extends AbstractRestHandler {
protected RecipeLookupResult getServiceInstanceOrchestrationURI(ServiceInstancesRequest sir, Actions action,
boolean alaCarteFlag, InfraActiveRequests currentActiveReq) throws ApiException {
RecipeLookupResult recipeLookupResult = null;
- // if the aLaCarte flag is set to TRUE, the API-H should choose the VID_DEFAULT recipe for the requested action
+ // if the aLaCarte flag is set to TRUE, the API-H should choose the VID_DEFAULT
+ // recipe for the requested action
ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
// Query MSO Catalog DB
@@ -1008,7 +1048,6 @@ public class ServiceInstances extends AbstractRestHandler {
new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
ValidateException validateException =
new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
@@ -1027,7 +1066,6 @@ public class ServiceInstances extends AbstractRestHandler {
new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
ValidateException validateException =
new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
@@ -1045,7 +1083,6 @@ public class ServiceInstances extends AbstractRestHandler {
new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
ValidateException validateException =
new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
@@ -1062,7 +1099,6 @@ public class ServiceInstances extends AbstractRestHandler {
new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
RecipeNotFoundException recipeNotFoundExceptionException =
new RecipeNotFoundException.Builder("Recipe could not be retrieved from catalog DB.",
HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_GENERAL_SERVICE_ERROR).errorInfo(errorLoggerInfo)
@@ -1112,7 +1148,8 @@ public class ServiceInstances extends AbstractRestHandler {
}
}
- // if an aLaCarte flag was sent in the request, throw an error if the recipe was not found
+ // if an aLaCarte flag was sent in the request, throw an error if the recipe was
+ // not found
RequestParameters reqParam = requestDetails.getRequestParameters();
if (reqParam != null && alaCarteFlag && recipe == null) {
return null;
@@ -1301,23 +1338,32 @@ public class ServiceInstances extends AbstractRestHandler {
if (modelInfo.getModelType().equals(ModelType.vnf)) {
// a. For a vnf request (only create, no update currently):
- // i. (v3-v4) If modelInfo.modelCustomizationId is provided, use it to validate catalog DB has record in
+ // i. (v3-v4) If modelInfo.modelCustomizationId is provided, use it to validate
+ // catalog DB has record in
// vnf_resource_customization.model_customization_uuid.
- // ii. (v2-v4) If modelInfo.modelCustomizationId is NOT provided (because it is a pre-1702 ASDC model or
+ // ii. (v2-v4) If modelInfo.modelCustomizationId is NOT provided (because it is
+ // a pre-1702 ASDC model or
// pre-v3), then modelInfo.modelCustomizationName must have
// been provided (else create request should be rejected). APIH should use the
- // relatedInstance.modelInfo[service].modelVersionId** + modelInfo[vnf].modelCustomizationName
- // to “join�? service_to_resource_customizations with vnf_resource_customization to confirm a
+ // relatedInstance.modelInfo[service].modelVersionId** +
+ // modelInfo[vnf].modelCustomizationName
+ // to “join�? service_to_resource_customizations with
+ // vnf_resource_customization to confirm a
// vnf_resource_customization.model_customization_uuid record exists.
// **If relatedInstance.modelInfo[service].modelVersionId was not provided, use
- // relatedInstance.modelInfo[service].modelInvariantId + modelVersion instead to lookup modelVersionId
+ // relatedInstance.modelInfo[service].modelInvariantId + modelVersion instead to
+ // lookup modelVersionId
// (MODEL_UUID) in SERVICE table.
- // iii. Regardless of how the value was provided/obtained above, APIH must always populate
- // vnfModelCustomizationId in bpmnRequest. It would be assumed it was MSO generated
+ // iii. Regardless of how the value was provided/obtained above, APIH must
+ // always populate
+ // vnfModelCustomizationId in bpmnRequest. It would be assumed it was MSO
+ // generated
// during 1707 data migration if VID did not provide it originally on request.
- // iv. Note: continue to construct the “vnf-type�? value and pass to BPMN (must still be populated
+ // iv. Note: continue to construct the “vnf-type�? value and pass to BPMN
+ // (must still be populated
// in A&AI).
- // 1. If modelCustomizationName is NOT provided on a vnf/vfModule request, use modelCustomizationId to
+ // 1. If modelCustomizationName is NOT provided on a vnf/vfModule request, use
+ // modelCustomizationId to
// look it up in our catalog to construct vnf-type value to pass to BPMN.
VnfResource vnfResource = null;
@@ -1448,14 +1494,13 @@ public class ServiceInstances extends AbstractRestHandler {
throw new ValidationException("vfModuleCustomization");
} else if (vfModule == null && vfmc != null) {
vfModule = vfmc.getVfModule(); // can't be null as vfModuleModelUUID is not-null property in
- // VfModuleCustomization table
+ // VfModuleCustomization table
}
if (modelInfo.getModelVersionId() == null) {
modelInfo.setModelVersionId(vfModule.getModelUUID());
}
-
recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
vfModule.getModelUUID(), vnfComponentType, action.toString());
if (recipe == null) {
@@ -1518,7 +1563,6 @@ public class ServiceInstances extends AbstractRestHandler {
return new RecipeLookupResult(vnfRecipe.getOrchestrationUri(), vnfRecipe.getRecipeTimeout());
}
-
private RecipeLookupResult getNetworkUri(ServiceInstancesRequest sir, Actions action) throws ValidationException {
String defaultNetworkType = requestHandlerUtils.getDefaultModel(sir);
@@ -1558,7 +1602,6 @@ public class ServiceInstances extends AbstractRestHandler {
return recipe != null ? new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout()) : null;
}
-
private Response configurationRecipeLookup(String requestJSON, Action action, HashMap<String, String> instanceIdMap,
String version, String requestId, String requestUri) throws ApiException {
String serviceInstanceId;
@@ -1597,7 +1640,6 @@ public class ServiceInstances extends AbstractRestHandler {
referencesResponse.setRequestId(requestId);
serviceResponse.setRequestReferences(referencesResponse);
-
String orchestrationUri = env.getProperty(CommonConstants.ALACARTE_ORCHESTRATION);
String timeOut = env.getProperty(CommonConstants.ALACARTE_RECIPE_TIMEOUT);
@@ -1609,7 +1651,6 @@ public class ServiceInstances extends AbstractRestHandler {
new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.DataError)
.errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
ValidateException validateException = new ValidateException.Builder(error, HttpStatus.SC_NOT_FOUND,
ErrorNumbers.SVC_GENERAL_SERVICE_ERROR).errorInfo(errorLoggerInfo).build();