diff options
author | Pooja03 <pm00501616@techmahindra.com> | 2019-07-26 16:38:29 +0530 |
---|---|---|
committer | Pooja03 <pm00501616@techmahindra.com> | 2019-07-26 16:38:29 +0530 |
commit | 273661b667a90925d9918bbd238d7240f396c185 (patch) | |
tree | 55f68190435b51191a32a4171ddf38adc140f9ad /bpmn | |
parent | 7e9581d1cab9604abdf0c3397877a100567bc33c (diff) |
Javadoc and logging improvement
Added Javadocs for four classes
AAIUpdateTasks,OrchestrationStatusValidator,AAICreateTasks ,BBInputSetup
Issue-ID: SO-2052
Signed-off-by: Pooja03 <pm00501616@techmahindra.com>
Change-Id: I048b42131449e151be91839e45f4d39864b3ec52
Diffstat (limited to 'bpmn')
4 files changed, 272 insertions, 19 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index c7665acc68..9a39334af1 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -150,6 +150,17 @@ public class BBInputSetup implements JavaDelegate { this.mapperLayer = mapperLayer; } + /** + * This method is used for executing the building block. + * + * It will get the BB from the execution object by checking if the aLaCarte and homing is true. + * + * Then it will get the GBB and execute it. + * + * @param execution + * @throws Exception + * @return + */ @Override public void execute(DelegateExecution execution) throws Exception { try { @@ -1538,6 +1549,14 @@ public class BBInputSetup implements JavaDelegate { return serviceInstance; } + /** + * This method is used for getting the existing service instance. + * + * This will map the serviceInstanceAAI to serviceInstance and return the serviceInstance. + * + * @throws Exception + * @return serviceInstance + */ public ServiceInstance getExistingServiceInstance(org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI) throws Exception { ServiceInstance serviceInstance = mapperLayer.mapAAIServiceInstanceIntoServiceInstance(serviceInstanceAAI); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java index 583e3e172a..68cfd487b3 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java @@ -104,6 +104,14 @@ public class AAICreateTasks { @Autowired private Environment env; + /** + * This method is used for creating the service instance in A&AI. + * + * It will check the alaCarte and create the service instance in A&AI. + * + * @param execution + * @throws @return + */ public void createServiceInstance(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -115,6 +123,12 @@ public class AAICreateTasks { } } + /** + * This method is used for creating and subscribing the service in A&AI. + * + * @param execution + * @throws @return + */ public void createServiceSubscription(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -136,6 +150,12 @@ public class AAICreateTasks { } } + /** + * This method is used for creation of the project A&AI. + * + * @param execution + * @throws @return + */ public void createProject(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -153,6 +173,12 @@ public class AAICreateTasks { } } + /** + * This method is used for creating OwningEntity A&AI. + * + * @param execution + * @throws @return + */ public void createOwningEntity(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -192,6 +218,16 @@ public class AAICreateTasks { } } + /** + * This method is used for creating Vnf in A&AI. + * + * It will check if the Vnf Name is exits in A&AI then it will throw the duplicate name exception. + * + * Otherwise it will create the vnf amd connect to the serviceinstance. + * + * @param execution + * @throws @return + */ public void createVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -204,6 +240,12 @@ public class AAICreateTasks { } } + /** + * This method is used for separating (,) from the string. + * + * @param str + * @throws @return + */ public void createPlatform(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -223,10 +265,22 @@ public class AAICreateTasks { } + /** + * This method is used for separating (,) from the string. + * + * @param str + * @throws @return + */ public List<String> splitCDL(String str) { return Stream.of(str.split(",")).map(String::trim).map(elem -> new String(elem)).collect(Collectors.toList()); } + /** + * This method is used for creating the type of business in A&AI. + * + * @param execution + * @throws @return + */ public void createLineOfBusiness(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -246,6 +300,12 @@ public class AAICreateTasks { } } + /** + * This method is used for creating the volume group in A&AI. + * + * @param execution + * @throws @return + */ public void createVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -261,6 +321,12 @@ public class AAICreateTasks { } } + /** + * This method is used for creating the vfModule in A&AI. + * + * @param execution + * @throws @return + */ public void createVfModule(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -279,7 +345,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -304,7 +370,7 @@ public class AAICreateTasks { /** * BPMN access method to execute Create L3Network operation (PUT )in AAI - * + * * @param execution * @throws Exception */ @@ -325,6 +391,12 @@ public class AAICreateTasks { } } + /** + * This method is used for creating the customer in A&AI. + * + * @param execution + * @throws Exception + */ public void createCustomer(BuildingBlockExecution execution) throws Exception { try { Customer customer = execution.getGeneralBuildingBlock().getCustomer(); @@ -337,7 +409,7 @@ public class AAICreateTasks { /** * BPMN access method to execute NetworkCollection operation (PUT) in AAI - * + * * @param execution * @throws Exception */ @@ -357,7 +429,7 @@ public class AAICreateTasks { /** * BPMN access method to execute NetworkCollectionInstanceGroup operation (PUT) in AAI - * + * * @param execution * @throws Exception */ @@ -378,7 +450,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -393,7 +465,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -409,7 +481,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -432,7 +504,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -447,7 +519,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -464,7 +536,7 @@ public class AAICreateTasks { /** * BPMN access method to establish relationships in AAI - * + * * @param execution * @throws Exception */ @@ -482,6 +554,11 @@ public class AAICreateTasks { } } + /** + * This method is used for configuring the service in A&AI. + * + * @param execution @throws + */ public void createConfiguration(BuildingBlockExecution execution) { try { Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID); @@ -491,6 +568,11 @@ public class AAICreateTasks { } } + /** + * This method is used for creating vnf instance group in A&AI. + * + * @param execution @throws + */ public void createInstanceGroupVnf(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -502,6 +584,11 @@ public class AAICreateTasks { } } + /** + * This method is used to put the network policy in A&AI. + * + * @param execution @throws + */ public void createNetworkPolicies(BuildingBlockExecution execution) { try { String fqdns = execution.getVariable(CONTRAIL_NETWORK_POLICY_FQDN_LIST); @@ -536,10 +623,10 @@ public class AAICreateTasks { /** * Groups existing vf modules by the model uuid of our new vf module and returns the lowest unused index - * + * * if we have a module type A, and there are 3 instances of those, and then module type B has 2 instances, if we are * adding a new module type A, the vf-module-index should be 3 assuming contiguous indices (not 5, or 2) - * + * */ protected int getLowestUnusedVfModuleIndexFromAAIVnfResponse(GenericVnf genericVnf, VfModule newVfModule) { diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java index 01bdc09419..20f4443291 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java @@ -79,6 +79,11 @@ public class AAIUpdateTasks { @Autowired private AAIConfigurationResources aaiConfigurationResources; + /** + * BPMN access method to update the status of Service to Assigned in AAI + * + * @param execution + */ public void updateOrchestrationStatusAssignedService(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -91,6 +96,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of Service to Active in AAI + * + * @param execution + */ public void updateOrchestrationStatusActiveService(BuildingBlockExecution execution) { try { ServiceInstance serviceInstance = @@ -102,6 +112,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of Vnf to Assigned in AAI + * + * @param execution + */ public void updateOrchestrationStatusAssignedVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -111,6 +126,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of Vnf to Active in AAI + * + * @param execution + */ public void updateOrchestrationStatusActiveVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -120,6 +140,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VolumeGroup to Assigned in AAI + * + * @param execution + */ public void updateOrchestrationStatusAssignedVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -134,6 +159,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VolumeGroup to Active in AAI + * + * @param execution + */ public void updateOrchestrationStatusActiveVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -148,6 +178,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VolumeGroup to Created in AAI + * + * @param execution + */ public void updateOrchestrationStatusCreatedVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -162,6 +197,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update HeatStackId and VolumeGroup in AAI + * + * @param execution + */ public void updateHeatStackIdVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -179,6 +219,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VfModule to Assigned in AAI + * + * @param execution + */ public void updateOrchestrationStatusAssignedVfModule(BuildingBlockExecution execution) { try { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -190,6 +235,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VfModule to PendingActivation in AAI + * + * @param execution + */ public void updateOrchestrationStatusPendingActivationVfModule(BuildingBlockExecution execution) { try { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -201,6 +251,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VfModule to AssignedOrPendingActivation in AAI + * + * @param execution + */ public void updateOrchestrationStatusAssignedOrPendingActivationVfModule(BuildingBlockExecution execution) { try { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -222,6 +277,12 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VfModule to Created in AAI + * + * @param execution + * + */ public void updateOrchestrationStatusCreatedVfModule(BuildingBlockExecution execution) { try { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -232,6 +293,12 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update aaiDeactivateVfModuleRollback to true for deactivating the VfModule + * + * @param execution + * @throws buildAndThrowWorkflowException + */ public void updateOrchestrationStatusDeactivateVfModule(BuildingBlockExecution execution) { execution.setVariable("aaiDeactivateVfModuleRollback", false); try { @@ -246,7 +313,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update status of L3Network to Assigned in AAI - * + * * @param execution * @throws BBObjectNotFoundException */ @@ -256,7 +323,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update status of L3Network to Active in AAI - * + * * @param execution * @throws BBObjectNotFoundException */ @@ -266,7 +333,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update status of L3Network to Created in AAI - * + * * @param execution * @throws BBObjectNotFoundException */ @@ -302,7 +369,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update status of L3Network Collection to Active in AAI - * + * * @param execution * @throws BBObjectNotFoundException */ @@ -323,6 +390,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VfModule to Active in AAI + * + * @param execution + */ public void updateOrchestrationStatusActivateVfModule(BuildingBlockExecution execution) { execution.setVariable("aaiActivateVfModuleRollback", false); try { @@ -335,6 +407,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update HeatStackId of VfModule in AAI + * + * @param execution + */ public void updateHeatStackIdVfModule(BuildingBlockExecution execution) { try { String heatStackId = execution.getVariable("heatStackId"); @@ -352,7 +429,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update L3Network after it was created in cloud - * + * * @param execution * @throws Exception */ @@ -395,7 +472,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update L3Network after it was updated in cloud - * + * * @param execution * @throws Exception */ @@ -422,6 +499,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update L3Network Object + * + * @param execution + */ public void updateObjectNetwork(BuildingBlockExecution execution) { try { L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); @@ -433,7 +515,7 @@ public class AAIUpdateTasks { /** * BPMN access method to update ServiceInstance - * + * * @param execution */ public void updateServiceInstance(BuildingBlockExecution execution) { @@ -446,6 +528,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update Vnf Object + * + * @param execution + */ public void updateObjectVnf(BuildingBlockExecution execution) { try { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -455,6 +542,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of VfModuleRollback as true + * + * @param execution + */ public void updateOrchestrationStatusDeleteVfModule(BuildingBlockExecution execution) { execution.setVariable("aaiDeleteVfModuleRollback", false); try { @@ -471,6 +563,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update Model of VfModule + * + * @param execution + */ public void updateModelVfModule(BuildingBlockExecution execution) { try { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -481,6 +578,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of FabricConfiguration to Assigned in AAI + * + * @param execution + */ public void updateOrchestrationStatusAssignFabricConfiguration(BuildingBlockExecution execution) { try { Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID); @@ -491,6 +593,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of FabricConfiguration to Active in AAI + * + * @param execution + */ public void updateOrchestrationStatusActivateFabricConfiguration(BuildingBlockExecution execution) { try { Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID); @@ -500,6 +607,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of FabricConfiguration to deactive in AAI + * + * @param execution + */ public void updateOrchestrationStatusDeactivateFabricConfiguration(BuildingBlockExecution execution) { try { Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID); @@ -510,6 +622,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update Ipv4OamAddress of Vnf + * + * @param execution + */ public void updateIpv4OamAddressVnf(BuildingBlockExecution execution) { try { String ipv4OamAddress = execution.getVariable("oamManagementV4Address"); @@ -527,6 +644,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update ManagementV6Address of Vnf + * + * @param execution + */ public void updateManagementV6AddressVnf(BuildingBlockExecution execution) { try { String managementV6Address = execution.getVariable("oamManagementV6Address"); @@ -544,6 +666,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update ContrailServiceInstanceFqdn of VfModule + * + * @param execution + */ public void updateContrailServiceInstanceFqdnVfModule(BuildingBlockExecution execution) { try { String contrailServiceInstanceFqdn = execution.getVariable("contrailServiceInstanceFqdn"); @@ -558,6 +685,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of Vnf to ConfigAssigned in AAI + * + * @param execution + */ public void updateOrchestrationStatusConfigAssignedVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -567,6 +699,11 @@ public class AAIUpdateTasks { } } + /** + * BPMN access method to update status of Vnf to Configure in AAI + * + * @param execution + */ public void updateOrchestrationStausConfigDeployConfigureVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -578,6 +715,11 @@ public class AAIUpdateTasks { } + /** + * BPMN access method to update status of Vnf to configured in AAI + * + * @param execution + */ public void updateOrchestrationStausConfigDeployConfiguredVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); 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 4fcacb3c42..7eaf011c75 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 @@ -63,6 +63,11 @@ public class OrchestrationStatusValidator { @Autowired private CatalogDbClient catalogDbClient; + /** + * This method validate's the status of the OrchestrationStatus against the buildingBlockDetail ResourceType + * + * @param execution + */ public void validateOrchestrationStatus(BuildingBlockExecution execution) { try { OrchestrationStatusValidationDirective previousOrchestrationStatusValidationResult = |