summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.client
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-04-05 19:47:23 +0530
committerSelvam <selvam@gluster.com>2011-04-06 18:02:46 +0530
commit4c69fc2e2a653d39216505ba583c428fb659d377 (patch)
treecb605ead9b50c3b94e33591d8ca6165435a38dd6 /src/com.gluster.storage.management.client
parentc3c30b10360ac6c994ad72d9b857231b033a29f9 (diff)
Alerts and running task UI stories review updates
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.java8
-rw-r--r--src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/RunningTaskClient.java5
2 files changed, 9 insertions, 4 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 2dd91620..3c06315d 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
@@ -23,6 +23,7 @@ import java.util.Arrays;
import java.util.Date;
import java.util.List;
+import com.gluster.storage.management.core.exceptions.GlusterRuntimeException;
import com.gluster.storage.management.core.model.Cluster;
import com.gluster.storage.management.core.model.ClusterListener;
import com.gluster.storage.management.core.model.Disk;
@@ -40,6 +41,7 @@ import com.gluster.storage.management.core.model.Volume;
import com.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE;
import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS;
import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE;
+import com.gluster.storage.management.core.response.RunningTaskListResponse;
import com.gluster.storage.management.core.response.VolumeListResponse;
import com.gluster.storage.management.client.VolumesClient;
@@ -250,7 +252,11 @@ public class GlusterDataModelManager {
}
public void initializeRunningTasks(Cluster cluster) {
- cluster.setRunningTasks(new RunningTaskClient(securityToken).getRunningTasks());
+ RunningTaskListResponse runningTaskResponse = new RunningTaskClient(securityToken).getRunningTasks();
+ if (!runningTaskResponse.getStatus().isSuccess()) {
+ throw new GlusterRuntimeException(runningTaskResponse.getStatus().getMessage());
+ }
+ cluster.setRunningTasks( runningTaskResponse.getRunningTasks());
}
public void initializeAlerts(Cluster cluster) {
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/RunningTaskClient.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/RunningTaskClient.java
index eb5f1f3b..856eff61 100644
--- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/RunningTaskClient.java
+++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/RunningTaskClient.java
@@ -23,8 +23,7 @@ public class RunningTaskClient extends AbstractClient {
return fetchResource( responseClass );
}
- public List<RunningTask> getRunningTasks() {
- RunningTaskListResponse response = (RunningTaskListResponse) fetchRunningTasks( RunningTaskListResponse.class );
- return response.getRunningTasks();
+ public RunningTaskListResponse getRunningTasks() {
+ return (RunningTaskListResponse) fetchRunningTasks( RunningTaskListResponse.class );
}
}