mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-16 01:54:53 +00:00
Arguments to skip EAP, Bridge, NAT, VLAN tests and disclude their TCs from the TestRail test run
This commit is contained in:
@@ -228,14 +228,19 @@ class RunTest:
|
|||||||
print("Error in test for single client connection to", ssid_name)
|
print("Error in test for single client connection to", ssid_name)
|
||||||
logger.warning("ERROR testing Client connectivity to " + ssid_name)
|
logger.warning("ERROR testing Client connectivity to " + ssid_name)
|
||||||
|
|
||||||
|
|
||||||
####Use variables other than defaults for running tests on custom FW etc
|
####Use variables other than defaults for running tests on custom FW etc
|
||||||
equipment_ids = equipment_id_dict
|
equipment_ids = equipment_id_dict
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Sanity Testing on Firmware Build")
|
parser = argparse.ArgumentParser(description="Sanity Testing on Firmware Build")
|
||||||
parser.add_argument("-b", "--build", type=str, default="pending", help="FW commit ID (latest pending build on dev is default)")
|
parser.add_argument("-b", "--build", type=str, default="pending",
|
||||||
parser.add_argument("-i", "--ignore", type=str, default='no', choices=['yes', 'no'], help="Set to 'no' to ignore current running version on AP and run sanity including upgrade")
|
help="FW commit ID (latest pending build on dev is default)")
|
||||||
parser.add_argument("-r", "--report", type=str, default=report_path, help="Report directory path other than default - directory must already exist!")
|
parser.add_argument("-i", "--ignore", type=str, default='no', choices=['yes', 'no'],
|
||||||
parser.add_argument("-m", "--model", type=str, choices=['ea8300', 'ecw5410', 'ecw5211', 'ec420'], help="AP model to be run")
|
help="Set to 'no' to ignore current running version on AP and run sanity including upgrade")
|
||||||
|
parser.add_argument("-r", "--report", type=str, default=report_path,
|
||||||
|
help="Report directory path other than default - directory must already exist!")
|
||||||
|
parser.add_argument("-m", "--model", type=str, choices=['ea8300', 'ecw5410', 'ecw5211', 'ec420'],
|
||||||
|
help="AP model to be run")
|
||||||
parser.add_argument("--skip_upgrade", dest="skip_upgrade", action='store_true', help="Skip Upgrade testing")
|
parser.add_argument("--skip_upgrade", dest="skip_upgrade", action='store_true', help="Skip Upgrade testing")
|
||||||
parser.set_defaults(skip_eap=False)
|
parser.set_defaults(skip_eap=False)
|
||||||
parser.add_argument("--skip_eap", dest="skip_eap", action='store_true', help="Skip EAP testing")
|
parser.add_argument("--skip_eap", dest="skip_eap", action='store_true', help="Skip EAP testing")
|
||||||
@@ -291,7 +296,6 @@ ap_latest_dict = {
|
|||||||
# import json file used by throughput test
|
# import json file used by throughput test
|
||||||
sanity_status = json.load(open("sanity_status.json"))
|
sanity_status = json.load(open("sanity_status.json"))
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#################### Create Report #########################################
|
#################### Create Report #########################################
|
||||||
############################################################################
|
############################################################################
|
||||||
@@ -403,6 +407,7 @@ for key in equipment_ids:
|
|||||||
else:
|
else:
|
||||||
if ap_cli_fw == latest_ap_image and ignore == "yes":
|
if ap_cli_fw == latest_ap_image and ignore == "yes":
|
||||||
print('AP is already running FW version under test. Ignored based on ignore flag')
|
print('AP is already running FW version under test. Ignored based on ignore flag')
|
||||||
|
report_data['fw_available'][key] = "Yes"
|
||||||
elif args.skip_upgrade == True:
|
elif args.skip_upgrade == True:
|
||||||
print("User requested to skip upgrade, will use existing version and not upgrade AP")
|
print("User requested to skip upgrade, will use existing version and not upgrade AP")
|
||||||
report_data['fw_available'][key] = "N/A"
|
report_data['fw_available'][key] = "N/A"
|
||||||
@@ -429,6 +434,7 @@ for key in equipment_ids:
|
|||||||
if args.skip_bridge == True:
|
if args.skip_bridge == True:
|
||||||
for x in test_cases:
|
for x in test_cases:
|
||||||
if "bridge" in x:
|
if "bridge" in x:
|
||||||
|
print(x)
|
||||||
case_ids.remove(test_cases[x])
|
case_ids.remove(test_cases[x])
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
@@ -448,17 +454,16 @@ for key in equipment_ids:
|
|||||||
case_ids.remove(test_cases[x])
|
case_ids.remove(test_cases[x])
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Skip EAP argument
|
# Skip EAP argument
|
||||||
if args.skip_eap == True:
|
if args.skip_eap == True:
|
||||||
case_ids.remove(test_cases["radius_profile"])
|
#case_ids.remove(test_cases["radius_profile"])
|
||||||
for x in test_cases:
|
for x in test_cases:
|
||||||
if "eap" in x:
|
if "eap" in x and test_cases[x] in case_ids:
|
||||||
case_ids.remove(test_cases[x])
|
case_ids.remove(test_cases[x])
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
print(case_ids)
|
|
||||||
|
|
||||||
test_run_name = testRunPrefix + fw_model + "_" + today + "_" + latest_ap_image
|
test_run_name = testRunPrefix + fw_model + "_" + today + "_" + latest_ap_image
|
||||||
client.create_testrun(name=test_run_name, case_ids=case_ids, project_id=projId, milestone_id=milestoneId,
|
client.create_testrun(name=test_run_name, case_ids=case_ids, project_id=projId, milestone_id=milestoneId,
|
||||||
description="Automated Nightly Sanity test run for new firmware build")
|
description="Automated Nightly Sanity test run for new firmware build")
|
||||||
@@ -562,19 +567,22 @@ for key in equipment_ids:
|
|||||||
if upgrade_fw["success"] == True:
|
if upgrade_fw["success"] == True:
|
||||||
print("CloudSDK Upgrade Request Success")
|
print("CloudSDK Upgrade Request Success")
|
||||||
report_data['tests'][key][test_cases["upgrade_api"]] = "passed"
|
report_data['tests'][key][test_cases["upgrade_api"]] = "passed"
|
||||||
client.update_testrail(case_id=test_cases["upgrade_api"], run_id=rid, status_id=1, msg='Upgrade request using API successful')
|
client.update_testrail(case_id=test_cases["upgrade_api"], run_id=rid, status_id=1,
|
||||||
|
msg='Upgrade request using API successful')
|
||||||
logger.info('Firmware upgrade API successfully sent')
|
logger.info('Firmware upgrade API successfully sent')
|
||||||
else:
|
else:
|
||||||
print("Cloud SDK Upgrade Request Error!")
|
print("Cloud SDK Upgrade Request Error!")
|
||||||
# mark upgrade test case as failed with CloudSDK error
|
# mark upgrade test case as failed with CloudSDK error
|
||||||
client.update_testrail(case_id=test_cases["upgrade_api"], run_id=rid, status_id=5, msg='Error requesting upgrade via API')
|
client.update_testrail(case_id=test_cases["upgrade_api"], run_id=rid, status_id=5,
|
||||||
|
msg='Error requesting upgrade via API')
|
||||||
report_data['tests'][key][test_cases["upgrade_api"]] = "failed"
|
report_data['tests'][key][test_cases["upgrade_api"]] = "failed"
|
||||||
logger.warning('Firmware upgrade API failed to send')
|
logger.warning('Firmware upgrade API failed to send')
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
print("Cloud SDK Upgrade Request Error!")
|
print("Cloud SDK Upgrade Request Error!")
|
||||||
# mark upgrade test case as failed with CloudSDK error
|
# mark upgrade test case as failed with CloudSDK error
|
||||||
client.update_testrail(case_id=test_cases["upgrade_api"], run_id=rid, status_id=5,msg='Error requesting upgrade via API')
|
client.update_testrail(case_id=test_cases["upgrade_api"], run_id=rid, status_id=5,
|
||||||
|
msg='Error requesting upgrade via API')
|
||||||
report_data['tests'][key][test_cases["upgrade_api"]] = "failed"
|
report_data['tests'][key][test_cases["upgrade_api"]] = "failed"
|
||||||
logger.warning('Firmware upgrade API failed to send')
|
logger.warning('Firmware upgrade API failed to send')
|
||||||
continue
|
continue
|
||||||
@@ -676,20 +684,23 @@ for key in equipment_ids:
|
|||||||
print("Manager status is", manager_status, "! Not connected to the cloud.")
|
print("Manager status is", manager_status, "! Not connected to the cloud.")
|
||||||
print("Manager status fails multiple checks - failing test case.")
|
print("Manager status fails multiple checks - failing test case.")
|
||||||
##fail cloud connectivity testcase
|
##fail cloud connectivity testcase
|
||||||
client.update_testrail(case_id=test_cases["cloud_connection"], run_id=rid, status_id=5, msg='CloudSDK connectivity failed')
|
client.update_testrail(case_id=test_cases["cloud_connection"], run_id=rid, status_id=5,
|
||||||
|
msg='CloudSDK connectivity failed')
|
||||||
report_data['tests'][key][test_cases["cloud_connection"]] = "failed"
|
report_data['tests'][key][test_cases["cloud_connection"]] = "failed"
|
||||||
print(report_data['tests'][key])
|
print(report_data['tests'][key])
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
print("Manager status is Active. Proceeding to connectivity testing!")
|
print("Manager status is Active. Proceeding to connectivity testing!")
|
||||||
# TC522 pass in Testrail
|
# TC522 pass in Testrail
|
||||||
client.update_testrail(case_id=test_cases["cloud_connection"], run_id=rid, status_id=1, msg='Manager status is Active')
|
client.update_testrail(case_id=test_cases["cloud_connection"], run_id=rid, status_id=1,
|
||||||
|
msg='Manager status is Active')
|
||||||
report_data['tests'][key][test_cases["cloud_connection"]] = "passed"
|
report_data['tests'][key][test_cases["cloud_connection"]] = "passed"
|
||||||
print(report_data['tests'][key])
|
print(report_data['tests'][key])
|
||||||
else:
|
else:
|
||||||
print("Manager status is Active. Proceeding to connectivity testing!")
|
print("Manager status is Active. Proceeding to connectivity testing!")
|
||||||
# TC5222 pass in testrail
|
# TC5222 pass in testrail
|
||||||
client.update_testrail(case_id=test_cases["cloud_connection"], run_id=rid, status_id=1, msg='Manager status is Active')
|
client.update_testrail(case_id=test_cases["cloud_connection"], run_id=rid, status_id=1,
|
||||||
|
msg='Manager status is Active')
|
||||||
report_data['tests'][key][test_cases["cloud_connection"]] = "passed"
|
report_data['tests'][key][test_cases["cloud_connection"]] = "passed"
|
||||||
print(report_data['tests'][key])
|
print(report_data['tests'][key])
|
||||||
# Pass cloud connectivity test case
|
# Pass cloud connectivity test case
|
||||||
@@ -711,8 +722,10 @@ for key in equipment_ids:
|
|||||||
secret = radius_info['secret']
|
secret = radius_info['secret']
|
||||||
auth_port = radius_info['auth_port']
|
auth_port = radius_info['auth_port']
|
||||||
try:
|
try:
|
||||||
radius_profile = CloudSDK.create_radius_profile(cloudSDK_url, bearer, radius_template, radius_name, subnet_name, subnet,
|
radius_profile = CloudSDK.create_radius_profile(cloudSDK_url, bearer, radius_template, radius_name,
|
||||||
subnet_mask, region, server_name, server_ip, secret, auth_port)
|
subnet_name, subnet,
|
||||||
|
subnet_mask, region, server_name, server_ip, secret,
|
||||||
|
auth_port)
|
||||||
print("radius profile Id is", radius_profile)
|
print("radius profile Id is", radius_profile)
|
||||||
client.update_testrail(case_id=test_cases["radius_profile"], run_id=rid, status_id=1,
|
client.update_testrail(case_id=test_cases["radius_profile"], run_id=rid, status_id=1,
|
||||||
msg='RADIUS profile created successfully')
|
msg='RADIUS profile created successfully')
|
||||||
@@ -738,12 +751,15 @@ for key in equipment_ids:
|
|||||||
# 5G SSIDs
|
# 5G SSIDs
|
||||||
if args.skip_eap != True:
|
if args.skip_eap != True:
|
||||||
try:
|
try:
|
||||||
fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template, fw_model + '_5G_EAP_' + today,
|
fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
|
fw_model + '_5G_EAP_' + today,
|
||||||
profile_info_dict[fw_model]["fiveG_WPA2-EAP_SSID"], None,
|
profile_info_dict[fw_model]["fiveG_WPA2-EAP_SSID"], None,
|
||||||
radius_name,
|
radius_name,
|
||||||
"wpa2OnlyRadius", "BRIDGE", 1, ["is5GHzU", "is5GHz", "is5GHzL"])
|
"wpa2OnlyRadius", "BRIDGE", 1,
|
||||||
|
["is5GHzU", "is5GHz", "is5GHzL"])
|
||||||
print("5G EAP SSID created successfully - bridge mode")
|
print("5G EAP SSID created successfully - bridge mode")
|
||||||
client.update_testrail(case_id=test_cases["ssid_5g_eap_bridge"], run_id=rid, status_id=1, msg='5G EAP SSID created successfully - bridge mode')
|
client.update_testrail(case_id=test_cases["ssid_5g_eap_bridge"], run_id=rid, status_id=1,
|
||||||
|
msg='5G EAP SSID created successfully - bridge mode')
|
||||||
report_data['tests'][key][test_cases["ssid_5g_eap_bridge"]] = "passed"
|
report_data['tests'][key][test_cases["ssid_5g_eap_bridge"]] = "passed"
|
||||||
|
|
||||||
except:
|
except:
|
||||||
@@ -757,13 +773,15 @@ for key in equipment_ids:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fiveG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template, fw_model + '_5G_WPA2_' + today,
|
fiveG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
|
fw_model + '_5G_WPA2_' + today,
|
||||||
profile_info_dict[fw_model]["fiveG_WPA2_SSID"],
|
profile_info_dict[fw_model]["fiveG_WPA2_SSID"],
|
||||||
profile_info_dict[fw_model]["fiveG_WPA2_PSK"],
|
profile_info_dict[fw_model]["fiveG_WPA2_PSK"],
|
||||||
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 1,
|
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 1,
|
||||||
["is5GHzU", "is5GHz", "is5GHzL"])
|
["is5GHzU", "is5GHz", "is5GHzL"])
|
||||||
print("5G WPA2 SSID created successfully - bridge mode")
|
print("5G WPA2 SSID created successfully - bridge mode")
|
||||||
client.update_testrail(case_id=test_cases["ssid_5g_wpa2_bridge"], run_id=rid, status_id=1, msg='5G WPA2 SSID created successfully - bridge mode')
|
client.update_testrail(case_id=test_cases["ssid_5g_wpa2_bridge"], run_id=rid, status_id=1,
|
||||||
|
msg='5G WPA2 SSID created successfully - bridge mode')
|
||||||
report_data['tests'][key][test_cases["ssid_5g_wpa2_bridge"]] = "passed"
|
report_data['tests'][key][test_cases["ssid_5g_wpa2_bridge"]] = "passed"
|
||||||
except:
|
except:
|
||||||
fiveG_wpa2 = "error"
|
fiveG_wpa2 = "error"
|
||||||
@@ -774,7 +792,8 @@ for key in equipment_ids:
|
|||||||
fiveG_wpa2 = profile_info_dict[fw_model]["fiveG_WPA2_profile"]
|
fiveG_wpa2 = profile_info_dict[fw_model]["fiveG_WPA2_profile"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fiveG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template, fw_model + '_5G_WPA_' + today,
|
fiveG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
|
fw_model + '_5G_WPA_' + today,
|
||||||
profile_info_dict[fw_model]["fiveG_WPA_SSID"],
|
profile_info_dict[fw_model]["fiveG_WPA_SSID"],
|
||||||
profile_info_dict[fw_model]["fiveG_WPA_PSK"],
|
profile_info_dict[fw_model]["fiveG_WPA_PSK"],
|
||||||
"Radius-Accounting-Profile", "wpaPSK", "BRIDGE", 1,
|
"Radius-Accounting-Profile", "wpaPSK", "BRIDGE", 1,
|
||||||
@@ -796,8 +815,10 @@ for key in equipment_ids:
|
|||||||
try:
|
try:
|
||||||
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
fw_model + '_2G_EAP_' + today,
|
fw_model + '_2G_EAP_' + today,
|
||||||
profile_info_dict[fw_model]["twoFourG_WPA2-EAP_SSID"], None,
|
profile_info_dict[fw_model]["twoFourG_WPA2-EAP_SSID"],
|
||||||
radius_name, "wpa2OnlyRadius", "BRIDGE", 1, ["is2dot4GHz"])
|
None,
|
||||||
|
radius_name, "wpa2OnlyRadius", "BRIDGE", 1,
|
||||||
|
["is2dot4GHz"])
|
||||||
print("2.4G EAP SSID created successfully - bridge mode")
|
print("2.4G EAP SSID created successfully - bridge mode")
|
||||||
client.update_testrail(case_id=test_cases["ssid_2g_eap_bridge"], run_id=rid, status_id=1,
|
client.update_testrail(case_id=test_cases["ssid_2g_eap_bridge"], run_id=rid, status_id=1,
|
||||||
msg='2.4G EAP SSID created successfully - bridge mode')
|
msg='2.4G EAP SSID created successfully - bridge mode')
|
||||||
@@ -854,7 +875,8 @@ for key in equipment_ids:
|
|||||||
rfProfileId = lab_ap_info.rf_profile
|
rfProfileId = lab_ap_info.rf_profile
|
||||||
if args.skip_eap != True:
|
if args.skip_eap != True:
|
||||||
radiusProfileId = radius_profile
|
radiusProfileId = radius_profile
|
||||||
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa, rfProfileId,
|
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa,
|
||||||
|
rfProfileId,
|
||||||
radiusProfileId]
|
radiusProfileId]
|
||||||
print(child_profiles)
|
print(child_profiles)
|
||||||
else:
|
else:
|
||||||
@@ -953,7 +975,8 @@ for key in equipment_ids:
|
|||||||
security = "wpa2"
|
security = "wpa2"
|
||||||
eap_type = "TTLS"
|
eap_type = "TTLS"
|
||||||
try:
|
try:
|
||||||
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type, identity,
|
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type,
|
||||||
|
identity,
|
||||||
ttls_password, test_case, rid)
|
ttls_password, test_case, rid)
|
||||||
except:
|
except:
|
||||||
test_result = "error"
|
test_result = "error"
|
||||||
@@ -1015,7 +1038,8 @@ for key in equipment_ids:
|
|||||||
security = "wpa2"
|
security = "wpa2"
|
||||||
eap_type = "TTLS"
|
eap_type = "TTLS"
|
||||||
try:
|
try:
|
||||||
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type, identity,
|
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type,
|
||||||
|
identity,
|
||||||
ttls_password, test_case, rid)
|
ttls_password, test_case, rid)
|
||||||
except:
|
except:
|
||||||
test_result = "error"
|
test_result = "error"
|
||||||
@@ -1087,7 +1111,8 @@ for key in equipment_ids:
|
|||||||
try:
|
try:
|
||||||
fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
fw_model + '_5G_EAP_NAT_' + today,
|
fw_model + '_5G_EAP_NAT_' + today,
|
||||||
profile_info_dict[fw_model + '_nat']["fiveG_WPA2-EAP_SSID"], None,
|
profile_info_dict[fw_model + '_nat'][
|
||||||
|
"fiveG_WPA2-EAP_SSID"], None,
|
||||||
radius_name,
|
radius_name,
|
||||||
"wpa2OnlyRadius", "NAT", 1,
|
"wpa2OnlyRadius", "NAT", 1,
|
||||||
["is5GHzU", "is5GHz", "is5GHzL"])
|
["is5GHzU", "is5GHz", "is5GHzL"])
|
||||||
@@ -1149,7 +1174,8 @@ for key in equipment_ids:
|
|||||||
try:
|
try:
|
||||||
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
fw_model + '_2G_EAP_NAT_' + today,
|
fw_model + '_2G_EAP_NAT_' + today,
|
||||||
profile_info_dict[fw_model + '_nat']["twoFourG_WPA2-EAP_SSID"],
|
profile_info_dict[fw_model + '_nat'][
|
||||||
|
"twoFourG_WPA2-EAP_SSID"],
|
||||||
None,
|
None,
|
||||||
radius_name, "wpa2OnlyRadius", "NAT", 1, ["is2dot4GHz"])
|
radius_name, "wpa2OnlyRadius", "NAT", 1, ["is2dot4GHz"])
|
||||||
print("2.4G EAP SSID created successfully - NAT mode")
|
print("2.4G EAP SSID created successfully - NAT mode")
|
||||||
@@ -1208,7 +1234,8 @@ for key in equipment_ids:
|
|||||||
rfProfileId = lab_ap_info.rf_profile
|
rfProfileId = lab_ap_info.rf_profile
|
||||||
if args.skip_eap != True:
|
if args.skip_eap != True:
|
||||||
radiusProfileId = radius_profile
|
radiusProfileId = radius_profile
|
||||||
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa, rfProfileId,
|
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa,
|
||||||
|
rfProfileId,
|
||||||
radiusProfileId]
|
radiusProfileId]
|
||||||
print(child_profiles)
|
print(child_profiles)
|
||||||
else:
|
else:
|
||||||
@@ -1306,7 +1333,8 @@ for key in equipment_ids:
|
|||||||
security = "wpa2"
|
security = "wpa2"
|
||||||
eap_type = "TTLS"
|
eap_type = "TTLS"
|
||||||
try:
|
try:
|
||||||
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type, identity,
|
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type,
|
||||||
|
identity,
|
||||||
ttls_password, test_case, rid)
|
ttls_password, test_case, rid)
|
||||||
except:
|
except:
|
||||||
test_result = "error"
|
test_result = "error"
|
||||||
@@ -1367,7 +1395,8 @@ for key in equipment_ids:
|
|||||||
security = "wpa2"
|
security = "wpa2"
|
||||||
eap_type = "TTLS"
|
eap_type = "TTLS"
|
||||||
try:
|
try:
|
||||||
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type, identity,
|
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type,
|
||||||
|
identity,
|
||||||
ttls_password, test_case, rid)
|
ttls_password, test_case, rid)
|
||||||
except:
|
except:
|
||||||
test_result = "error"
|
test_result = "error"
|
||||||
@@ -1437,9 +1466,11 @@ for key in equipment_ids:
|
|||||||
try:
|
try:
|
||||||
fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
fw_model + '_5G_EAP_VLAN' + today,
|
fw_model + '_5G_EAP_VLAN' + today,
|
||||||
profile_info_dict[fw_model + '_vlan']["fiveG_WPA2-EAP_SSID"], None,
|
profile_info_dict[fw_model + '_vlan'][
|
||||||
|
"fiveG_WPA2-EAP_SSID"], None,
|
||||||
radius_name,
|
radius_name,
|
||||||
"wpa2OnlyRadius", "BRIDGE", 100, ["is5GHzU", "is5GHz", "is5GHzL"])
|
"wpa2OnlyRadius", "BRIDGE", 100,
|
||||||
|
["is5GHzU", "is5GHz", "is5GHzL"])
|
||||||
print("5G EAP SSID created successfully - custom VLAN mode")
|
print("5G EAP SSID created successfully - custom VLAN mode")
|
||||||
client.update_testrail(case_id=test_cases["ssid_5g_eap_vlan"], run_id=rid, status_id=1,
|
client.update_testrail(case_id=test_cases["ssid_5g_eap_vlan"], run_id=rid, status_id=1,
|
||||||
msg='5G EAP SSID created successfully - Custom VLAN mode')
|
msg='5G EAP SSID created successfully - Custom VLAN mode')
|
||||||
@@ -1498,9 +1529,11 @@ for key in equipment_ids:
|
|||||||
try:
|
try:
|
||||||
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
fw_model + '_2G_EAP_VLAN_' + today,
|
fw_model + '_2G_EAP_VLAN_' + today,
|
||||||
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2-EAP_SSID"],
|
profile_info_dict[fw_model + '_vlan'][
|
||||||
|
"twoFourG_WPA2-EAP_SSID"],
|
||||||
None,
|
None,
|
||||||
radius_name, "wpa2OnlyRadius", "BRIDGE", 100, ["is2dot4GHz"])
|
radius_name, "wpa2OnlyRadius", "BRIDGE", 100,
|
||||||
|
["is2dot4GHz"])
|
||||||
print("2.4G EAP SSID created successfully - custom VLAN mode")
|
print("2.4G EAP SSID created successfully - custom VLAN mode")
|
||||||
client.update_testrail(case_id=test_cases["ssid_2g_eap_vlan"], run_id=rid, status_id=1,
|
client.update_testrail(case_id=test_cases["ssid_2g_eap_vlan"], run_id=rid, status_id=1,
|
||||||
msg='2.4G EAP SSID created successfully - custom VLAN mode')
|
msg='2.4G EAP SSID created successfully - custom VLAN mode')
|
||||||
@@ -1518,7 +1551,8 @@ for key in equipment_ids:
|
|||||||
try:
|
try:
|
||||||
twoFourG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
twoFourG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
|
||||||
fw_model + '_2G_WPA2_VLAN_' + today,
|
fw_model + '_2G_WPA2_VLAN_' + today,
|
||||||
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2_SSID"],
|
profile_info_dict[fw_model + '_vlan'][
|
||||||
|
"twoFourG_WPA2_SSID"],
|
||||||
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2_PSK"],
|
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2_PSK"],
|
||||||
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 100,
|
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 100,
|
||||||
["is2dot4GHz"])
|
["is2dot4GHz"])
|
||||||
@@ -1557,7 +1591,8 @@ for key in equipment_ids:
|
|||||||
rfProfileId = lab_ap_info.rf_profile
|
rfProfileId = lab_ap_info.rf_profile
|
||||||
if args.skip_eap != True:
|
if args.skip_eap != True:
|
||||||
radiusProfileId = radius_profile
|
radiusProfileId = radius_profile
|
||||||
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa, rfProfileId,
|
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa,
|
||||||
|
rfProfileId,
|
||||||
radiusProfileId]
|
radiusProfileId]
|
||||||
print(child_profiles)
|
print(child_profiles)
|
||||||
else:
|
else:
|
||||||
@@ -1656,7 +1691,8 @@ for key in equipment_ids:
|
|||||||
security = "wpa2"
|
security = "wpa2"
|
||||||
eap_type = "TTLS"
|
eap_type = "TTLS"
|
||||||
try:
|
try:
|
||||||
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type, identity,
|
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type,
|
||||||
|
identity,
|
||||||
ttls_password, test_case, rid)
|
ttls_password, test_case, rid)
|
||||||
except:
|
except:
|
||||||
test_result = "error"
|
test_result = "error"
|
||||||
@@ -1716,7 +1752,8 @@ for key in equipment_ids:
|
|||||||
security = "wpa2"
|
security = "wpa2"
|
||||||
eap_type = "TTLS"
|
eap_type = "TTLS"
|
||||||
try:
|
try:
|
||||||
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type, identity,
|
test_result = RunTest.Single_Client_EAP(port, sta_list, ssid_name, radio, security, eap_type,
|
||||||
|
identity,
|
||||||
ttls_password, test_case, rid)
|
ttls_password, test_case, rid)
|
||||||
except:
|
except:
|
||||||
test_result = "error"
|
test_result = "error"
|
||||||
@@ -1800,6 +1837,9 @@ for key in equipment_ids:
|
|||||||
with open(report_path + today + '/report_data.json', 'w') as report_json_file:
|
with open(report_path + today + '/report_data.json', 'w') as report_json_file:
|
||||||
json.dump(report_data, report_json_file)
|
json.dump(report_data, report_json_file)
|
||||||
|
|
||||||
|
## Post-test Profile Cleanup
|
||||||
|
|
||||||
|
|
||||||
# Dump all sanity test results to external json file again just to be sure
|
# Dump all sanity test results to external json file again just to be sure
|
||||||
with open('sanity_status.json', 'w') as json_file:
|
with open('sanity_status.json', 'w') as json_file:
|
||||||
json.dump(sanity_status, json_file)
|
json.dump(sanity_status, json_file)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ test_cases = {
|
|||||||
|
|
||||||
## Other profiles
|
## Other profiles
|
||||||
radius_profile = 129
|
radius_profile = 129
|
||||||
rf_profile = 10
|
rf_profile = 3459
|
||||||
|
|
||||||
###Testing AP Profile Information
|
###Testing AP Profile Information
|
||||||
profile_info_dict = {
|
profile_info_dict = {
|
||||||
@@ -146,7 +146,7 @@ profile_info_dict = {
|
|||||||
"childProfileIds": [
|
"childProfileIds": [
|
||||||
129,
|
129,
|
||||||
3,
|
3,
|
||||||
10,
|
3459,
|
||||||
11,
|
11,
|
||||||
12,
|
12,
|
||||||
13,
|
13,
|
||||||
@@ -189,7 +189,7 @@ profile_info_dict = {
|
|||||||
18,
|
18,
|
||||||
201,
|
201,
|
||||||
202,
|
202,
|
||||||
10,
|
3459,
|
||||||
14,
|
14,
|
||||||
15
|
15
|
||||||
],
|
],
|
||||||
@@ -235,7 +235,7 @@ profile_info_dict = {
|
|||||||
22,
|
22,
|
||||||
24,
|
24,
|
||||||
25,
|
25,
|
||||||
10
|
3459
|
||||||
],
|
],
|
||||||
"fiveG_WPA2_SSID": "EC420_5G_WPA2",
|
"fiveG_WPA2_SSID": "EC420_5G_WPA2",
|
||||||
"fiveG_WPA2_PSK": "Connectus123$",
|
"fiveG_WPA2_PSK": "Connectus123$",
|
||||||
@@ -270,7 +270,7 @@ profile_info_dict = {
|
|||||||
"childProfileIds": [
|
"childProfileIds": [
|
||||||
32,
|
32,
|
||||||
129,
|
129,
|
||||||
10,
|
3459,
|
||||||
28,
|
28,
|
||||||
29,
|
29,
|
||||||
205,
|
205,
|
||||||
@@ -313,7 +313,7 @@ profile_info_dict = {
|
|||||||
81,
|
81,
|
||||||
193,
|
193,
|
||||||
82,
|
82,
|
||||||
10,
|
3459,
|
||||||
78,
|
78,
|
||||||
79
|
79
|
||||||
],
|
],
|
||||||
@@ -351,7 +351,7 @@ profile_info_dict = {
|
|||||||
129,
|
129,
|
||||||
72,
|
72,
|
||||||
73,
|
73,
|
||||||
10,
|
3459,
|
||||||
75,
|
75,
|
||||||
203,
|
203,
|
||||||
76,
|
76,
|
||||||
@@ -396,7 +396,7 @@ profile_info_dict = {
|
|||||||
211,
|
211,
|
||||||
212,
|
212,
|
||||||
90,
|
90,
|
||||||
10,
|
3459,
|
||||||
91,
|
91,
|
||||||
93,
|
93,
|
||||||
94
|
94
|
||||||
@@ -438,7 +438,7 @@ profile_info_dict = {
|
|||||||
85,
|
85,
|
||||||
87,
|
87,
|
||||||
88,
|
88,
|
||||||
10,
|
3459,
|
||||||
207
|
207
|
||||||
],
|
],
|
||||||
"fiveG_WPA2_SSID": "ECW5211_5G_WPA2_NAT",
|
"fiveG_WPA2_SSID": "ECW5211_5G_WPA2_NAT",
|
||||||
@@ -476,7 +476,7 @@ profile_info_dict = {
|
|||||||
320,
|
320,
|
||||||
129,
|
129,
|
||||||
337,
|
337,
|
||||||
10,
|
3459,
|
||||||
333,
|
333,
|
||||||
334,
|
334,
|
||||||
335
|
335
|
||||||
@@ -514,7 +514,7 @@ profile_info_dict = {
|
|||||||
"childProfileIds": [
|
"childProfileIds": [
|
||||||
129,
|
129,
|
||||||
313,
|
313,
|
||||||
10,
|
3459,
|
||||||
314,
|
314,
|
||||||
315,
|
315,
|
||||||
316,
|
316,
|
||||||
@@ -562,7 +562,7 @@ profile_info_dict = {
|
|||||||
354,
|
354,
|
||||||
355,
|
355,
|
||||||
356,
|
356,
|
||||||
10,
|
3459,
|
||||||
351
|
351
|
||||||
],
|
],
|
||||||
"fiveG_WPA2_SSID": "EC420_5G_WPA2_VLAN",
|
"fiveG_WPA2_SSID": "EC420_5G_WPA2_VLAN",
|
||||||
@@ -601,7 +601,7 @@ profile_info_dict = {
|
|||||||
359,
|
359,
|
||||||
360,
|
360,
|
||||||
361,
|
361,
|
||||||
10,
|
3459,
|
||||||
362,
|
362,
|
||||||
363
|
363
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user