summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Asir <tjeyasin@redhat.com>2014-04-16 13:54:14 +0530
committerBala.FA <barumuga@redhat.com>2014-04-28 16:20:46 +0530
commit62a32a2a82abc880d9374ce446dba971849ed8e1 (patch)
tree9c444c65eb62f72daa16cc17a3e426644998b6a8
parentd8a700fae2a92e8f447e9fa64844028a7cfc56e9 (diff)
enable volumeInfo to provide host uuid
Change-Id: If1f9d22c59200f707c5a86d0f89628a2d8380d55 Signed-off-by: Timothy Asir <tjeyasin@redhat.com>
-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',