Commit 5afec8db authored by hardy's avatar hardy

fix ping analysis if no threshold defined + escape if scp fails

parent 6ccc419d
......@@ -112,14 +112,18 @@ def GetPingTimeAnalysis(RAN,ping_log_file,ping_rttavg_threshold):
else:
y_max=YMAX+1
plt.ylim(0,y_max)
if ping_rttavg_threshold != '':
th_label="AVG Ping Fail Threshold="+ping_rttavg_threshold
plt.axhline(y=float(ping_rttavg_threshold), color='r', linestyle='-',label=th_label)
axis.legend()
plt.savefig(ping_log_file+'.png')
#copy the png file already to enb to move it move it later into the artifacts
try:
mySSH = sshconnection.SSHConnection()
mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file+'.png', RAN.eNBSourceCodePath + '/cmake_targets/')
except:
logging.debug('\u001B[1;37;41m Ping PNG SCP to eNB FAILED\u001B[0m')
return ping_stat
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment