diff options
32 files changed, 505 insertions, 392 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java index c69800d640..c2b3ffddca 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java @@ -57,9 +57,11 @@ public class ASDCConfiguration implements IConfiguration { public static final String WORKFLOW = "WORKFLOW"; public static final String VF_MODULES_METADATA = "VF_MODULES_METADATA"; public static final String CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT = "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"; + public static final String HELM = "HELM"; + private static final String[] SUPPORTED_ARTIFACT_TYPES = {HEAT, HEAT_ARTIFACT, HEAT_ENV, HEAT_NESTED, HEAT_NET, - HEAT_VOL, OTHER, TOSCA_CSAR, VF_MODULES_METADATA, WORKFLOW, CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT}; + HEAT_VOL, OTHER, TOSCA_CSAR, VF_MODULES_METADATA, WORKFLOW, CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT, HELM}; public static final List<String> SUPPORTED_ARTIFACT_TYPES_LIST = diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java index f5b0e17cf5..1b5463211c 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java @@ -119,6 +119,7 @@ public class VfResourceStructure extends ResourceStructure { case ASDCConfiguration.HEAT_NET: case ASDCConfiguration.OTHER: case ASDCConfiguration.CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT: + case ASDCConfiguration.HELM: artifactsMapByUUID.put(artifactInfo.getArtifactUUID(), vfModuleArtifact); break; case ASDCConfiguration.VF_MODULES_METADATA: diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java index 55d76819fc..e5d8a921a5 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java @@ -92,7 +92,7 @@ public class AbstractCDSProcessingBBUtils { * * @param execution BuildingBlockExecution object */ - public void constructExecutionServiceInputObject(BuildingBlockExecution execution) { + public void constructExecutionServiceInputObjectBB(BuildingBlockExecution execution) { logger.trace("Start AbstractCDSProcessingBBUtils.preProcessRequest for BuildingBlockExecution object."); try { @@ -136,7 +136,7 @@ public class AbstractCDSProcessingBBUtils { * * @param execution BuildingBlockExecution object */ - public void sendRequestToCDSClient(BuildingBlockExecution execution) { + public void sendRequestToCDSClientBB(BuildingBlockExecution execution) { logger.trace("Start AbstractCDSProcessingBBUtils.sendRequestToCDSClient for BuildingBlockExecution object."); try { diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java index 10844ec652..40b0ed5624 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtilsTest.java @@ -97,7 +97,7 @@ public class AbstractCDSProcessingBBUtilsTest { BuildingBlockExecution execution = mock(BuildingBlockExecution.class); when(execution.getVariable("executionObject")).thenReturn(abstractCDSPropertiesBean); - abstractCDSProcessingBBUtils.constructExecutionServiceInputObject(execution); + abstractCDSProcessingBBUtils.constructExecutionServiceInputObjectBB(execution); verify(exceptionUtil, times(0)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), anyInt(), any(Exception.class)); } @@ -107,7 +107,7 @@ public class AbstractCDSProcessingBBUtilsTest { BuildingBlockExecution execution = mock(BuildingBlockExecution.class); when(execution.getVariable("executionServiceInput")).thenReturn(abstractCDSPropertiesBean); - abstractCDSProcessingBBUtils.sendRequestToCDSClient(execution); + abstractCDSProcessingBBUtils.sendRequestToCDSClientBB(execution); verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), anyInt(), any(Exception.class)); diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn index ccd6b0bd48..a69ee25a3a 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AbstractCDSProcessingBB.bpmn @@ -10,11 +10,11 @@ <bpmn:endEvent id="EndEvent_1h3epjc"> <bpmn:incoming>SequenceFlow_161g9uz</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="Task_06n9c9v" name="Get Required data to call CDS Client" camunda:expression="${AbstractCDSProcessingBBUtils.constructExecutionServiceInputObject(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_06n9c9v" name="Get Required data to call CDS Client" camunda:expression="${AbstractCDSProcessingBBUtils.constructExecutionServiceInputObjectBB(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_02v5z4h</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0gksy4i</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_0kjfr5o" name="CDS (Call SelfServiceAPI) " camunda:expression="${AbstractCDSProcessingBBUtils.sendRequestToCDSClient(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_0kjfr5o" name="CDS (Call SelfServiceAPI) " camunda:expression="${AbstractCDSProcessingBBUtils.sendRequestToCDSClientBB(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0gksy4i</bpmn:incoming> <bpmn:outgoing>SequenceFlow_161g9uz</bpmn:outgoing> </bpmn:serviceTask> @@ -47,4 +47,4 @@ </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy index baf0333a19..fbb2b00854 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateTnNssi.groovy @@ -93,7 +93,7 @@ class DoDeallocateTnNssi extends AbstractServiceTaskProcessor { try { String serviceInstanceId = execution.getVariable("serviceInstanceID") - String sdncRequest = tnNssmfUtils.buildSDNCRequest(execution, serviceInstanceId, "deallocate") + String sdncRequest = tnNssmfUtils.buildSDNCRequest(execution, serviceInstanceId, "delete") execution.setVariable("TNNSSMF_SDNCRequest", sdncRequest) logger.debug("Outgoing SDNCRequest is: \n" + sdncRequest) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy index 1bb0e8aca7..92953fd60b 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/TnNssmfUtils.groovy @@ -66,7 +66,29 @@ class TnNssmfUtils { } } - String buildSDNCRequest(DelegateExecution execution, String svcInstId, String action) { + String buildSDNCRequest(DelegateExecution execution, String svcInstId, String svcAction) { + String reqAction + switch (svcAction) { + case "create": + reqAction = "AllocateTransportSliceInstance" + break + case "delete": + reqAction = "DeleteTransportSliceInstance" + break + case "activate": + reqAction = "ActivateTransportSliceInstance" + break + case "deactivate": + reqAction = "DeactivateTransportSliceInstance" + break + default: + reqAction = svcAction + } + + buildSDNCRequest(execution, svcInstId, svcAction, reqAction) + } + + String buildSDNCRequest(DelegateExecution execution, String svcInstId, String svcAction, String reqAction) { String uuid = execution.getVariable('testReqId') // for junits if (uuid == null) { @@ -105,7 +127,7 @@ class TnNssmfUtils { <sdncadapter:RequestHeader> <sdncadapter:RequestId>${MsoUtils.xmlEscape(uuid)}</sdncadapter:RequestId> <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(svcInstId)}</sdncadapter:SvcInstanceId> - <sdncadapter:SvcAction>${MsoUtils.xmlEscape(action)}</sdncadapter:SvcAction> + <sdncadapter:SvcAction>${MsoUtils.xmlEscape(svcAction)}</sdncadapter:SvcAction> <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation> <sdncadapter:CallbackUrl>${MsoUtils.xmlEscape(callbackURL)}</sdncadapter:CallbackUrl> <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction> @@ -113,7 +135,7 @@ class TnNssmfUtils { <sdncadapterworkflow:SDNCRequestData> <request-information> <request-id>${MsoUtils.xmlEscape(requestId)}</request-id> - <request-action>AllocateTnNssi</request-action> + <request-action>${MsoUtils.xmlEscape(reqAction)}</request-action> <source>${MsoUtils.xmlEscape(source)}</source> <notification-url/> <order-number/> @@ -168,7 +190,7 @@ class TnNssmfUtils { String msg - String prefix = execution.setVariable("prefix") + String prefix = execution.getVariable("prefix") if (isBlank(prefix)) { if (exceptionOnErr) { msg = "validateSDNCResponse: prefix is null" @@ -181,7 +203,8 @@ class TnNssmfUtils { WorkflowException workflowException = execution.getVariable("WorkflowException") boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator") - logger.debug("workflowException: " + workflowException) + logger.debug("TnNssmfUtils.validateSDNCResponse: SDNCResponse: " + response) + logger.debug("TnNssmfUtils.validateSDNCResponse: workflowException: " + workflowException) sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator) @@ -189,6 +212,9 @@ class TnNssmfUtils { if (execution.getVariable(prefix + 'sdncResponseSuccess') == true) { logger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call. Response is: \n" + sdncResponse) RollbackData rollbackData = execution.getVariable("rollbackData") + if (rollbackData == null) { + rollbackData = new RollbackData() + } if (method.equals("allocate")) { rollbackData.put("VNFMODULE", "rollbackSDNCRequestAllocate", "true") @@ -204,7 +230,7 @@ class TnNssmfUtils { execution.setVariable("rollbackData", rollbackData) } else { if (exceptionOnErr) { - msg = "validateSDNCResponse: bad Response from SDNC Adapter for " + method + " SDNC Call." + msg = "TnNssmfUtils.validateSDNCResponse: bad Response from SDNC Adapter for " + method + " SDNC Call." logger.error(msg) exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) } diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn index 8ecce46ac0..4447b32f4a 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateTransportNSSI.bpmn @@ -56,8 +56,8 @@ runScript.preprocessSdncActOrDeactTnNssiRequest(execution)</bpmn:script> <bpmn:extensionElements> <camunda:in source="TNNSSMF_SDNCRequest" target="sdncAdapterWorkflowRequest" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="mso-request-id" target="mso-request-id" /> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="sliceServiceInstanceId" target="mso-service-instance-id" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="sdncAdapterResponse" target="TNNSSMF_SDNCAdapterResponse" /> <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateTnNssiInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateTnNssiInstance.bpmn index e9cbbb77cc..55adbe3698 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateTnNssiInstance.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateTnNssiInstance.bpmn @@ -45,8 +45,8 @@ dcsi.preprocessSdncAllocateTnNssiRequest(execution)</bpmn:script> <bpmn:extensionElements> <camunda:in source="TNNSSMF_SDNCRequest" target="sdncAdapterWorkflowRequest" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="mso-request-id" target="mso-request-id" /> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="sliceServiceInstanceId" target="mso-service-instance-id" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="sdncAdapterResponse" target="TNNSSMF_SDNCAdapterResponse" /> <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn index a800289aaa..94279b7fe8 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateTransportNSSI.bpmn @@ -55,8 +55,8 @@ runScript.preprocessSdncDeallocateTnNssiRequest(execution)</bpmn:script> <bpmn:extensionElements> <camunda:in source="TNNSSMF_SDNCRequest" target="sdncAdapterWorkflowRequest" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="mso-request-id" target="mso-request-id" /> - <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="sliceServiceInstanceId" target="mso-service-instance-id" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="sdncAdapterResponse" target="TNNSSMF_SDNCAdapterResponse" /> <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" /> diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java index d78b7c3af0..1fae5ce06c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBB.java @@ -84,7 +84,7 @@ public class GenericCDSProcessingBB implements ControllerRunnable<BuildingBlockE @Override public void run(ControllerContext<BuildingBlockExecution> context) { BuildingBlockExecution obj = context.getExecution(); - cdsDispather.constructExecutionServiceInputObject(obj); - cdsDispather.sendRequestToCDSClient(obj); + cdsDispather.constructExecutionServiceInputObjectBB(obj); + cdsDispather.sendRequestToCDSClientBB(obj); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericPnfCDSControllerRunnableBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericPnfCDSControllerRunnableBB.java index 3b81d52703..fe6d9de199 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericPnfCDSControllerRunnableBB.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericPnfCDSControllerRunnableBB.java @@ -94,8 +94,8 @@ public class GenericPnfCDSControllerRunnableBB implements ControllerRunnable<Bui @Override public void run(ControllerContext<BuildingBlockExecution> controllerContext) { BuildingBlockExecution buildingBlockExecution = controllerContext.getExecution(); - abstractCDSProcessingBBUtils.constructExecutionServiceInputObject(buildingBlockExecution); - abstractCDSProcessingBBUtils.sendRequestToCDSClient(buildingBlockExecution); + abstractCDSProcessingBBUtils.constructExecutionServiceInputObjectBB(buildingBlockExecution); + abstractCDSProcessingBBUtils.sendRequestToCDSClientBB(buildingBlockExecution); } private AbstractCDSPropertiesBean prepareAndSetCdsPropertyBean(BuildingBlockExecution buildingBlockExecution) { diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java index 0f955e2851..d9ad245e76 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java @@ -88,6 +88,7 @@ import org.onap.so.serviceinstancebeans.ModelType; import org.onap.so.serviceinstancebeans.Networks; import org.onap.so.serviceinstancebeans.Pnfs; import org.onap.so.serviceinstancebeans.RelatedInstance; +import org.onap.so.serviceinstancebeans.RelatedInstanceList; import org.onap.so.serviceinstancebeans.RequestDetails; import org.onap.so.serviceinstancebeans.Service; import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; @@ -566,6 +567,20 @@ public class WorkflowAction { } else { vfModuleCustomizationUUID = aaiVfModule.getModelCustomizationId(); } + String replaceVfModuleCustomizationUUID = ""; + String replaceVnfModuleCustomizationUUID = ""; + boolean isReplace = false; + if (dataObj.getRequestAction().equalsIgnoreCase("replaceInstance") + || dataObj.getRequestAction().equalsIgnoreCase("replaceInstanceRetainAssignments")) { + for (RelatedInstanceList relatedInstList : dataObj.getRequestDetails().getRelatedInstanceList()) { + RelatedInstance relatedInstance = relatedInstList.getRelatedInstance(); + if (relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)) { + replaceVnfModuleCustomizationUUID = relatedInstance.getModelInfo().getModelCustomizationId(); + } + } + replaceVfModuleCustomizationUUID = dataObj.getRequestDetails().getModelInfo().getModelCustomizationId(); + isReplace = true; + } List<org.onap.aai.domain.yang.Vnfc> vnfcs = getRelatedResourcesInVfModule(vnfId, vfModuleId, org.onap.aai.domain.yang.Vnfc.class, Types.VNFC); @@ -579,9 +594,19 @@ public class WorkflowAction { } workflowIdsCopy.setConfigurationId(configuration.getConfigurationId()); for (OrchestrationFlow orchFlow : result) { - dataObj.getResourceKey().setVfModuleCustomizationId(vfModuleCustomizationUUID); + if (!isReplace) { + dataObj.getResourceKey().setVfModuleCustomizationId(vfModuleCustomizationUUID); + dataObj.getResourceKey().setVnfCustomizationId(vnfCustomizationUUID); + } else { + if (orchFlow.getFlowName().contains("Delete")) { + dataObj.getResourceKey().setVfModuleCustomizationId(vfModuleCustomizationUUID); + dataObj.getResourceKey().setVnfCustomizationId(vnfCustomizationUUID); + } else { + dataObj.getResourceKey().setVfModuleCustomizationId(replaceVfModuleCustomizationUUID); + dataObj.getResourceKey().setVnfCustomizationId(replaceVnfModuleCustomizationUUID); + } + } dataObj.getResourceKey().setCvnfModuleCustomizationId(vnfc.getModelCustomizationId()); - dataObj.getResourceKey().setVnfCustomizationId(vnfCustomizationUUID); String vnfcName = vnfc.getVnfcName(); if (vnfcName == null || vnfcName.isEmpty()) { buildAndThrowException(dataObj.getExecution(), "Exception in create execution list " diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java index f0898ace81..43a85051be 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java @@ -414,9 +414,12 @@ public class WorkflowActionBBTasks { String handlingCode = (String) execution.getVariable(HANDLINGCODE); final boolean aLaCarte = (boolean) execution.getVariable(G_ALACARTE); int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); + String requestAction = (String) execution.getVariable(G_ACTION); ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence - 1); String bbFlowName = ebb.getBuildingBlock().getBpmnFlowName(); - if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte && "Success".equalsIgnoreCase(handlingCode)) { + if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte && "Success".equalsIgnoreCase(handlingCode) + && !(requestAction.equalsIgnoreCase("replaceInstance") + || requestAction.equalsIgnoreCase("replaceInstanceRetainAssignments"))) { postProcessingExecuteBBActivateVfModule(execution, ebb, flowsToExecute); } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBBTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBBTest.java index 24bbc78afb..e360dc7c42 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBBTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericCDSProcessingBBTest.java @@ -102,8 +102,8 @@ public class GenericCDSProcessingBBTest extends BaseTaskTest { AbstractCDSPropertiesBean cdsBean = prepareCDSBean(); doReturn(cdsBean).when(generatePayloadForCds).buildCdsPropertiesBean(buildingBlockExecution); - doNothing().when(cdsDispather).constructExecutionServiceInputObject(buildingBlockExecution); - doNothing().when(cdsDispather).sendRequestToCDSClient(buildingBlockExecution); + doNothing().when(cdsDispather).constructExecutionServiceInputObjectBB(buildingBlockExecution); + doNothing().when(cdsDispather).sendRequestToCDSClientBB(buildingBlockExecution); // when Boolean isUnderstandable = controllerRunnable.understand(controllerContext); diff --git a/docs/developer_info/Docker-Config_Understanding.rst b/docs/developer_info/Docker-Config_Understanding.rst new file mode 100644 index 0000000000..e684c6c480 --- /dev/null +++ b/docs/developer_info/Docker-Config_Understanding.rst @@ -0,0 +1,364 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2020 Huawei Technologies Co., Ltd. + +Docker-config +============= + +In SO (Service Orchestration) every component running on docker engine and respective containers. here we can see how so is working with Dokcer. + +CA(Certificate Authority) +========================= + +Certificate Authorities/ CAs, issue Digital Certificates. Digital Certificates are verifiable small data files that contain identity credentials to help websites, people, and devices represent their authentic online identity (authentic because the CA has verified the identity). CAs play a critical role in how the Internet operates and how transparent, trusted transactions can take place online. CAs issue millions of Digital Certificates each year, and these certificates are used to protect information, encrypt billions of transactions, and enable secure communication. + +CA(file) + +/so/packages/docker/src/main/docker/docker-files/ca-certificates/onap-ca.crt + +Example CA cirtifiacte:- + +-----BEGIN CERTIFICATE----- +MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix +EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD +VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y +aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy +MDQxOTUwMTZaMIGHMQswCQYDVQQGEwJHQjETMBEGA1..29tZS1TdGF0ZTEU +MBIGA1UEChMLQmVzdCBDQSBMdGQxNzA1BgNVBAsTLk..DEgUHVibGljIFBy +aW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxFD..AMTC0Jlc3QgQ0Eg +THRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCg..Tz2mr7SZiAMfQyu +vBjM9OiJjRazXBZ1BjP5CE/Wm/Rr500PRK+Lh9x5eJ../ANBE0sTK0ZsDGM +ak2m1g7oruI3dY3VHqIxFTz0Ta1d+NAjwnLe4nOb7/..k05ShhBrJGBKKxb +8n104o/5p8HAsZPdzbFMIyNjJzBM2o5y5A13wiLitE..fyYkQzaxCw0Awzl +kVHiIyCuaF4wj571pSzkv6sv+4IDMbT/XpCo8L6wTa..sh+etLD6FtTjYbb +rvZ8RQM1tlKdoMHg2qxraAV++HNBYmNWs0duEdjUbJ..XI9TtnS4o1Ckj7P +OfljiQIDAQABo4HnMIHkMB0GA1UdDgQWBBQ8urMCRL..5AkIp9NJHJw5TCB +tAYDVR0jBIGsMIGpgBQ8urMCRLYYMHUKU5AkIp9NJH..aSBijCBhzELMAkG +A1UEBhMCR0IxEzARBgNVBAgTClNvbWUtU3RhdGUxFD..AoTC0Jlc3QgQ0Eg +THRkMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcm..ENlcnRpZmljYXRp +b24gQXV0aG9yaXR5MRQwEgYDVQQDEwtCZXN0IENBIE..DAMBgNVHRMEBTAD +AQH/MA0GCSqGSIb3DQEBBAUAA4IBAQC1uYBcsSncwA..DCsQer772C2ucpX +xQUE/C0pWWm6gDkwd5D0DSMDJRqV/weoZ4wC6B73f5..bLhGYHaXJeSD6Kr +XcoOwLdSaGmJYslLKZB3ZIDEp0wYTGhgteb6JFiTtn..sf2xdrYfPCiIB7g +BMAV7Gzdc4VspS6ljrAhbiiawdBiQlQmsBeFz9JkF4..b3l8BoGN+qMa56Y +It8una2gY4l2O//on88r5IWJlm1L0oA8e4fR2yrBHX..adsGeFKkyNrwGi/ +7vQMfXdGsRrXNGRGnX+vWDZ3/zWI0joDtCkNnqEpVn..HoX +-----END CERTIFICATE----- + + +Configurations:- +================ + +Every component has its own over-ride yaml file. We can over-ride the file according the Configurations and Dependencies required for Deploying. + +Over-ride yaml for api-handler +============================== + +Path:- /docker-config/volumes/so/config/api-handler-infra/onapheat/override.yaml + +.. code-block:: bash + + server: + port: 8080 + tomcat: + max-threads: 50 + ssl-enable: false + + mso: + msoKey: 07a7159d3bf51a0e53be7a8f89699be7 + logPath: logs + site-name: onapheat + adapters: + requestDb: + endpoint: http://request-db-adapter:8083 + auth: Basic YnBlbDpwYXNzd29yZDEk + catalog: + db: + spring: + endpoint: http://catalog-db-adapter:8082 + db: + auth: Basic YnBlbDpwYXNzd29yZDEk + config: + path: /src/main/resources/ + infra: + default: + alacarte: + orchestrationUri: /mso/async/services/ALaCarteOrchestrator + recipeTimeout: 180 + testApi: VNF_API + service: + macro: + default: + testApi: GR_API + camundaURL: http://bpmn-infra:8081 + camundaAuth: AE2E9BE6EF9249085AF98689C4EE087736A5500629A72F35068FFB88813A023581DD6E765071F1C04075B36EA4213A + async: + core-pool-size: 50 + max-pool-size: 50 + queue-capacity: 500 + sdc: + client: + auth: F3473596C526938329DF877495B494DC374D1C4198ED3AD305EA3ADCBBDA1862 + activate: + instanceid: test + userid: cs0008 + endpoint: http://c1.vm1.mso.simpledemo.onap.org:28090 + tenant: + isolation: + retry: + count: 3 + aai: + endpoint: https://aai.api.simpledemo.onap.org:8443 + auth: 2630606608347B7124C244AB0FE34F6F + extApi: + endpoint: http://nbi.onap:8080/nbi/api/v3 + so: + operational-environment: + dmaap: + username: testuser + password: VjR5NDcxSzA= + host: http://c1.vm1.mso.simpledemo.onap.org:28090 + auth: 51EA5414022D7BE536E7516C4D1A6361416921849B72C0D6FC1C7F262FD9F2BBC2AD124190A332D9845A188AD80955567A4F975C84C221EEA8243BFD92FFE6896CDD1EA16ADD34E1E3D47D4A + publisher: + topic: com.att.ecomp.mso.operationalEnvironmentEvent + + spring: + datasource: + hikari: + jdbcUrl: jdbc:mariadb://mariadb:3306/catalogdb + username: cataloguser + password: catalog123 + driver-class-name: org.mariadb.jdbc.Driver + pool-name: catdb-pool + registerMbeans: true + jpa: + show-sql: true + hibernate: + dialect: org.hibernate.dialect.MySQL5Dialect + ddl-auto: validate + naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy + enable-lazy-load-no-trans: true + jersey: + type: filter + + security: + usercredentials: + - + username: sitecontrol + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: SiteControl-Client + - + username: gui + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: GUI-Client + - + username: infraportal + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: InfraPortal-Client + - + username: InfraPortalClient + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: InfraPortal-Client + - + username: bpel + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPEL-Client + - + username: mso_admin + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: ACTUATOR + + request: + datasource: + hikari: + jdbcUrl: jdbc:mariadb://mariadb:3306/requestdb + username: requestuser + password: request123 + driver-class-name: org.mariadb.jdbc.Driver + pool-name: reqdb-pool + registerMbeans: true + org: + onap: + so: + cloud-owner: CloudOwner + adapters: + network: + encryptionKey: 07a7159d3bf51a0e53be7a8f89699be7 + + + +Start the container +======================= +cd /home/root1/docker-config/ + +CMD:- +=== + +sudo docker-compose up -d + +*Example Output:* + +root1@slave-node:~/docker-config$ sudo docker-compose up -d +docker-config_mariadb_1 is up-to-date +Starting docker-config_catalog-db-adapter_1 ... done +Starting docker-config_request-db-adapter_1 ... done +Starting docker-config_bpmn-infra_1 ... done +Starting docker-config_vfc-adapter_1 ... done +Starting docker-config_sdc-controller_1 ... done +Starting docker-config_sdnc-adapter_1 ... done +Starting docker-config_openstack-adapter_1 ... done +Starting docker-config_api-handler-infra_1 ... done +Starting docker-config_so-monitoring_1 ... done +Starting docker-config_nssmf-adapter_1 ... done + + +Example Output: +=============== + +docker ps + +*Example Output:* + +root1@slave-node:~/docker-config$ sudo docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d930caf28508 nexus3.onap.org:10001/onap/so/openstack-adapter "/app/wait-for.sh -q…" 5 weeks ago Up 30 seconds 0.0.0.0:8087->8087/tcp docker-config_openstack-adapter_1 +599af283319e nexus3.onap.org:10001/onap/so/vfc-adapter "/app/wait-for.sh -q…" 5 weeks ago Up 30 seconds 0.0.0.0:8084->8084/tcp docker-config_vfc-adapter_1 +5549305c8dd6 nexus3.onap.org:10001/onap/so/api-handler-infra "/app/wait-for.sh -q…" 5 weeks ago Up 27 seconds 0.0.0.0:8080->8080/tcp docker-config_api-handler-infra_1 +59d3aa684ecb nexus3.onap.org:10001/onap/so/sdnc-adapter "/app/wait-for.sh -q…" 5 weeks ago Up 29 seconds 0.0.0.0:8086->8086/tcp docker-config_sdnc-adapter_1 +ade4cef97bd3 nexus3.onap.org:10001/onap/so/bpmn-infra "/app/wait-for.sh -q…" 5 weeks ago Up 29 seconds 0.0.0.0:8081->8081/tcp docker-config_bpmn-infra_1 +e9558560c4d7 nexus3.onap.org:10001/onap/so/sdc-controller "/app/wait-for.sh -q…" 5 weeks ago Up 25 seconds 0.0.0.0:8085->8085/tcp docker-config_sdc-controller_1 +ae27ec2f8b04 nexus3.onap.org:10001/onap/so/so-monitoring "/app/wait-for.sh -q…" 5 weeks ago Up 26 seconds 0.0.0.0:8088->8088/tcp docker-config_so-monitoring_1 +8d2c64d48f1a nexus3.onap.org:10001/onap/so/request-db-adapter "/app/wait-for.sh -q…" 5 weeks ago Up 32 seconds 0.0.0.0:8083->8083/tcp docker-config_request-db-adapter_1 +a126dd29c540 nexus3.onap.org:10001/mariadb:10.1.11 "/docker-entrypoint.…" 5 weeks ago Up 17 minutes 0.0.0.0:32768->3306/tcp docker-config_mariadb_1 + +Inspect a docker image +====================== +This command shows interesting information about the structure of the mso image. Note that an image is NOT a running container. It is the template that a container is created from. + +CMD:- +===== +sudo docker inspect onap/so/api-handler-infra + + +Example Output: + +.. code-block:: bash + + + [ + { + "Id": "sha256:2573165483e9ac87826da9c08984a9d0e1d93a90c681b22d9b4f90ed579350dc", + "RepoTags": [ + "onap/so/api-handler-infra:1.3.0-SNAPSHOT", + "onap/so/api-handler-infra:1.3.0-SNAPSHOT-20190213T0846", + "onap/so/api-handler-infra:1.3.0-SNAPSHOT-latest", + "onap/so/api-handler-infra:latest" + ], + "RepoDigests": [], + "Parent": "sha256:66b508441811ab4ed9968f8702a0d0a697f517bbc10d8d9076e5b98ae4437344", + "Comment": "", + "Created": "2019-02-13T09:37:33.770342225Z", + "Container": "8be46c735d21935631130f9017c3747779aab26eab54a9149b1edde122f7576d", + "ContainerConfig": { + "Hostname": "ac4a12e21390", + "Domainname": "", + "User": "", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin", + "LANG=C.UTF-8", + "JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk", + "JAVA_VERSION=8u191", + "JAVA_ALPINE_VERSION=8.191.12-r0", + "HTTP_PROXY=", + "HTTPS_PROXY=", + "http_proxy=", + "https_proxy=" + ], + "Cmd": [ + "/bin/sh", + "-c", + "#(nop) ", + "CMD [\"/app/start-app.sh\"]" + ], + "ArgsEscaped": true, + "Image": "sha256:66b508441811ab4ed9968f8702a0d0a697f517bbc10d8d9076e5b98ae4437344", + "Volumes": { + "/app/ca-certificates": {}, + "/app/config": {} + }, + "WorkingDir": "/app", + "Entrypoint": null, + "OnBuild": [], + "Labels": {} + }, + "DockerVersion": "17.05.0-ce", + "Author": "", + "Config": { + "Hostname": "ac4a12e21390", + "Domainname": "", + "User": "", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin", + "LANG=C.UTF-8", + "JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk", + "JAVA_VERSION=8u191", + "JAVA_ALPINE_VERSION=8.191.12-r0", + "HTTP_PROXY=", + "HTTPS_PROXY=", + "http_proxy=", + "https_proxy=" + ], + "Cmd": [ + "/app/start-app.sh" + ], + "ArgsEscaped": true, + "Image": "sha256:66b508441811ab4ed9968f8702a0d0a697f517bbc10d8d9076e5b98ae4437344", + "Volumes": { + "/app/ca-certificates": {}, + "/app/config": {} + }, + "WorkingDir": "/app", + "Entrypoint": null, + "OnBuild": [], + "Labels": {} + }, + "Architecture": "amd64", + "Os": "linux", + "Size": 245926705, + "VirtualSize": 245926705, + "GraphDriver": { + "Data": null, + "Name": "aufs" + }, + "RootFS": { + "Type": "layers", + "Layers": [ + "sha256:503e53e365f34399c4d58d8f4e23c161106cfbce4400e3d0a0357967bad69390", + "sha256:744b4cd8cf79c70508aace3697b6c3b46bee2c14f1c14b6ff09fd0ba5735c6d4", + "sha256:4c6899b75fdbea2f44efe5a2f8d9f5319c1cf7e87151de0de1014aba6ce71244", + "sha256:2e076d24f6d1277456e33e58fc8adcfd69dfd9c025f61aa7b98d500e7195beb2", + "sha256:bb67f2d5f8196c22137a9e98dd4190339a65c839822d16954070eeb0b2a17aa2", + "sha256:afbbd0cc43999d5c5b0ff54dfd82365a3feb826e5c857d9b4a7cf378001cd4b3", + "sha256:1920a7ca0f8ae38a79a1339ce742aaf3d7a095922d96e37074df67cf031d5035", + "sha256:1261fbaef67c5be677dae1c0f50394587832ea9d8c7dc105df2f3db6dfb92a3a", + "sha256:a33d8ee5c18908807458ffe643184228c21d3c5d5c5df1251f0f7dfce512f7e8", + "sha256:80704fca12eddb4cc638cee105637266e04ab5706b4e285d4fc6cac990e96d63", + "sha256:55abe39073a47f29aedba790a92c351501f21b3628414fa49a073c010ee747d1", + "sha256:cc4136c2c52ad522bd492545d4dd18265676ca690aa755994adf64943b119b28", + "sha256:2163a1f989859fdb3af6e253b74094e92a0fc1ee59f5eb959971f94eb1f98094" + ] + } + } + ] diff --git a/docs/developer_info/developer_information.rst b/docs/developer_info/developer_information.rst index a060da60b0..85e7010fcb 100644 --- a/docs/developer_info/developer_information.rst +++ b/docs/developer_info/developer_information.rst @@ -20,6 +20,7 @@ SO Developer Information BPMN_Subprocess_Process_Flows.rst BPMN_Project_Deployment_Strategy.rst BPMN-INFRA_Workflow_Understanding.rst + Docker-Config_Understanding.rst Mso_Openstack_Adapter.rst Cxf_Logging.rst instantiate/index.rst diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java index 3f05c79dad..b1486c9686 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstances.java @@ -88,9 +88,9 @@ import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.client.RequestsDbClient; @Component -@Path("/onap/so/infra/onap3gppServiceInstances") -@OpenAPIDefinition(info = @Info(title = "/onap/so/infra/onap3gppServiceInstances", - description = "API Requests for 3GPP Service Instances")) +@Path("/onap/so/infra/3gppservices") +@OpenAPIDefinition( + info = @Info(title = "/onap/so/infra/3gppservices", description = "API Requests for 3GPP Service Instances")) public class Onap3gppServiceInstances { private static final Logger logger = LoggerFactory.getLogger(Onap3gppServiceInstances.class); @@ -101,7 +101,7 @@ public class Onap3gppServiceInstances { private static final String SAVE_TO_DB = "save instance to db"; - private static String uriPrefix = "/onap3gppServiceInstances/"; + private static final String URI_PREFIX = "/3gppservices/"; @Autowired private MsoRequest msoRequest; @@ -140,7 +140,7 @@ public class Onap3gppServiceInstances { @Context ContainerRequestContext requestContext) throws ApiException { String requestId = requestHandlerUtils.getRequestId(requestContext); return processServiceInstanceRequest(request, Action.createInstance, version, requestId, null, - requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); + requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX)); } /** @@ -161,7 +161,7 @@ public class Onap3gppServiceInstances { HashMap<String, String> instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", request.getServiceInstanceID()); return updateServiceInstances(request, Action.updateInstance, version, requestId, instanceIdMap, - requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); + requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX)); } /** @@ -183,7 +183,7 @@ public class Onap3gppServiceInstances { HashMap<String, String> instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", request.getServiceInstanceID()); return deleteServiceInstances(request, Action.deleteInstance, version, requestId, instanceIdMap, - requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); + requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX)); } /** @@ -204,7 +204,7 @@ public class Onap3gppServiceInstances { HashMap<String, String> instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", request.getServiceInstanceID()); return activateOrDeactivateServiceInstances(request, Action.activateInstance, version, requestId, instanceIdMap, - requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); + requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX)); } /** @@ -225,7 +225,7 @@ public class Onap3gppServiceInstances { HashMap<String, String> instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", request.getServiceInstanceID()); return activateOrDeactivateServiceInstances(request, Action.deactivateInstance, version, requestId, - instanceIdMap, requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); + instanceIdMap, requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX)); } /** diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java index c3c92be013..95f00c3a39 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java @@ -55,9 +55,9 @@ import org.springframework.beans.factory.annotation.Autowired; public class Onap3gppServiceInstancesTest extends BaseTest { - private String onap3gppServicesUri = "/onap/so/infra/onap3gppServiceInstances/"; + private static final String ONAP3GPPSERVICES_URI = "/onap/so/infra/3gppservices/"; - private final ObjectMapper mapper = new ObjectMapper(); + private static final ObjectMapper MAPPER = new ObjectMapper(); @Autowired private Onap3gppServiceInstances objUnderTest; @@ -74,11 +74,11 @@ public class Onap3gppServiceInstancesTest extends BaseTest { wireMockServer.stubFor(get(urlPathEqualTo("/service/search/findFirstByModelNameOrderByModelVersionDesc")) .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) - .withBody(mapper.writeValueAsString(defaultService)).withStatus(HttpStatus.SC_OK))); + .withBody(MAPPER.writeValueAsString(defaultService)).withStatus(HttpStatus.SC_OK))); wireMockServer.stubFor(get(urlPathEqualTo("/serviceRecipe/search/findFirstByServiceModelUUIDAndAction")) .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) - .withBody(mapper.writeValueAsString(serviceRecipe)).withStatus(HttpStatus.SC_OK))); + .withBody(MAPPER.writeValueAsString(serviceRecipe)).withStatus(HttpStatus.SC_OK))); wireMockServer.stubFor(post(urlMatching(".*/infraActiveRequests/")).willReturn(aResponse() .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).withStatus(HttpStatus.SC_OK))); Mockito.doReturn(null).when(requestsDbClient).getInfraActiveRequestbyRequestId(Mockito.any()); @@ -107,7 +107,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest { @Test public void createServiceInstanceTest() throws IOException { - String uri = onap3gppServicesUri + "v1/allocate"; + String uri = ONAP3GPPSERVICES_URI + "v1/allocate"; wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn( aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json") .withStatus(org.apache.http.HttpStatus.SC_ACCEPTED))); @@ -123,7 +123,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest { @Test public void updateServiceInstanceTest() throws IOException { - String uri = onap3gppServicesUri + "v1/modify"; + String uri = ONAP3GPPSERVICES_URI + "v1/modify"; wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn( aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json") .withStatus(org.apache.http.HttpStatus.SC_ACCEPTED))); @@ -139,7 +139,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest { @Test public void deleteServiceInstanceTest() throws IOException { - String uri = onap3gppServicesUri + "v1/deAllocate"; + String uri = ONAP3GPPSERVICES_URI + "v1/deAllocate"; wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn( aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json") .withStatus(org.apache.http.HttpStatus.SC_ACCEPTED))); @@ -154,7 +154,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest { @Test public void activateServiceInstanceTest() throws IOException { - String uri = onap3gppServicesUri + "v1/activate"; + String uri = ONAP3GPPSERVICES_URI + "v1/activate"; wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn( aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json") .withStatus(org.apache.http.HttpStatus.SC_ACCEPTED))); @@ -169,7 +169,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest { @Test public void deActivateServiceInstance() throws IOException { - String uri = onap3gppServicesUri + "v1/deActivate"; + String uri = ONAP3GPPSERVICES_URI + "v1/deActivate"; wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn( aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json") .withStatus(org.apache.http.HttpStatus.SC_ACCEPTED))); @@ -185,7 +185,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest { @Test public void getSliceSubnetCapabilitiesTest() throws IOException, ApiException { String request = "{\"subnetTypes\":[\"AN\"]}"; - QuerySubnetCapability subnetCapabilityRequest = mapper.readValue(request, QuerySubnetCapability.class); + QuerySubnetCapability subnetCapabilityRequest = MAPPER.readValue(request, QuerySubnetCapability.class); String expectedResponse = "{\"AN\":{\"latency\":\"5\",\"maxNumberofUEs\":\"100\",\"maxThroughput\":\"150\",\"terminalDensity\":\"50\"}}"; Response response = objUnderTest.getSliceSubnetCapabilities(subnetCapabilityRequest, "v1"); diff --git a/releases/1.7.4.yaml b/releases/1.7.4.yaml new file mode 100644 index 0000000000..da2acb2988 --- /dev/null +++ b/releases/1.7.4.yaml @@ -0,0 +1,33 @@ +--- +distribution_type: 'container' +container_release_tag: '1.7.4' +project: 'so' +log_dir: 'so-maven-docker-stage-master/488/' +ref: '432a5fe384fe559ddb167d2a1ceb7916f5379a4d' +containers: + - name: 'so/vnfm-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/catalog-db-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/request-db-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/openstack-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/sdnc-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/vfc-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/sdc-controller' + version: '1.7.4-20201015T1406' + - name: 'so/bpmn-infra' + version: '1.7.4-20201015T1406' + - name: 'so/so-monitoring' + version: '1.7.4-20201015T1406' + - name: 'so/api-handler-infra' + version: '1.7.4-20201015T1406' + - name: 'so/nssmf-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/mso-cnf-adapter' + version: '1.7.4-20201015T1406' + - name: 'so/so-oof-adapter' + version: '1.7.4-20201015T1406'
\ No newline at end of file diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java deleted file mode 100644 index cbb375ae55..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-CreateStack") -@RequestMapping(value = "/sim/v1/tenantOne/stacks", method = RequestMethod.POST) -public class CreateStack extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().post().extractFromPayload("$.stack_name", "stackName"); - - scenario.action(new CreateAAInventory()); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Create.json")); - - - } - - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStackAudit.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStackAudit.java deleted file mode 100644 index 35e0571b14..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStackAudit.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-CreateStackAudit") -@RequestMapping(value = "/sim/mockPublicUrlThree/stacks", method = RequestMethod.POST) -public class CreateStackAudit extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().post().extractFromPayload("$.stack_name", "stackName"); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); - - - } - - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java deleted file mode 100644 index 046829fa2f..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.onap.so.simulator.actions.aai.DeleteVServers; -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-ModuleCreateDelete") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/dummy_id/stackId") -public class ModuleCreateDelete extends AbstractSimulatorScenario { - - - @Override - public void run(ScenarioDesigner scenario) { - // Get to see if stack exists - scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "correlationId"); - scenario.echo("${correlationId}"); - scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "${correlationId}"); - - scenario.variable("stackName", "dummy_id"); - scenario.variable("cloudOwner", "cloudOwner"); - scenario.variable("cloudRegion", "regionOne"); - scenario.variable("tenantId", "0422ffb57ba042c0800a29dc85ca70f8"); - scenario.variable("vServerId", "92272b67-d23f-42ca-87fa-7b06a9ec81f3"); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); - - // Initial Get from Openstack Adapter prior to deletion of the stack - scenario.http().receive().get(); - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); - - // Delete of the stack - scenario.http().receive().delete(); - scenario.action(new DeleteVServers()); - scenario.http().send().response(HttpStatus.NO_CONTENT); - - // Final Get from Openstack Adapter after the deletion of the stack - scenario.http().receive().get(); - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); - - } - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java deleted file mode 100644 index 3c95149afe..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Query-Failure-ID-Name-Resources") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/failure_id/resources", method = RequestMethod.GET) -public class QueryResourcesByStackNameFailureId extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get(); - - scenario.variable("stackName", "failure_id"); - - scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") - .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); - - } -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java deleted file mode 100644 index 434eafc668..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Query-Replace-ID-Name-Resources") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/replace_module/resources", method = RequestMethod.GET) -public class QueryResourcesByStackNameModuleReplace extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get(); - - scenario.variable("stackName", "replace_module"); - - scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") - .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); - - } -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java deleted file mode 100644 index 6504cf6dc0..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Query-Replace-Volume-ID-Name-Resources") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/replace_module_volume_id/resources", method = RequestMethod.GET) -public class QueryResourcesByStackNameModuleReplaceVolume extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get(); - - scenario.variable("stackName", "replace_module_volume_id"); - - scenario.http().send().response(HttpStatus.OK).header("ContentType", "application/json") - .payload(new ClassPathResource("openstack/gr_api/GetStackResourcesMacro.json")); - - } -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java deleted file mode 100644 index ecd0c9fdba..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-QueryStackByName") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/*", method = RequestMethod.GET) -public class QueryStack extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get(); - - scenario.http().send().response(HttpStatus.NOT_FOUND); - - } - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java deleted file mode 100644 index 249834a8d8..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-QueryStackByID-NetworkMacro1") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_network1/*", method = RequestMethod.GET) -public class QueryStackByIdNetworkMacro1 extends AbstractSimulatorScenario { - - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "correlationId"); - scenario.echo("${correlationId}"); - scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "${correlationId}"); - - scenario.variable("stackName", "dummy_id"); - - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); - - scenario.http().receive().get(); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); - - } - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java deleted file mode 100644 index b3c6c7231f..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-QueryStackByID-NetworkMacro2") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_network1/*", method = RequestMethod.GET) -public class QueryStackByIdNetworkMacro2 extends AbstractSimulatorScenario { - - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "correlationId"); - scenario.echo("${correlationId}"); - scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "${correlationId}"); - - scenario.variable("stackName", "dummy_id"); - - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); - - scenario.http().receive().get(); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); - - } - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java deleted file mode 100644 index cbe842caf9..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-VolumeGroup-Interactions") -@RequestMapping(value = "/sim/v1/tenantOne/stacks/VolumeGroup/*") -public class QueryStackByIdVolumeGroup extends AbstractSimulatorScenario { - - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get().extractFromHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "correlationId"); - scenario.echo("${correlationId}"); - scenario.correlation().start().onHeader(DynamicEndpointUriResolver.REQUEST_PATH_HEADER_NAME, - "${correlationId}"); - - scenario.variable("stackName", "VolumeGroup"); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Created.json")); - - scenario.http().receive().delete(); - - scenario.http().send().response(HttpStatus.NO_CONTENT); - - scenario.http().receive().get(); - - scenario.http().send().response(HttpStatus.OK) - .payload(new ClassPathResource("openstack/gr_api/Stack_Deleted.json")); - } - -} diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByName.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByName.java deleted file mode 100644 index b51a608e6d..0000000000 --- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByName.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.onap.so.simulator.scenarios.openstack; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario; -import com.consol.citrus.simulator.scenario.Scenario; -import com.consol.citrus.simulator.scenario.ScenarioDesigner; - -@Scenario("Openstack-QueryStackByName3") -@RequestMapping(value = "/sim/mockPublicUrlThree/stacks/*", method = RequestMethod.GET) -public class QueryStackByName extends AbstractSimulatorScenario { - - @Override - public void run(ScenarioDesigner scenario) { - scenario.http().receive().get(); - - scenario.http().send().response(HttpStatus.NOT_FOUND); - - } - - -} diff --git a/version.properties b/version.properties index e783874dbf..058fdc4c92 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ major=1 minor=7 -patch=3 +patch=4 base_version=${major}.${minor}.${patch} |