mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 11:57:49 +00:00
dataplane throughput test wpa2psk
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -46,7 +46,6 @@ class APNOS:
|
||||
cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"'
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
var = str(stdout.read())
|
||||
print(var)
|
||||
if var.__contains__("True"):
|
||||
allure.attach(name="openwrt_ctl Setup", body=str(var))
|
||||
print("APNOS Serial Setup OK")
|
||||
@@ -135,6 +134,31 @@ class APNOS:
|
||||
return ssid_list
|
||||
|
||||
# Method to get the vif_state ssid's of AP using AP-CLI/ JUMPHOST-CLI
|
||||
def get_ssid_info(self):
|
||||
stdout = self.get_vif_state()
|
||||
ssid_info_list = []
|
||||
info = []
|
||||
for i in stdout.splitlines():
|
||||
ssid = str(i).replace(" ", "").split(".")
|
||||
# print(ssid)
|
||||
if ssid[0].split(":")[0] == "b'mac":
|
||||
mac_info_list = ssid[0].split(":")
|
||||
mac_info_list.pop(0)
|
||||
info.append(":".join(mac_info_list).replace("'", ""))
|
||||
if ssid[0].split(":")[0] == "b'security":
|
||||
security = ssid[0].split(":")[1].split(",")[2].replace("]", "").replace('"', "")
|
||||
info.append(security)
|
||||
security_key = ssid[0].split(":")[1].split(",")[4].replace('"', "").replace("]", "")
|
||||
info.append(security_key)
|
||||
if ssid[0].split(":")[0] == "b'ssid":
|
||||
info.append(ssid[0].split(":")[1].replace("'", ""))
|
||||
ssid_info_list.append(info)
|
||||
info = []
|
||||
print(ssid_info_list)
|
||||
# allure.attach(name="get_vif_state_ssids ", body=str(ssid_list))
|
||||
return ssid_info_list
|
||||
|
||||
# Get VIF State parameters
|
||||
def get_vif_state_ssids(self):
|
||||
stdout = self.get_vif_state()
|
||||
ssid_list = []
|
||||
@@ -255,13 +279,13 @@ class APNOS:
|
||||
if __name__ == '__main__':
|
||||
obj = {
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.230",
|
||||
'ip': "192.168.200.80",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'jumphost_tty': '/dev/ttyUSB0',
|
||||
|
||||
}
|
||||
var = APNOS(credentials=obj)
|
||||
r = var.get_redirector()
|
||||
r = var.get_ssid_info()
|
||||
print(r)
|
||||
@@ -43,7 +43,7 @@ class RunTest:
|
||||
self.ax_prefix = lanforge_data["AX-Station-Name"]
|
||||
self.debug = debug
|
||||
self.staConnect = StaConnect2(self.lanforge_ip, self.lanforge_port, debug_=debug)
|
||||
print(lanforge_data)
|
||||
self.dataplane_obj = None
|
||||
|
||||
def Client_Connectivity(self, ssid="[BLANK]", passkey="[BLANK]", security="open", extra_securities=[], station_name=[],
|
||||
mode="BRIDGE", vlan_id=1, band="twog"):
|
||||
@@ -165,25 +165,18 @@ class RunTest:
|
||||
print(self.client_connect.wait_for_ip(station_name))
|
||||
if self.client_connect.wait_for_ip(station_name):
|
||||
self.client_connect._pass("ALL Stations got IP's", print_=True)
|
||||
|
||||
return True
|
||||
return self.client_connect
|
||||
else:
|
||||
return False
|
||||
|
||||
def Client_disconnect(self, ssid="[BLANK]", passkey="[BLANK]", security="wpa2", mode="BRIDGE", band="twog",
|
||||
vlan_id=100,
|
||||
station_name=[]):
|
||||
print("hi")
|
||||
|
||||
def Client_disconnect(self, station_name=[]):
|
||||
self.client_dis = CreateStation(_host=self.lanforge_ip, _port=self.lanforge_port,
|
||||
_sta_list=station_name, _password=passkey, _ssid=ssid, _security=security)
|
||||
print(station_name)
|
||||
self.client_dis.cleanup(station_name)
|
||||
_sta_list=station_name, _password="passkey", _ssid="ssid", _security="security")
|
||||
self.client_dis.station_profile.cleanup(station_name)
|
||||
return True
|
||||
|
||||
def dataplane(self, station_name=None, mode="BRIDGE", vlan_id=100, download_rate="85%", dut_name="TIP",
|
||||
upload_rate="85%", duration="1m", instance_name="test_demo"):
|
||||
print("hi")
|
||||
print(station_name)
|
||||
if mode == "BRIDGE":
|
||||
self.client_connect.upstream_port = self.upstream_port
|
||||
@@ -192,7 +185,7 @@ class RunTest:
|
||||
else:
|
||||
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||
|
||||
self.dataplane = DataplaneTest(lf_host=self.lanforge_ip,
|
||||
self.dataplane_obj = DataplaneTest(lf_host=self.lanforge_ip,
|
||||
lf_port=self.lanforge_port,
|
||||
lf_user="lanforge",
|
||||
lf_password="lanforge",
|
||||
@@ -208,10 +201,11 @@ class RunTest:
|
||||
station="1.1." + station_name[0],
|
||||
raw_lines=['pkts: Custom;60;142;256;512;1024;MTU',
|
||||
'directions: DUT Transmit;DUT Receive',
|
||||
'traffic_types: UDP;TCP'],
|
||||
'traffic_types: UDP;TCP', "show_3s: 1",
|
||||
"show_ll_graphs: 1","show_log: 1"],
|
||||
)
|
||||
self.dataplane.setup()
|
||||
self.dataplane.run()
|
||||
self.dataplane_obj.setup()
|
||||
self.dataplane_obj.run()
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class ChamberView:
|
||||
# for DUT
|
||||
self.dut_name = testbed
|
||||
self.ap_model = access_point_data[0]["model"]
|
||||
self.version = access_point_data[0]["version"]
|
||||
self.version = access_point_data[0]["version"].split("/")[-1]
|
||||
self.serial = access_point_data[0]["serial"]
|
||||
|
||||
self.CreateDut = DUT(lfmgr=self.lanforge_ip,
|
||||
@@ -50,11 +50,7 @@ class ChamberView:
|
||||
)
|
||||
self.CreateDut.ssid = []
|
||||
|
||||
# SSID data should be in this format
|
||||
# [
|
||||
# ['ssid_idx=0 ssid=Default-SSID-2g 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']
|
||||
# ]
|
||||
|
||||
|
||||
def Chamber_View(self):
|
||||
if self.delete_old_scenario:
|
||||
@@ -79,3 +75,13 @@ class ChamberView:
|
||||
self.CreateDut.cv_test.show_text_blob(None, None, True) # Show changes on GUI
|
||||
self.CreateDut.cv_test.sync_cv()
|
||||
return self.CreateDut, self.dut_name
|
||||
|
||||
def update_ssid(self, ssid_data=[]):
|
||||
self.CreateDut.ssid = ssid_data
|
||||
self.CreateDut.add_ssids()
|
||||
# SSID data should be in this format
|
||||
# [
|
||||
# ['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']
|
||||
# ]
|
||||
pass
|
||||
@@ -95,8 +95,7 @@ def pytest_addoption(parser):
|
||||
help="Stop using Testrails"
|
||||
)
|
||||
|
||||
|
||||
#Perfecto Parameters
|
||||
# Perfecto Parameters
|
||||
parser.addini("perfectoURL", "Cloud URL")
|
||||
parser.addini("securityToken", "Security Token")
|
||||
parser.addini("platformName-iOS", "iOS Platform")
|
||||
@@ -112,7 +111,7 @@ def pytest_addoption(parser):
|
||||
parser.addini("Default-SSID-2g-perfecto-b", "Wifi 2g AP Name")
|
||||
parser.addini("Default-SSID-perfecto-b", "Wifi AP Name")
|
||||
parser.addini("bundleId-iOS-Ping", "Ping Bundle ID")
|
||||
parser.addini("browserType-iOS", "Mobile Browser Name")
|
||||
parser.addini("browserType-iOS", "Mobile Browser Name")
|
||||
parser.addini("projectName", "Project Name")
|
||||
parser.addini("projectVersion", "Project Version")
|
||||
parser.addini("jobName", "CI Job Name")
|
||||
@@ -125,6 +124,7 @@ def pytest_addoption(parser):
|
||||
help="list of access points to test"
|
||||
)
|
||||
|
||||
|
||||
"""
|
||||
Test session base fixture
|
||||
"""
|
||||
@@ -262,7 +262,6 @@ def upload_firmware(should_upload_firmware, instantiate_firmware):
|
||||
@pytest.fixture(scope="session")
|
||||
def upgrade_firmware(request, instantiate_firmware, get_equipment_id, check_ap_firmware_cloud, get_latest_firmware,
|
||||
should_upgrade_firmware):
|
||||
|
||||
status_list = []
|
||||
if get_latest_firmware != check_ap_firmware_cloud:
|
||||
if request.config.getoption("--skip-upgrade"):
|
||||
@@ -315,6 +314,7 @@ def setup_test_run(setup_controller, upgrade_firmware, check_ap_firmware_cloud,
|
||||
else:
|
||||
pytest.exit("AP is not Upgraded tp Target Firmware versions")
|
||||
|
||||
|
||||
"""
|
||||
Instantiate Reporting
|
||||
"""
|
||||
@@ -349,7 +349,8 @@ FRAMEWORK MARKER LOGIC
|
||||
@pytest.fixture(scope="session")
|
||||
def get_security_flags():
|
||||
# Add more classifications as we go
|
||||
security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed", "wpa_wpa2_enterprise_mixed",
|
||||
security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed",
|
||||
"wpa_wpa2_enterprise_mixed",
|
||||
"wpa_wpa2_personal_mixed", "wpa_enterprise", "wpa2_enterprise", "wpa3_enterprise_mixed",
|
||||
"wpa3_enterprise", "twog", "fiveg", "radius"]
|
||||
yield security
|
||||
@@ -413,6 +414,8 @@ def get_lanforge_data(get_configuration):
|
||||
"vlan": 100
|
||||
}
|
||||
yield lanforge_data
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def traffic_generator_connectivity(testbed, get_configuration):
|
||||
if get_configuration['traffic_generator']['name'] == "lanforge":
|
||||
@@ -441,9 +444,10 @@ def traffic_generator_connectivity(testbed, get_configuration):
|
||||
# Writing the connectivity check of InterOP
|
||||
yield True
|
||||
|
||||
|
||||
# Controller Fixture
|
||||
@pytest.fixture(scope="session")
|
||||
def create_lanforge_chamberview_dut(get_configuration, testbed):
|
||||
ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"],
|
||||
testbed=testbed, access_point_data=get_configuration["access_point"])
|
||||
yield True
|
||||
yield True
|
||||
|
||||
@@ -22,7 +22,7 @@ def instantiate_profile():
|
||||
yield ProfileUtility
|
||||
|
||||
|
||||
@pytest.fixture(scope="package")
|
||||
@pytest.fixture(scope="session")
|
||||
def lf_tools(get_configuration, testbed):
|
||||
lf_tools_obj = ChamberView(lanforge_data=get_configuration['traffic_generator']['details'],
|
||||
access_point_data=get_configuration['access_point'],
|
||||
@@ -33,13 +33,13 @@ def lf_tools(get_configuration, testbed):
|
||||
@pytest.fixture(scope="session")
|
||||
def create_lanforge_chamberview(lf_tools):
|
||||
scenario_object, scenario_name = lf_tools.Chamber_View()
|
||||
return scenario_object, scenario_name
|
||||
return scenario_name
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def create_lanforge_chamberview_dut(lf_tools):
|
||||
dut_object, dut_name = lf_tools.Create_Dut()
|
||||
return dut_object, dut_name
|
||||
return dut_name
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
@@ -52,7 +52,7 @@ def setup_vlan():
|
||||
@allure.feature("CLIENT CONNECTIVITY SETUP")
|
||||
@pytest.fixture(scope="class")
|
||||
def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_id,
|
||||
instantiate_profile, get_markers,
|
||||
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||
get_security_flags, get_configuration, radius_info, get_apnos):
|
||||
instantiate_profile = instantiate_profile(sdk_client=setup_controller)
|
||||
vlan_id, mode = 0, 0
|
||||
@@ -134,7 +134,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
test_cases['radius_profile'] = False
|
||||
|
||||
# SSID Profile Creation
|
||||
print(get_markers)
|
||||
lf_dut_data = []
|
||||
for mode in profile_data['ssid']:
|
||||
if mode == "open":
|
||||
for j in profile_data["ssid"][mode]:
|
||||
@@ -143,6 +143,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||
test_cases["open_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -156,6 +157,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||
test_cases["open_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -172,6 +174,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -184,6 +187,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -200,6 +204,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_personal_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -212,6 +217,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_personal_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -229,6 +235,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
||||
@@ -242,6 +249,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa_wpa2_personal_mixed_5g"] = True
|
||||
@@ -259,6 +267,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_personal_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -271,6 +280,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_personal_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -287,6 +297,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_personal_mixed_2g"] = True
|
||||
@@ -300,6 +311,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_personal_mixed_5g"] = True
|
||||
@@ -318,6 +330,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_enterprise_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -331,6 +344,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -347,6 +361,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_enterprise_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -359,6 +374,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa2_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -375,6 +391,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -387,6 +404,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -405,6 +423,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
@@ -418,6 +437,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_enterprise_5g"] = True
|
||||
@@ -435,6 +455,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
@@ -448,6 +469,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(
|
||||
profile_data=j)
|
||||
test_cases["wpa3_enterprise_5g"] = True
|
||||
@@ -466,6 +488,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_2g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -478,6 +501,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
try:
|
||||
if "fiveg" in get_markers.keys() and get_markers["fiveg"] and "is5GHz" in list(
|
||||
j["appliedRadios"]):
|
||||
lf_dut_data.append(j)
|
||||
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
|
||||
test_cases["wpa3_enterprise_5g"] = True
|
||||
allure.attach(body=str(creates_profile),
|
||||
@@ -545,6 +569,22 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
||||
allure.attach(body=str("VIF Config: " + str(vif_config) + "\n" + "VIF State: " + str(vif_state)),
|
||||
name="SSID Profiles in VIF Config and VIF State: ")
|
||||
|
||||
ssid_info = ap_ssh.get_ssid_info()
|
||||
ssid_data = []
|
||||
for i in range(0, len(ssid_info)):
|
||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] +
|
||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||
ssid_data.append(ssid)
|
||||
|
||||
# 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']
|
||||
# ]
|
||||
|
||||
lf_tools.update_ssid(ssid_data=ssid_data)
|
||||
|
||||
def teardown_session():
|
||||
print("\nRemoving Profiles")
|
||||
instantiate_profile.delete_profile_by_name(profile_name=profile_data['equipment_ap']['profile_name'])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.bridge]
|
||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.bridge, pytest.mark.usefixtures("setup_test_run")]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
@@ -33,7 +33,7 @@ class TestDataplaneThroughputBridge(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg):
|
||||
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, create_lanforge_chamberview_dut):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -41,16 +41,17 @@ class TestDataplaneThroughputBridge(object):
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
|
||||
vlan_id=vlan)
|
||||
vlan_id=vlan, dut_name=dut_name)
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.nat]
|
||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.nat, pytest.mark.usefixtures("setup_test_run")]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
@@ -33,7 +33,7 @@ class TestDataplaneThroughputNAT(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg):
|
||||
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, create_lanforge_chamberview_dut):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
@@ -41,15 +41,17 @@ class TestDataplaneThroughputNAT(object):
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
lf_test.dataplane(station_name=station_names_fiveg, mode=mode, vlan_id=vlan)
|
||||
lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
|
||||
vlan_id=vlan, dut_name=dut_name)
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.vlan]
|
||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.vlan, pytest.mark.usefixtures("setup_test_run")]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
@@ -33,23 +33,24 @@ class TestDataplaneThroughputVLAN(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg):
|
||||
def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, create_lanforge_chamberview_dut):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 100
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
lf_test.dataplane(station_name=station_names_fiveg, mode=mode, vlan_id=vlan)
|
||||
lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
|
||||
vlan_id=vlan, dut_name=dut_name)
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
Reference in New Issue
Block a user