use of org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters in project ovirt-engine by oVirt.
the class MaintenanceNumberOfVdssCommand method cancelIncommingMigrations.
private void cancelIncommingMigrations() {
for (Guid hostId : vdssToMaintenance.keySet()) {
for (VmDynamic vm : vmDynamicDao.getAllMigratingToHost(hostId)) {
if (vm.getStatus() == VMStatus.MigratingFrom) {
log.info("Cancelling incoming migration of '{}' id '{}'", vm, vm.getId());
runVdsCommand(VDSCommandType.CancelMigrate, new CancelMigrationVDSParameters(vm.getRunOnVds(), vm.getId(), true));
}
}
}
}
use of org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters in project ovirt-engine by oVirt.
the class CancelMigrateVmCommand method executeCommand.
@Override
protected void executeCommand() {
VDSReturnValue retVal = runVdsCommand(VDSCommandType.CancelMigrate, new CancelMigrationVDSParameters(getVm().getRunOnVds(), getParameters().getVmId(), false));
setSucceeded(retVal.getSucceeded());
}
Aggregations