Aravinda VK has posted comments on this change.

Change subject: gluster: new vdsm verb glusterHostUUIDGet
......................................................................


Patch Set 7: No score

(3 inline comments)

....................................................
File vdsm/gluster/cli.py
Line 110: 
Line 111: def _getGlusterUuid():
Line 112:     command = _getGlusterSystemCmd() + ["uuid", "get"]
Line 113:     rc, out, err = _execGluster(command)
Line 114:     if not rc:
If error then condition will fail and returns empty string.
Line 115:         try:
Line 116:             return dict(["".join(out).split(': ', 1)]).get('UUID', '')
Line 117:         except ValueError:
Line 118:             # Empty string will be returned in the end so just


Line 112:     command = _getGlusterSystemCmd() + ["uuid", "get"]
Line 113:     rc, out, err = _execGluster(command)
Line 114:     if not rc:
Line 115:         try:
Line 116:             return dict(["".join(out).split(': ', 1)]).get('UUID', '')
Done
Line 117:         except ValueError:
Line 118:             # Empty string will be returned in the end so just
Line 119:             # ignore the ValueError here
Line 120:             pass


Line 118:             # Empty string will be returned in the end so just
Line 119:             # ignore the ValueError here
Line 120:             pass
Line 121: 
Line 122:     return ''
Exception is raised if UUID is empty in the "hostUUIDGet" below. 

This was the existing function which was consumed by "peerStatus" verb, so 
return value is not changed. 

Failure cases are when gluster cli fails to return or parsing issue.
Line 123: 
Line 124: 
Line 125: def _parseVolumeStatus(tree):
Line 126:     status = {'name': 
tree.find('volStatus/volumes/volume/volName').text,


-- 
To view, visit http://gerrit.ovirt.org/13785
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idf48b4c9530c48b2c46234d98c8cb4244adf22fd
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Aravinda VK <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Aravinda VK <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Bala.FA <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Timothy Asir <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to