summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gateway
diff options
context:
space:
mode:
authorDhandapani <dhandapani@gluster.com>2011-10-20 10:14:51 +0530
committerDhandapani <dhandapani@gluster.com>2011-11-02 12:52:44 +0530
commitf236e29a2affad82354385e2c81a6b27890d0ca7 (patch)
tree2840d1c5abdd70d7cc695c25fb088bdbee7fe443 /src/com.gluster.storage.management.gateway
parent23256a8c5d9bdabb43960770a08015f177c5b012 (diff)
parent7e88adeca93e3a91cb94ae97dfeaaf34abeebe52 (diff)
Merge branch 'master' of git@github.com:gluster/console
Diffstat (limited to 'src/com.gluster.storage.management.gateway')
-rw-r--r--src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/resources/v1_0/VolumesResource.java4
-rw-r--r--src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/resources/v1_0/VolumesResource.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/resources/v1_0/VolumesResource.java
index bc38469e..14e7be8c 100644
--- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/resources/v1_0/VolumesResource.java
+++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/resources/v1_0/VolumesResource.java
@@ -37,7 +37,7 @@ import static com.gluster.storage.management.core.constants.RESTConstants.FORM_P
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_NAME;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_OPTIONS;
import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_TYPE;
-import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_FORCE_OPTION;
+import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_FORCE;
import static com.gluster.storage.management.core.constants.RESTConstants.PATH_PARAM_CLUSTER_NAME;
import static com.gluster.storage.management.core.constants.RESTConstants.PATH_PARAM_VOLUME_NAME;
import static com.gluster.storage.management.core.constants.RESTConstants.QUERY_PARAM_BRICKS;
@@ -196,7 +196,7 @@ public class VolumesResource extends AbstractResource {
@FormParam(FORM_PARAM_MIGRATE_DATA) Boolean isMigrateData,
@FormParam(FORM_PARAM_FORCED_DATA_MIGRATE) Boolean isForcedDataMigrate,
@FormParam(FORM_PARAM_CIFS_ENABLE) Boolean enableCifs, @FormParam(FORM_PARAM_CIFS_USERS) String cifsUsers,
- @FormParam(FORM_PARAM_BRICKS) String bricks, @FormParam(FORM_PARAM_FORCE_OPTION) Boolean force) {
+ @FormParam(FORM_PARAM_BRICKS) String bricks, @FormParam(FORM_PARAM_FORCE) Boolean force) {
if (clusterName == null || clusterName.isEmpty()) {
throw new GlusterValidationException("Cluster name must not be empty!");
}
diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java
index e44cebb5..1a86b9cd 100644
--- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java
+++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/services/VolumeService.java
@@ -708,20 +708,20 @@ public class VolumeService {
}
}
- public void performVolumeOperation(String clusterName, String volumeName, String operation, Boolean forceOption) {
+ public void performVolumeOperation(String clusterName, String volumeName, String operation, Boolean force) {
GlusterServer onlineServer = clusterService.getOnlineServer(clusterName);
try {
if (onlineServer == null) {
throw new GlusterRuntimeException("No online servers found in cluster [" + clusterName + "]");
}
- performOperation(clusterName, volumeName, operation, onlineServer, forceOption);
+ performOperation(clusterName, volumeName, operation, onlineServer, force);
} catch (Exception e) {
// check if online server has gone offline. If yes, try again one more time.
if (e instanceof ConnectionException || serverUtil.isServerOnline(onlineServer) == false) {
// online server has gone offline! try with a different one.
onlineServer = clusterService.getNewOnlineServer(clusterName);
- performOperation(clusterName, volumeName, operation, onlineServer, forceOption);
+ performOperation(clusterName, volumeName, operation, onlineServer, force);
} else {
throw new GlusterRuntimeException(e.getMessage());
}
@@ -729,7 +729,7 @@ public class VolumeService {
}
private void performOperation(String clusterName, String volumeName, String operation, GlusterServer onlineServer,
- Boolean forceOption) {
+ Boolean force) {
Volume volume = null;
try {
volume = getVolume(clusterName, volumeName);
@@ -739,9 +739,9 @@ public class VolumeService {
}
if (operation.equals(TASK_START)) {
- startVolume(clusterName, onlineServer, volume, forceOption);
+ startVolume(clusterName, onlineServer, volume, force);
} else if (operation.equals(TASK_STOP)) {
- stopVolume(clusterName, onlineServer, volume, forceOption);
+ stopVolume(clusterName, onlineServer, volume, force);
} else {
throw new GlusterValidationException("Invalid operation code [" + operation + "]");
}