Search in sources :

Example 21 with RequestParameters

use of org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters in project so by onap.

the class GeneratePayloadForCdsTest method createGeneralBuildingBlock.

private GeneralBuildingBlock createGeneralBuildingBlock() {
    GeneralBuildingBlock generalBuildingBlock = new GeneralBuildingBlock();
    RequestContext requestContext = new RequestContext();
    RequestParameters requestParameters = new RequestParameters();
    requestParameters.setUserParams(createRequestUserParams());
    requestContext.setRequestParameters(requestParameters);
    requestContext.setMsoRequestId(MSO_REQUEST_ID);
    generalBuildingBlock.setRequestContext(requestContext);
    return generalBuildingBlock;
}
Also used : GeneralBuildingBlock(org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock) RequestContext(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext) RequestParameters(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)

Example 22 with RequestParameters

use of org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters in project so by onap.

the class BBInputSetupMapperLayerTest method mapRequestParameters.

protected RequestParameters mapRequestParameters(org.onap.so.serviceinstancebeans.RequestParameters requestParameters) {
    RequestParameters requestParams = new RequestParameters();
    requestParams.setaLaCarte(requestParameters.getALaCarte());
    requestParams.setUsePreload(requestParameters.getUsePreload());
    requestParams.setSubscriptionServiceType(requestParameters.getSubscriptionServiceType());
    requestParams.setUserParams(requestParameters.getUserParams());
    requestParams.setPayload(requestParameters.getPayload());
    return requestParams;
}
Also used : RequestParameters(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)

Example 23 with RequestParameters

use of org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters in project so by onap.

the class InputParameterRetrieverTaskTest method getGeneralBuildingBlock.

private GeneralBuildingBlock getGeneralBuildingBlock(final Map<String, Object> userParams) {
    final GeneralBuildingBlock buildingBlock = new GeneralBuildingBlock();
    final RequestContext requestContext = new RequestContext();
    final RequestParameters requestParameters = new RequestParameters();
    requestParameters.setUserParams(Arrays.asList(userParams));
    requestContext.setRequestParameters(requestParameters);
    buildingBlock.setRequestContext(requestContext);
    return buildingBlock;
}
Also used : GeneralBuildingBlock(org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock) RequestContext(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext) RequestParameters(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)

Example 24 with RequestParameters

use of org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters in project so by onap.

the class AppcOrchestratorPreProcessorTest method fillRequiredAppcExecutionFieldsConfigModify.

private void fillRequiredAppcExecutionFieldsConfigModify() {
    RequestContext context = new RequestContext();
    RequestParameters requestParameters = new RequestParameters();
    requestParameters.setPayload("{\"request_parameters\":{\"host_ip_address\":\"10.10.10.10\"},\"configuration_parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}");
    context.setRequestParameters(requestParameters);
    context.setMsoRequestId("TEST-MSO-ID");
    context.setRequestorId("testRequestorId");
    execution.setVariable("aicIdentity", "AIC-TEST");
    execution.setVariable("vmIdList", "VM-ID-LIST-TEST");
    execution.setVariable("vserverIdList", "VSERVER-ID-LIST");
    execution.setVariable("identityUrl", "IDENTITY-URL-TEST");
    execution.getGeneralBuildingBlock().setRequestContext(context);
}
Also used : RequestContext(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext) RequestParameters(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)

Example 25 with RequestParameters

use of org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters in project so by onap.

the class HomingV2Test method createBuildingBlockExecutionMock.

private BuildingBlockExecution createBuildingBlockExecutionMock(Map<String, Object> userParams) {
    BuildingBlockExecution execution = mock(BuildingBlockExecution.class);
    GeneralBuildingBlock generalBuildingBlock = mock(GeneralBuildingBlock.class);
    RequestContext requestContext = mock(RequestContext.class);
    RequestParameters requestParameters = mock(RequestParameters.class);
    List<Map<String, Object>> userParamsList = new ArrayList<>();
    userParamsList.add(userParams);
    when(execution.getGeneralBuildingBlock()).thenReturn(generalBuildingBlock);
    when(generalBuildingBlock.getRequestContext()).thenReturn(requestContext);
    when(requestContext.getRequestParameters()).thenReturn(requestParameters);
    when(requestParameters.getUserParams()).thenReturn(userParamsList);
    return execution;
}
Also used : BuildingBlockExecution(org.onap.so.bpmn.common.BuildingBlockExecution) GeneralBuildingBlock(org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock) ArrayList(java.util.ArrayList) RequestContext(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext) HashMap(java.util.HashMap) Map(java.util.Map) RequestParameters(org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)

Aggregations

RequestParameters (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)25 RequestContext (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext)18 Test (org.junit.Test)9 GeneralBuildingBlock (org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock)9 HashMap (java.util.HashMap)8 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)8 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)7 VfModule (org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule)7 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)7 ArrayList (java.util.ArrayList)6 Map (java.util.Map)6 ModelInfoVfModule (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule)6 Customer (org.onap.so.bpmn.servicedecomposition.bbobjects.Customer)4 URI (java.net.URI)3 GenericResourceApiVfModuleOperationInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation)3 GenericResourceApiVfmoduleinformationVfModuleInformation (org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleinformationVfModuleInformation)3 CloudRegion (org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion)3 ServiceSubscription (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription)3 ModelInfoGenericVnf (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf)3 MapperException (org.onap.so.client.exception.MapperException)3