summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/volume_ops.py
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/volume_ops.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/volume_ops.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/volume_ops.py b/glustolibs-gluster/glustolibs/gluster/volume_ops.py
index 6770b1d3e..503f2c2f1 100644
--- a/glustolibs-gluster/glustolibs/gluster/volume_ops.py
+++ b/glustolibs-gluster/glustolibs/gluster/volume_ops.py
@@ -539,6 +539,20 @@ def set_volume_options(mnode, volname, options):
set_volume_option("abc.com", "testvol", options)
"""
_rc = True
+
+ # Check if group options are specified.
+ if 'group' in options:
+ group_options = options.pop('group')
+ if isinstance(group_options, str):
+ group_options = [group_options]
+ for group_option in group_options:
+ cmd = ("gluster volume set %s group %s --mode=script" %
+ (volname, group_option))
+ ret, _, _ = g.run(mnode, cmd)
+ if ret != 0:
+ g.log.error("Unable to set group option: %s", group_option)
+ _rc = False
+
for option in options:
cmd = ("gluster volume set %s %s %s --mode=script"
% (volname, option, options[option]))