Merge "Fix remove_log_lines_end_json_str function"
This commit is contained in:
commit
24f4629e22
@ -211,8 +211,6 @@ class PodifiedTopology(rhosp.RhospTopology):
|
|||||||
'check_function': iperf3.check_iperf3_client_results
|
'check_function': iperf3.check_iperf3_client_results
|
||||||
}
|
}
|
||||||
if not ssh_client:
|
if not ssh_client:
|
||||||
LOG.debug("Running iperf3 client in the POD is "
|
|
||||||
"implemented yet.")
|
|
||||||
kwargs['start_function'] = _openshift.start_iperf3
|
kwargs['start_function'] = _openshift.start_iperf3
|
||||||
kwargs['liveness_function'] = _openshift.iperf3_pod_alive
|
kwargs['liveness_function'] = _openshift.iperf3_pod_alive
|
||||||
kwargs['stop_function'] = _openshift.stop_iperf3_client
|
kwargs['stop_function'] = _openshift.stop_iperf3_client
|
||||||
|
@ -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:
|
def remove_log_lines_end_json_str(json_str: str) -> str:
|
||||||
lines = json_str.splitlines()
|
lines = json_str.splitlines()
|
||||||
while lines:
|
while lines:
|
||||||
if lines[-1].strip() == "}":
|
last_line = lines[-1].strip()
|
||||||
|
if len(last_line) > 0 and last_line[-1] == "}":
|
||||||
# Stop when we find }
|
# Stop when we find }
|
||||||
break
|
break
|
||||||
# Remove last line, remove possible error logs
|
# Remove last line, remove possible error logs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user