Francesco Romani has posted comments on this change.

Change subject: caps: replacing minidom with ElementTree in caps.py
......................................................................


Patch Set 12: Code-Review-1

(4 comments)

thanks for switching to find(), looks nicer now. Now let's do the same in 
capsTests.py

https://gerrit.ovirt.org/#/c/41078/12//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: caps: replacing minidom with ElementTree in caps.py
Line 8: 
Line 9: minidom is replaced by ElementTree.py in caps.py. This is because ET is
Line 10: faster, and we want to elinate using two similar libs in the code
worth to mention (but only if you're about to do another upload) that ET has 
nicer and better documented API.
Line 11: 
Line 12: Change-Id: I8c1ca58807515922347e2255c77b4f950decd619


https://gerrit.ovirt.org/#/c/41078/12/tests/capsTests.py
File tests/capsTests.py:

Line 203:         capsFile = 
self._readCaps("caps_libvirt_intel_i73770_nosnap.out")
Line 204:         capsData = ET.fromstring(capsFile)
Line 205: 
Line 206:         guests = capsData.iter(tag='guest')
Line 207: 
find()?
Line 208:         result = caps._findLiveSnapshotSupport(guests.next())
Line 209:         self.assertIsNone(result)
Line 210: 
Line 211:         result = caps._findLiveSnapshotSupport(guests.next())


Line 204:         capsData = ET.fromstring(capsFile)
Line 205: 
Line 206:         guests = capsData.iter(tag='guest')
Line 207: 
Line 208:         result = caps._findLiveSnapshotSupport(guests.next())
same as above
Line 209:         self.assertIsNone(result)
Line 210: 
Line 211:         result = caps._findLiveSnapshotSupport(guests.next())
Line 212:         self.assertFalse(result)


Line 245:         capsData = self._readCaps("caps_libvirt_intel_i73770.out")
Line 246: 
Line 247:         result = 
caps._getLiveSnapshotSupport(UNSUPPORTED_ARCHITECTURE,
Line 248:                                               capsData)
Line 249: 
nice, but unrelated. In general we should aim to keep patches minimal.
Line 250:         self.assertIsNone(result)
Line 251: 
Line 252:         result = 
caps._getLiveSnapshotSupport(caps.Architecture.X86_64,
Line 253:                                               capsData)


-- 
To view, visit https://gerrit.ovirt.org/41078
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8c1ca58807515922347e2255c77b4f950decd619
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to