Bala.FA 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): Done 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)) The return value is (err, xmlout), here err=(rv, msg), xmlout=(tree, out). Either one is set based on rv. Issue in raising exception is that each command function should catch and raise again with appropriate exception specific to the function. If this is OK, I can do the change accordingly 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 <barum...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Bala.FA <barum...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Timothy Asir <tjeya...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches