use of org.ovirt.engine.core.common.action.RunVmParams in project ovirt-engine by oVirt.
the class VmPoolHandler method canRunPoolVm.
private boolean canRunPoolVm(Guid vmId, List<String> messages) {
VM vm = vmDao.get(vmId);
if (vm == null) {
messages.add(EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND.name());
return false;
}
// TODO: This is done to keep consistency with VmDao.getById.
// It can probably be removed, but that requires some more research
vmHandler.updateNetworkInterfacesFromDb(vm);
RunVmParams runVmParams = new RunVmParams(vmId);
return Injector.injectMembers(new RunVmValidator(vm, runVmParams, false, findActiveISODomain(vm.getStoragePoolId()))).canRunVm(messages, fetchStoragePool(vm.getStoragePoolId()), Collections.emptyList(), Collections.emptyList(), clusterDao.get(vm.getClusterId()), false);
}
Aggregations