summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java
diff options
context:
space:
mode:
authorSelvasundaram <selvam@gluster.com>2011-11-24 14:28:46 +0530
committerSelvasundaram <selvam@gluster.com>2011-11-24 14:28:46 +0530
commit8c7203104004e425579a4fcbc1b9b91bb82f8f2e (patch)
tree4cdbc20ee60ddffde626ae2b1ff9215e406fb635 /src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java
parent7476d5ee5b3f96ef8b637a4a016634cb1d098187 (diff)
Disk Initialization enhanced with user selectable file system and mount point
Diffstat (limited to 'src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java')
-rw-r--r--src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java
index 3d27afb2..cb3519b1 100644
--- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java
+++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java
@@ -31,6 +31,7 @@ import com.gluster.storage.management.core.constants.RESTConstants;
import com.gluster.storage.management.core.model.GlusterServer;
import com.gluster.storage.management.core.model.ServerStats;
import com.gluster.storage.management.core.response.GlusterServerListResponse;
+import com.gluster.storage.management.core.response.StringListResponse;
import com.gluster.storage.management.core.utils.GlusterCoreUtil;
import com.sun.jersey.api.representation.Form;
import com.sun.jersey.core.util.MultivaluedMapImpl;
@@ -76,9 +77,16 @@ public class GlusterServersClient extends AbstractClient {
return postRequest(form);
}
- public URI initializeDisk(String serverName, String diskName, String fsType) {
+ public List<String> getFSType(String serverName) {
+ List<String> fsType = ((StringListResponse) fetchSubResource(serverName + "/" + RESTConstants.RESOURCE_FSTYPE,
+ StringListResponse.class)).getData();
+ return fsType;
+ }
+
+ public URI initializeDisk(String serverName, String diskName, String fsType, String mountPoint) {
Form form = new Form();
form.add(RESTConstants.FORM_PARAM_FSTYPE, fsType);
+ form.add(RESTConstants.FORM_PARAM_MOUNTPOINT, fsType);
return putRequestURI(serverName + "/" + RESTConstants.RESOURCE_DISKS + "/" + diskName, form);
}