summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/volume_libs.py
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2016-11-16 17:36:15 +0530
committerJonathan Holloway <jholloway@redhat.com>2016-12-12 08:01:33 -0800
commit3070312c13e02cace3041d3429b0c31fc10b73ee (patch)
tree15b202c91c00fd93ab5559bced17b2e7fa27127f /glustolibs-gluster/glustolibs/gluster/volume_libs.py
parentb7aea27f6662fd5b0344c6dbffcf2b9a86c1f8cc (diff)
Clean up pyflakes and pep8 errors
Change-Id: Ibdd092118d3bb912716c46fd278ef3c680a6e742 Signed-off-by: Nigel Babu <nigelb@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/volume_libs.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/volume_libs.py28
1 files changed, 11 insertions, 17 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/volume_libs.py b/glustolibs-gluster/glustolibs/gluster/volume_libs.py
index 24aac82..520e8af 100644
--- a/glustolibs-gluster/glustolibs/gluster/volume_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/volume_libs.py
@@ -192,12 +192,6 @@ def setup_volume(mnode, all_servers_info, volume_config, force=False):
g.log.error("Invalid volume type defined in config")
return False
- # Get transport type
- if 'transport' in volume_config['voltype']:
- transpor_type = volume_config['voltype']['transport']
- else:
- transport_type = 'tcp'
-
# get bricks_list
bricks_list = form_bricks_list(mnode=mnode, volname=volname,
number_of_bricks=number_of_bricks,
@@ -335,14 +329,14 @@ def setup_volume(mnode, all_servers_info, volume_config, force=False):
return False
# Enable Ganesha
-## if ('nfs_ganesha' in volume_config and
-## 'enable' in volume_config['nfs_ganesha'] and
-## volume_config['nfs_ganesha']['enable']):
-## from glustolibs.gluster.ganesha import vol_set_ganesha
-## ret = vol_set_ganesha(mnode=mnode, volname=volname, option=True)
-## if not ret:
-## g.log.error("failed to set the ganesha option for %s" % volname)
-## return False
+# if ('nfs_ganesha' in volume_config and
+# 'enable' in volume_config['nfs_ganesha'] and
+# volume_config['nfs_ganesha']['enable']):
+# from glustolibs.gluster.ganesha import vol_set_ganesha
+# ret = vol_set_ganesha(mnode=mnode, volname=volname, option=True)
+# if not ret:
+# g.log.error("failed to set the ganesha option for %s" % volname)
+# return False
# Enable Samba
if ('smb' in volume_config and 'enable' in volume_config['smb'] and
@@ -479,7 +473,7 @@ def get_subvols(mnode, volname):
# Disperse or Distribute-Disperse volume
elif (cold_tier_type == 'Disperse' or
- cold_tier_type == 'Distributed-Disperse'):
+ cold_tier_type == 'Distributed-Disperse'):
disp_count = sum([int(nums) for nums in
((volinfo[volname]["bricks"]['coldBricks']
['numberOfBricks']).split("x", 1)[1].
@@ -641,8 +635,8 @@ def get_volume_type_info(mnode, volname):
if key in volinfo[volname]:
non_tiered_volume_type_info[key] = volinfo[volname][key]
else:
- g.log.error("Unable to find key '%s' in the volume info for the "
- "volume %s" % (key, volname))
+ g.log.error("Unable to find key '%s' in the volume info for "
+ "the volume %s" % (key, volname))
non_tiered_volume_type_info[key] = None
volume_type_info['volume_type_info'] = non_tiered_volume_type_info