use of org.ovirt.engine.api.model.GlusterBrick in project ovirt-engine by oVirt.
the class BackendGlusterBricksResourceTest method testActivate.
@Test
public void testActivate() throws Exception {
GlusterBrick brick = new GlusterBrick();
GlusterVolume volume = new GlusterVolume();
brick.setName(serverName + ":" + brickDir);
volume.setId(volumeId.toString());
brick.setGlusterVolume(volume);
GlusterBricks bricks = mock(GlusterBricks.class);
when(bricks.getGlusterBricks()).thenReturn(Collections.singletonList(brick));
setUriInfo(setUpActionExpectations(ActionType.StopRemoveGlusterVolumeBricks, GlusterVolumeRemoveBricksParameters.class, new String[] {}, new Object[] {}, true, true));
Action action = new Action();
action.setBricks(bricks);
collection.stopMigrate(action);
}
use of org.ovirt.engine.api.model.GlusterBrick in project ovirt-engine by oVirt.
the class BackendGlusterBricksResourceTest method testStopMigrate.
@Test
public void testStopMigrate() throws Exception {
GlusterBrick brick = new GlusterBrick();
GlusterVolume volume = new GlusterVolume();
brick.setName(serverName + ":" + brickDir);
volume.setId(volumeId.toString());
brick.setGlusterVolume(volume);
GlusterBricks bricks = mock(GlusterBricks.class);
when(bricks.getGlusterBricks()).thenReturn(Collections.singletonList(brick));
setUriInfo(setUpActionExpectations(ActionType.StopRemoveGlusterVolumeBricks, GlusterVolumeRemoveBricksParameters.class, new String[] {}, new Object[] {}, true, true));
Action action = new Action();
action.setBricks(bricks);
collection.stopMigrate(action);
}
use of org.ovirt.engine.api.model.GlusterBrick in project ovirt-engine by oVirt.
the class BackendGlusterBricksResourceTest method getBrickModelsToRemove.
private GlusterBricks getBrickModelsToRemove() {
GlusterBricks bricks = new GlusterBricks();
GlusterBrick brick = new GlusterBrick();
brick.setId(GUIDS[0].toString());
bricks.getGlusterBricks().add(brick);
return bricks;
}
use of org.ovirt.engine.api.model.GlusterBrick in project ovirt-engine by oVirt.
the class BackendGlusterBricksResourceTest method createModel.
private GlusterBricks createModel() {
GlusterBricks bricks = new GlusterBricks();
GlusterBrick brick = new GlusterBrick();
brick.setId(GUIDS[0].toString());
brick.setGlusterVolume(new GlusterVolume());
brick.getGlusterVolume().setId(volumeId.toString());
brick.setServerId(serverId.toString());
brick.setBrickDir(brickDir);
bricks.getGlusterBricks().add(brick);
return bricks;
}
use of org.ovirt.engine.api.model.GlusterBrick in project ovirt-engine by oVirt.
the class BackendGlusterVolumesResourceTest method createBrick.
private GlusterBrick createBrick(String brickDir) {
GlusterBrick brick = new GlusterBrick();
brick.setServerId(serverId.toString());
brick.setBrickDir(brickDir);
return brick;
}
Aggregations