Commit 8d96488e authored by hardy's avatar hardy

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

parent 5c2c8124
...@@ -112,14 +112,18 @@ def GetPingTimeAnalysis(RAN,ping_log_file,ping_rttavg_threshold): ...@@ -112,14 +112,18 @@ def GetPingTimeAnalysis(RAN,ping_log_file,ping_rttavg_threshold):
else: else:
y_max=YMAX+1 y_max=YMAX+1
plt.ylim(0,y_max) plt.ylim(0,y_max)
if ping_rttavg_threshold != '':
th_label="AVG Ping Fail Threshold="+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) plt.axhline(y=float(ping_rttavg_threshold), color='r', linestyle='-',label=th_label)
axis.legend() axis.legend()
plt.savefig(ping_log_file+'.png') plt.savefig(ping_log_file+'.png')
#copy the png file already to enb to move it move it later into the artifacts #copy the png file already to enb to move it move it later into the artifacts
try:
mySSH = sshconnection.SSHConnection() mySSH = sshconnection.SSHConnection()
mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file+'.png', RAN.eNBSourceCodePath + '/cmake_targets/') 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 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