Add tests to Nightly_Sanity to create all SSID profiles using CloudSDK APIs prior to performing connectivity tests

This commit is contained in:
bealler
2020-12-13 20:18:50 -05:00
parent 66221c590b
commit 5b76bdaa36
6 changed files with 623 additions and 86 deletions

View File

@@ -270,7 +270,25 @@ test_cases = [
5548, 5548,
5641, 5641,
5642, 5642,
5643 5643,
5644,
5645,
5646,
5647,
5648,
5649,
5650,
5651,
5652,
5653,
5654,
5655,
5656,
5657,
5658,
5659,
5660,
5661
] ]
##AP models for jfrog ##AP models for jfrog
@@ -639,12 +657,130 @@ for key in equipment_id_dict:
############## Bridge Mode Client Connectivity ############################ ############## Bridge Mode Client Connectivity ############################
########################################################################### ###########################################################################
### Create AP Bridge Profile ### Create SSID Profiles
template = "templates/ap_profile_template.json" ssid_template = "templates/ssid_profile_template.json"
name = "Nightly_Sanity_" + fw_model + "_" + today + "_bridge"
child_profiles = profile_info_dict[fw_model]["childProfileIds"] # 5G SSIDs
try: try:
create_ap_profile = CloudSDK.create_ap_profile(cloudSDK_url, bearer, template, name, child_profiles) 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,
"Lab-RADIUS",
"wpa2OnlyRadius", "BRIDGE", 1, ["is5GHzU", "is5GHz", "is5GHzL"])
print("5G EAP SSID created successfully - bridge mode")
client.update_testrail(case_id="5647", run_id=rid, status_id=1, msg='5G EAP SSID created successfully - bridge mode')
report_data['tests'][key][5647] = "passed"
except:
fiveG_eap = "error"
print("5G EAP SSID create failed - bridge mode")
client.update_testrail(case_id="5647", run_id=rid, status_id=5,
msg='5G EAP SSID create failed - bridge mode')
report_data['tests'][key][5647] = "failed"
fiveG_eap = profile_info_dict[fw_model]["fiveG_WPA2-EAP_profile"]
try:
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_PSK"],
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 1,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G WPA2 SSID created successfully - bridge mode")
client.update_testrail(case_id="5648", run_id=rid, status_id=1, msg='5G WPA2 SSID created successfully - bridge mode')
report_data['tests'][key][5648] = "passed"
except:
fiveG_wpa2 = "error"
print("5G WPA2 SSID create failed - bridge mode")
client.update_testrail(case_id="5648", run_id=rid, status_id=5,
msg='5G WPA2 SSID create failed - bridge mode')
report_data['tests'][key][5648] = "failed"
fiveG_wpa2 = profile_info_dict[fw_model]["fiveG_WPA2_profile"]
try:
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_PSK"],
"Radius-Accounting-Profile", "wpaPSK", "BRIDGE", 1,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G WPA SSID created successfully - bridge mode")
client.update_testrail(case_id="5649", run_id=rid, status_id=1,
msg='5G WPA SSID created successfully - bridge mode')
report_data['tests'][key][5649] = "passed"
except:
fiveG_wpa = "error"
print("5G WPA SSID create failed - bridge mode")
client.update_testrail(case_id="5649", run_id=rid, status_id=5,
msg='5G WPA SSID create failed - bridge mode')
report_data['tests'][key][5649] = "failed"
fiveG_wpa = profile_info_dict[fw_model]["fiveG_WPA_profile"]
# 2.4G SSIDs
try:
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_EAP_' + today,
profile_info_dict[fw_model]["twoFourG_WPA2-EAP_SSID"], None,
"Lab-RADIUS", "wpa2OnlyRadius", "BRIDGE", 1, ["is2dot4GHz"])
print("2.4G EAP SSID created successfully - bridge mode")
client.update_testrail(case_id="5644", run_id=rid, status_id=1,
msg='2.4G EAP SSID created successfully - bridge mode')
report_data['tests'][key][5644] = "passed"
except:
twoFourG_eap = "error"
print("2.4G EAP SSID create failed - bridge mode")
client.update_testrail(case_id="5644", run_id=rid, status_id=5,
msg='2.4G EAP SSID create failed - bridge mode')
report_data['tests'][key][5644] = "failed"
twoFourG_eap = profile_info_dict[fw_model]["twoFourG_WPA2-EAP_SSID"]
try:
twoFourG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_WPA2_' + today,
profile_info_dict[fw_model]["twoFourG_WPA2_SSID"],
profile_info_dict[fw_model]["twoFourG_WPA2_PSK"],
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 1,
["is2dot4GHz"])
print("2.4G WPA2 SSID created successfully - bridge mode")
client.update_testrail(case_id="5645", run_id=rid, status_id=1,
msg='2.4G WPA2 SSID created successfully - bridge mode')
report_data['tests'][key][5645] = "passed"
except:
twoFourG_wpa2 = "error"
print("2.4G WPA2 SSID create failed - bridge mode")
client.update_testrail(case_id="5645", run_id=rid, status_id=5,
msg='2.4G WPA2 SSID create failed - bridge mode')
report_data['tests'][key][5645] = "failed"
twoFourG_wpa2 = profile_info_dict[fw_model]["twoFourG_WPA2_SSID"]
try:
twoFourG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_WPA_' + today,
profile_info_dict[fw_model]["twoFourG_WPA_SSID"],
profile_info_dict[fw_model]["twoFourG_WPA_PSK"],
"Radius-Accounting-Profile", "wpaPSK", "BRIDGE", 1,
["is2dot4GHz"])
print("2.4G WPA SSID created successfully - bridge mode")
client.update_testrail(case_id="5646", run_id=rid, status_id=1,
msg='2.4G WPA SSID created successfully - bridge mode')
report_data['tests'][key][5646] = "passed"
except:
twoFourG_wpa = "error"
print("2.4G WPA SSID create failed - bridge mode")
client.update_testrail(case_id="5646", run_id=rid, status_id=5,
msg='2.4G WPA SSID create failed - bridge mode')
report_data['tests'][key][5646] = "failed"
twoFourG_wpa = profile_info_dict[fw_model]["twoFourG_WPA_SSID"]
### Create AP Bridge Profile
rfProfileId = 10
radiusProfileId = 129
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa, rfProfileId, radiusProfileId]
print(child_profiles)
ap_template = "templates/ap_profile_template.json"
name = "Nightly_Sanity_" + fw_model + "_" + today + "_bridge"
try:
create_ap_profile = CloudSDK.create_ap_profile(cloudSDK_url, bearer, ap_template, name, child_profiles)
test_profile_id = create_ap_profile test_profile_id = create_ap_profile
print("Test Profile ID for Test is:",test_profile_id) print("Test Profile ID for Test is:",test_profile_id)
client.update_testrail(case_id="5641", run_id=rid, status_id=1, client.update_testrail(case_id="5641", run_id=rid, status_id=1,
@@ -847,12 +983,135 @@ for key in equipment_id_dict:
################# NAT Mode Client Connectivity ############################ ################# NAT Mode Client Connectivity ############################
########################################################################### ###########################################################################
### Create AP NAT Profile ### Create SSID Profiles
template = "templates/ap_profile_template.json" ssid_template = "templates/ssid_profile_template.json"
name = "Nightly_Sanity_" + fw_model + "_" + today + "_nat"
child_profiles = profile_info_dict[fw_model + '_nat']["childProfileIds"] # 5G SSIDs
try: try:
create_ap_profile = CloudSDK.create_ap_profile(cloudSDK_url, bearer, template, name, child_profiles) fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_5G_EAP_NAT_' + today,
profile_info_dict[fw_model + '_nat']["fiveG_WPA2-EAP_SSID"], None,
"Lab-RADIUS",
"wpa2OnlyRadius", "NAT", 1,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G EAP SSID created successfully - NAT mode")
client.update_testrail(case_id="5653", run_id=rid, status_id=1,
msg='5G EAP SSID created successfully - NAT mode')
report_data['tests'][key][5653] = "passed"
except:
fiveG_eap = "error"
print("5G EAP SSID create failed - NAT mode")
client.update_testrail(case_id="5653", run_id=rid, status_id=5,
msg='5G EAP SSID create failed - NAT mode')
report_data['tests'][key][5653] = "failed"
fiveG_eap = profile_info_dict[fw_model + '_nat']["fiveG_WPA2-EAP_profile"]
try:
fiveG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_5G_WPA2_NAT_' + today,
profile_info_dict[fw_model + '_nat']["fiveG_WPA2_SSID"],
profile_info_dict[fw_model + '_nat']["fiveG_WPA2_PSK"],
"Radius-Accounting-Profile", "wpa2OnlyPSK", "NAT", 1,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G WPA2 SSID created successfully - NAT mode")
client.update_testrail(case_id="5654", run_id=rid, status_id=1,
msg='5G WPA2 SSID created successfully - NAT mode')
report_data['tests'][key][5654] = "passed"
except:
fiveG_wpa2 = "error"
print("5G WPA2 SSID create failed - NAT mode")
client.update_testrail(case_id="5654", run_id=rid, status_id=5,
msg='5G WPA2 SSID create failed - NAT mode')
report_data['tests'][key][5654] = "failed"
fiveG_wpa2 = profile_info_dict[fw_model + '_nat']["fiveG_WPA2_profile"]
try:
fiveG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_5G_WPA_NAT_' + today,
profile_info_dict[fw_model + '_nat']["fiveG_WPA_SSID"],
profile_info_dict[fw_model + '_nat']["fiveG_WPA_PSK"],
"Radius-Accounting-Profile", "wpaPSK", "NAT", 1,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G WPA SSID created successfully - NAT mode")
client.update_testrail(case_id="5655", run_id=rid, status_id=1,
msg='5G WPA SSID created successfully - NAT mode')
report_data['tests'][key][5655] = "passed"
except:
fiveG_wpa = "error"
print("5G WPA SSID create failed - NAT mode")
client.update_testrail(case_id="5655", run_id=rid, status_id=5,
msg='5G WPA SSID create failed - NAT mode')
report_data['tests'][key][5655] = "failed"
fiveG_wpa = profile_info_dict[fw_model + '_nat']["fiveG_WPA_profile"]
# 2.4G SSIDs
try:
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_EAP_NAT_' + today,
profile_info_dict[fw_model + '_nat']["twoFourG_WPA2-EAP_SSID"],
None,
"Lab-RADIUS", "wpa2OnlyRadius", "NAT", 1, ["is2dot4GHz"])
print("2.4G EAP SSID created successfully - NAT mode")
client.update_testrail(case_id="5650", run_id=rid, status_id=1,
msg='2.4G EAP SSID created successfully - NAT mode')
report_data['tests'][key][5650] = "passed"
except:
twoFourG_eap = "error"
print("2.4G EAP SSID create failed - NAT mode")
client.update_testrail(case_id="5650", run_id=rid, status_id=5,
msg='2.4G EAP SSID create failed - NAT mode')
report_data['tests'][key][5650] = "failed"
twoFourG_eap = profile_info_dict[fw_model + '_nat']["twoFourG_WPA2-EAP_SSID"]
try:
twoFourG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_WPA2_NAT_' + today,
profile_info_dict[fw_model + '_nat']["twoFourG_WPA2_SSID"],
profile_info_dict[fw_model + '_nat']["twoFourG_WPA2_PSK"],
"Radius-Accounting-Profile", "wpa2OnlyPSK", "NAT", 1,
["is2dot4GHz"])
print("2.4G WPA2 SSID created successfully - NAT mode")
client.update_testrail(case_id="5651", run_id=rid, status_id=1,
msg='2.4G WPA2 SSID created successfully - NAT mode')
report_data['tests'][key][5651] = "passed"
except:
twoFourG_wpa2 = "error"
print("2.4G WPA2 SSID create failed - NAT mode")
client.update_testrail(case_id="5651", run_id=rid, status_id=5,
msg='2.4G WPA2 SSID create failed - NAT mode')
report_data['tests'][key][5651] = "failed"
twoFourG_wpa2 = profile_info_dict[fw_model + '_nat']["twoFourG_WPA2_SSID"]
try:
twoFourG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_WPA_NAT_' + today,
profile_info_dict[fw_model + '_nat']["twoFourG_WPA_SSID"],
profile_info_dict[fw_model + '_nat']["twoFourG_WPA_PSK"],
"Radius-Accounting-Profile", "wpaPSK", "NAT", 1,
["is2dot4GHz"])
print("2.4G WPA SSID created successfully - NAT mode")
client.update_testrail(case_id="5652", run_id=rid, status_id=1,
msg='2.4G WPA SSID created successfully - NAT mode')
report_data['tests'][key][5652] = "passed"
except:
twoFourG_wpa = "error"
print("2.4G WPA SSID create failed - NAT mode")
client.update_testrail(case_id="5652", run_id=rid, status_id=5,
msg='2.4G WPA SSID create failed - NAT mode')
report_data['tests'][key][5652] = "failed"
twoFourG_wpa = profile_info_dict[fw_model + '_nat']["twoFourG_WPA_SSID"]
### Create AP NAT Profile
rfProfileId = 10
radiusProfileId = 129
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa, rfProfileId,
radiusProfileId]
print(child_profiles)
ap_template = "templates/ap_profile_template.json"
name = "Nightly_Sanity_" + fw_model + "_" + today + "_nat"
try:
create_ap_profile = CloudSDK.create_ap_profile(cloudSDK_url, bearer, ap_template, name, child_profiles)
test_profile_id = create_ap_profile test_profile_id = create_ap_profile
print("Test Profile ID for Test is:", test_profile_id) print("Test Profile ID for Test is:", test_profile_id)
client.update_testrail(case_id="5642", run_id=rid, status_id=1, client.update_testrail(case_id="5642", run_id=rid, status_id=1,
@@ -1053,12 +1312,134 @@ for key in equipment_id_dict:
################# Customer VLAN Client Connectivity ####################### ################# Customer VLAN Client Connectivity #######################
########################################################################### ###########################################################################
### Create AP VLAN Profile ### Create SSID Profiles
template = "templates/ap_profile_template.json" ssid_template = "templates/ssid_profile_template.json"
name = "Nightly_Sanity_" + fw_model + "_" + today + "_vlan"
child_profiles = profile_info_dict[fw_model + '_vlan']["childProfileIds"] # 5G SSIDs
try: try:
create_ap_profile = CloudSDK.create_ap_profile(cloudSDK_url, bearer, template, name, child_profiles) fiveG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_5G_EAP_VLAN' + today,
profile_info_dict[fw_model + '_vlan']["fiveG_WPA2-EAP_SSID"], None,
"Lab-RADIUS",
"wpa2OnlyRadius", "BRIDGE", 100, ["is5GHzU", "is5GHz", "is5GHzL"])
print("5G EAP SSID created successfully - custom VLAN mode")
client.update_testrail(case_id="5659", run_id=rid, status_id=1,
msg='5G EAP SSID created successfully - Custom VLAN mode')
report_data['tests'][key][5659] = "passed"
except:
fiveG_eap = "error"
print("5G EAP SSID create failed - custom VLAN mode")
client.update_testrail(case_id="5659", run_id=rid, status_id=5,
msg='5G EAP SSID create failed - custom VLAN mode')
report_data['tests'][key][5659] = "failed"
fiveG_eap = profile_info_dict[fw_model + '_vlan']["fiveG_WPA2-EAP_profile"]
try:
fiveG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_5G_WPA2_VLAN' + today,
profile_info_dict[fw_model + '_vlan']["fiveG_WPA2_SSID"],
profile_info_dict[fw_model + '_vlan']["fiveG_WPA2_PSK"],
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 100,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G WPA2 SSID created successfully - custom VLAN mode")
client.update_testrail(case_id="5660", run_id=rid, status_id=1,
msg='5G WPA2 SSID created successfully - custom VLAN mode')
report_data['tests'][key][5660] = "passed"
except:
fiveG_wpa2 = "error"
print("5G WPA2 SSID create failed - custom VLAN mode")
client.update_testrail(case_id="5660", run_id=rid, status_id=5,
msg='5G WPA2 SSID create failed - custom VLAN mode')
report_data['tests'][key][5660] = "failed"
fiveG_wpa2 = profile_info_dict[fw_model + '_vlan']["fiveG_WPA2_profile"]
try:
fiveG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_5G_WPA_VLAN_' + today,
profile_info_dict[fw_model + '_vlan']["fiveG_WPA_SSID"],
profile_info_dict[fw_model + '_vlan']["fiveG_WPA_PSK"],
"Radius-Accounting-Profile", "wpaPSK", "BRIDGE", 100,
["is5GHzU", "is5GHz", "is5GHzL"])
print("5G WPA SSID created successfully - custom VLAN mode")
client.update_testrail(case_id="5661", run_id=rid, status_id=1,
msg='5G WPA SSID created successfully - custom VLAN mode')
report_data['tests'][key][5661] = "passed"
except:
fiveG_wpa = "error"
print("5G WPA SSID create failed - custom VLAN mode")
client.update_testrail(case_id="5661", run_id=rid, status_id=5,
msg='5G WPA SSID create failed - custom VLAN mode')
report_data['tests'][key][5661] = "failed"
fiveG_wpa = profile_info_dict[fw_model + '_vlan']["fiveG_WPA_profile"]
# 2.4G SSIDs
try:
twoFourG_eap = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_EAP_VLAN_' + today,
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2-EAP_SSID"],
None,
"Lab-RADIUS", "wpa2OnlyRadius", "BRIDGE", 100, ["is2dot4GHz"])
print("2.4G EAP SSID created successfully - custom VLAN mode")
client.update_testrail(case_id="5656", run_id=rid, status_id=1,
msg='2.4G EAP SSID created successfully - custom VLAN mode')
report_data['tests'][key][5656] = "passed"
except:
twoFourG_eap = "error"
print("2.4G EAP SSID create failed - custom VLAN mode")
client.update_testrail(case_id="5656", run_id=rid, status_id=5,
msg='2.4G EAP SSID create failed - custom VLAN mode')
report_data['tests'][key][5656] = "failed"
twoFourG_eap = profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2-EAP_SSID"]
try:
twoFourG_wpa2 = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_WPA2_VLAN_' + today,
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2_SSID"],
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2_PSK"],
"Radius-Accounting-Profile", "wpa2OnlyPSK", "BRIDGE", 100,
["is2dot4GHz"])
print("2.4G WPA2 SSID created successfully - custom VLAN mode")
client.update_testrail(case_id="5657", run_id=rid, status_id=1,
msg='2.4G WPA2 SSID created successfully - custom VLAN mode')
report_data['tests'][key][5657] = "passed"
except:
twoFourG_wpa2 = "error"
print("2.4G WPA2 SSID create failed - custom VLAN mode")
client.update_testrail(case_id="5657", run_id=rid, status_id=5,
msg='2.4G WPA2 SSID create failed - custom VLAN mode')
report_data['tests'][key][5657] = "failed"
twoFourG_wpa2 = profile_info_dict[fw_model + '_vlan']["twoFourG_WPA2_SSID"]
try:
twoFourG_wpa = CloudSDK.create_ssid_profile(cloudSDK_url, bearer, ssid_template,
fw_model + '_2G_WPA_VLAN_' + today,
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA_SSID"],
profile_info_dict[fw_model + '_vlan']["twoFourG_WPA_PSK"],
"Radius-Accounting-Profile", "wpaPSK", "BRIDGE", 100,
["is2dot4GHz"])
print("2.4G WPA SSID created successfully - custom VLAN mode")
client.update_testrail(case_id="5658", run_id=rid, status_id=1,
msg='2.4G WPA SSID created successfully - custom VLAN mode')
report_data['tests'][key][5658] = "passed"
except:
twoFourG_wpa = "error"
print("2.4G WPA SSID create failed - custom VLAN mode")
client.update_testrail(case_id="5658", run_id=rid, status_id=5,
msg='2.4G WPA SSID create failed - custom VLAN mode')
report_data['tests'][key][5658] = "failed"
twoFourG_wpa = profile_info_dict[fw_model + '_vlan']["twoFourG_WPA_SSID"]
### Create AP VLAN Profile
rfProfileId = 10
radiusProfileId = 129
child_profiles = [fiveG_eap, fiveG_wpa2, fiveG_wpa, twoFourG_eap, twoFourG_wpa2, twoFourG_wpa, rfProfileId, radiusProfileId]
print(child_profiles)
ap_template = "templates/ap_profile_template.json"
name = "Nightly_Sanity_" + fw_model + "_" + today + "_vlan"
try:
create_ap_profile = CloudSDK.create_ap_profile(cloudSDK_url, bearer, ap_template, name, child_profiles)
test_profile_id = create_ap_profile test_profile_id = create_ap_profile
print("Test Profile ID for Test is:", test_profile_id) print("Test Profile ID for Test is:", test_profile_id)
client.update_testrail(case_id="5643", run_id=rid, status_id=1, client.update_testrail(case_id="5643", run_id=rid, status_id=1,

View File

@@ -184,7 +184,6 @@ class CloudSDK:
profile = json.load(ap_profile) profile = json.load(ap_profile)
profile["name"] = name profile["name"] = name
profile["childProfileIds"] = child_profiles profile["childProfileIds"] = child_profiles
print(profile["childProfileIds"])
with open(template, 'w') as ap_profile: with open(template, 'w') as ap_profile:
json.dump(profile, ap_profile) json.dump(profile, ap_profile)
@@ -199,3 +198,28 @@ class CloudSDK:
print(ap_profile) print(ap_profile)
ap_profile_id = ap_profile['id'] ap_profile_id = ap_profile['id']
return ap_profile_id return ap_profile_id
def create_ssid_profile(cloudSDK_url, bearer, template, name, ssid, passkey, radius, security, mode, vlan, radios):
with open(template, 'r+') as ssid_profile:
profile = json.load(ssid_profile)
profile['name'] = name
profile['details']['ssid'] = ssid
profile['details']['keyStr'] = passkey
profile['details']['radiusServiceName'] = radius
profile['details']['secureMode'] = security
profile['details']['forwardMode'] = mode
profile['details']['vlanId'] = vlan
profile['details']['appliedRadios'] = radios
with open(template, 'w') as ssid_profile:
json.dump(profile, ssid_profile)
url = cloudSDK_url + "/portal/profile"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + bearer
}
response = requests.request("POST", url, headers=headers, data=open(template, 'rb'))
ssid_profile = response.json()
#print(ssid_profile)
ssid_profile_id = ssid_profile['id']
return ssid_profile_id

View File

@@ -150,6 +150,12 @@ profile_info_dict = {
"twoFourG_WPA_SSID": "EC420_2dot4G_WPA", "twoFourG_WPA_SSID": "EC420_2dot4G_WPA",
"twoFourG_WPA_PSK": "Connectus123$", "twoFourG_WPA_PSK": "Connectus123$",
"twoFourG_WPA2-EAP_SSID": "EC420_2dot4G_WPA2-EAP", "twoFourG_WPA2-EAP_SSID": "EC420_2dot4G_WPA2-EAP",
"fiveG_WPA2_profile": 21,
"fiveG_WPA_profile": 22,
"fiveG_WPA2-EAP_profile": 210,
"twoFourG_WPA2_profile": 24,
"twoFourG_WPA_profile": 25,
"twoFourG_WPA2-EAP_profile": 209,
"ssid_list": [ "ssid_list": [
"EC420_5G_WPA2", "EC420_5G_WPA2",
"EC420_5G_WPA", "EC420_5G_WPA",
@@ -290,6 +296,12 @@ profile_info_dict = {
"twoFourG_WPA_SSID": "EC420_2dot4G_WPA_NAT", "twoFourG_WPA_SSID": "EC420_2dot4G_WPA_NAT",
"twoFourG_WPA_PSK": "Connectus123$", "twoFourG_WPA_PSK": "Connectus123$",
"twoFourG_WPA2-EAP_SSID": "EC420_2dot4G_WPA2-EAP_NAT", "twoFourG_WPA2-EAP_SSID": "EC420_2dot4G_WPA2-EAP_NAT",
"fiveG_WPA2_profile": 90,
"fiveG_WPA_profile": 91,
"fiveG_WPA2-EAP_profile": 211,
"twoFourG_WPA2_profile": 93,
"twoFourG_WPA_profile": 94,
"twoFourG_WPA2-EAP_profile": 212,
"ssid_list": [ "ssid_list": [
"EC420_5G_WPA2_NAT", "EC420_5G_WPA2_NAT",
"EC420_5G_WPA_NAT", "EC420_5G_WPA_NAT",
@@ -430,6 +442,12 @@ profile_info_dict = {
"twoFourG_WPA_SSID": "EC420_2dot4G_WPA_VLAN", "twoFourG_WPA_SSID": "EC420_2dot4G_WPA_VLAN",
"twoFourG_WPA_PSK": "Connectus123$", "twoFourG_WPA_PSK": "Connectus123$",
"twoFourG_WPA2-EAP_SSID": "EC420_2dot4G_WPA2-EAP_VLAN", "twoFourG_WPA2-EAP_SSID": "EC420_2dot4G_WPA2-EAP_VLAN",
"fiveG_WPA2_profile": 351,
"fiveG_WPA_profile": 352,
"fiveG_WPA2-EAP_profile": 356,
"twoFourG_WPA2_profile": 353,
"twoFourG_WPA_profile": 354,
"twoFourG_WPA2-EAP_profile": 355,
"ssid_list": [ "ssid_list": [
"EC420_5G_WPA2_VLAN", "EC420_5G_WPA2_VLAN",
"EC420_5G_WPA_VLAN", "EC420_5G_WPA_VLAN",

View File

@@ -175,6 +175,66 @@ $json = json_decode($results, true);
<TD><?php echo print_r($json['tests']['ec420']['5222'],true) ?></TD> <TD><?php echo print_r($json['tests']['ec420']['5222'],true) ?></TD>
</TR> </TR>
<TR ALIGN="CENTER">
<TD>5644</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA2-EAP - Bridge Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5644'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5644'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5644'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5644'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5645</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA2 - Bridge Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5645'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5645'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5645'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5645'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5646</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA - Bridge Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5646'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5646'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5646'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5646'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5647</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA2-EAP - Bridge Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5646'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5646'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5646'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5646'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5647</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA2 - Bridge Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5647'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5647'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5647'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5647'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5648</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA - Bridge Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5648'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5648'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5648'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5648'],true) ?></TD>
</TR>
<TR ALIGN="CENTER"> <TR ALIGN="CENTER">
<TD>5641</TD> <TD>5641</TD>
<TD>CloudSDK</TD> <TD>CloudSDK</TD>
@@ -259,6 +319,66 @@ $json = json_decode($results, true);
<TD><?php echo print_r($json['tests']['ecw5410']['2419'],true) ?></TD> <TD><?php echo print_r($json['tests']['ecw5410']['2419'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['2419'],true) ?></TD> <TD><?php echo print_r($json['tests']['ec420']['2419'],true) ?></TD>
<TR ALIGN="CENTER">
<TD>5650</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA2-EAP - NAT Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5650'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5650'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5650'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5650'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5651</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA2 - NAT Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5651'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5651'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5651'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5651'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5652</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA - NAT Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5652'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5652'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5652'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5652'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5653</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA2-EAP - NAT Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5653'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5653'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5653'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5653'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5654</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA2 - NAT Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5654'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5654'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5654'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5654'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5655</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA - NAT Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5655'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5655'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5655'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5655'],true) ?></TD>
</TR>
<TR ALIGN="CENTER"> <TR ALIGN="CENTER">
<TD>5642</TD> <TD>5642</TD>
<TD>CloudSDK</TD> <TD>CloudSDK</TD>
@@ -343,10 +463,70 @@ $json = json_decode($results, true);
<TD><?php echo print_r($json['tests']['ec420']['4324'],true) ?></TD> <TD><?php echo print_r($json['tests']['ec420']['4324'],true) ?></TD>
</TR> </TR>
<TR ALIGN="CENTER">
<TD>5656</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA2-EAP - Custom VLAN Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5656'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5656'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5656'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5656'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5657</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA2 - Custom VLAN Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5657'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5657'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5657'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5657'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5658</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 2.4 GHz WPA - Custom VLAN Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5658'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5658'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5658'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5658'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5659</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA2-EAP - Custom VLAN Mode </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5659'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5659'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5659'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5659'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5660</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA2 - Custom VLAN </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5660'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5660'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5660'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5660'],true) ?></TD>
</TR>
<TR ALIGN="CENTER">
<TD>5661</TD>
<TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create SSID Profile 5 GHz WPA - Custom VLAN </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5661'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5661'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5661'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ec420']['5661'],true) ?></TD>
</TR>
<TR ALIGN="CENTER"> <TR ALIGN="CENTER">
<TD>5643</TD> <TD>5643</TD>
<TD>CloudSDK</TD> <TD>CloudSDK</TD>
<TD ALIGN="LEFT">Create AP Profile - Custom VLAN Mode </TD> <TD ALIGN="LEFT">Create AP Profile - Custom VLAN </TD>
<TD><?php echo print_r($json['tests']['ea8300']['5643'],true) ?></TD> <TD><?php echo print_r($json['tests']['ea8300']['5643'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5211']['5643'],true) ?></TD> <TD><?php echo print_r($json['tests']['ecw5211']['5643'],true) ?></TD>
<TD><?php echo print_r($json['tests']['ecw5410']['5643'],true) ?></TD> <TD><?php echo print_r($json['tests']['ecw5410']['5643'],true) ?></TD>

View File

@@ -1 +1 @@
{"model_type": "Profile", "id": 2, "customerId": 2, "profileType": "equipment_ap", "name": "Nightly_Sanity_ec420_2020-12-10_vlan", "details": {"model_type": "ApNetworkConfiguration", "networkConfigVersion": "AP-1", "equipmentType": "AP", "vlanNative": true, "vlan": 0, "ntpServer": {"model_type": "AutoOrManualString", "auto": true, "value": null}, "syslogRelay": {"model_type": "SyslogRelay", "enabled": false, "srvHostIp": null, "srvHostPort": 514, "severity": "NOTICE"}, "rtlsSettings": {"model_type": "RtlsSettings", "enabled": false, "srvHostIp": null, "srvHostPort": 0}, "syntheticClientEnabled": false, "ledControlEnabled": true, "equipmentDiscovery": false, "greTunnelName": null, "greParentIfName": null, "greLocalInetAddr": null, "greRemoteInetAddr": null, "greRemoteMacAddr": null, "radioMap": {"is5GHz": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}, "is2dot4GHz": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}, "is5GHzU": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}, "is5GHzL": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}}, "profileType": "equipment_ap"}, "createdTimestamp": 1598524693438, "lastModifiedTimestamp": 1607377963675, "childProfileIds": [352, 129, 353, 354, 355, 356, 10, 351]} {"model_type": "Profile", "id": 2, "customerId": 2, "profileType": "equipment_ap", "name": "Nightly_Sanity_ea8300_2020-12-13_vlan", "details": {"model_type": "ApNetworkConfiguration", "networkConfigVersion": "AP-1", "equipmentType": "AP", "vlanNative": true, "vlan": 0, "ntpServer": {"model_type": "AutoOrManualString", "auto": true, "value": null}, "syslogRelay": {"model_type": "SyslogRelay", "enabled": false, "srvHostIp": null, "srvHostPort": 514, "severity": "NOTICE"}, "rtlsSettings": {"model_type": "RtlsSettings", "enabled": false, "srvHostIp": null, "srvHostPort": 0}, "syntheticClientEnabled": false, "ledControlEnabled": true, "equipmentDiscovery": false, "greTunnelName": null, "greParentIfName": null, "greLocalInetAddr": null, "greRemoteInetAddr": null, "greRemoteMacAddr": null, "radioMap": {"is5GHz": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}, "is2dot4GHz": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}, "is5GHzU": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}, "is5GHzL": {"model_type": "RadioProfileConfiguration", "bestApEnabled": true, "bestAPSteerType": "both"}}, "profileType": "equipment_ap"}, "createdTimestamp": 1598524693438, "lastModifiedTimestamp": 1607377963675, "childProfileIds": [967, 968, 969, 970, 971, 972, 10, 129]}

