diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-10-12 14:03:02 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-10-16 17:28:55 -0400 |
commit | 2ff435b28384a066017b690cf8a876a2cdd52d29 (patch) | |
tree | 0b87091067f3a23d8a75738d933bcb61cb8f8d6a /bpmn/MSOCommonBPMN/src/main | |
parent | d6c21ac6f38474841d3b9ced0524fe7671ae8682 (diff) |
Bug fixes for casablanca
Updated builder to use String.format
Added exception specifically for issues interacting with
requestdbadapter
Updated exception message and added junit test case
Added case to handle when homing is not called during assign vnf.
include network ID for completion handler
Added exception handling for saving to requestdb
added null check to mdc and interceptors to sdnc cxf
confirm subnet map is not null in adapter response
shallow copy subnet before AAI udpate
update AAIObjectType to use uriTemplate
extract subnet data from adapter response
update correct AAIObjectType for subnet query
update subnet(s) in AAI on network create completion
updated how request db is set to failure in workflowA
updated in and out mapping to be generalBuildingBlock
change source out mapping to generalBuildingBlock
Use explicit conversion to JSON to read cloudConfiguration settings.
Use explicit conversion to JSON to read cloudConfiguration settings.
Correct the name of DeleteVfModuleBB subprocess.
Write the returned value from Homing to gBBInput
updated unit test coverage for update network
sync subnet status with network update
Added WorkflowException to out mapping which will trigger an exception
to be thrown when populated.
Correct the payload for HealthCheck APP-C Action to remove escaping and
change parameter name.
Added WorkflowException to out mapping which will trigger an exception
to be thrown when populated.
Commit a change that was not staged in previous commit
updated arguments to getConstructor method
forgot to extract throwable from Optional object
added throwable constructor to createException
fixed broken unit test and added a new test and method
set the network technology in the network request
remove namespace from added networkId payload element
- Updated SDWan test case to check the database to make sure the
VNFCustomization object exist.
- Updated code to only loop in iNotif.getResources() for VF resources,
all others are unnecessary and were causing issues with the Service
object.
- Removed modifiedHeatTemplate variable since this isn't needed in the
ONAP code base.
Make sure vnfResponseCode variable is set to 200 when VNF is correctly
retrieved from A&AI.
VRR VRRCreateVfModule - send availability_zone to SDNC Infra Assign
request
Safeguard the retrieval of Boolean setting for isRollbackEnabled.
Set isRollbackEnabled to opposite of suppressRollback early on in the
execution.
Reverse suppressRollback value to pass as backout parameter to VNF
Adapter
Add the exceptions to the calls to aai client queries
Correct retrieval of the object from Optional for A&AI queries.
Change-Id: I7d22e621b0316c14ce61bd51a9d5753473622697
Issue-ID: SO-1134
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
5 files changed, 17 insertions, 14 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy index ff5dabf99a..c19851d223 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy @@ -206,6 +206,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor { idXml = "" } idXml = utils.removeXmlPreamble(idXml) + idXml = utils.removeXmlNamespaces(idXml) msoLogger.debug("Incoming Instance Id Xml: " + idXml) String payload = """ diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy index e182ae3300..1a55bf2a0e 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy @@ -20,6 +20,7 @@ package org.onap.so.bpmn.common.scripts +import javax.ws.rs.NotFoundException import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution import org.camunda.bpm.model.dmn.instance.OrganizationUnit @@ -124,10 +125,11 @@ public class PrepareUpdateAAIVfModule extends VfModuleBase { try { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId) AAIResourcesClient resourceClient = new AAIResourcesClient() - AAIResultWrapper wrapper = resourceClient.get(uri.depth(Depth.ONE)) + AAIResultWrapper wrapper = resourceClient.get(uri.depth(Depth.ONE), NotFoundException.class) GenericVnf responseData = wrapper.asBean(GenericVnf.class).get() execution.setVariable('PUAAIVfMod_getVnfResponse', responseData) + execution.setVariable('PUAAIVfMod_getVnfResponseCode', 200) } catch (Exception ex) { msoLogger.error(ex); @@ -176,8 +178,8 @@ public class PrepareUpdateAAIVfModule extends VfModuleBase { execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg) execution.setVariable('PUAAIVfMod_vfModuleOK', false) } else { - AAIResultWrapper wrapper = resourceClient.get(uri) - org.onap.aai.domain.yang.VfModule vfModule = wrapper.asBean(org.onap.aai.domain.yang.VfModule.class) + AAIResultWrapper wrapper = resourceClient.get(uri, NotFoundException.class) + org.onap.aai.domain.yang.VfModule vfModule = wrapper.asBean(org.onap.aai.domain.yang.VfModule.class).get() def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus') if (vfModule.isBaseVfModule && genericVnf.getVfModules().getVfModule().size() > 1 && vfModule.getOrchestrationStatus().equals('pending-delete')) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java index 47e36424dd..45bc27d840 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java @@ -85,9 +85,9 @@ public class PayloadClient { public static Optional<String> healthCheckFormat(String vnfName, String vnfHostIpAddress) throws JsonProcessingException{ HealthCheckAction payloadResult = new HealthCheckAction(); RequestParametersHealthCheck requestParams = new RequestParametersHealthCheck(); - requestParams.setVnfHostIpAddress(vnfHostIpAddress); + requestParams.setHostIpAddress(vnfHostIpAddress); payloadResult.setRequestParameters(requestParams); - return Optional.of((mapper.writeValueAsString(payloadResult)).replaceAll("\"", "\\\\\"")); + return Optional.of((mapper.writeValueAsString(payloadResult))); } public static Optional<String> snapshotFormat(String vmId, String identityUrl)throws JsonProcessingException{ diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java index 053ac5e741..60030ee3dd 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java @@ -32,8 +32,8 @@ public class RequestParametersHealthCheck { @JsonProperty("vnf-name") private String vnfName; -@JsonProperty("vnf-host-ip-address") -private String vnfHostIpAddress; +@JsonProperty("host-ip-address") +private String hostIpAddress; @JsonProperty("vnf-name") public String getVnfName() { @@ -45,14 +45,14 @@ public void setVnfName(String vnfName) { this.vnfName = vnfName; } -@JsonProperty("vnf-host-ip-address") -public void setVnfHostIpAddress(String vnfHostIpAddress) { - this.vnfHostIpAddress = vnfHostIpAddress; +@JsonProperty("host-ip-address") +public void setHostIpAddress(String hostIpAddress) { + this.hostIpAddress = hostIpAddress; } -@JsonProperty("vnf-host-ip-address") -public String getVnfHostIpAddress() { - return vnfHostIpAddress; +@JsonProperty("host-ip-address") +public String getHostIpAddress() { + return hostIpAddress; } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java index 6c399ddbbb..d463fde09c 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java @@ -347,7 +347,7 @@ public class BBInputSetupMapperLayer { protected OrchestrationContext mapOrchestrationContext(RequestDetails requestDetails) { OrchestrationContext context = new OrchestrationContext(); - context.setIsRollbackEnabled((requestDetails.getRequestInfo().getSuppressRollback())); + context.setIsRollbackEnabled(!(requestDetails.getRequestInfo().getSuppressRollback())); return context; } |