From 483500a2f159e29a9304a659c327b6be56f44cd3 Mon Sep 17 00:00:00 2001 From: Dhandapani Date: Mon, 25 Jul 2011 14:58:10 +0530 Subject: NFS volume Enable/Disable feature --- .../gluster/storage/management/server/utils/GlusterUtil.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/com.gluster.storage.management.server') diff --git a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/GlusterUtil.java b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/GlusterUtil.java index 22da9ca3..b7112c08 100644 --- a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/GlusterUtil.java +++ b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/GlusterUtil.java @@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.gluster.storage.management.core.constants.CoreConstants; +import com.gluster.storage.management.core.constants.GlusterConstants; import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; import com.gluster.storage.management.core.model.Brick; import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; @@ -447,6 +448,15 @@ public class GlusterUtil { if (line.matches("^[^:]*:.*$")) { int index = line.indexOf(':'); volume.setOption(line.substring(0, index).trim(), line.substring(index + 1, line.length()).trim()); + + if (line.substring(0, index).trim().equals(Volume.OPTION_NFS_DISABLE)) { + if (line.substring(index + 1, line.length()).trim().equals(GlusterConstants.ON)) { + volume.disableNFS(); + } else { + volume.enableNFS(); + } + } + return true; } return false; -- cgit