use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity in project ovirt-engine by oVirt.
the class GlusterGeoRepSyncJobTest method getVolume.
private GlusterVolumeEntity getVolume() {
GlusterVolumeEntity volume = new GlusterVolumeEntity();
volume.setName("VOL1");
volume.setClusterId(Guid.newGuid());
volume.setId(Guid.newGuid());
volume.setReplicaCount(2);
GlusterBrickEntity brick = new GlusterBrickEntity();
brick.setVolumeId(volume.getId());
brick.setBrickDirectory("/export/testvol1");
brick.setStatus(GlusterStatus.UP);
brick.setBrickOrder(0);
volume.addBrick(brick);
GlusterBrickEntity brick2 = new GlusterBrickEntity();
brick2.setVolumeId(volume.getId());
brick2.setBrickDirectory("/export/testvol1");
brick2.setStatus(GlusterStatus.UP);
brick2.setBrickOrder(1);
volume.addBrick(brick2);
return volume;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity in project ovirt-engine by oVirt.
the class GlusterSyncJobTest method createReplVol.
private GlusterVolumeEntity createReplVol() {
GlusterVolumeEntity vol = createVolume(REPL_VOL_NAME, EXISTING_VOL_REPL_ID);
vol.addBrick(createBrick(EXISTING_VOL_REPL_ID, existingServer1, REPL_BRICK_R1D1));
vol.addBrick(createBrick(EXISTING_VOL_REPL_ID, existingServer2, REPL_BRICK_R1D2));
vol.addBrick(createBrick(EXISTING_VOL_REPL_ID, existingServer1, REPL_BRICK_R2D1));
vol.addBrick(createBrick(EXISTING_VOL_REPL_ID, existingServer2, REPL_BRICK_R2D2));
vol.setOption(OPTION_AUTH_ALLOW, "*");
vol.setOption(OPTION_NFS_DISABLE, OPTION_VALUE_OFF);
existingVolumes.add(vol);
return vol;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity in project ovirt-engine by oVirt.
the class GlusterSyncJobTest method createVolume.
private GlusterVolumeEntity createVolume(String volName, Guid id) {
GlusterVolumeEntity vol = new GlusterVolumeEntity();
vol.setId(id);
vol.setName(volName);
vol.setClusterId(CLUSTER_ID);
vol.setStatus(GlusterStatus.UP);
return vol;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity in project ovirt-engine by oVirt.
the class GlusterSyncJobTest method getNewVolume.
private GlusterVolumeEntity getNewVolume() {
GlusterVolumeEntity volume = new GlusterVolumeEntity();
volume.setName(NEW_VOL_NAME);
volume.setClusterId(CLUSTER_ID);
volume.setId(NEW_VOL_ID);
volume.setVolumeType(GlusterVolumeType.DISTRIBUTE);
volume.addTransportType(TransportType.TCP);
volume.setReplicaCount(0);
volume.setStripeCount(0);
volume.setStatus(GlusterStatus.UP);
volume.setOption("auth.allow", "*");
volume.addAccessProtocol(AccessProtocol.GLUSTER);
volume.addAccessProtocol(AccessProtocol.NFS);
GlusterBrickEntity brick = new GlusterBrickEntity();
brick.setVolumeId(NEW_VOL_ID);
brick.setServerId(existingServer1.getId());
brick.setServerName(existingServer1.getHostName());
brick.setBrickDirectory("/export/testvol1");
brick.setStatus(GlusterStatus.UP);
brick.setBrickOrder(0);
volume.addBrick(brick);
return volume;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity in project ovirt-engine by oVirt.
the class GlusterSyncJobTest method createDistVol.
private GlusterVolumeEntity createDistVol(String volName, Guid volId) {
GlusterVolumeEntity vol = createVolume(volName, volId);
vol.getAdvancedDetails().setCapacityInfo(getCapacityInfo(volId));
vol.addBrick(createBrick(volId, existingServer1, DIST_BRICK_D1));
vol.addBrick(createBrick(volId, existingServer1, DIST_BRICK_D2));
existingVolumes.add(vol);
return vol;
}
Aggregations