- if test.status == "PASS" and ("NDRPDRDISC" in tags or
- "NDRPDR" in tags or
- "SOAK" in tags or
- "TCP" in tags or
- "MRR" in tags or
- "BMRR" in tags or
- "RECONF" in tags):
- # TODO: Remove when definitely no NDRPDRDISC tests are used:
- if "NDRDISC" in tags:
- test_result["type"] = "NDR"
- # TODO: Remove when definitely no NDRPDRDISC tests are used:
- elif "PDRDISC" in tags:
- test_result["type"] = "PDR"
- elif "NDRPDR" in tags:
- test_result["type"] = "NDRPDR"
- elif "SOAK" in tags:
- test_result["type"] = "SOAK"
- elif "TCP" in tags:
- test_result["type"] = "TCP"
- elif "MRR" in tags:
- test_result["type"] = "MRR"
- elif "FRMOBL" in tags or "BMRR" in tags:
- test_result["type"] = "BMRR"
- elif "RECONF" in tags:
- test_result["type"] = "RECONF"
- else:
- test_result["status"] = "FAIL"
- self._data["tests"][self._test_ID] = test_result
- return
-
- # TODO: Remove when definitely no NDRPDRDISC tests are used:
- if test_result["type"] in ("NDR", "PDR"):
- try:
- rate_value = str(re.search(
- self.REGEX_RATE, test.message).group(1))
- except AttributeError:
- rate_value = "-1"
- try:
- rate_unit = str(re.search(
- self.REGEX_RATE, test.message).group(2))
- except AttributeError:
- rate_unit = "-1"
-
- test_result["throughput"] = dict()
- test_result["throughput"]["value"] = \
- int(rate_value.split('.')[0])
- test_result["throughput"]["unit"] = rate_unit
- test_result["latency"] = \
- self._get_latency(test.message, test_result["type"])
- if test_result["type"] == "PDR":
- test_result["lossTolerance"] = str(re.search(
- self.REGEX_TOLERANCE, test.message).group(1))
-
- elif test_result["type"] in ("NDRPDR", ):
- test_result["throughput"], test_result["status"] = \