diff options
Diffstat (limited to 'bpmn')
9 files changed, 54 insertions, 30 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/AggregateRoute.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/AggregateRoute.java index a5eb9d86a7..96a6ab7bd2 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/AggregateRoute.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/AggregateRoute.java @@ -36,8 +36,6 @@ public class AggregateRoute implements Serializable, ShallowCopy<AggregateRoute> @Id @JsonProperty("route-id") private String routeId; - @JsonProperty("route-name") - private String routeName; @JsonProperty("network-start-address") private String networkStartAddress; @JsonProperty("cidr-mask") @@ -54,14 +52,6 @@ public class AggregateRoute implements Serializable, ShallowCopy<AggregateRoute> this.routeId = routeId; } - public String getRouteName() { - return routeName; - } - - public void setRouteName(String routeName) { - this.routeName = routeName; - } - public String getNetworkStartAddress() { return networkStartAddress; } 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 573925ff3f..ea48c78dc0 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 @@ -30,6 +30,7 @@ import java.util.Map; import java.util.Optional; import org.modelmapper.ModelMapper; import org.modelmapper.convention.MatchingStrategies; +import org.onap.so.bpmn.servicedecomposition.bbobjects.AggregateRoute; import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; @@ -131,6 +132,10 @@ public class BBInputSetupMapperLayer { return modelMapper.map(aaiSegmentationAssignment, SegmentationAssignment.class); } + protected AggregateRoute mapAAIAggregateRoute(org.onap.aai.domain.yang.AggregateRoute aaiAggregateRoute) { + return modelMapper.map(aaiAggregateRoute, AggregateRoute.class); + } + protected CtagAssignment mapAAICtagAssignment(org.onap.aai.domain.yang.CtagAssignment aaiCtagAssignment) { return modelMapper.map(aaiCtagAssignment, CtagAssignment.class); } @@ -262,10 +267,21 @@ public class BBInputSetupMapperLayer { mapAllSubnetsIntoL3Network(aaiL3Network, network); mapAllCtagAssignmentsIntoL3Network(aaiL3Network, network); mapAllSegmentationAssignmentsIntoL3Network(aaiL3Network, network); + mapAllAggregateRoutesIntoL3Network(aaiL3Network, network); network.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiL3Network.getOrchestrationStatus())); return network; } + protected void mapAllAggregateRoutesIntoL3Network(org.onap.aai.domain.yang.L3Network aaiL3Network, + L3Network network) { + if (aaiL3Network.getAggregateRoutes() != null) { + for (org.onap.aai.domain.yang.AggregateRoute aaiAggregateRoute : aaiL3Network.getAggregateRoutes() + .getAggregateRoute()) { + network.getAggregateRoutes().add(mapAAIAggregateRoute(aaiAggregateRoute)); + } + } + } + protected void mapAllSegmentationAssignmentsIntoL3Network(org.onap.aai.domain.yang.L3Network aaiL3Network, L3Network network) { if (aaiL3Network.getSegmentationAssignments() != null) { diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json index 418396f290..9b32a4c446 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json @@ -69,5 +69,15 @@ } ] }, + "aggregateRoutes": { + "aggregateRoute": [ + { + "routeId": "routeId", + "networkStartAddress": "10.80.12.0", + "cidrMask": "23", + "ipVersion": "4" + } + ] + }, "relationshipList": null }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json index ccefe195c9..f65fe17a2e 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json @@ -52,5 +52,13 @@ "segmentation-id": "segmentationId" } ], + "aggregate-routes": [ + { + "route-id": "routeId", + "network-start-address": "10.80.12.0", + "cidr-mask": "23", + "ip-version": "4" + } + ], "model-info-network": null } diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java index 21847e1c4e..7d5bb0dcf1 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/WorkflowException.java @@ -33,7 +33,7 @@ public class WorkflowException implements Serializable { private final int errorCode; private final String errorMessage; private final String workStep; - private transient TargetEntities extSystemErrorSource; + private TargetEntities extSystemErrorSource; /** * Constructor diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy index 8e560cc09d..1a689d426c 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy @@ -53,7 +53,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor MsoUtils msoUtils = new MsoUtils() - public void preProcessRequest(DelegateExecution execution) { + void preProcessRequest(DelegateExecution execution) { logger.info(" ***** Started preProcessRequest *****") @@ -104,7 +104,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor } } - public void prepareSDNCRequest(DelegateExecution execution) { + void prepareSDNCRequest(DelegateExecution execution) { logger.info(" ***** Started prepareSDNCRequest *****") try { @@ -390,7 +390,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor logger.info(" ***** Exit prepareSDNCRequest *****") } - public void prepareUpdateAfterDeActivateSDNCResource(DelegateExecution execution) { + void prepareUpdateAfterDeActivateSDNCResource(DelegateExecution execution) { String resourceInput = execution.getVariable("resourceInput") ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class) String operType = resourceInputObj.getOperationType() @@ -429,7 +429,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor execution.setVariable("CVFMI_updateResOperStatusRequest", body) } - public void postDeactivateSDNCCall(DelegateExecution execution) { + void postDeactivateSDNCCall(DelegateExecution execution) { logger.info(" ***** Started prepareSDNCRequest *****") String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode") String responseObj = execution.getVariable(Prefix + "SuccessIndicator") @@ -438,7 +438,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor logger.info(" ***** Exit prepareSDNCRequest *****") } - public void sendSyncResponse(DelegateExecution execution) { + void sendSyncResponse(DelegateExecution execution) { logger.debug(" *** sendSyncResponse *** ") try { diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy index 9b269c734f..642609a970 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy @@ -63,14 +63,14 @@ public class DeleteVFCNSResource extends AbstractServiceTaskProcessor { logger.info(" ***** end preProcessRequest *****") } - public void postProcessRequest (DelegateExecution execution) { + void postProcessRequest (DelegateExecution execution) { def isDebugEnabled = execution.getVariable("isDebugLogEnabled") logger.info(" ***** start postProcessRequest *****") logger.info(" ***** end postProcessRequest *****") } - public void sendSyncResponse (DelegateExecution execution) { + void sendSyncResponse (DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.debug( " *** sendSyncResponse *** ") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy index bf52b11de2..64d9827c7c 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy @@ -83,7 +83,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { JsonUtils jsonUtil = new JsonUtils() CatalogDbUtils catalogDbUtils = new CatalogDbUtilsFactory().create() - public void preProcessRequest (DelegateExecution execution) { + void preProcessRequest (DelegateExecution execution) { def isDebugEnabled = execution.getVariable("isDebugLogEnabled") String msg = "" logger.trace("preProcessRequest") @@ -286,7 +286,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit preProcessRequest") } - public void getAAICustomerById (DelegateExecution execution) { + void getAAICustomerById (DelegateExecution execution) { // https://{aaiEP}/aai/v8/business/customers/customer/{globalCustomerId} try { @@ -306,7 +306,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { } - public void putServiceInstance(DelegateExecution execution) { + void putServiceInstance(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("putServiceInstance") String msg = "" @@ -380,7 +380,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit putServiceInstance") } - public void preProcessSDNCAssignRequest(DelegateExecution execution) { + void preProcessSDNCAssignRequest(DelegateExecution execution) { def isDebugEnabled = execution.getVariable("isDebugLogEnabled") String msg = "" logger.trace("preProcessSDNCAssignRequest") @@ -479,7 +479,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit preProcessSDNCAssignRequest") } - public void postProcessSDNCAssign (DelegateExecution execution) { + void postProcessSDNCAssign (DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("postProcessSDNCAssign") try { @@ -518,7 +518,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit postProcessSDNCAssign") } - public void postProcessAAIGET2(DelegateExecution execution) { + void postProcessAAIGET2(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("postProcessAAIGET2") String msg = "" @@ -561,7 +561,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit postProcessAAIGET2") } - public void preProcessRollback (DelegateExecution execution) { + void preProcessRollback (DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("preProcessRollback") try { @@ -582,7 +582,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit preProcessRollback") } - public void postProcessRollback (DelegateExecution execution) { + void postProcessRollback (DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("postProcessRollback") String msg = "" @@ -603,7 +603,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit postProcessRollback") } - public void createProject(DelegateExecution execution) { + void createProject(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("createProject") @@ -631,7 +631,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { logger.trace("Exit createProject") } - public void createOwningEntity(DelegateExecution execution) { + void createOwningEntity(DelegateExecution execution) { def isDebugEnabled=execution.getVariable("isDebugLogEnabled") logger.trace("createOwningEntity") String msg = ""; @@ -679,7 +679,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { // Build Error Section // ******************************* - public void processJavaException(DelegateExecution execution){ + void processJavaException(DelegateExecution execution){ def isDebugEnabled=execution.getVariable("isDebugLogEnabled") try{ diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java index 357b571a5c..48061db887 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java @@ -90,7 +90,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { @Override public synchronized Runnable unregister(String pnfCorrelationId) { logger.debug("unregistering from pnf ready dmaap event for pnf correlation id: {}", pnfCorrelationId); - Runnable runnable = runnable = pnfCorrelationIdToThreadMap.remove(pnfCorrelationId); + Runnable runnable = pnfCorrelationIdToThreadMap.remove(pnfCorrelationId); synchronized (updateInfoMap) { for (int i = updateInfoMap.size() - 1; i >= 0; i--) { if (!updateInfoMap.get(i).containsKey("pnfCorrelationId")) |