summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.client/src/com/gluster/storage/management
diff options
context:
space:
mode:
authorDhandapani <dhandapani@gluster.com>2011-08-01 11:20:36 +0530
committerDhandapani <dhandapani@gluster.com>2011-08-02 17:24:22 +0530
commit397232596f760b9bbe6aa2ed02fc4161fced13c0 (patch)
tree1457ea64aa804275d4f2740dcc5b332c5e0d17e1 /src/com.gluster.storage.management.client/src/com/gluster/storage/management
parent5e89ccaac396f3ff780fea8558b72ea3a29c5030 (diff)
Story #56: CIFS Feature
Diffstat (limited to 'src/com.gluster.storage.management.client/src/com/gluster/storage/management')
-rw-r--r--src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java2
-rw-r--r--src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java2
-rw-r--r--src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java2
-rw-r--r--src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java12
4 files changed, 11 insertions, 7 deletions
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java
index 0185084c..d6bf962a 100644
--- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java
+++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java
@@ -24,8 +24,6 @@ import static com.gluster.storage.management.core.constants.RESTConstants.RESOUR
import java.util.List;
-import com.gluster.storage.management.core.exceptions.GlusterRuntimeException;
-import com.gluster.storage.management.core.model.Status;
import com.gluster.storage.management.core.response.ClusterNameListResponse;
import com.sun.jersey.api.representation.Form;
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java
index c85cdffd..e1b8f234 100644
--- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java
+++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java
@@ -25,9 +25,7 @@ import java.util.List;
import javax.ws.rs.core.MultivaluedMap;
-import com.gluster.storage.management.core.model.GlusterServer;
import com.gluster.storage.management.core.model.Server;
-import com.gluster.storage.management.core.response.GenericResponse;
import com.gluster.storage.management.core.response.ServerListResponse;
import com.gluster.storage.management.core.response.ServerNameListResponse;
import com.gluster.storage.management.core.utils.GlusterCoreUtil;
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 3bc22370..85c7d383 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
@@ -28,9 +28,7 @@ import javax.ws.rs.core.MultivaluedMap;
import com.gluster.storage.management.core.constants.RESTConstants;
import com.gluster.storage.management.core.model.GlusterServer;
-import com.gluster.storage.management.core.model.Server;
import com.gluster.storage.management.core.model.ServerStats;
-import com.gluster.storage.management.core.model.ServerStatsRow;
import com.gluster.storage.management.core.response.GlusterServerListResponse;
import com.gluster.storage.management.core.utils.GlusterCoreUtil;
import com.sun.jersey.api.representation.Form;
diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java
index 3435b2e1..fb254d26 100644
--- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java
+++ b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java
@@ -22,6 +22,8 @@ package com.gluster.storage.management.client;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_ACCESS_PROTOCOLS;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_BRICKS;
+import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_CIFS_ENABLE;
+import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_CIFS_USERS;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_REPLICA_COUNT;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_STRIPE_COUNT;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_TRANSPORT_TYPE;
@@ -40,7 +42,6 @@ import com.gluster.storage.management.core.constants.CoreConstants;
import com.gluster.storage.management.core.constants.GlusterConstants;
import com.gluster.storage.management.core.constants.RESTConstants;
import com.gluster.storage.management.core.model.Brick;
-import com.gluster.storage.management.core.model.TaskInfo;
import com.gluster.storage.management.core.model.Volume;
import com.gluster.storage.management.core.model.VolumeLogMessage;
import com.gluster.storage.management.core.model.VolumeOptionInfo;
@@ -81,6 +82,7 @@ public class VolumesClient extends AbstractClient {
form.add(FORM_PARAM_BRICKS, StringUtil.collectionToString(volume.getBricks(), ","));
form.add(FORM_PARAM_ACCESS_PROTOCOLS, StringUtil.collectionToString(volume.getNASProtocols(), ","));
form.add(FORM_PARAM_VOLUME_OPTIONS, StringUtil.collectionToString(volume.getOptions().getOptions(), ","));
+ form.add(FORM_PARAM_CIFS_USERS, StringUtil.collectionToString(volume.getCifsUsers(), ","));
postRequest(form);
}
@@ -99,6 +101,14 @@ public class VolumesClient extends AbstractClient {
performOperation(volumeName, RESTConstants.TASK_STOP);
}
+ public void setCifsConfig(String volumeName, Boolean isCifsEnabled, String cifsUsers) {
+ Form form = new Form();
+ form.add(RESTConstants.FORM_PARAM_OPERATION, RESTConstants.TASK_CIFS_CONFIG);
+ form.add(RESTConstants.FORM_PARAM_CIFS_ENABLE, isCifsEnabled);
+ form.add(RESTConstants.FORM_PARAM_CIFS_USERS, cifsUsers);
+ putRequest(volumeName, form);
+ }
+
public boolean volumeExists(String volumeName) {
try {
// TODO: instead of fetching full volume name, fetch list of volumes and check if