Change in vdsm[master]: Added xml option in gluster command execution.

barumuga at redhat.com barumuga at redhat.com
Thu Aug 23 07:14:49 UTC 2012


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 <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