Merge "Fix remove_log_lines_end_json_str function"

This commit is contained in:
Zuul 2025-04-02 16:55:30 +00:00 committed by Gerrit Code Review
commit 24f4629e22
2 changed files with 2 additions and 3 deletions

View File

@ -211,8 +211,6 @@ class PodifiedTopology(rhosp.RhospTopology):
'check_function': iperf3.check_iperf3_client_results
}
if not ssh_client:
LOG.debug("Running iperf3 client in the POD is "
"implemented yet.")
kwargs['start_function'] = _openshift.start_iperf3
kwargs['liveness_function'] = _openshift.iperf3_pod_alive
kwargs['stop_function'] = _openshift.stop_iperf3_client

View File

@ -246,7 +246,8 @@ def check_iperf3_client_results(address: typing.Union[str, netaddr.IPAddress],
def remove_log_lines_end_json_str(json_str: str) -> str:
lines = json_str.splitlines()
while lines:
if lines[-1].strip() == "}":
last_line = lines[-1].strip()
if len(last_line) > 0 and last_line[-1] == "}":
# Stop when we find }
break
# Remove last line, remove possible error logs