use of org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity in project ovirt-engine by oVirt.
the class GetGlusterVolumeBricksQueryTest method setupExpectedVolume.
private void setupExpectedVolume() {
expected = new GlusterVolumeEntity();
expected.setId(Guid.newGuid());
brickEntity = new GlusterBrickEntity();
brickEntity.setId(Guid.newGuid());
brickEntity.setServerId(Guid.newGuid());
brickEntity.setBrickDirectory("/tmp/b1");
brickEntity.setStatus(GlusterStatus.DOWN);
bricks.add(brickEntity);
expected.setBricks(bricks);
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity in project ovirt-engine by oVirt.
the class GetGlusterVolumeProfileInfoQueryTest method getBrick.
private GlusterBrickEntity getBrick() {
GlusterBrickEntity brick = new GlusterBrickEntity();
brick.setBrickDirectory("dir");
brick.setServerName("host");
return brick;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity in project ovirt-engine by oVirt.
the class GlusterVolumeRemoveBricksCommandTest method getBricks.
private List<GlusterBrickEntity> getBricks(Guid volumeId, int max) {
List<GlusterBrickEntity> bricks = new ArrayList<>();
for (Integer i = 0; i < max; i++) {
GlusterBrickEntity brick1 = new GlusterBrickEntity();
brick1.setVolumeId(volumeId);
brick1.setServerName("server1");
brick1.setStatus(GlusterStatus.UP);
brick1.setBrickDirectory("/tmp/s" + i.toString());
bricks.add(brick1);
}
return bricks;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity in project ovirt-engine by oVirt.
the class ReplaceGlusterVolumeBrickCommandTest method getBricks.
private List<GlusterBrickEntity> getBricks(Guid volumeId, String dirPrefix, int n) {
List<GlusterBrickEntity> bricks = new ArrayList<>();
GlusterBrickEntity brick;
for (Integer i = 0; i < n; i++) {
brick = new GlusterBrickEntity();
brick.setVolumeId(volumeId);
brick.setServerId(serverId);
brick.setServerName(serverName);
brick.setBrickDirectory("/tmp/" + dirPrefix + i.toString());
brick.setStatus(GlusterStatus.UP);
bricks.add(brick);
}
return bricks;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity in project ovirt-engine by oVirt.
the class AbstractRemoveGlusterVolumeBricksCommandTest method getInvalidBricks.
protected List<GlusterBrickEntity> getInvalidBricks(Guid volumeId) {
List<GlusterBrickEntity> bricks = new ArrayList<>();
GlusterBrickEntity brick1 = new GlusterBrickEntity();
brick1.setVolumeId(volumeId);
brick1.setBrickDirectory("/tmp/test-vol1");
brick1.setServerId(SERVER_ID);
brick1.setStatus(GlusterStatus.UP);
bricks.add(brick1);
GlusterBrickEntity brick2 = new GlusterBrickEntity();
brick2.setVolumeId(volumeId);
brick2.setBrickDirectory("/tmp/test-vol122");
brick2.setServerId(SERVER_ID);
brick2.setStatus(GlusterStatus.UP);
bricks.add(brick2);
return bricks;
}
Aggregations