summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xglusternagios/glustercli.py2
-rw-r--r--tests/test_glustercli.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/glusternagios/glustercli.py b/glusternagios/glustercli.py
index 5753811..ff4781b 100755
--- a/glusternagios/glustercli.py
+++ b/glusternagios/glustercli.py
@@ -403,7 +403,7 @@ def _parseVolumeInfo(tree):
#it returns an empty list when gluster doesnot return uuid
try:
brickDetail['name'] = d.find('name').text
- #brickDetail['hostUuid'] = d.find('hostUuid').text
+ brickDetail['hostUuid'] = d.find('hostUuid').text
value['bricksInfo'].append(brickDetail)
except AttributeError:
break
diff --git a/tests/test_glustercli.py b/tests/test_glustercli.py
index 1f240fa..526aa6e 100644
--- a/tests/test_glustercli.py
+++ b/tests/test_glustercli.py
@@ -61,8 +61,10 @@ class GlusterCliTests(TestCaseBase):
<transport>0</transport>
<bricks>
<brick>192.168.122.2:/tmp/m_b1<name>192.168.122.2:/tmp/m_b1</name>
+ <hostUuid>883c7829-d808-4a92-a414-db87061097b3</hostUuid>
</brick>
<brick>192.168.122.2:/tmp/m_b2<name>192.168.122.2:/tmp/m_b2</name>
+ <hostUuid>883c7829-d808-4a92-a414-db87061097b3</hostUuid>
</brick>
</bricks>
<optCount>1</optCount>
@@ -87,6 +89,7 @@ class GlusterCliTests(TestCaseBase):
<transport>1</transport>
<bricks>
<brick>192.168.122.2:/tmp/t_b1<name>192.168.122.2:/tmp/t_b1</name>
+ <hostUuid>883c7829-d808-4a92-a414-db87061097b3</hostUuid>
</brick>
</bricks>
<optCount>0</optCount>
@@ -105,8 +108,10 @@ class GlusterCliTests(TestCaseBase):
'distCount': '2',
'bricksInfo': [{
'name': '192.168.122.2:/tmp/m_b1',
+ 'hostUuid': '883c7829-d808-4a92-a414-db87061097b3'
}, {
'name': '192.168.122.2:/tmp/m_b2',
+ 'hostUuid': '883c7829-d808-4a92-a414-db87061097b3'
}],
'options': {'auth.allow': '*'},
'replicaCount': '2',
@@ -121,6 +126,7 @@ class GlusterCliTests(TestCaseBase):
'distCount': '1',
'bricksInfo': [{
'name': '192.168.122.2:/tmp/t_b1',
+ 'hostUuid': '883c7829-d808-4a92-a414-db87061097b3'
}],
'options': {},
'replicaCount': '1',