Search in sources :

Example 1 with HostDeviceManager

use of org.ovirt.engine.core.bll.hostdev.HostDeviceManager in project ovirt-engine by oVirt.

the class VdsEventListener method refreshHostIfAnyVmHasHostDevices.

@Override
public void refreshHostIfAnyVmHasHostDevices(final List<Guid> vmIds, final Guid hostId) {
    if (vmIds.isEmpty()) {
        return;
    }
    ThreadPoolUtil.execute(() -> {
        HostDeviceManager hostDeviceManager = Injector.get(HostDeviceManager.class);
        hostDeviceManager.refreshHostIfAnyVmHasHostDevices(vmIds, hostId);
    });
}
Also used : HostDeviceManager(org.ovirt.engine.core.bll.hostdev.HostDeviceManager)

Example 2 with HostDeviceManager

use of org.ovirt.engine.core.bll.hostdev.HostDeviceManager in project ovirt-engine by oVirt.

the class VdsEventListener method processOnVmStopInternal.

private void processOnVmStopInternal(final Collection<Guid> vmIds, final Guid hostId) {
    for (Guid vmId : vmIds) {
        backend.runInternalAction(ActionType.ProcessDownVm, new ProcessDownVmParameters(vmId, true));
    }
    HostDeviceManager hostDeviceManager = Injector.get(HostDeviceManager.class);
    hostDeviceManager.refreshHostIfAnyVmHasHostDevices(vmIds, hostId);
}
Also used : ProcessDownVmParameters(org.ovirt.engine.core.common.action.ProcessDownVmParameters) Guid(org.ovirt.engine.core.compat.Guid) HostDeviceManager(org.ovirt.engine.core.bll.hostdev.HostDeviceManager)

Aggregations

HostDeviceManager (org.ovirt.engine.core.bll.hostdev.HostDeviceManager)2 ProcessDownVmParameters (org.ovirt.engine.core.common.action.ProcessDownVmParameters)1 Guid (org.ovirt.engine.core.compat.Guid)1