use of org.ovirt.engine.core.common.businessentities.VmWatchdogType in project ovirt-engine by oVirt.
the class InstanceTypeListModel method setVmWatchdogToParams.
private void setVmWatchdogToParams(final UnitVmModel model, VmTemplateManagementParameters updateVmParams) {
VmWatchdogType wdModel = model.getWatchdogModel().getSelectedItem();
updateVmParams.setUpdateWatchdog(true);
if (wdModel != null) {
VmWatchdog vmWatchdog = new VmWatchdog();
vmWatchdog.setAction(model.getWatchdogAction().getSelectedItem());
vmWatchdog.setModel(wdModel);
updateVmParams.setWatchdog(vmWatchdog);
}
}
use of org.ovirt.engine.core.common.businessentities.VmWatchdogType in project ovirt-engine by oVirt.
the class TemplateListModel method setVmWatchdogToParams.
private void setVmWatchdogToParams(final UnitVmModel model, UpdateVmTemplateParameters updateVmParams) {
VmWatchdogType wdModel = model.getWatchdogModel().getSelectedItem();
updateVmParams.setUpdateWatchdog(true);
if (wdModel != null) {
VmWatchdog vmWatchdog = new VmWatchdog();
vmWatchdog.setAction(model.getWatchdogAction().getSelectedItem());
vmWatchdog.setModel(wdModel);
updateVmParams.setWatchdog(vmWatchdog);
}
}
use of org.ovirt.engine.core.common.businessentities.VmWatchdogType in project ovirt-engine by oVirt.
the class WatchdogMapperTest method mapModel.
@Test
public void mapModel() {
for (WatchdogModel model : WatchdogModel.values()) {
VmWatchdogType backendModel = WatchdogMapper.map(model);
assertNotNull(backendModel);
assertEquals(backendModel.name().toLowerCase(), model.name().toLowerCase());
}
}
use of org.ovirt.engine.core.common.businessentities.VmWatchdogType in project ovirt-engine by oVirt.
the class VmBaseListModel method setVmWatchdogToParams.
protected void setVmWatchdogToParams(final UnitVmModel model, VmManagementParametersBase updateVmParams) {
VmWatchdogType wdModel = model.getWatchdogModel().getSelectedItem();
updateVmParams.setUpdateWatchdog(true);
if (wdModel != null) {
VmWatchdog vmWatchdog = new VmWatchdog();
vmWatchdog.setAction(model.getWatchdogAction().getSelectedItem());
vmWatchdog.setModel(wdModel);
updateVmParams.setWatchdog(vmWatchdog);
}
}
use of org.ovirt.engine.core.common.businessentities.VmWatchdogType in project ovirt-engine by oVirt.
the class WatchdogMapperTest method mapBackendModel.
@Test
public void mapBackendModel() {
for (VmWatchdogType type : VmWatchdogType.values()) {
WatchdogModel model = WatchdogMapper.map(type);
assertNotNull(model);
assertEquals(model.name().toLowerCase(), type.name().toLowerCase());
}
}
Aggregations