Doron Fediuck has posted comments on this change. Change subject: mom: add mom balloon functional tests for running vms ......................................................................
Patch Set 6: (2 inline comments) .................................................... File tests/functional/momTests.py Line 67: self.assertEqual(bool(run), hostStats['ksmState']) Line 68: self.assertEqual(pages_to_scan, hostStats['ksmPages']) Line 69: Line 70: def _statsOK(self, stats): Line 71: try: True ;) Line 72: if stats['status'] == 'Running' and stats['balloonInfo'] \ Line 73: and stats['memoryStats']: Line 74: return True Line 75: else: Line 81: # Filter all vms' statistics to get balloon operation candidates. Line 82: candidateStats = [] Line 83: for stats in vmsStats: Line 84: if self._statsOK(stats): Line 85: candidateStats.append(stats) Once you learn filter, it looks more readable than the alternative. However, people should be aware of filter to appreciate it... Line 86: Line 87: # Set the balloon target to initial value before shrink Line 88: # or grow operation. Line 89: # The initial value is max for shrink operation and -- To view, visit http://gerrit.ovirt.org/13156 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I922568233dc769d83e2fdffe1c24439d13d03d7e Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mei Liu <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Doron Fediuck <[email protected]> Gerrit-Reviewer: Mark Wu <[email protected]> Gerrit-Reviewer: Martin Sivák <[email protected]> Gerrit-Reviewer: Mei Liu <[email protected]> Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