View File

@@ -1,67 +1 @@
{ {"model_type": "Profile", "id": 28, "customerId": 2, "profileType": "ssid", "name": "ea8300_2G_WPA_VLAN_2020-12-13", "details": {"model_type": "SsidConfiguration", "ssid": "EA8300_2dot4G_WPA_VLAN", "appliedRadios": ["is2dot4GHz"], "ssidAdminState": "enabled", "secureMode": "wpaPSK", "vlanId": 100, "keyStr": "Connectus123$", "broadcastSsid": "enabled", "keyRefresh": 0, "noLocalSubnets": false, "radiusServiceName": "Radius-Accounting-Profile", "radiusAccountingServiceName": null, "radiusAcountingServiceInterval": null, "captivePortalId": null, "bandwidthLimitDown": 0, "bandwidthLimitUp": 0, "clientBandwidthLimitDown": 0, "clientBandwidthLimitUp": 0, "videoTrafficOnly": false, "radioBasedConfigs": {"is2dot4GHz": {"model_type": "RadioBasedSsidConfiguration", "enable80211r": null, "enable80211k": null, "enable80211v": null}, "is5GHz": {"model_type": "RadioBasedSsidConfiguration", "enable80211r": null, "enable80211k": null, "enable80211v": null}, "is5GHzU": {"model_type": "RadioBasedSsidConfiguration", "enable80211r": null, "enable80211k": null, "enable80211v": null}, "is5GHzL": {"model_type": "RadioBasedSsidConfiguration", "enable80211r": null, "enable80211k": null, "enable80211v": null}}, "bonjourGatewayProfileId": null, "enable80211w": null, "wepConfig": null, "forwardMode": "BRIDGE", "profileType": "ssid"}, "createdTimestamp": 1598557809816, "lastModifiedTimestamp": 1598557809816, "childProfileIds": []}
"model_type": "Profile",
"id": 28,
"customerId": 2,
"profileType": "ssid",
"name": "ECW5211_5G_WPA2",
"details": {
"model_type": "SsidConfiguration",
"ssid": "ECW5211_5G_WPA2",
"appliedRadios": [
"is5GHzU",
"is5GHz",
"is5GHzL"
],
"ssidAdminState": "enabled",
"secureMode": "wpa2OnlyPSK",
"vlanId": 1,
"keyStr": "Connectus123$",
"broadcastSsid": "enabled",
"keyRefresh": 0,
"noLocalSubnets": false,
"radiusServiceName": null,
"radiusAccountingServiceName": null,
"radiusAcountingServiceInterval": null,
"captivePortalId": null,
"bandwidthLimitDown": 0,
"bandwidthLimitUp": 0,
"clientBandwidthLimitDown": 0,
"clientBandwidthLimitUp": 0,
"videoTrafficOnly": false,
"radioBasedConfigs": {
"is2dot4GHz": {
"model_type": "RadioBasedSsidConfiguration",
"enable80211r": null,
"enable80211k": null,
"enable80211v": null
},
"is5GHz": {
"model_type": "RadioBasedSsidConfiguration",
"enable80211r": null,
"enable80211k": null,
"enable80211v": null
},
"is5GHzU": {
"model_type": "RadioBasedSsidConfiguration",
"enable80211r": null,
"enable80211k": null,
"enable80211v": null
},
"is5GHzL": {
"model_type": "RadioBasedSsidConfiguration",
"enable80211r": null,
"enable80211k": null,
"enable80211v": null
}
},
"bonjourGatewayProfileId": null,
"enable80211w": null,
"wepConfig": null,
"forwardMode": "BRIDGE",
"profileType": "ssid"
},
"createdTimestamp": 1598557809816,
"lastModifiedTimestamp": 1598557809816,
"childProfileIds": []
}
}