Search in sources :

Example 1 with ConfigureInstanceParamsForPnf

use of org.onap.so.client.cds.ConfigureInstanceParamsForPnf in project so by onap.

the class GenericPnfCDSControllerRunnableBBTest method prepareData.

private void prepareData() throws BBObjectNotFoundException, PayloadGenerationException {
    Pnf pnf = new Pnf();
    ServiceInstance serviceInstance = new ServiceInstance();
    pnf.setPnfName(pnfName);
    pnf.setPnfId(pnfID);
    ModelInfoPnf modelInfoPnf = new ModelInfoPnf();
    modelInfoPnf.setModelCustomizationUuid(pnfCustomizationUUID);
    pnf.setModelInfoPnf(modelInfoPnf);
    serviceInstance.setServiceInstanceId(serviceInstanceID);
    ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
    modelInfoServiceInstance.setModelUuid(serviceModelUUID);
    serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
    execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock(createService(createPnfsList())));
    when(extractPojosForBB.extractByKey(eq(execution), eq(ResourceKey.PNF))).thenReturn(pnf);
    when(extractPojosForBB.extractByKey(eq(execution), eq(ResourceKey.SERVICE_INSTANCE_ID))).thenReturn(serviceInstance);
    doNothing().when(configureInstanceParamsForPnf).populateInstanceParams(any(), any(), any());
}
Also used : ModelInfoPnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoPnf) Pnf(org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf) ModelInfoPnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoPnf) ConfigureInstanceParamsForPnf(org.onap.so.client.cds.ConfigureInstanceParamsForPnf) ServiceInstance(org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance) ModelInfoServiceInstance(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance) ModelInfoServiceInstance(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)

Aggregations

Pnf (org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf)1 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)1 ModelInfoPnf (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoPnf)1 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)1 ConfigureInstanceParamsForPnf (org.onap.so.client.cds.ConfigureInstanceParamsForPnf)1