def METHOD_NAME(self, vcpuQuota, vcpuPeriod):
    # Get vms' statistics before the operation.
    status, msg, statsList = self.s.getAllVmStats()
    self.assertEqual(status, SUCCESS, msg)
    # Filter all vms' statistics to get balloon operation candidates.
    candidateStats = [s for s in statsList if self._statsOK(s)]
    # Set the balloon target to initial value before shrink
    # or grow operation.
    # The initial value is max for shrink operation and
    # 0.95*max for grow operation.
    for stats in candidateStats:
        status, msg = self.s.setCpuTuneQuota(
            stats['vmId'],
            vcpuQuota)
        self.assertEqual(status, SUCCESS, msg)
        status, msg = self.s.setCpuTunePeriod(
            stats['vmId'],
            vcpuPeriod)
        self.assertEqual(status, SUCCESS, msg)