From 487061f35d918536c6ce8ec6fe7e0ee70532aedc Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 12 Sep 2018 16:55:02 -0400 Subject: Stability fixes sdnc now logs the full response message as a json removed erroneous encoding of variables with full XML Return created network from getVirtualLinkL3Network added exception logger to workflowaction aai check Check for null value for vnfcPorts before referencing it Added test case for invalid camunda response Changed to use updateStatus method Added saving for currentActiveReq and test for 401 resp Change JUnit to use expectedException and clean up unused items. Add vfModuleId to the exception message for missing model info. Report an error if VF Module model info is expected but is null. - Just renamed the Cvnfc and Vnfc set names - Updated code to check for duplicate VNFC's across multiple modules in the same VNF. - Removed commented out if statement line for ALLOTTED_RESOURCE - Reinitialize the Cvnfc and Vnfc Sets each time we iterate the VFModule loop. This will avoid the concurrent modification exception. Eliminated Ben from the sample request Changed to use else if for null check Added null check before catdb call and test case Fix implementation of a call to VNF Adapter for DeleteVolumeGroupBB. Update the method to no call save and do a put Revert usage of PUT method, use save instead Change-Id: I9f69fb68d0639c23b8e1de6931938119bd3ac54b Issue-ID: SO-1032 Signed-off-by: Benjamin, Max (mb388a) --- .../java/org/onap/so/apihandlerinfra/ServiceInstances.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java') 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 60b07fdeab..5d9ad767bf 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 @@ -663,14 +663,14 @@ public class ServiceInstances { // Get VF Module-specific base module indicator - VfModule vfm; + VfModule vfm = null; String modelVersionId = modelInfo.getModelVersionId(); if(modelVersionId != null) { vfm = catalogDbClient.getVfModuleByModelUUID(modelVersionId); - } else { - vfm = catalogDbClient.getVfModuleByModelInvariantUUIDAndModelVersion(modelInfo.getModelInvariantId(), modelInfo.getModelVersion()); + } else if(modelInfo.getModelInvariantId() != null && modelInfo.getModelVersion() != null){ + vfm = catalogDbClient.getVfModuleByModelInvariantUUIDAndModelVersion(modelInfo.getModelInvariantId(), modelInfo.getModelVersion()); } if (vfm != null) { @@ -831,9 +831,8 @@ public class ServiceInstances { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, MsoLogger.ErrorCode.SchemaError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); ValidateException validateException = new ValidateException.Builder("Exception caught mapping Camunda JSON response to object", HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_BAD_PARAMETER).cause(e) .errorInfo(errorLoggerInfo).build(); - currentActiveReq.setRequestStatus(Status.FAILED.name()); - currentActiveReq.setStatusMessage(validateException.getMessage()); - throw validateException; + updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage()); + throw validateException; } // BPEL accepted the request, the request is in progress @@ -850,8 +849,7 @@ public class ServiceInstances { ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, MsoLogger.ErrorCode.SchemaError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); ValidateException validateException = new ValidateException.Builder("Exception caught mapping Camunda JSON response to object", HttpStatus.SC_NOT_ACCEPTABLE, ErrorNumbers.SVC_BAD_PARAMETER).cause(e) .errorInfo(errorLoggerInfo).build(); - currentActiveReq.setRequestStatus(Status.FAILED.name()); - currentActiveReq.setStatusMessage(validateException.getMessage()); + updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage()); throw validateException; } -- cgit 1.2.3-korg