diff options
| author | Selvam <selvam@gluster.com> | 2011-04-15 16:10:10 +0530 |
|---|---|---|
| committer | Selvam <selvam@gluster.com> | 2011-04-15 16:35:19 +0530 |
| commit | 7e6efca549922972ab18074af8337b5105f0cfcd (patch) | |
| tree | 107570fb0213d379e1703bcad912644b99729725 /src/com.gluster.storage.management.client | |
| parent | 0260cedde3b852047b7b6bf2fd1843a7a4e3f934 (diff) | |
[Bug 2693] New: Volumes are not listed in the Volumes node
Alert section implemented in the volume summary page
Diffstat (limited to 'src/com.gluster.storage.management.client')
| -rw-r--r-- | src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterDataModelManager.java | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterDataModelManager.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterDataModelManager.java index 8d6d5002..815ba853 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterDataModelManager.java +++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterDataModelManager.java @@ -118,13 +118,10 @@ public class GlusterDataModelManager { setSecurityToken(securityToken); Cluster cluster = new Cluster("Home", model); - VolumesClient volumeClient = new VolumesClient(securityToken); initializeGlusterServers(cluster); - - // initializeVolumes(cluster); - VolumeListResponse response = volumeClient.getAllVolumes(); - cluster.setVolumes(response.getVolumes()); + initializeVolumes(cluster); + initializeAutoDiscoveredServers(cluster); initializeDisks(); @@ -167,26 +164,12 @@ public class GlusterDataModelManager { } private void initializeVolumes(Cluster cluster) { - List<Volume> volumes = new ArrayList<Volume>(); - - volume1 = addVolume(volumes, "Volume1", cluster, VOLUME_TYPE.PLAIN_DISTRIBUTE, TRANSPORT_TYPE.ETHERNET, - VOLUME_STATUS.ONLINE); - - volume2 = addVolume(volumes, "Volume2", cluster, VOLUME_TYPE.PLAIN_DISTRIBUTE, TRANSPORT_TYPE.ETHERNET, - VOLUME_STATUS.ONLINE); - - volume3 = addVolume(volumes, "Volume3", cluster, VOLUME_TYPE.DISTRIBUTED_MIRROR, TRANSPORT_TYPE.ETHERNET, - VOLUME_STATUS.OFFLINE); - volume3.setReplicaCount(2); - - volume4 = addVolume(volumes, "Volume4", cluster, VOLUME_TYPE.PLAIN_DISTRIBUTE, TRANSPORT_TYPE.ETHERNET, - VOLUME_STATUS.ONLINE); - - volume5 = addVolume(volumes, "Volume5", cluster, VOLUME_TYPE.DISTRIBUTED_STRIPE, TRANSPORT_TYPE.INFINIBAND, - VOLUME_STATUS.OFFLINE); - volume5.setStripeCount(3); - - cluster.setVolumes(volumes); + VolumesClient volumeClient = new VolumesClient(securityToken); + VolumeListResponse response = volumeClient.getAllVolumes(); + if(!response.getStatus().isSuccess()) { + throw new GlusterRuntimeException("Error fetching volume list: [" + response.getStatus() + "]"); + } + cluster.setVolumes(response.getVolumes()); } private void initializeDisks() { |
