mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 19:37:54 +00:00
@@ -36,6 +36,7 @@ class APNOS:
|
||||
self.password = credentials['password'] # if mode=1, enter jumphost password else ap password
|
||||
self.port = credentials['port'] # if mode=1, enter jumphost ssh port else ap ssh port
|
||||
self.mode = credentials['jumphost'] # 1 for jumphost, 0 for direct ssh
|
||||
self.model = credentials['mode']
|
||||
if self.mode:
|
||||
self.tty = credentials['jumphost_tty'] # /dev/ttyAP1
|
||||
# kill minicom instance
|
||||
@@ -601,19 +602,67 @@ class APNOS:
|
||||
status = "Error"
|
||||
return status
|
||||
|
||||
def dfs(self):
|
||||
if self.model == "wifi5":
|
||||
cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
|
||||
print("cmd: ", cmd)
|
||||
if self.mode:
|
||||
command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||
f"cmd --value \"{cmd}\" "
|
||||
elif self.model == "wifi6":
|
||||
cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar'
|
||||
print("cmd: ", cmd)
|
||||
if self.mode:
|
||||
command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||
f"cmd --value \"{cmd}\" "
|
||||
client = self.ssh_cli_connect()
|
||||
stdin, stdout, stderr = client.exec_command(command)
|
||||
output = stdout.read()
|
||||
print("hey", output)
|
||||
client.close()
|
||||
|
||||
def dfs_logread(self):
|
||||
if self.model == "wifi5":
|
||||
cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
|
||||
print("cmd: ", cmd)
|
||||
if self.mode:
|
||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||
f"cmd --value \"{cmd}\" "
|
||||
elif self.model == "wifi6":
|
||||
cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS'
|
||||
print("cmd: ", cmd)
|
||||
if self.mode:
|
||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||
f"cmd --value \"{cmd}\" "
|
||||
try:
|
||||
client = self.ssh_cli_connect()
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
output = stdout.read()
|
||||
status = output.decode('utf-8').splitlines()
|
||||
logread = status[-6:]
|
||||
logs = ""
|
||||
for i in logread:
|
||||
logs = logs + i + "\n"
|
||||
client.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
logs = ""
|
||||
return logs
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
obj = {
|
||||
'model': 'eap102',
|
||||
'mode': 'wifi6',
|
||||
'serial': '903cb30bcf12',
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.80",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/trunk/ecw5410-1.1.0.tar.gz"
|
||||
}
|
||||
'model': 'eap102',
|
||||
'mode': 'wifi6',
|
||||
'serial': '903cb30bcf12',
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.80",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/trunk/ecw5410-1.1.0.tar.gz"
|
||||
}
|
||||
var = APNOS(credentials=obj, sdk="2.x")
|
||||
a = var.get_uc_latest_config()
|
||||
print(a)
|
||||
|
||||
@@ -451,21 +451,30 @@ class UProfileUtility:
|
||||
ssid_info.append(temp)
|
||||
return ssid_info
|
||||
|
||||
def set_radio_config(self, radio_config=None):
|
||||
self.base_profile_config["radios"].append({
|
||||
"band": "2G",
|
||||
"country": "US",
|
||||
# "channel-mode": "HE",
|
||||
"channel-width": 40,
|
||||
# "channel": 11
|
||||
})
|
||||
self.base_profile_config["radios"].append({
|
||||
"band": "5G",
|
||||
"country": "US",
|
||||
# "channel-mode": "HE",
|
||||
"channel-width": 80,
|
||||
# "channel": "auto"
|
||||
})
|
||||
def set_radio_config(self, radio_config=None, DFS = False, channel=None, bw=None):
|
||||
if DFS:
|
||||
self.base_profile_config["radios"].append({
|
||||
"band": "5G",
|
||||
"country": "CA",
|
||||
"channel-mode": "VHT",
|
||||
"channel-width": bw,
|
||||
"channel": channel
|
||||
})
|
||||
else:
|
||||
self.base_profile_config["radios"].append({
|
||||
"band": "2G",
|
||||
"country": "US",
|
||||
# "channel-mode": "HE",
|
||||
"channel-width": 40,
|
||||
# "channel": 11
|
||||
})
|
||||
self.base_profile_config["radios"].append({
|
||||
"band": "5G",
|
||||
"country": "US",
|
||||
# "channel-mode": "HE",
|
||||
"channel-width": 80,
|
||||
# "channel": "auto"
|
||||
})
|
||||
|
||||
self.vlan_section["ssids"] = []
|
||||
self.vlan_ids = []
|
||||
|
||||
@@ -297,6 +297,19 @@ class ChamberView:
|
||||
cli_base = LFCliBase(_lfjson_host=self.lanforge_ip, _lfjson_port=self.lanforge_port, )
|
||||
return cli_base.json_post(req_url, data)
|
||||
|
||||
def station_data_query(self, station_name="wlan0", query="channel"):
|
||||
x = self.upstream_port.split(".")
|
||||
print(x)
|
||||
url = f"/port/{x[0]}/{x[1]}/{station_name}?fields={query}"
|
||||
response = self.json_get(_req_url=url)
|
||||
print("response: ", response)
|
||||
if (response is None) or ("interface" not in response):
|
||||
print("station_list: incomplete response:")
|
||||
#pprint(response)
|
||||
exit(1)
|
||||
y = response["interface"][query]
|
||||
return y
|
||||
|
||||
def read_kpi_file(self, column_name, dir_name):
|
||||
if column_name == None:
|
||||
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', engine='python')
|
||||
|
||||
@@ -125,6 +125,12 @@ def get_vif_state(get_apnos, get_configuration, request, lf_tools):
|
||||
yield lf_tools.ssid_list
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def dfs_start(fixtures_ver, get_apnos, get_configuration):
|
||||
dfs_start = fixtures_ver.dfs(get_apnos, get_configuration)
|
||||
yield dfs_start
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def get_vlan_list(get_apnos, get_configuration):
|
||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||
|
||||
0
tests/e2e/basic/dfs_test/__init__.py
Normal file
0
tests/e2e/basic/dfs_test/__init__.py
Normal file
0
tests/e2e/basic/dfs_test/wpa2_personal/__init__.py
Normal file
0
tests/e2e/basic/dfs_test/wpa2_personal/__init__.py
Normal file
@@ -0,0 +1,969 @@
|
||||
import pytest
|
||||
import allure
|
||||
import os
|
||||
import time
|
||||
import pandas as pd
|
||||
|
||||
pytestmark = [pytest.mark.regression, pytest.mark.dfs, pytest.mark.bridge]
|
||||
|
||||
setup_params_general1 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 52,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general1],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel52Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6209", name="WIFI-6209")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_52_bw_40
|
||||
def test_dfs_channel_52_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general1["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general2 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 100,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general2],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel100Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6310", name="WIFI-6310")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_100_bw_40
|
||||
def test_dfs_channel_100_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general2["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general3 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 104,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general3],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel104Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6312", name="WIFI-6312")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_104_bw_40
|
||||
def test_dfs_channel_104_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general3["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general4 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 56,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general4],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel56Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6314", name="WIFI-6314")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_56_bw_40
|
||||
def test_dfs_channel_56_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general4["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general5 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 60,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general5],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel60Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6315", name="WIFI-6315")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_60_bw_40
|
||||
def test_dfs_channel_60_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general5["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general6 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 64,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general6],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel64Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6316", name="WIFI-6316")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_64_bw_40
|
||||
def test_dfs_channel_64_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general6["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general7 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 108,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general7],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel108Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6317", name="WIFI-6317")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_108_bw_40
|
||||
def test_dfs_channel_108_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general7["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general8 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 120,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general8],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel120Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6318", name="WIFI-6318")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_120_bw_40
|
||||
def test_dfs_channel_120_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general8["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general9 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 124,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general9],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel124Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6319", name="WIFI-6319")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_124_bw_40
|
||||
def test_dfs_channel_124_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general9["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general10 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 128,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general10],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel128Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6320", name="WIFI-6320")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_128_bw_40
|
||||
def test_dfs_channel_128_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general10["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general11 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 136,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general11],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel136Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6321", name="WIFI-6321")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_136_bw_40
|
||||
def test_dfs_channel_136_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general11["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general12 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 140,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general12],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel140Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6321", name="WIFI-6321")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_140_bw_40
|
||||
def test_dfs_channel_140_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general12["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general13 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 144,
|
||||
"channel_bandwidth": 40
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general13],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel144Bw40(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6322", name="WIFI-6322")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_144_bw_40
|
||||
def test_dfs_channel_144_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general13["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
@@ -0,0 +1,969 @@
|
||||
import pytest
|
||||
import allure
|
||||
import os
|
||||
import time
|
||||
import pandas as pd
|
||||
|
||||
pytestmark = [pytest.mark.regression, pytest.mark.dfs, pytest.mark.bridge]
|
||||
|
||||
setup_params_general1 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 52,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general1],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel52Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6376", name="WIFI-6376")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_52_bw_80
|
||||
def test_dfs_channel_52_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general1["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general2 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 100,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general2],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel100Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6311", name="WIFI-6311")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_100_bw_80
|
||||
def test_dfs_channel_100_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general2["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general3 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 104,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general3],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel104Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6313", name="WIFI-6313")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_104_bw_80
|
||||
def test_dfs_channel_104_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general3["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general4 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 56,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general4],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel56Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6377", name="WIFI-6377")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_56_bw_80
|
||||
def test_dfs_channel_56_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general4["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general5 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 60,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general5],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel60Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6378", name="WIFI-6378")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_60_bw_80
|
||||
def test_dfs_channel_60_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general5["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general6 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 64,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general6],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel64Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6379", name="WIFI-6379")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_64_bw_80
|
||||
def test_dfs_channel_64_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general6["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general7 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 108,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general7],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel108Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6380", name="WIFI-6380")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_108_bw_80
|
||||
def test_dfs_channel_108_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general7["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general8 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 120,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general8],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel120Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6381", name="WIFI-6381")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_120_bw_80
|
||||
def test_dfs_channel_120_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general8["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general9 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 124,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general9],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel124Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6382", name="WIFI-6382")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_124_bw_80
|
||||
def test_dfs_channel_124_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general9["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general10 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 128,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general10],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel128Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6383", name="WIFI-6383")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_128_bw_80
|
||||
def test_dfs_channel_128_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general10["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general11 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 136,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general11],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel136Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6384", name="WIFI-6384")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_136_bw_80
|
||||
def test_dfs_channel_136_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general11["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general12 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 140,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general12],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel140Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6385", name="WIFI-6385")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_140_bw_80
|
||||
def test_dfs_channel_140_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general12["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
|
||||
setup_params_general13 = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"dfs": {
|
||||
"channel": 144,
|
||||
"channel_bandwidth": 80
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general13],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
|
||||
class TestDFSChannel144Bw80(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6386", name="WIFI-6386")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.dfs_channel_144_bw_80
|
||||
def test_dfs_channel_144_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_start):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
channel = setup_params_general13["dfs"]["channel"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dfs_fail = True
|
||||
print("station_names_fiveg :", station_names_fiveg)
|
||||
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)
|
||||
print("station", station)
|
||||
channel1 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
print("channel before dfs: ", channel1)
|
||||
if channel1 == str(channel):
|
||||
dfs_start.dfs()
|
||||
time.sleep(15)
|
||||
else:
|
||||
print("Station not connected to applied channel")
|
||||
allure.attach(name="log Data", body="Station not connected to applied channel")
|
||||
assert False
|
||||
channel2 = lf_tools.station_data_query(station_name=station_names_fiveg[0], query="channel")
|
||||
log = dfs_start.dfs_logread()
|
||||
if channel1 != channel2:
|
||||
print(log)
|
||||
print("channel after dfs: ", channel2)
|
||||
allure.attach(name="log Data", body=log)
|
||||
else:
|
||||
print(log)
|
||||
print("dfs not happened")
|
||||
allure.attach(name="log Data", body=log)
|
||||
dfs_fail = False
|
||||
dfs_start.reboot()
|
||||
time.sleep(200)
|
||||
while True:
|
||||
connected, latest, active = dfs_start.get_ucentral_status()
|
||||
if connected is True:
|
||||
print("status is connected after reboot: ", connected)
|
||||
break
|
||||
time.sleep(1)
|
||||
if not dfs_fail:
|
||||
assert False
|
||||
@@ -329,6 +329,11 @@ class Fixtures_2x:
|
||||
# version_list.append(connectivity_data)
|
||||
return connectivity_data[1]
|
||||
|
||||
def dfs(self, get_apnos, get_configuration):
|
||||
for access_point_info in get_configuration['access_point']:
|
||||
ap_ssh = get_apnos(access_point_info, sdk="2.x")
|
||||
return ap_ssh
|
||||
|
||||
def get_ap_status_logs(self, get_configuration, get_apnos):
|
||||
connected = 0
|
||||
redirector_data = None
|
||||
@@ -368,12 +373,18 @@ class Fixtures_2x:
|
||||
test_cases = {}
|
||||
profile_data = {}
|
||||
var = ""
|
||||
list_key = list(parameter.keys())
|
||||
|
||||
if "dfs" in list_key:
|
||||
print("In dfs")
|
||||
instantiate_profile_obj.set_radio_config(DFS=True, channel=parameter["dfs"]["channel"], bw=parameter["dfs"]["channel_bandwidth"])
|
||||
else:
|
||||
instantiate_profile_obj.set_radio_config()
|
||||
if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]:
|
||||
print("Invalid Mode: ", parameter['mode'])
|
||||
return test_cases
|
||||
|
||||
instantiate_profile_obj.set_radio_config()
|
||||
|
||||
|
||||
if parameter['mode'] == "NAT":
|
||||
mode = "NAT"
|
||||
|
||||
Reference in New Issue
Block a user