diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index e698388e2f4293d063294097c54d4cac8f8aacf5..d126ad66c6c38eec818122a19e1d3968b89bb4b2 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -977,6 +977,17 @@ class V3BWFile(object): key=lambda l: l.bw) return cls(header, bw_lines) + @staticmethod + def set_under_min_report(bw_lines): + """ + Mondify the Bandwidth Lines adding the KeyValue `under_min_report`, + `vote`. + """ + log.debug("Setting `under_min_report` to %s lines.", len(bw_lines)) + for l in bw_lines: + l.under_min_report = 1 + l.vote = 0 + @staticmethod def bw_kb(bw_lines, reverse=False): bw_lines_scaled = copy.deepcopy(bw_lines)