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; }
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; }
private GlusterVolumeEntity getVolume(Guid id) { GlusterVolumeEntity volumeEntity = new GlusterVolumeEntity(); volumeEntity.setId(id); volumeEntity.setName("test-vol"); volumeEntity.addAccessProtocol(AccessProtocol.GLUSTER); volumeEntity.addTransportType(TransportType.TCP); return volumeEntity; }