Search in sources :

Example 26 with VmWatchdog

use of org.ovirt.engine.core.common.businessentities.VmWatchdog in project ovirt-engine by oVirt.

the class WatchdogMapperTest method mapVmWatchdog.

@Test
public void mapVmWatchdog() {
    VmWatchdog entity = new VmWatchdog();
    entity.setAction(VmWatchdogAction.RESET);
    entity.setModel(VmWatchdogType.i6300esb);
    entity.setId(Guid.Empty);
    Watchdog model = WatchdogMapper.map(entity, null);
    assertNotNull(model);
    assertEquals(WatchdogAction.RESET, model.getAction());
    assertEquals(WatchdogModel.I6300ESB, model.getModel());
}
Also used : VmWatchdog(org.ovirt.engine.core.common.businessentities.VmWatchdog) Watchdog(org.ovirt.engine.api.model.Watchdog) VmWatchdog(org.ovirt.engine.core.common.businessentities.VmWatchdog) Test(org.junit.Test)

Example 27 with VmWatchdog

use of org.ovirt.engine.core.common.businessentities.VmWatchdog in project ovirt-engine by oVirt.

the class WatchdogMapperTest method mapWatchdog.

@Test
public void mapWatchdog() {
    Watchdog model = new Watchdog();
    model.setAction(WatchdogAction.RESET);
    model.setModel(WatchdogModel.I6300ESB);
    model.setId(Guid.Empty.toString());
    VmWatchdog entity = WatchdogMapper.map(model, null);
    assertNotNull(entity);
    assertEquals(VmWatchdogAction.RESET, entity.getAction());
    assertEquals(VmWatchdogType.i6300esb, entity.getModel());
}
Also used : VmWatchdog(org.ovirt.engine.core.common.businessentities.VmWatchdog) Watchdog(org.ovirt.engine.api.model.Watchdog) VmWatchdog(org.ovirt.engine.core.common.businessentities.VmWatchdog) Test(org.junit.Test)

Aggregations

VmWatchdog (org.ovirt.engine.core.common.businessentities.VmWatchdog)27 VmDevice (org.ovirt.engine.core.common.businessentities.VmDevice)7 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)7 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)6 Guid (org.ovirt.engine.core.compat.Guid)5 Test (org.junit.Test)4 GraphicsType (org.ovirt.engine.core.common.businessentities.GraphicsType)4 Arrays (java.util.Arrays)3 Collection (java.util.Collection)3 List (java.util.List)3 Watchdog (org.ovirt.engine.api.model.Watchdog)3 GraphicsDevice (org.ovirt.engine.core.common.businessentities.GraphicsDevice)3 VmBase (org.ovirt.engine.core.common.businessentities.VmBase)3 VmRngDevice (org.ovirt.engine.core.common.businessentities.VmRngDevice)3 VmTemplate (org.ovirt.engine.core.common.businessentities.VmTemplate)3 VmWatchdogType (org.ovirt.engine.core.common.businessentities.VmWatchdogType)3 QueryType (org.ovirt.engine.core.common.queries.QueryType)3 AsyncQuery (org.ovirt.engine.ui.frontend.AsyncQuery)3 Frontend (org.ovirt.engine.ui.frontend.Frontend)3 BuilderExecutor (org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor)3