Change in vdsm[master]: Added xml option in gluster command execution.
danken at redhat.com
danken at redhat.com
Wed Aug 22 13:31:27 UTC 2012
Dan Kenigsberg has posted comments on this change.
Change subject: Added xml option in gluster command execution.
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File vdsm/gluster/cli.py
Line 62: DISCONNECTED = 'DISCONNECTED'
Line 63: UNKNOWN = 'UNKNOWN'
Line 64:
Line 65:
Line 66: def _execGluster(cmd, xml=False):
the point is that there are two different functions, but they are bundled into one python function. that's not a good practice. so, yes, please have a _execGlusterXml() or whatever for the new functionality.
Line 67: if not xml:
Line 68: return utils.execCmd(cmd)
Line 69:
Line 70: cmd.append('--xml')
Line 77: msg = tree.find('opErrstr').text
Line 78: except (etree.ParseError, AttributeError):
Line 79: raise ge.GlusterXmlErrorException(err=out)
Line 80: if rv == '0':
Line 81: return (None, (tree, out))
sorry, I do not understand. Some time you have
(None, (tree, out))
and otherwise, in what seems like an error flow, you have
((rv, [msg]), None)
If the latter is indeed error condition, I suggest to raise an exception.
Line 82: else:
Line 83: return ((rv, [msg]), None)
Line 84:
Line 85:
--
To view, visit http://gerrit.ovirt.org/6999
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I385f992005d446b417be84eb7ff484e4edf6e5b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list