Minor bug fixes

This commit is contained in:
bealler
2021-01-31 12:56:21 -05:00
parent abbc1476d3
commit edb9c693c3
2 changed files with 9 additions and 4 deletions

View File

@@ -1874,7 +1874,7 @@ for key in ap_models:
passed_tests = sum(x == "passed" for x in report_data["tests"][key].values())
failed_tests = sum(y == "failed" for y in report_data["tests"][key].values())
error_tests = sum(z == "error" for z in report_data["tests"][key].values())
no_of_tests = passed_tests + failed_tests + error_tests
no_of_tests = len(case_ids)
if no_of_tests == 0:
print("No tests run for", key)
else:

View File

@@ -72,10 +72,15 @@ class CloudSDK:
if status_code is 200:
status_data = status_response.json()
#print(status_data)
try:
current_ap_fw = status_data[2]['details']['reportedSwVersion']
return current_ap_fw
except:
current_ap_fw = "error"
return "ERROR"
else:
return("ERROR")
return "ERROR"
def CloudSDK_images(apModel, cloudSDK_url, bearer):
getFW_url = cloudSDK_url+"/portal/firmware/version/byEquipmentType?equipmentType=AP&modelId=" + apModel