use of org.ovirt.engine.core.common.businessentities.HostDeviceView in project ovirt-engine by oVirt.
the class HostDeviceDaoTest method testGetExtendedHostDevicesByHostId.
@Test
public void testGetExtendedHostDevicesByHostId() {
List<HostDeviceView> hostDevices = dao.getExtendedHostDevicesByHostId(FixturesTool.VDS_RHEL6_NFS_SPM);
assertEquals(getEntitiesTotalCount(), hostDevices.size());
for (HostDeviceView hostDevice : hostDevices) {
assertEquals(FixturesTool.VDS_RHEL6_NFS_SPM, hostDevice.getHostId());
}
}
use of org.ovirt.engine.core.common.businessentities.HostDeviceView in project ovirt-engine by oVirt.
the class VmHostDeviceListModel method doAttachDevices.
private void doAttachDevices(Collection<EntityModel<HostDeviceView>> items) {
List<String> deviceNamesToAttach = new ArrayList<>();
for (EntityModel<HostDeviceView> model : items) {
deviceNamesToAttach.add(model.getEntity().getDeviceName());
}
Frontend.getInstance().runAction(ActionType.AddVmHostDevices, new VmHostDevicesParameters(getEntity().getId(), deviceNamesToAttach), result -> {
syncSearch();
getWindow().stopProgress();
setWindow(null);
});
}
Aggregations