use of org.ovirt.engine.core.common.businessentities.ConsoleTargetType in project ovirt-engine by oVirt.
the class VmDeviceUtils method getConsoleDeviceSpecParams.
/**
* Returns console device spec params.
*/
private Map<String, Object> getConsoleDeviceSpecParams(Guid vmId) {
Map<String, Object> specParams = new HashMap<>();
VmBase vmBase = getVmBase(vmId);
ConsoleTargetType targetType = osRepository.getOsConsoleTargetType(vmBase.getOsId(), CompatibilityVersionUtils.getEffective(vmBase, () -> vmBase.getClusterId() != null ? clusterDao.get(vmBase.getClusterId()) : null));
specParams.put("enableSocket", "true");
specParams.put("consoleType", targetType == null ? "serial" : targetType.libvirtName);
return specParams;
}
Aggregations