mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-03 04:18:15 +00:00
Added dfs method
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
@@ -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,6 +602,28 @@ 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)
|
||||
client = self.ssh_cli_connect()
|
||||
command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||
f"cmd --value \"{cmd}\" "
|
||||
stdin, stdout, stderr = client.exec_command(command)
|
||||
output = stdout.read()
|
||||
print("hey", output)
|
||||
client.close()
|
||||
else:
|
||||
cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar '
|
||||
print("cmd: ", cmd)
|
||||
client = self.ssh_cli_connect()
|
||||
command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||
f"cmd --value \"{cmd}\" "
|
||||
stdin, stdout, stderr = client.exec_command(command)
|
||||
output = stdout.read()
|
||||
print("hey", output)
|
||||
client.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
obj = {
|
||||
'model': 'eap102',
|
||||
|
||||
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
30
tests/e2e/basic/dfs_test/wpa2_personal/test_dfs_bridge.py
Normal file
30
tests/e2e/basic/dfs_test/wpa2_personal/test_dfs_bridge.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.dfs, pytest.mark.bridge]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"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_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
|
||||
class DFSTest(object):
|
||||
|
||||
def test_dfs(self, setup_profiles):
|
||||
pass
|
||||
Reference in New Issue
Block a user