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);
}
}
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;
}
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;
}