Search in sources :

Example 1 with Pnfs

use of org.onap.so.serviceinstancebeans.Pnfs in project so by onap.

the class UserParamsServiceTraversal method setResourceListForPnfs.

private void setResourceListForPnfs(List<Resource> resourceList, Resource serviceResource, Service validate) {
    for (Pnfs pnf : validate.getResources().getPnfs()) {
        Resource pnfResource = new Resource(WorkflowType.PNF, pnf.getModelInfo().getModelCustomizationId(), false, serviceResource);
        ModelInfo modelInfo = pnf.getModelInfo();
        if (modelInfo != null) {
            pnfResource.setModelCustomizationId(modelInfo.getModelCustomizationUuid());
            pnfResource.setModelVersionId(modelInfo.getModelVersionId());
        }
        pnfResource.setProcessingPriority(pnf.getProcessingPriority());
        resourceList.add(pnfResource);
    }
}
Also used : ModelInfo(org.onap.so.serviceinstancebeans.ModelInfo) Resource(org.onap.so.bpmn.infrastructure.workflow.tasks.Resource) Pnfs(org.onap.so.serviceinstancebeans.Pnfs)

Example 2 with Pnfs

use of org.onap.so.serviceinstancebeans.Pnfs in project so by onap.

the class GenericPnfCDSControllerRunnableBBTest method createPnfs.

private Pnfs createPnfs(String pnfModelCustomizationId, List<Map<String, String>> instanceParamsList) {
    Pnfs pnfs = new Pnfs();
    ModelInfo modelInfo = new ModelInfo();
    modelInfo.setModelCustomizationUuid(pnfModelCustomizationId);
    pnfs.setModelInfo(modelInfo);
    pnfs.setInstanceParams(instanceParamsList);
    return pnfs;
}
Also used : ModelInfo(org.onap.so.serviceinstancebeans.ModelInfo) Pnfs(org.onap.so.serviceinstancebeans.Pnfs)

Example 3 with Pnfs

use of org.onap.so.serviceinstancebeans.Pnfs in project so by onap.

the class GenericPnfCDSControllerRunnableBBTest method createPnfsList.

private List<Pnfs> createPnfsList() {
    List<Map<String, String>> instanceParamsListSearchedPnf = new ArrayList<>();
    Map<String, String> instanceParam = new HashMap<>();
    instanceParam.put("INSTANCE_PARAM1_NAME", "INSTANCE_PARAM1_VALUE");
    instanceParam.put("INSTANCE_PARAM2_NAME", "INSTANCE_PARAM2_VALUE");
    Map<String, String> instanceParam2 = new HashMap<>();
    instanceParam2.put("INSTANCE_PARAM3_NAME", "INSTANCE_PARAM3_VALUE");
    instanceParamsListSearchedPnf.add(instanceParam);
    instanceParamsListSearchedPnf.add(instanceParam2);
    Pnfs searchedPnf = createPnfs("0c1ac643-377e-475b-be50-6be65f91a7ad", instanceParamsListSearchedPnf);
    List<Pnfs> pnfList = new ArrayList<>();
    pnfList.add(searchedPnf);
    return pnfList;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) HashMap(java.util.HashMap) Map(java.util.Map) Pnfs(org.onap.so.serviceinstancebeans.Pnfs)

Aggregations

Pnfs (org.onap.so.serviceinstancebeans.Pnfs)3 ModelInfo (org.onap.so.serviceinstancebeans.ModelInfo)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Resource (org.onap.so.bpmn.infrastructure.workflow.tasks.Resource)1