Search in sources :

Example 1 with PowerManagementStatus

use of org.ovirt.engine.api.model.PowerManagementStatus in project ovirt-engine by oVirt.

the class BackendHostResourceTest method testFenceStatus.

@Test
public void testFenceStatus() throws Exception {
    FenceOperationResult retVal = new FenceOperationResult(FenceOperationResult.Status.SUCCESS, PowerStatus.ON);
    setUpEntityQueryExpectations(QueryType.GetVdsFenceStatus, IdQueryParameters.class, new String[] { "Id" }, new Object[] { GUIDS[0] }, retVal);
    Action action = new Action();
    action.setFenceType(FenceType.STATUS.value());
    verifyActionResponse(resource.fence(action));
    PowerManagementStatus status = action.getPowerManagement().getStatus();
    assertEquals(PowerManagementStatus.ON, status);
}
Also used : Action(org.ovirt.engine.api.model.Action) FenceOperationResult(org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult) PowerManagementStatus(org.ovirt.engine.api.model.PowerManagementStatus) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Action (org.ovirt.engine.api.model.Action)1 PowerManagementStatus (org.ovirt.engine.api.model.PowerManagementStatus)1 FenceOperationResult (org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult)1