summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster
diff options
context:
space:
mode:
authorsayaleeraut <saraut@redhat.com>2020-02-13 10:49:17 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-02-14 03:47:54 +0000
commit58a71f32c632c433c2db2672bb21fb2781dfac87 (patch)
treedc6c181a0397ce623f0ce4972edd73b273b045c1 /glustolibs-gluster/glustolibs/gluster
parent7de00fc74625efe9a35d4a5ae1da02d9737b2763 (diff)
[LibFix] Fix volume type check
Earlier the elements passed in list for volume type check were ('replicate', 'disperse', 'arbiter'), but as the volume type returned by get_volume_type() will be in the format 'Replicate', 'Disperse', 'Arbiter' and lists are case sensitive, these changes will make sure it does not change. Change-Id: Ic73ca946cd9c06bfa5b92605dbeba74d6ffa83d9 Signed-off-by: sayaleeraut <saraut@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/brickdir.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/brickdir.py b/glustolibs-gluster/glustolibs/gluster/brickdir.py
index 29db08b..ffc868b 100644
--- a/glustolibs-gluster/glustolibs/gluster/brickdir.py
+++ b/glustolibs-gluster/glustolibs/gluster/brickdir.py
@@ -96,10 +96,10 @@ def get_hashrange(brickdir_path):
return None
elif gluster_version >= 6.0:
ret = get_volume_type(brickdir_path)
- if ret in ('replicate', 'disperse', 'arbiter'):
+ if ret in ('Replicate', 'Disperse', 'Arbiter'):
g.log.info("Cannot find hash-range for Replicate/Disperse/Arbiter"
" volume type on Gluster 6.0 and higher.")
- return "Skipping for replicate/disperse/arbiter volume type"
+ return "Skipping for Replicate/Disperse/Arbiter volume type"
else:
ret = check_hashrange(brickdir_path)
hash_range_low = ret[0]
@@ -156,7 +156,7 @@ class BrickDir(object):
self._hashrange_high = self._hashrange[1]
elif gluster_version >= 6.0:
ret = get_volume_type(self._path)
- if ret in ('replicate', 'disperse', 'arbiter'):
+ if ret in ('Replicate', 'Disperse', 'Arbiter'):
g.log.info("Cannot find hash-range as the volume type under"
" test is Replicate/Disperse/Arbiter")
else:
@@ -210,7 +210,7 @@ class BrickDir(object):
gluster_version = get_gluster_version(self._host)
if gluster_version >= 6.0:
ret = get_volume_type(self._path)
- if ret in ('replicate', 'disperse', 'arbiter'):
+ if ret in ('Replicate', 'Disperse', 'Arbiter'):
g.log.info("Cannot find hash-range as the volume type"
" under test is Replicate/Disperse/Arbiter")
else: