mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2026-01-12 23:25:07 +00:00
Merge branch 'master' into feature/ucentral-separate-qa-dev-deployment
This commit is contained in:
@@ -53,7 +53,7 @@ CONFIGURATION = {
|
||||
'password': "pumpkin77",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/dev/ecw5410-2021-06-25-pending-b6743c3.tar.gz"
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/trunk/ecw5410-1.2.0-rc1.tar.gz"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
@@ -93,7 +93,7 @@ CONFIGURATION = {
|
||||
'password': "pumpkin77",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP2',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/dev/eap101-2021-06-25-pending-b6743c3.tar.gz"
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/eap101/trunk/eap101-1.2.0-rc1.tar.gz"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
@@ -102,9 +102,9 @@ CONFIGURATION = {
|
||||
"ip": "10.28.3.8",
|
||||
"port": 8080,
|
||||
"ssh_port": 22,
|
||||
"2.4G-Radio": ["wiphy4"],
|
||||
"5G-Radio": ["wiphy5"],
|
||||
"AX-Radio": ["wiphy0", "wiphy1", "wiphy2", "wiphy3"],
|
||||
"2.4G-Radio": ["1.1.wiphy4"],
|
||||
"5G-Radio": ["1.1.wiphy5"],
|
||||
"AX-Radio": ["1.1.wiphy0", "1.1.wiphy1", "1.1.wiphy2", "1.1.wiphy3"],
|
||||
"upstream": "1.1.eth2",
|
||||
"upstream_subnet": "10.28.2.1/24",
|
||||
"uplink": "1.1.eth3",
|
||||
|
||||
@@ -249,12 +249,15 @@ def get_equipment_id(request, setup_controller, testbed, get_configuration):
|
||||
@pytest.fixture(scope="session")
|
||||
def instantiate_access_point(testbed, get_apnos, get_configuration):
|
||||
"""setup the access point connectivity"""
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
if access_point_info["jumphost"]:
|
||||
get_apnos(access_point_info, pwd="../libs/apnos/")
|
||||
else:
|
||||
pass
|
||||
# Write a code to verify Access Point Connectivity
|
||||
if request.config.getoption("1.x"):
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
if access_point_info["jumphost"]:
|
||||
get_apnos(access_point_info, pwd="../libs/apnos/", sdk="1.x")
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
get_apnos(access_point_info, pwd="../libs/apnos/")
|
||||
# Write a code to verify Access Point Connectivity
|
||||
yield True
|
||||
|
||||
|
||||
@@ -338,7 +341,7 @@ def upgrade_firmware(request, instantiate_firmware, get_equipment_id, check_ap_f
|
||||
active_fw_list = []
|
||||
try:
|
||||
for access_point in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point)
|
||||
ap_ssh = get_apnos(access_point, sdk="1.x")
|
||||
active_fw = ap_ssh.get_active_firmware()
|
||||
active_fw_list.append(active_fw)
|
||||
except Exception as e:
|
||||
@@ -412,7 +415,7 @@ def setup_test_run(setup_controller, request, upgrade_firmware, get_configuratio
|
||||
active_fw_list = []
|
||||
try:
|
||||
for access_point in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point)
|
||||
ap_ssh = get_apnos(access_point, sdk="1.x")
|
||||
active_fw = ap_ssh.get_active_firmware()
|
||||
active_fw_list.append(active_fw)
|
||||
except Exception as e:
|
||||
@@ -497,7 +500,7 @@ def test_access_point(request, testbed, get_apnos, get_configuration):
|
||||
mgr_status = []
|
||||
if request.config.getoption("1.x"):
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point_info)
|
||||
ap_ssh = get_apnos(access_point_info, sdk="1.x")
|
||||
status = ap_ssh.get_manager_state()
|
||||
if "ACTIVE" not in status:
|
||||
time.sleep(30)
|
||||
|
||||
@@ -13,18 +13,10 @@ def test_cloud_sdk_version(setup_controller, testbed, test_cases, update_report)
|
||||
try:
|
||||
response = setup_controller.portal_ping()
|
||||
if CONFIGURATION[testbed]['controller']['version'] == response._project_version:
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=1, msg='Read CloudSDK version from API successfully')
|
||||
PASS = True
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=0, msg='Could not read CloudSDK version from API - '
|
||||
'version missmatch')
|
||||
PASS = False
|
||||
except Exception as e:
|
||||
print(e)
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=0, msg='Could not read CloudSDK version from API - Exception '
|
||||
'occured')
|
||||
PASS = False
|
||||
assert PASS
|
||||
|
||||
@@ -45,13 +45,13 @@ class TestSetupBridgeEnterpriseSuiteA(object):
|
||||
@pytest.mark.twog
|
||||
def test_setup_wpa_enterprise_2g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
""" WPA Enterprise SSID 2.4G """
|
||||
assert setup_profiles['wpa2_enterprise_2g']
|
||||
assert setup_profiles['wpa_enterprise_2g']
|
||||
|
||||
@pytest.mark.wpa_enterprise
|
||||
@pytest.mark.fiveg
|
||||
def test_setup_wpa_enterprise_5g_ssid_profile(self, setup_profiles, update_report, test_cases):
|
||||
""" WPA Enterprise SSID 5G """
|
||||
assert setup_profiles['wpa2_enterprise_5g']
|
||||
assert setup_profiles['wpa_enterprise_5g']
|
||||
|
||||
@pytest.mark.sanity_light
|
||||
@pytest.mark.wpa2_enterprise
|
||||
|
||||
@@ -15,14 +15,14 @@ setup_params_enterprise = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_enterprise": [
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"]}],
|
||||
{"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
|
||||
"wpa2_enterprise": [
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"]}],
|
||||
{"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
|
||||
"wpa3_enterprise": [
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"]}]},
|
||||
{"ssid_name": "ssid_wpa3_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa3_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]},
|
||||
|
||||
"rf": {},
|
||||
"radius": True
|
||||
@@ -108,11 +108,11 @@ setup_params_enterprise_two = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_wpa2_enterprise_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}],
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
|
||||
"wpa3_enterprise_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"]}]
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": True
|
||||
|
||||
@@ -47,7 +47,6 @@ def create_lanforge_chamberview_dut(lf_tools):
|
||||
return dut_name
|
||||
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def setup_profiles(request, setup_controller, testbed, get_equipment_id, fixtures_ver,
|
||||
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
@@ -78,10 +77,10 @@ def setup_profiles(request, setup_controller, testbed, get_equipment_id, fixture
|
||||
|
||||
# call this, if 1.x
|
||||
return_var = fixtures_ver.setup_profiles(request, param, setup_controller, testbed, get_equipment_id,
|
||||
instantiate_profile,
|
||||
get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos,
|
||||
radius_accounting_info)
|
||||
instantiate_profile,
|
||||
get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos,
|
||||
radius_accounting_info)
|
||||
yield return_var
|
||||
|
||||
|
||||
@@ -116,7 +115,7 @@ def num_stations(request):
|
||||
@pytest.fixture(scope="class")
|
||||
def get_vif_state(get_apnos, get_configuration, request, lf_tools):
|
||||
if request.config.getoption("1.x"):
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x")
|
||||
vif_state = list(ap_ssh.get_vif_state_ssids())
|
||||
vif_state.sort()
|
||||
yield vif_state
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
import allure
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_light, pytest.mark.usefixtures("setup_test_run")]
|
||||
pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_light,
|
||||
pytest.mark.usefixtures("setup_test_run")]
|
||||
|
||||
|
||||
@allure.testcase("firmware upgrade from Cloud")
|
||||
@@ -16,14 +17,8 @@ class TestFirmware(object):
|
||||
@pytest.mark.firmware_create
|
||||
def test_firmware_create(self, upload_firmware, update_report, test_cases):
|
||||
if upload_firmware != 0:
|
||||
update_report.update_testrail(case_id=test_cases["create_fw"],
|
||||
status_id=1,
|
||||
msg='Create new FW version by API successful')
|
||||
PASS = True
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["create_fw"],
|
||||
status_id=5,
|
||||
msg='Error creating new FW version by API')
|
||||
PASS = False
|
||||
assert PASS
|
||||
|
||||
@@ -31,14 +26,8 @@ class TestFirmware(object):
|
||||
def test_firmware_upgrade_request(self, upgrade_firmware, update_report, test_cases):
|
||||
print(upgrade_firmware)
|
||||
if not upgrade_firmware:
|
||||
update_report.update_testrail(case_id=test_cases["upgrade_api"],
|
||||
status_id=0,
|
||||
msg='Error requesting upgrade via API')
|
||||
PASS = False
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["upgrade_api"],
|
||||
status_id=1,
|
||||
msg='Upgrade request using API successful')
|
||||
PASS = True
|
||||
assert PASS
|
||||
|
||||
@@ -48,39 +37,21 @@ class TestFirmware(object):
|
||||
ap_fw_list = []
|
||||
for i in get_equipment_id:
|
||||
ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i))
|
||||
if get_latest_firmware != ap_fw_list:
|
||||
update_report.update_testrail(case_id=test_cases["cloud_fw"],
|
||||
status_id=5,
|
||||
msg='CLOUDSDK reporting incorrect firmware version.')
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["cloud_fw"],
|
||||
status_id=1,
|
||||
msg='CLOUDSDK reporting correct firmware version.')
|
||||
|
||||
assert get_latest_firmware == ap_fw_list
|
||||
|
||||
|
||||
@pytest.mark.firmware_ap
|
||||
|
||||
def test_ap_firmware(get_configuration, get_apnos, get_latest_firmware, update_report,
|
||||
test_cases):
|
||||
"""yields the active version of firmware on ap"""
|
||||
active_fw_list = []
|
||||
try:
|
||||
for access_point in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point)
|
||||
ap_ssh = get_apnos(access_point, sdk="1.x")
|
||||
active_fw = ap_ssh.get_active_firmware()
|
||||
active_fw_list.append(active_fw)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
active_fw_list = []
|
||||
if active_fw_list == get_latest_firmware:
|
||||
update_report.update_testrail(case_id=test_cases["ap_upgrade"],
|
||||
status_id=1,
|
||||
msg='Upgrade to ' + str(get_latest_firmware) + ' successful')
|
||||
else:
|
||||
update_report.update_testrail(case_id=test_cases["ap_upgrade"],
|
||||
status_id=4,
|
||||
msg='Cannot reach AP after upgrade to check CLI - re-test required')
|
||||
|
||||
assert active_fw_list == get_latest_firmware
|
||||
|
||||
@@ -72,7 +72,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
|
||||
@pytest.mark.fiveg
|
||||
def test_wpa_enterprise_5g(self, station_names_fiveg, setup_profiles, get_lanforge_data, lf_test, update_report,
|
||||
test_cases, radius_info, exit_on_fail):
|
||||
""" wpa enterprise 2g
|
||||
""" wpa enterprise 5g
|
||||
pytest -m "client_connectivity and bridge and enterprise and ttls and wpa_enterprise and fiveg"
|
||||
"""
|
||||
profile_data = setup_params_enterprise["ssid_modes"]["wpa_enterprise"][1]
|
||||
@@ -80,7 +80,7 @@ class TestBridgeModeEnterpriseTTLSSuiteA(object):
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
@@ -274,7 +274,7 @@ class TestBridgeModeEnterpriseTTLSSuiteTwo(object):
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
|
||||
@@ -64,7 +64,7 @@ class TestNATModeEnterpriseTTLSSuiteOne(object):
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
@@ -236,7 +236,7 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object):
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
|
||||
@@ -66,7 +66,7 @@ class TestVLANModeEnterpriseTTLSSuiteOne(object):
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 100
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
@@ -188,11 +188,11 @@ setup_params_enterprise_two = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_wpa2_enterprise_mixed": [
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"]}],
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa_wpa2_eap_5g", "appliedRadios": ["5G"], "vlan": 100}],
|
||||
"wpa3_enterprise_mixed": [
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"]},
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"]}]
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_2g", "appliedRadios": ["2G"], "vlan": 100},
|
||||
{"ssid_name": "ssid_wpa3_mixed_eap_5g", "appliedRadios": ["5G"], "vlan": 100}]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": True
|
||||
@@ -244,7 +244,7 @@ class TestVLANModeEnterpriseTTLSSuiteTwo(object):
|
||||
security = "wpa"
|
||||
extra_secu = ["wpa2"]
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 100
|
||||
ttls_passwd = radius_info["password"]
|
||||
eap = "TTLS"
|
||||
|
||||
@@ -168,12 +168,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||
test_cases["open_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["open_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["open_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["open_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["open_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["open_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -192,12 +198,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -217,12 +229,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_personal_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa2_personal_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa2_personal_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa2_personal_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa2_personal_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa2_personal_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -243,12 +261,18 @@ class Fixtures_1x:
|
||||
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_wpa2_personal_mixed_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_wpa2_personal_mixed_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -268,12 +292,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_personal_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_personal_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_personal_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_personal_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_personal_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_personal_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa3_personal_mixed":
|
||||
@@ -292,12 +322,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_personal_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_personal_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_personal_mixed_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_personal_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_personal_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_personal_mixed_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -316,13 +352,19 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_enterprise_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_enterprise_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_enterprise_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa2_enterprise":
|
||||
@@ -340,12 +382,19 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_enterprise_2g"] = True
|
||||
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa2_enterprise_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa2_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa2_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa2_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa2_enterprise_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa3_enterprise":
|
||||
@@ -363,12 +412,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_enterprise_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -388,12 +443,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa_wpa2_enterprise_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_wpa2_enterprise_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_wpa2_enterprise_mixed_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa_wpa2_enterprise_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa_wpa2_enterprise_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa_wpa2_enterprise_mixed_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
if mode == "wpa3_enterprise_mixed":
|
||||
@@ -412,12 +473,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_enterprise_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_enterprise_mixed_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_enterprise_mixed_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_enterprise_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wpa3_enterprise_mixed_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wpa3_enterprise_mixed_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
|
||||
@@ -436,12 +503,18 @@ class Fixtures_1x:
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wep_2g"] = True
|
||||
if j["appliedRadios"].__contains__("is5GHzU"):
|
||||
test_cases["wep_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
name="SSID Profile Created")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
test_cases["wpa3_enterprise_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is2dot4GHz"):
|
||||
test_cases["wep_2g"] = False
|
||||
if j["appliedRadios"].__contains__("is5GHz"):
|
||||
test_cases["wep_5g"] = False
|
||||
allure.attach(body=str(e),
|
||||
name="SSID Profile Creation Failed")
|
||||
# Equipment AP Profile Creation
|
||||
@@ -464,7 +537,7 @@ class Fixtures_1x:
|
||||
print(e)
|
||||
print("failed to create AP Profile")
|
||||
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x")
|
||||
# ssid_names = []
|
||||
# for i in instantiate_profile.profile_creation_ids["ssid"]:
|
||||
# ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
|
||||
@@ -488,7 +561,7 @@ class Fixtures_1x:
|
||||
allure.attach(
|
||||
body=str("VIF Config: " + str(vif_config) + "\n" + "SSID Pushed from Controller: " + str(ssid_names)),
|
||||
name="SSID Profiles in VIF Config and Controller: ")
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/", sdk="1.x")
|
||||
|
||||
# This loop will check the VIF Config with VIF State
|
||||
test_cases['vifs'] = False
|
||||
@@ -508,58 +581,58 @@ class Fixtures_1x:
|
||||
|
||||
ap_logs = ap_ssh.logread()
|
||||
allure.attach(body=ap_logs, name="AP LOgs: ")
|
||||
ssid_info = ap_ssh.get_ssid_info()
|
||||
ssid_data = []
|
||||
print(ssid_info)
|
||||
band_mapping = ap_ssh.get_bssid_band_mapping()
|
||||
print(band_mapping)
|
||||
idx_mapping = {}
|
||||
for i in range(0, len(ssid_info)):
|
||||
if ssid_info[i][1] == "OPEN":
|
||||
ssid_info[i].append("")
|
||||
if ssid_info[i][1] == "OPEN":
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
ssid_info[i][0]]
|
||||
|
||||
if ssid_info[i][1] == "WPA":
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA" +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
ssid_info[i][0]]
|
||||
if ssid_info[i][1] == "WPA2":
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA2" +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
ssid_info[i][0]]
|
||||
if ssid_info[i][1] == "WPA3_PERSONAL":
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA3" +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
ssid_info[i][0]]
|
||||
|
||||
if ssid_info[i][1] == "WPA | WPA2":
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA|WPA2" +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
ssid_info[i][0]]
|
||||
|
||||
if ssid_info[i][1] == "EAP-TTLS":
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=EAP-TTLS" +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
ssid_info[i][0]]
|
||||
ssid_data.append(ssid)
|
||||
lf_tools.dut_idx_mapping = idx_mapping
|
||||
# Add bssid password and security from iwinfo data
|
||||
# Format SSID Data in the below format
|
||||
# ssid_data = [
|
||||
# ['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58'],
|
||||
# ['ssid_idx=1 ssid=Default-SSID-5gl password=12345678 bssid=90:3c:b3:94:48:59']
|
||||
# ]
|
||||
allure.attach(name="SSID DATA IN LF DUT", body=str(ssid_data))
|
||||
lf_tools.update_ssid(ssid_data=ssid_data)
|
||||
# ssid_info = ap_ssh.get_ssid_info()
|
||||
# ssid_data = []
|
||||
# print(ssid_info)
|
||||
# band_mapping = ap_ssh.get_bssid_band_mapping()
|
||||
# print(band_mapping)
|
||||
# idx_mapping = {}
|
||||
# for i in range(0, len(ssid_info)):
|
||||
# if ssid_info[i][1] == "OPEN":
|
||||
# ssid_info[i].append("")
|
||||
# if ssid_info[i][1] == "OPEN":
|
||||
# ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" +
|
||||
# " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
# idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
# ssid_info[i][0]]
|
||||
#
|
||||
# if ssid_info[i][1] == "WPA":
|
||||
# ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA" +
|
||||
# " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
# idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
# ssid_info[i][0]]
|
||||
# if ssid_info[i][1] == "WPA2":
|
||||
# ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA2" +
|
||||
# " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
# idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
# ssid_info[i][0]]
|
||||
# if ssid_info[i][1] == "WPA3_PERSONAL":
|
||||
# ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA3" +
|
||||
# " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
# idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
# ssid_info[i][0]]
|
||||
#
|
||||
# if ssid_info[i][1] == "WPA | WPA2":
|
||||
# ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA|WPA2" +
|
||||
# " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
# idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
# ssid_info[i][0]]
|
||||
#
|
||||
# if ssid_info[i][1] == "EAP-TTLS":
|
||||
# ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=EAP-TTLS" +
|
||||
# " password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
# idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||
# ssid_info[i][0]]
|
||||
# ssid_data.append(ssid)
|
||||
# lf_tools.dut_idx_mapping = idx_mapping
|
||||
# # Add bssid password and security from iwinfo data
|
||||
# # Format SSID Data in the below format
|
||||
# # ssid_data = [
|
||||
# # ['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58'],
|
||||
# # ['ssid_idx=1 ssid=Default-SSID-5gl password=12345678 bssid=90:3c:b3:94:48:59']
|
||||
# # ]
|
||||
# allure.attach(name="SSID DATA IN LF DUT", body=str(ssid_data))
|
||||
# lf_tools.update_ssid(ssid_data=ssid_data)
|
||||
|
||||
def teardown_session():
|
||||
print("\nRemoving Profiles")
|
||||
|
||||
@@ -19,12 +19,8 @@ class TestResources(object):
|
||||
"""Test case to verify cloud Controller Connectivity"""
|
||||
if setup_controller.bearer:
|
||||
allure.attach(name="Controller Connectivity Success", body="")
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=1, msg='Read CloudSDK version from API successfully')
|
||||
else:
|
||||
allure.attach(name="Controller Connectivity Failed", body="")
|
||||
update_report.update_testrail(case_id=test_cases["cloud_ver"],
|
||||
status_id=0, msg='Could not read CloudSDK version from API')
|
||||
pytest.exit("Controller Not Available")
|
||||
assert setup_controller.bearer
|
||||
|
||||
@@ -38,16 +34,9 @@ class TestResources(object):
|
||||
flag = False
|
||||
if flag is False:
|
||||
allure.attach(name="Access Point Connectivity Success", body=str(test_access_point))
|
||||
update_report.update_testrail(case_id=test_cases["cloud_connection"],
|
||||
status_id=5,
|
||||
msg='CloudSDK connectivity failed')
|
||||
|
||||
pytest.exit("Access Point Manager state is not Active")
|
||||
else:
|
||||
allure.attach(name="Access Point Connectivity Failed", body=str(test_access_point))
|
||||
update_report.update_testrail(case_id=test_cases["cloud_connection"],
|
||||
status_id=1,
|
||||
msg='Manager status is Active')
|
||||
|
||||
assert flag
|
||||
|
||||
@@ -59,7 +48,6 @@ class TestResources(object):
|
||||
allure.attach(name="LANforge-", body=str(traffic_generator_connectivity))
|
||||
|
||||
else:
|
||||
allure.attach(name="LANforgeGUI-5.4.3 is not available", body=str(traffic_generator_connectivity))
|
||||
pytest.exit("LANforgeGUI-5.4.3 is not available")
|
||||
|
||||
assert traffic_generator_connectivity
|
||||
|
||||
Reference in New Issue
Block a user