use of com.intel.mountwilson.datamodel.VmmHostDataVo in project OpenAttestation by OpenAttestation.
the class WLMDataController method getHostOSForVMM.
public ModelAndView getHostOSForVMM(HttpServletRequest req, HttpServletResponse res) {
log.info("WLMDataController.getHostOSForVMM >>");
ModelAndView responseView = new ModelAndView(new JSONView());
List<VmmHostDataVo> list = new ArrayList<VmmHostDataVo>();
VmmHostDataVo dataVo = null;
List<String> VmmNames = getVMMNameList(WLMPConfig.getConfiguration().getString("mtwilson.wlmp.openSourceHypervisors"));
try {
List<OSDataVO> osList = osClientService.getAllOS(getWhitelistService(req));
for (OSDataVO osDataVO : osList) {
dataVo = new VmmHostDataVo();
dataVo.setHostOS(osDataVO.getOsName());
dataVo.setHostVersion(osDataVO.getOsVersion());
dataVo.setVmmNames(VmmNames);
dataVo.setAttestationType("PCR");
list.add(dataVo);
}
} catch (WLMPortalException e) {
log.error("Error While getting Host OS Data for VMM. Root cause " + e.getStackTrace());
responseView.addObject("result", false);
responseView.addObject("message", e.getMessage());
return responseView;
}
responseView.addObject("HostList", list);
responseView.addObject("result", true);
responseView.addObject("message", "");
log.info("WLMDataController.getHostOSForVMM <<<");
return responseView;
}
Aggregations