mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 20:07:57 +00:00
2.x updates
setup_profiles for 2.x added functionality - bssid band ssid mapping for lf dut get_vif_state fixture adjustments for 2.x (posibbly changing the naming convention in next commit) lf_tests synced up with master branch lf_tools synced up with master added a ssid_list in lf_tools, it will be updated and used on a class level for verification of ssid availability in each test case Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
@@ -23,6 +23,7 @@ class APNOS:
|
|||||||
allure.attach(name="APNOS LIbrary: ", body=str(credentials))
|
allure.attach(name="APNOS LIbrary: ", body=str(credentials))
|
||||||
self.serial = credentials['serial']
|
self.serial = credentials['serial']
|
||||||
self.owrt_args = "--prompt root@OpenAp -s serial --log stdout --user root --passwd openwifi"
|
self.owrt_args = "--prompt root@OpenAp -s serial --log stdout --user root --passwd openwifi"
|
||||||
|
self.sdk = sdk
|
||||||
if sdk == "2.x":
|
if sdk == "2.x":
|
||||||
self.owrt_args = "--prompt root@" + self.serial + " -s serial --log stdout --user root --passwd openwifi"
|
self.owrt_args = "--prompt root@" + self.serial + " -s serial --log stdout --user root --passwd openwifi"
|
||||||
if credentials is None:
|
if credentials is None:
|
||||||
@@ -85,18 +86,39 @@ class APNOS:
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
# Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
|
# Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
|
||||||
def iwinfo_status(self):
|
# Method to get the iwinfo status of AP using AP-CLI/ JUMPHOST-CLI
|
||||||
|
def get_bssid_band_mapping(self):
|
||||||
client = self.ssh_cli_connect()
|
client = self.ssh_cli_connect()
|
||||||
cmd = 'iwinfo'
|
cmd = 'iwinfo'
|
||||||
if self.mode:
|
if self.mode:
|
||||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||||
f"cmd --value \"{cmd}\" "
|
f"cmd --value \"{cmd}\" "
|
||||||
stdin, stdout, stderr = client.exec_command(cmd)
|
stdin, stdout, stderr = client.exec_command(cmd)
|
||||||
output = stdout.read()
|
data = stdout.read()
|
||||||
client.close()
|
client.close()
|
||||||
allure.attach(name="iwinfo Output Msg: ", body=str(output))
|
allure.attach(name="iwinfo Output Msg: ", body=str(data))
|
||||||
allure.attach(name="iwinfo config Err Msg: ", body=str(stderr))
|
allure.attach(name="iwinfo config Err Msg: ", body=str(stderr))
|
||||||
return output
|
data = str(data).replace(" ", "").split("\\r\\n")
|
||||||
|
band_info = []
|
||||||
|
for i in data:
|
||||||
|
tmp = []
|
||||||
|
if i.__contains__("AccessPoint"):
|
||||||
|
bssid = i.replace("AccessPoint:", "")
|
||||||
|
tmp.append(bssid.casefold())
|
||||||
|
elif i.__contains__("MasterChannel"):
|
||||||
|
if i.split(":")[2].__contains__("2.4"):
|
||||||
|
tmp.append("2G")
|
||||||
|
else:
|
||||||
|
tmp.append("5G")
|
||||||
|
else:
|
||||||
|
tmp = []
|
||||||
|
if tmp != []:
|
||||||
|
band_info.append(tmp)
|
||||||
|
bssi_band_mapping = {}
|
||||||
|
for i in range(len(band_info)):
|
||||||
|
if (i % 2) == 0:
|
||||||
|
bssi_band_mapping[band_info[i][0]] = band_info[i + 1][0]
|
||||||
|
return bssi_band_mapping
|
||||||
|
|
||||||
# Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI
|
# Method to get the vif_config of AP using AP-CLI/ JUMPHOST-CLI
|
||||||
def get_vif_config(self):
|
def get_vif_config(self):
|
||||||
@@ -365,63 +387,86 @@ class APNOS:
|
|||||||
print(e)
|
print(e)
|
||||||
return json_output
|
return json_output
|
||||||
|
|
||||||
def logread(self):
|
def get_interface_details(self):
|
||||||
|
r = self.get_wifi_status()
|
||||||
|
print(r)
|
||||||
|
wifi_info = {}
|
||||||
|
if self.sdk == "1.x":
|
||||||
|
for i in r:
|
||||||
|
for j in r[i]["interfaces"]:
|
||||||
|
encryption = j["config"]["encryption"]
|
||||||
|
if encryption == "psk" or encryption == "psk2" or encryption == "psk-mixed" or \
|
||||||
|
encryption == "sae" or encryption == "sae-mixed":
|
||||||
|
wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], j["config"]["key"]]
|
||||||
|
else:
|
||||||
|
wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""]
|
||||||
|
print(wifi_info)
|
||||||
|
data = self.get_iwinfo()
|
||||||
|
for i in wifi_info.keys():
|
||||||
|
wifi_info[i].append(data[i])
|
||||||
|
|
||||||
|
return wifi_info
|
||||||
|
if self.sdk == "2.x":
|
||||||
|
for i in r:
|
||||||
|
for j in r[i]["interfaces"]:
|
||||||
|
encryption = j["config"]["encryption"]
|
||||||
|
if encryption == "psk" or encryption == "psk2" or encryption == "psk-mixed" or \
|
||||||
|
encryption == "sae" or encryption == "sae-mixed":
|
||||||
|
wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], j["config"]["key"]]
|
||||||
|
else:
|
||||||
|
wifi_info[j["ifname"]] = [j["config"]["ssid"], j["config"]["encryption"], ""]
|
||||||
|
data = self.get_iwinfo()
|
||||||
|
for i in wifi_info.keys():
|
||||||
|
wifi_info[i].append(data[i])
|
||||||
|
return wifi_info
|
||||||
|
|
||||||
|
def get_wifi_status(self):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
client = self.ssh_cli_connect()
|
client = self.ssh_cli_connect()
|
||||||
cmd = "logread"
|
cmd = "wifi status"
|
||||||
if self.mode:
|
if self.mode:
|
||||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||||
f"cmd --value \"{cmd}\" "
|
f"cmd --value \"{cmd}\" "
|
||||||
stdin, stdout, stderr = client.exec_command(cmd)
|
stdin, stdout, stderr = client.exec_command(cmd)
|
||||||
output = stdout.read()
|
|
||||||
status = output.decode('utf-8').splitlines()
|
output = stdout.read().decode('utf-8')
|
||||||
logread = status
|
data = output.split()
|
||||||
logs = ""
|
data.pop(0)
|
||||||
for i in logread:
|
data.pop(0)
|
||||||
logs = logs + i + "\n"
|
data.pop(0)
|
||||||
|
OUT = "".join(data)
|
||||||
|
json_output = json.loads(OUT)
|
||||||
client.close()
|
client.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
json_output = False
|
||||||
print(e)
|
print(e)
|
||||||
logs = ""
|
return json_output
|
||||||
return logs
|
|
||||||
|
|
||||||
def get_vifc(self):
|
def get_iwinfo(self):
|
||||||
client = self.ssh_cli_connect()
|
try:
|
||||||
cmd = "vifC"
|
|
||||||
if self.mode:
|
|
||||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
|
||||||
f"cmd --value \"{cmd}\" "
|
|
||||||
stdin, stdout, stderr = client.exec_command(cmd)
|
|
||||||
output = stdout.read()
|
|
||||||
client.close()
|
|
||||||
allure.attach(name="vif state Output Msg: ", body=str(output))
|
|
||||||
allure.attach(name="vif state Err Msg: ", body=str(stderr))
|
|
||||||
return output
|
|
||||||
|
|
||||||
def get_vifs(self):
|
client = self.ssh_cli_connect()
|
||||||
client = self.ssh_cli_connect()
|
cmd = "iwinfo"
|
||||||
cmd = "vifS"
|
if self.mode:
|
||||||
if self.mode:
|
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
f"cmd --value \"{cmd}\" "
|
||||||
f"cmd --value \"{cmd}\" "
|
stdin, stdout, stderr = client.exec_command(cmd)
|
||||||
stdin, stdout, stderr = client.exec_command(cmd)
|
output = stdout.read().replace(b":~# iwinfo", b"").decode('utf-8')
|
||||||
output = stdout.read()
|
o = output.split()
|
||||||
client.close()
|
iwinfo_bssid_data = {}
|
||||||
allure.attach(name="vif state Output Msg: ", body=str(output))
|
for i in range(len(o)):
|
||||||
allure.attach(name="vif state Err Msg: ", body=str(stderr))
|
if o[i].__contains__("ESSID"):
|
||||||
return output
|
if o[i + 9].__contains__("2.4"):
|
||||||
|
band = "2G"
|
||||||
def get_vlan(self):
|
else:
|
||||||
stdout = self.get_vifs()
|
band = "5G"
|
||||||
vlan_list = []
|
iwinfo_bssid_data[o[i - 1]] = [o[i + 4], band]
|
||||||
for i in stdout.splitlines():
|
client.close()
|
||||||
vlan = str(i.strip()).replace("|", ".").split(".")
|
except Exception as e:
|
||||||
try:
|
iwinfo_bssid_data = False
|
||||||
if not vlan[0].find("b'vlan_id"):
|
print(e)
|
||||||
vlan_list.append(vlan[1].strip())
|
return iwinfo_bssid_data
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return vlan_list
|
|
||||||
|
|
||||||
def logread(self):
|
def logread(self):
|
||||||
try:
|
try:
|
||||||
@@ -486,15 +531,15 @@ if __name__ == '__main__':
|
|||||||
obj = {
|
obj = {
|
||||||
'model': 'eap102',
|
'model': 'eap102',
|
||||||
'mode': 'wifi6',
|
'mode': 'wifi6',
|
||||||
'serial': '903cb39d6918',
|
'serial': '0000c1018812',
|
||||||
'jumphost': True,
|
'jumphost': True,
|
||||||
'ip': "10.28.3.103", # 10.28.3.103
|
'ip': "10.28.3.100", # 10.28.3.103
|
||||||
'username': "lanforge",
|
'username': "lanforge",
|
||||||
'password': "pumpkin77",
|
'password': "pumpkin77",
|
||||||
'port': 22, # 22
|
'port': 22, # 22
|
||||||
'jumphost_tty': '/dev/ttyAP2',
|
'jumphost_tty': '/dev/ttyAP1',
|
||||||
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
|
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/edgecore_eap102/20210625-edgecore_eap102-uCentral-trunk-4225122-upgrade.bin"
|
||||||
}
|
}
|
||||||
var = APNOS(credentials=obj, sdk="2.x")
|
var = APNOS(credentials=obj, sdk="1.x")
|
||||||
r = var.get_uc_latest_config()
|
x = var.get_interface_details()
|
||||||
print(r)
|
print(x)
|
||||||
@@ -24,6 +24,9 @@ sys.path.append(f'../libs')
|
|||||||
sys.path.append(f'../libs/lanforge/')
|
sys.path.append(f'../libs/lanforge/')
|
||||||
from sta_connect2 import StaConnect2
|
from sta_connect2 import StaConnect2
|
||||||
import time
|
import time
|
||||||
|
import string
|
||||||
|
import random
|
||||||
|
S = 12
|
||||||
# from eap_connect import EAPConnect
|
# from eap_connect import EAPConnect
|
||||||
from test_ipv4_ttls import TTLSTest
|
from test_ipv4_ttls import TTLSTest
|
||||||
from lf_wifi_capacity_test import WiFiCapacityTest
|
from lf_wifi_capacity_test import WiFiCapacityTest
|
||||||
@@ -200,42 +203,44 @@ class RunTest:
|
|||||||
self.eap_connect.cleanup(station_name)
|
self.eap_connect.cleanup(station_name)
|
||||||
return self.eap_connect.passes()
|
return self.eap_connect.passes()
|
||||||
|
|
||||||
def wifi_capacity(self, mode="BRIDGE", vlan_id=100, instance_name="wct_instance", stations=None):
|
def wifi_capacity(self, mode="BRIDGE", vlan_id=100, instance_name="wct_instance", download_rate="1Gbps",
|
||||||
|
upload_rate="1Gbps", protocol="TCP-IPv4", duration="60000"):
|
||||||
|
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
|
||||||
if mode == "BRIDGE":
|
if mode == "BRIDGE":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
upstream_port = self.upstream_port
|
||||||
elif mode == "NAT":
|
elif mode == "NAT":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
upstream_port = self.upstream_port
|
||||||
elif mode == "VLAN":
|
elif mode == "VLAN":
|
||||||
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||||
'''SINGLE WIFI CAPACITY using lf_wifi_capacity.py'''
|
'''SINGLE WIFI CAPACITY using lf_wifi_capacity.py'''
|
||||||
wificapacity_obj = WiFiCapacityTest(lfclient_host=self.lanforge_ip,
|
wificapacity_obj = WiFiCapacityTest(lfclient_host=self.lanforge_ip,
|
||||||
lf_port=self.lanforge_port,
|
lf_port=self.lanforge_port,
|
||||||
lf_user="lanforge",
|
lf_user="lanforge",
|
||||||
lf_password="lanforge",
|
lf_password="lanforge",
|
||||||
local_lf_report_dir=self.local_report_path,
|
local_lf_report_dir=self.local_report_path,
|
||||||
instance_name=instance_name,
|
instance_name=instance_name,
|
||||||
config_name="wifi_config",
|
config_name="wifi_config",
|
||||||
upstream="1.1." + self.upstream_port,
|
upstream="1.1." + upstream_port,
|
||||||
batch_size="1",
|
batch_size="1,5,10,20,40,64",
|
||||||
loop_iter="1",
|
loop_iter="1",
|
||||||
protocol="UDP-IPv4",
|
protocol=protocol,
|
||||||
duration="3000",
|
duration=duration,
|
||||||
pull_report=True,
|
pull_report=True,
|
||||||
load_old_cfg=False,
|
load_old_cfg=False,
|
||||||
upload_rate="10Mbps",
|
upload_rate=upload_rate,
|
||||||
download_rate="1Gbps",
|
download_rate=download_rate,
|
||||||
sort="interleave",
|
sort="interleave",
|
||||||
stations=stations,
|
# stations=stations,
|
||||||
create_stations=False,
|
create_stations=True,
|
||||||
radio=None,
|
radio=None,
|
||||||
security=None,
|
security=None,
|
||||||
paswd=None,
|
paswd=None,
|
||||||
ssid=None,
|
ssid=None,
|
||||||
enables=[],
|
enables=[],
|
||||||
disables=[],
|
disables=[],
|
||||||
raw_lines=[],
|
raw_lines=[],
|
||||||
raw_lines_file="",
|
raw_lines_file="",
|
||||||
sets=[])
|
sets=[])
|
||||||
|
|
||||||
wificapacity_obj.setup()
|
wificapacity_obj.setup()
|
||||||
wificapacity_obj.run()
|
wificapacity_obj.run()
|
||||||
@@ -282,18 +287,25 @@ class RunTest:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def dataplane(self, station_name=None, mode="BRIDGE", vlan_id=100, download_rate="85%", dut_name="TIP",
|
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"):
|
upload_rate="0", duration="15s", instance_name="test_demo", raw_lines=None):
|
||||||
|
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
|
||||||
|
|
||||||
if mode == "BRIDGE":
|
if mode == "BRIDGE":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.client_connect.upstream_port = self.upstream_port
|
||||||
elif mode == "NAT":
|
elif mode == "NAT":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.client_connect.upstream_port = self.upstream_port
|
||||||
else:
|
elif mode == "VLAN":
|
||||||
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||||
|
|
||||||
|
if raw_lines is None:
|
||||||
|
raw_lines = [['pkts: 60;142;256;512;1024;MTU;4000'], ['directions: DUT Transmit;DUT Receive'],
|
||||||
|
['traffic_types: UDP;TCP'],
|
||||||
|
["show_3s: 1"], ["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||||
|
|
||||||
self.dataplane_obj = DataplaneTest(lf_host=self.lanforge_ip,
|
self.dataplane_obj = DataplaneTest(lf_host=self.lanforge_ip,
|
||||||
lf_port=self.lanforge_port,
|
lf_port=self.lanforge_port,
|
||||||
ssh_port=self.lf_ssh_port,
|
ssh_port=self.lf_ssh_port,
|
||||||
local_path=self.local_report_path,
|
local_lf_report_dir=self.local_report_path,
|
||||||
lf_user="lanforge",
|
lf_user="lanforge",
|
||||||
lf_password="lanforge",
|
lf_password="lanforge",
|
||||||
instance_name=instance_name,
|
instance_name=instance_name,
|
||||||
@@ -306,61 +318,63 @@ class RunTest:
|
|||||||
duration=duration,
|
duration=duration,
|
||||||
dut=dut_name,
|
dut=dut_name,
|
||||||
station="1.1." + station_name[0],
|
station="1.1." + station_name[0],
|
||||||
raw_lines=[['pkts: Custom;60;142;256;512;1024;MTU'],
|
raw_lines=raw_lines)
|
||||||
['directions: DUT Transmit;DUT Receive'],
|
|
||||||
['traffic_types: UDP;TCP'], ["show_3s: 1"],
|
|
||||||
["show_ll_graphs: 1"], ["show_log: 1"]],
|
|
||||||
)
|
|
||||||
self.dataplane_obj.setup()
|
self.dataplane_obj.setup()
|
||||||
self.dataplane_obj.run()
|
self.dataplane_obj.run()
|
||||||
report_name = self.dataplane_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = self.dataplane_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
influx = CSVtoInflux(influxdb=self.influxdb,
|
influx = CSVtoInflux(influxdb=self.influxdb, _influx_tag=self.influx_params["influx_tag"],
|
||||||
_influx_tag=self.influx_params["influx_tag"],
|
|
||||||
target_csv=self.local_report_path + report_name + "/kpi.csv")
|
target_csv=self.local_report_path + report_name + "/kpi.csv")
|
||||||
influx.post_to_influx()
|
influx.post_to_influx()
|
||||||
|
|
||||||
return self.dataplane_obj
|
return self.dataplane_obj
|
||||||
|
|
||||||
def dualbandperformancetest(self,ssid_5G="[BLANK]",ssid_2G="[BLANK]",mode="BRIDGE", vlan_id=100,dut_name="TIP",
|
def dualbandperformancetest(self, ssid_5G="[BLANK]", ssid_2G="[BLANK]", mode="BRIDGE", vlan_id=100, dut_name="TIP",
|
||||||
instance_name="test_demo"):
|
instance_name="test_demo", dut_5g="", dut_2g=""):
|
||||||
|
instance_name = ''.join(random.choices(string.ascii_uppercase + string.digits, k=S))
|
||||||
|
|
||||||
if mode == "BRIDGE":
|
if mode == "BRIDGE":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.upstream_port = self.upstream_port
|
||||||
elif mode == "NAT":
|
elif mode == "NAT":
|
||||||
self.client_connect.upstream_port = self.upstream_port
|
self.upstream_port = self.upstream_port
|
||||||
else:
|
else:
|
||||||
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
self.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||||
|
|
||||||
self.dualbandptest_obj = ApAutoTest(lf_host=self.lanforge_ip,
|
self.dualbandptest_obj = ApAutoTest(lf_host=self.lanforge_ip,
|
||||||
lf_port=self.lanforge_port,
|
lf_port=self.lanforge_port,
|
||||||
lf_user="lanforge",
|
lf_user="lanforge",
|
||||||
lf_password="lanforge",
|
lf_password="lanforge",
|
||||||
instance_name=instance_name,
|
instance_name=instance_name,
|
||||||
config_name="dbp_config",
|
config_name="dbp_config",
|
||||||
upstream="1.1." + self.upstream_port,
|
upstream="1.1." + self.upstream_port,
|
||||||
pull_report=True,
|
pull_report=True,
|
||||||
dut5_0=dut_name + ' ' + ssid_5G,
|
dut5_0=dut_5g,
|
||||||
dut2_0=dut_name + ' ' + ssid_2G,
|
dut2_0=dut_2g,
|
||||||
load_old_cfg=False,
|
load_old_cfg=False,
|
||||||
max_stations_2=1,
|
local_lf_report_dir=self.local_report_path,
|
||||||
max_stations_5=1,
|
max_stations_2=64,
|
||||||
max_stations_dual=2,
|
max_stations_5=64,
|
||||||
radio2=[["1.1.wiphy0"]],
|
max_stations_dual=124,
|
||||||
radio5=[["1.1.wiphy1"]],
|
radio2=[self.twog_radios],
|
||||||
sets=[['Basic Client Connectivity', '0'], ['Multi Band Performance', '1'],
|
radio5=[self.fiveg_radios],
|
||||||
['Throughput vs Pkt Size', '0'], ['Capacity', '0'], ['Stability', '0'],
|
sets=[['Basic Client Connectivity', '0'], ['Multi Band Performance', '1'],
|
||||||
['Band-Steering', '0'], ['Multi-Station Throughput vs Pkt Size', '0'],
|
['Throughput vs Pkt Size', '0'], ['Capacity', '0'],
|
||||||
['Long-Term', '0']]
|
['Skip 2.4Ghz Tests', '1'],
|
||||||
)
|
['Skip 5Ghz Tests', '1'],
|
||||||
|
['Stability', '0'],
|
||||||
|
['Band-Steering', '0'], ['Multi-Station Throughput vs Pkt Size', '0'],
|
||||||
|
['Long-Term', '0']]
|
||||||
|
)
|
||||||
self.dualbandptest_obj.setup()
|
self.dualbandptest_obj.setup()
|
||||||
self.dualbandptest_obj.run()
|
self.dualbandptest_obj.run()
|
||||||
report_name = self.dataplane_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = self.dualbandptest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
influx = CSVtoInflux(influxdb=self.influxdb,
|
# influx = CSVtoInflux(influxdb=self.influxdb,
|
||||||
_influx_tag=self.influx_params["influx_tag"],
|
# _influx_tag=self.influx_params["influx_tag"],
|
||||||
target_csv=self.local_report_path + report_name + "/kpi.csv")
|
# target_csv=self.local_report_path + report_name + "/kpi.csv")
|
||||||
influx.post_to_influx()
|
# influx.post_to_influx()
|
||||||
return self.dualbandptest_obj
|
return self.dualbandptest_obj
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
lanforge_data = {
|
lanforge_data = {
|
||||||
"ip": "localhost",
|
"ip": "localhost",
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
import allure
|
||||||
from create_chamberview import CreateChamberview
|
from create_chamberview import CreateChamberview
|
||||||
from create_chamberview_dut import DUT
|
from create_chamberview_dut import DUT
|
||||||
import time
|
import time
|
||||||
@@ -6,6 +9,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
|
|
||||||
class ChamberView:
|
class ChamberView:
|
||||||
|
|
||||||
def __init__(self, lanforge_data=None, access_point_data=None, debug=True, testbed=None):
|
def __init__(self, lanforge_data=None, access_point_data=None, debug=True, testbed=None):
|
||||||
@@ -28,7 +32,8 @@ class ChamberView:
|
|||||||
self.scenario_name = "TIP-" + self.testbed
|
self.scenario_name = "TIP-" + self.testbed
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
self.exit_on_error = False
|
self.exit_on_error = False
|
||||||
|
self.dut_idx_mapping = {}
|
||||||
|
self.ssid_list = []
|
||||||
self.raw_line = [
|
self.raw_line = [
|
||||||
["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
|
["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
|
||||||
[2] + ",AUTO -1 NA"],
|
[2] + ",AUTO -1 NA"],
|
||||||
@@ -57,6 +62,15 @@ class ChamberView:
|
|||||||
)
|
)
|
||||||
self.CreateDut.ssid = []
|
self.CreateDut.ssid = []
|
||||||
|
|
||||||
|
def reset_scenario(self):
|
||||||
|
self.raw_line = [
|
||||||
|
["profile_link " + self.upstream_resources + " upstream-dhcp 1 NA NA " + self.upstream_port.split(".")
|
||||||
|
[2] + ",AUTO -1 NA"],
|
||||||
|
["profile_link " + self.uplink_resources + " uplink-nat 1 'DUT: upstream LAN " + self.upstream_subnet
|
||||||
|
+ "' NA " + self.uplink_port.split(".")[2] + "," + self.upstream_port.split(".")[2] + " -1 NA"]
|
||||||
|
]
|
||||||
|
self.Chamber_View()
|
||||||
|
|
||||||
def Chamber_View(self):
|
def Chamber_View(self):
|
||||||
if self.delete_old_scenario:
|
if self.delete_old_scenario:
|
||||||
self.CreateChamberview.clean_cv_scenario(type="Network-Connectivity", scenario_name=self.scenario_name)
|
self.CreateChamberview.clean_cv_scenario(type="Network-Connectivity", scenario_name=self.scenario_name)
|
||||||
@@ -70,6 +84,38 @@ class ChamberView:
|
|||||||
self.CreateChamberview.sync_cv()
|
self.CreateChamberview.sync_cv()
|
||||||
return self.CreateChamberview, self.scenario_name
|
return self.CreateChamberview, self.scenario_name
|
||||||
|
|
||||||
|
def add_stations(self, band="2G", num_stations="max", dut="NA", ssid_name=[]):
|
||||||
|
idx = 0
|
||||||
|
print(self.dut_idx_mapping)
|
||||||
|
for i in self.dut_idx_mapping:
|
||||||
|
if self.dut_idx_mapping[i][0] == ssid_name and self.dut_idx_mapping[i][3] == band:
|
||||||
|
idx = i
|
||||||
|
max_stations = 0
|
||||||
|
print(idx)
|
||||||
|
if band == "2G":
|
||||||
|
max_stations = 64 * len(self.twog_radios)
|
||||||
|
radio = ",".join(self.twog_radios)
|
||||||
|
if len(self.twog_radios) == 1:
|
||||||
|
radio = radio + ",AUTO"
|
||||||
|
# self.eap_connect.sta_prefix = self.twog_prefix
|
||||||
|
if band == "5G":
|
||||||
|
max_stations = 64 * len(self.twog_radios)
|
||||||
|
radio = ",".join(self.fiveg_radios)
|
||||||
|
if len(self.fiveg_radios) == 1:
|
||||||
|
radio = radio + ",AUTO"
|
||||||
|
if band == "ax":
|
||||||
|
max_stations = len(self.twog_radios)
|
||||||
|
radio = ",".join(self.fiveg_radios)
|
||||||
|
if len(self.fiveg_radios) == 1:
|
||||||
|
radio = radio + ",AUTO"
|
||||||
|
# self.eap_connect.sta_prefix = self.fiveg_prefix
|
||||||
|
if num_stations != "max":
|
||||||
|
max_stations = num_stations
|
||||||
|
station_data = ["profile_link 1.1 STA-AUTO " + str(max_stations) + " 'DUT: " + dut + " Radio-" + str(int(idx)+1) + "'" + " NA " + radio]
|
||||||
|
self.raw_line.append(station_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def Create_Dut(self):
|
def Create_Dut(self):
|
||||||
self.CreateDut.setup()
|
self.CreateDut.setup()
|
||||||
self.CreateDut.add_ssids()
|
self.CreateDut.add_ssids()
|
||||||
@@ -95,12 +141,6 @@ class ChamberView:
|
|||||||
json_response = cli_base.json_get(_req_url=_req_url)
|
json_response = cli_base.json_get(_req_url=_req_url)
|
||||||
return json_response
|
return json_response
|
||||||
|
|
||||||
def add_stations(self, num_stations=5):
|
|
||||||
self.CreateChamberview.setup(create_scenario=self.scenario_name,
|
|
||||||
raw_line=self.raw_line)
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
def json_post(self, req_url, shelf, resources, port, current, intrest):
|
def json_post(self, req_url, shelf, resources, port, current, intrest):
|
||||||
data = {
|
data = {
|
||||||
"shelf": shelf,
|
"shelf": shelf,
|
||||||
@@ -112,7 +152,7 @@ class ChamberView:
|
|||||||
cli_base = LFCliBase(_lfjson_host=self.lanforge_ip, _lfjson_port=self.lanforge_port, )
|
cli_base = LFCliBase(_lfjson_host=self.lanforge_ip, _lfjson_port=self.lanforge_port, )
|
||||||
return cli_base.json_post(req_url, data)
|
return cli_base.json_post(req_url, data)
|
||||||
|
|
||||||
def read_kpi_file(self, column_name, dir_name ):
|
def read_kpi_file(self, column_name, dir_name):
|
||||||
if column_name == None:
|
if column_name == None:
|
||||||
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', engine='python')
|
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', engine='python')
|
||||||
if df.empty == True:
|
if df.empty == True:
|
||||||
@@ -120,14 +160,36 @@ class ChamberView:
|
|||||||
else:
|
else:
|
||||||
return df
|
return df
|
||||||
else:
|
else:
|
||||||
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', usecols=column_name, engine='python')
|
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', usecols=column_name,
|
||||||
|
engine='python')
|
||||||
if df.empty == True:
|
if df.empty == True:
|
||||||
return "empty"
|
return "empty"
|
||||||
else:
|
else:
|
||||||
return df
|
return df
|
||||||
|
|
||||||
|
def attach_report_graphs(self, report_name=None, pdf_name="WIFI Capacity Test PDF Report"):
|
||||||
|
relevant_path = "../reports/" + report_name + "/"
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
pdf = False
|
||||||
|
for i in entries:
|
||||||
|
if ".pdf" in i:
|
||||||
|
pdf = i
|
||||||
|
if pdf:
|
||||||
|
allure.attach.file(source=relevant_path + pdf,
|
||||||
|
name=pdf_name)
|
||||||
|
|
||||||
|
included_extensions = ['png']
|
||||||
|
file_names = [fn for fn in os.listdir(relevant_path)
|
||||||
|
if any(fn.endswith(ext) for ext in included_extensions)]
|
||||||
|
|
||||||
|
a = [item for item in file_names if 'print' not in item]
|
||||||
|
a = [item for item in a if 'logo' not in item]
|
||||||
|
a = [item for item in a if 'Logo' not in item]
|
||||||
|
a = [item for item in a if 'candela' not in item]
|
||||||
|
|
||||||
|
a.sort()
|
||||||
|
for i in a:
|
||||||
|
allure.attach.file(source=relevant_path + i,
|
||||||
|
name=i,
|
||||||
|
attachment_type="image/png", extension=None)
|
||||||
|
|
||||||
|
|||||||
@@ -258,3 +258,78 @@ RADIUS_ACCOUNTING_DATA = {
|
|||||||
"password": "password",
|
"password": "password",
|
||||||
"pk_password": "whatever"
|
"pk_password": "whatever"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PASSPOINT_RADIUS_SERVER_DATA = {
|
||||||
|
"ip": "52.234.179.191",
|
||||||
|
"port": 11812,
|
||||||
|
"secret": "yeababy20!",
|
||||||
|
"user": "nolaradius",
|
||||||
|
"password": "nolastart",
|
||||||
|
"pk_password": "whatever"
|
||||||
|
}
|
||||||
|
|
||||||
|
PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA = {
|
||||||
|
"ip": "52.234.179.191",
|
||||||
|
"port": 11813,
|
||||||
|
"secret": "yeababy20!"
|
||||||
|
}
|
||||||
|
|
||||||
|
PASSPOINT_PROVIDER_INFO = {
|
||||||
|
"mcc": None,
|
||||||
|
"mnc": None,
|
||||||
|
"network": None,
|
||||||
|
"nai_realms": {
|
||||||
|
"domain": "oss.ameriband.com",
|
||||||
|
"encoding": 0,
|
||||||
|
"eap_map": {"EAP-TTLS with username/password": ["Credential Type:username/password",
|
||||||
|
"Non-EAP Inner Authentication Type:MSCHAPV2"]}
|
||||||
|
},
|
||||||
|
"osu_nai_standalone": "anonymous@ameriband.com",
|
||||||
|
"osu_nai_shared": "anonymous@ameriband.com",
|
||||||
|
"roaming_oi": []
|
||||||
|
}
|
||||||
|
|
||||||
|
PASSPOINT_OPERATOR_INFO = {
|
||||||
|
"osen": "Disabled",
|
||||||
|
"domain_name_list": ["telecominfraproject.atlassian.net"],
|
||||||
|
"operator_names": [
|
||||||
|
{"locale": "eng", "name": "Default friendly passpoint_operator name"},
|
||||||
|
{"locale": "fra", "name": "Nom de l'opérateur convivial par défaut"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
PASSPOINT_VENUE_INFO = {
|
||||||
|
"venue_type": {"group": "Business", "type": "Police Station"},
|
||||||
|
"venue_names": [
|
||||||
|
{"locale": "eng", "name": "Example passpoint_venue", "url": "http://www.example.com/info-eng"},
|
||||||
|
{"locale": "fra", "name": "Exemple de lieu", "url": "http://www.example.com/info-fra"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
PASSPOINT_PROFILE_INFO = {
|
||||||
|
"profile_download_url_ios": "https://onboard.almondlabs.net/ttls/AmeriBand-Profile.mobileconfig",
|
||||||
|
"profile_download_url_android": "https://onboard.almondlabs.net/ttls/androidconfig.cfg",
|
||||||
|
"profile_name_on_device": "AmeriBand",
|
||||||
|
"radius_configuration": {
|
||||||
|
"user_defined_nas_id": "FB001AP001",
|
||||||
|
"operator_id": "AmeribandTIP",
|
||||||
|
"radius_acounting_service_interval": 60
|
||||||
|
},
|
||||||
|
"interworking_hs2dot0": "Enabled",
|
||||||
|
"hessid": None,
|
||||||
|
"access_network": {
|
||||||
|
"Access Network Type": "Free Public Network",
|
||||||
|
"Authentication Type": "Acceptance of Terms & Conditions",
|
||||||
|
"Emergency Services Reachable": "Enabled",
|
||||||
|
"Unauthenticated Emergency Service": "Disabled",
|
||||||
|
},
|
||||||
|
"ip_connectivity": {
|
||||||
|
"Internet Connectivity": "Enabled",
|
||||||
|
"IP Address Type": "Public IPv4 Address Available",
|
||||||
|
"Connection Capability": [{"status": "open", "protocol": "TCP", "port": 8888}],
|
||||||
|
"ANQP Domain ID": 1234,
|
||||||
|
"GAS Address 3 Behaviour": "P2P Spec Workaround From Request",
|
||||||
|
"Disable DGAF": False
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ def setup_vlan():
|
|||||||
allure.attach(body=str(vlan_id), name="VLAN Created: ")
|
allure.attach(body=str(vlan_id), name="VLAN Created: ")
|
||||||
yield vlan_id[0]
|
yield vlan_id[0]
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_id,
|
def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_id,
|
||||||
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||||
@@ -126,7 +127,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
# Radius Profile Creation
|
# Radius Profile Creation
|
||||||
if parameter["radius"]:
|
if parameter["radius"]:
|
||||||
radius_info = radius_info
|
radius_info = radius_info
|
||||||
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + testbed
|
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + mode
|
||||||
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
|
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
|
||||||
try:
|
try:
|
||||||
instantiate_profile.create_radius_profile(radius_info=radius_info)
|
instantiate_profile.create_radius_profile(radius_info=radius_info)
|
||||||
@@ -145,379 +146,292 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["open_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||||
|
test_cases["open_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["open_2g"] = False
|
test_cases["open_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
|
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["open_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa":
|
if mode == "wpa":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["wpa_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa_2g"] = False
|
test_cases["wpa_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa2_personal":
|
if mode == "wpa2_personal":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
|
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["wpa2_personal_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa2_personal_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa2_personal_2g"] = False
|
test_cases["wpa2_personal_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa2_personal_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
|
|
||||||
if mode == "wpa_wpa2_personal_mixed":
|
if mode == "wpa_wpa2_personal_mixed":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
profile_data=j)
|
lf_dut_data.append(j)
|
||||||
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
for i in range(len(j["appliedRadios"])):
|
||||||
allure.attach(body=str(creates_profile),
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
|
||||||
|
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa_wpa2_personal_mixed_2g"] = False
|
test_cases["wpa_wpa2_personal_mixed_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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
|
|
||||||
allure.attach(body=str(creates_profile),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa_wpa2_personal_mixed_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa3_personal":
|
if mode == "wpa3_personal":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
print(j)
|
print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["wpa3_personal_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa3_personal_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa3_personal_2g"] = False
|
test_cases["wpa3_personal_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa3_personal_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa3_personal_mixed":
|
if mode == "wpa3_personal_mixed":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
print(j)
|
print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
profile_data=j)
|
lf_dut_data.append(j)
|
||||||
test_cases["wpa3_personal_mixed_2g"] = True
|
for i in range(len(j["appliedRadios"])):
|
||||||
allure.attach(body=str(creates_profile),
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa3_personal_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa3_personal_2g"] = False
|
test_cases["wpa3_personal_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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
|
|
||||||
allure.attach(body=str(creates_profile),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa3_personal_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
|
|
||||||
if mode == "wpa_enterprise":
|
if mode == "wpa_enterprise":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
|
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["wpa_enterprise_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa_enterprise_2g"] = False
|
test_cases["wpa_enterprise_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa_enterprise_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa2_enterprise":
|
if mode == "wpa2_enterprise":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
profile_data=j)
|
lf_dut_data.append(j)
|
||||||
test_cases["wpa2_enterprise_2g"] = True
|
for i in range(len(j["appliedRadios"])):
|
||||||
allure.attach(body=str(creates_profile),
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa2_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa2_enterprise_2g"] = False
|
test_cases["wpa2_enterprise_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa2_enterprise_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa3_enterprise":
|
if mode == "wpa3_enterprise":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
profile_data=j)
|
lf_dut_data.append(j)
|
||||||
test_cases["wpa3_enterprise_2g"] = True
|
for i in range(len(j["appliedRadios"])):
|
||||||
allure.attach(body=str(creates_profile),
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa3_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa3_enterprise_2g"] = False
|
test_cases["wpa3_enterprise_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa3_enterprise_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
|
|
||||||
if mode == "wpa_wpa2_enterprise_mixed":
|
if mode == "wpa_wpa2_enterprise_mixed":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
profile_data=j)
|
lf_dut_data.append(j)
|
||||||
test_cases["wpa_wpa2_enterprise_mixed_2g"] = True
|
for i in range(len(j["appliedRadios"])):
|
||||||
allure.attach(body=str(creates_profile),
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa_wpa2_enterprise_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa_wpa2_enterprise_mixed_2g"] = False
|
test_cases["wpa_wpa2_enterprise_mixed_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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["wpa_wpa2_enterprise_mixed_5g"] = True
|
|
||||||
allure.attach(body=str(creates_profile),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa_wpa2_enterprise_mixed_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
if mode == "wpa3_enterprise_mixed":
|
if mode == "wpa3_enterprise_mixed":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
profile_data=j)
|
lf_dut_data.append(j)
|
||||||
test_cases["wpa3_enterprise_mixed_2g"] = True
|
for i in range(len(j["appliedRadios"])):
|
||||||
allure.attach(body=str(creates_profile),
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa3_enterprise_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa3_enterprise_mixed_2g"] = False
|
test_cases["wpa3_enterprise_mixed_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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_mixed_5g"] = True
|
|
||||||
allure.attach(body=str(creates_profile),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa3_enterprise_mixed_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
|
|
||||||
if mode == "wep":
|
if mode == "wep":
|
||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
# print(j)
|
# print(j)
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"]):
|
|
||||||
lf_dut_data.append(j)
|
lf_dut_data.append(j)
|
||||||
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
test_cases["wpa3_enterprise_2g"] = True
|
lf_dut_data.append(j)
|
||||||
allure.attach(body=str(creates_profile),
|
for i in range(len(j["appliedRadios"])):
|
||||||
name="SSID Profile Created")
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GU", "is5GHzU")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5GL", "is5GHzL")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("5G", "is5GHz")
|
||||||
|
j["appliedRadios"][i] = j["appliedRadios"][i].replace("2G", "is2dot4GHz")
|
||||||
|
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa3_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
test_cases["wpa3_enterprise_2g"] = False
|
test_cases["wpa3_enterprise_2g"] = False
|
||||||
allure.attach(body=str(e),
|
allure.attach(body=str(e),
|
||||||
name="SSID Profile Creation Failed")
|
name="SSID Profile Creation Failed")
|
||||||
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),
|
|
||||||
name="SSID Profile Created")
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
test_cases["wpa3_enterprise_5g"] = False
|
|
||||||
allure.attach(body=str(e),
|
|
||||||
name="SSID Profile Creation Failed")
|
|
||||||
# Equipment AP Profile Creation
|
# Equipment AP Profile Creation
|
||||||
try:
|
try:
|
||||||
instantiate_profile.set_ap_profile(profile_data=profile_data['equipment_ap'])
|
instantiate_profile.set_ap_profile(profile_data=profile_data['equipment_ap'])
|
||||||
@@ -539,11 +453,14 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
print("failed to create AP Profile")
|
print("failed to create AP Profile")
|
||||||
|
|
||||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||||
|
# ssid_names = []
|
||||||
|
# for i in instantiate_profile.profile_creation_ids["ssid"]:
|
||||||
|
# ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
|
||||||
|
# ssid_names.sort()
|
||||||
ssid_names = []
|
ssid_names = []
|
||||||
for i in instantiate_profile.profile_creation_ids["ssid"]:
|
for i in lf_dut_data:
|
||||||
ssid_names.append(instantiate_profile.get_ssid_name_by_profile_id(profile_id=i))
|
ssid_names.append(i["ssid_name"])
|
||||||
ssid_names.sort()
|
ssid_names.sort()
|
||||||
|
|
||||||
# This loop will check the VIF Config with cloud profile
|
# This loop will check the VIF Config with cloud profile
|
||||||
vif_config = []
|
vif_config = []
|
||||||
test_cases['vifc'] = False
|
test_cases['vifc'] = False
|
||||||
@@ -577,16 +494,52 @@ 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)),
|
allure.attach(body=str("VIF Config: " + str(vif_config) + "\n" + "VIF State: " + str(vif_state)),
|
||||||
name="SSID Profiles in VIF Config and VIF State: ")
|
name="SSID Profiles in VIF Config and VIF State: ")
|
||||||
|
|
||||||
|
ap_logs = ap_ssh.logread()
|
||||||
|
allure.attach(body=ap_logs, name="AP LOgs: ")
|
||||||
ssid_info = ap_ssh.get_ssid_info()
|
ssid_info = ap_ssh.get_ssid_info()
|
||||||
ssid_data = []
|
ssid_data = []
|
||||||
print(ssid_info)
|
print(ssid_info)
|
||||||
|
band_mapping = ap_ssh.get_bssid_band_mapping()
|
||||||
|
print(band_mapping)
|
||||||
|
idx_mapping = {}
|
||||||
for i in range(0, len(ssid_info)):
|
for i in range(0, len(ssid_info)):
|
||||||
if ssid_info[i][1] == "OPEN":
|
if ssid_info[i][1] == "OPEN":
|
||||||
ssid_info[i].append("")
|
ssid_info[i].append("")
|
||||||
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] +
|
if ssid_info[i][1] == "OPEN":
|
||||||
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" +
|
||||||
ssid_data.append(ssid)
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
|
||||||
|
if ssid_info[i][1] == "WPA":
|
||||||
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA" +
|
||||||
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
if ssid_info[i][1] == "WPA2":
|
||||||
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA2" +
|
||||||
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
if ssid_info[i][1] == "WPA3_PERSONAL":
|
||||||
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA3" +
|
||||||
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
|
||||||
|
if ssid_info[i][1] == "WPA | WPA2":
|
||||||
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=WPA|WPA2" +
|
||||||
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
|
||||||
|
if ssid_info[i][1] == "EAP-TTLS":
|
||||||
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=EAP-TTLS" +
|
||||||
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
idx_mapping[str(i)] = [ssid_info[i][3], ssid_info[i][2], ssid_info[i][1], band_mapping[ssid_info[i][0]],
|
||||||
|
ssid_info[i][0]]
|
||||||
|
ssid_data.append(ssid)
|
||||||
|
lf_tools.dut_idx_mapping = idx_mapping
|
||||||
# Add bssid password and security from iwinfo data
|
# Add bssid password and security from iwinfo data
|
||||||
# Format SSID Data in the below format
|
# Format SSID Data in the below format
|
||||||
# ssid_data = [
|
# ssid_data = [
|
||||||
@@ -645,14 +598,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'none'
|
j['security'] = 'none'
|
||||||
lf_dut_data.append(j)
|
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
||||||
test_cases["wpa_2g"] = True
|
test_cases["wpa_2g"] = True
|
||||||
allure.attach(body=str(creates_profile),
|
allure.attach(body=str(creates_profile),
|
||||||
@@ -666,14 +617,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'psk'
|
j['security'] = 'psk'
|
||||||
lf_dut_data.append(j)
|
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
||||||
test_cases["wpa_2g"] = True
|
test_cases["wpa_2g"] = True
|
||||||
allure.attach(body=str(creates_profile),
|
allure.attach(body=str(creates_profile),
|
||||||
@@ -687,15 +636,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'psk2'
|
j['security'] = 'psk2'
|
||||||
lf_dut_data.append(j)
|
|
||||||
print("shivam: ", j)
|
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
||||||
test_cases["wpa_2g"] = True
|
test_cases["wpa_2g"] = True
|
||||||
allure.attach(body=str(creates_profile),
|
allure.attach(body=str(creates_profile),
|
||||||
@@ -709,15 +655,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'psk-mixed'
|
j['security'] = 'psk-mixed'
|
||||||
lf_dut_data.append(j)
|
|
||||||
print("shivam: ", j)
|
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
||||||
test_cases["wpa_2g"] = True
|
test_cases["wpa_2g"] = True
|
||||||
allure.attach(body=str(creates_profile),
|
allure.attach(body=str(creates_profile),
|
||||||
@@ -731,15 +674,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'sae'
|
j['security'] = 'sae'
|
||||||
lf_dut_data.append(j)
|
|
||||||
print("shivam: ", j)
|
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
||||||
test_cases["wpa_2g"] = True
|
test_cases["wpa_2g"] = True
|
||||||
allure.attach(body=str(creates_profile),
|
allure.attach(body=str(creates_profile),
|
||||||
@@ -753,15 +693,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'sae-mixed'
|
j['security'] = 'sae-mixed'
|
||||||
lf_dut_data.append(j)
|
|
||||||
print("shivam: ", j)
|
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j)
|
||||||
test_cases["wpa_2g"] = True
|
test_cases["wpa_2g"] = True
|
||||||
allure.attach(body=str(creates_profile),
|
allure.attach(body=str(creates_profile),
|
||||||
@@ -777,15 +714,12 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
for j in profile_data["ssid"][mode]:
|
for j in profile_data["ssid"][mode]:
|
||||||
if mode in get_markers.keys() and get_markers[mode]:
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
try:
|
try:
|
||||||
for i in range(len(j["appliedRadios"])):
|
if j["appliedRadios"].__contains__("2G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzU", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHzL", "5G")
|
if j["appliedRadios"].__contains__("5G"):
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is5GHz", "5G")
|
lf_dut_data.append(j)
|
||||||
j["appliedRadios"][i] = j["appliedRadios"][i].replace("is2dot4GHz", "2G")
|
|
||||||
|
|
||||||
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
j["appliedRadios"] = list(set(j["appliedRadios"]))
|
||||||
j['security'] = 'wpa2'
|
j['security'] = 'wpa2'
|
||||||
lf_dut_data.append(j)
|
|
||||||
RADIUS_SERVER_DATA = radius_info
|
RADIUS_SERVER_DATA = radius_info
|
||||||
RADIUS_ACCOUNTING_DATA = radius_accounting_info
|
RADIUS_ACCOUNTING_DATA = radius_accounting_info
|
||||||
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True,
|
creates_profile = instantiate_profile_obj.add_ssid(ssid_data=j, radius=True,
|
||||||
@@ -810,7 +744,8 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
ap_config_latest = ap_ssh.get_uc_latest_config()
|
ap_config_latest = ap_ssh.get_uc_latest_config()
|
||||||
try:
|
try:
|
||||||
ap_config_latest["uuid"] = 0
|
ap_config_latest["uuid"] = 0
|
||||||
except:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
pass
|
pass
|
||||||
x = 1
|
x = 1
|
||||||
while ap_config_latest != config:
|
while ap_config_latest != config:
|
||||||
@@ -851,9 +786,115 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
|
|||||||
else:
|
else:
|
||||||
print("AP is Not Broadcasting Applied Config")
|
print("AP is Not Broadcasting Applied Config")
|
||||||
allure.attach(name="Config Info", body="AP is Not Broadcasting Applied Config: " + str(allure_body))
|
allure.attach(name="Config Info", body="AP is Not Broadcasting Applied Config: " + str(allure_body))
|
||||||
yield True
|
ap_logs = ap_ssh.logread()
|
||||||
|
allure.attach(body=ap_logs, name="AP LOgs: ")
|
||||||
|
ap_wifi_data = ap_ssh.get_interface_details()
|
||||||
|
idx_mapping = {}
|
||||||
|
ssid_data = []
|
||||||
|
ap_interfaces = list(ap_wifi_data.keys())
|
||||||
|
for interface in range(len(ap_interfaces)):
|
||||||
|
if ap_wifi_data[ap_interfaces[interface]][1] == "none":
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=OPEN" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
if ap_wifi_data[ap_interfaces[interface]][1] == "psk":
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=WPA" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
if ap_wifi_data[ap_interfaces[interface]][1] == "psk-mixed":
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=WPA|WPA2" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
if ap_wifi_data[ap_interfaces[interface]][1] == "psk2":
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=WPA2" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
if ap_wifi_data[ap_interfaces[interface]][1] == "sae":
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=WPA3" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
if ap_wifi_data[ap_interfaces[interface]][1] == "sae-mixed":
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=WPA3" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
else:
|
||||||
|
ssid = ["ssid_idx=" + str(interface) +
|
||||||
|
" ssid=" + ap_wifi_data[ap_interfaces[interface]][0] +
|
||||||
|
" security=EAP-TTLS" +
|
||||||
|
" password=" + ap_wifi_data[ap_interfaces[interface]][2] +
|
||||||
|
" bssid=" + ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
idx_mapping[str(i)] = [ap_wifi_data[ap_interfaces[interface]][0],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][2],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][1],
|
||||||
|
ap_wifi_data[ap_interfaces[interface]][3][0]
|
||||||
|
]
|
||||||
|
# pass
|
||||||
|
ssid_data.append(ssid)
|
||||||
|
lf_tools.ssid_list.append(ap_wifi_data[ap_interfaces[interface]][0])
|
||||||
|
lf_tools.dut_idx_mapping = idx_mapping
|
||||||
|
yield test_cases
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
@@ -887,7 +928,7 @@ def num_stations(request):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def get_vif_state(get_apnos, get_configuration, request):
|
def get_vif_state(get_apnos, get_configuration, request, lf_tools):
|
||||||
if request.config.getoption("1.x"):
|
if request.config.getoption("1.x"):
|
||||||
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||||
vif_state = list(ap_ssh.get_vif_state_ssids())
|
vif_state = list(ap_ssh.get_vif_state_ssids())
|
||||||
@@ -895,7 +936,7 @@ def get_vif_state(get_apnos, get_configuration, request):
|
|||||||
allure.attach(name="vif_state", body=str(vif_state))
|
allure.attach(name="vif_state", body=str(vif_state))
|
||||||
yield vif_state
|
yield vif_state
|
||||||
else:
|
else:
|
||||||
yield []
|
yield lf_tools.ssid_list
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
@@ -905,5 +946,3 @@ def get_vlan_list(get_apnos, get_configuration):
|
|||||||
vlan_list.sort()
|
vlan_list.sort()
|
||||||
allure.attach(name="vlan_list", body=str(vlan_list))
|
allure.attach(name="vlan_list", body=str(vlan_list))
|
||||||
yield vlan_list
|
yield vlan_list
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
Performance Test: Dataplane Throughput Test: Bridge Mode
|
Performance Test: Dataplane Throughput Test: BRIDGE Mode
|
||||||
pytest -m "dataplane_throughput_test and bridge"
|
pytest -m "dataplane_throughput_test and BRIDGE"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.bridge] #, pytest.mark.usefixtures("setup_test_run")]
|
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test,
|
||||||
|
pytest.mark.bridge] #pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
setup_params_general = {
|
setup_params_general = {
|
||||||
"mode": "BRIDGE",
|
"mode": "BRIDGE",
|
||||||
"ssid_modes": {
|
"ssid_modes": {
|
||||||
"wpa2_personal": [
|
"wpa2_personal": [
|
||||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]},
|
||||||
"security_key": "something"}]},
|
|
||||||
"rf": {},
|
"rf": {},
|
||||||
"radius": False
|
"radius": False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@allure.suite("performance")
|
||||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
@allure.feature("BRIDGE MODE Dataplane Throughput Test")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles',
|
'setup_profiles',
|
||||||
[setup_params_general],
|
[setup_params_general],
|
||||||
@@ -30,17 +30,18 @@ setup_params_general = {
|
|||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
class TestDataplaneThroughputBridge(object):
|
class TestDataplaneThroughputBRIDGE(object):
|
||||||
"""Dataplane THroughput Bridge Mode
|
"""Dataplane THroughput BRIDGE Mode
|
||||||
pytest -m "dataplane_throughput_test and bridge"
|
pytest -m "dataplane_throughput_test and BRIDGE"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
def test_client_wpa2_personal_2g(self, get_vif_state,
|
def test_tcp_upd_2g_band(self, get_vif_state, lf_tools,
|
||||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
get_configuration):
|
get_configuration):
|
||||||
"""Dataplane THroughput Bridge Mode
|
"""Dataplane THroughput BRIDGE Mode
|
||||||
pytest -m "dataplane_throughput_test and bridge and wpa2_personal and twog"
|
pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and twog"
|
||||||
"""
|
"""
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssid_name = profile_data["ssid_name"]
|
ssid_name = profile_data["ssid_name"]
|
||||||
@@ -62,15 +63,7 @@ class TestDataplaneThroughputBridge(object):
|
|||||||
instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE",
|
instance_name="TIP_DPT_DPT_WPA2_2G_BRIDGE",
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
vlan_id=vlan, dut_name=dut_name)
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/" + report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G")
|
||||||
pdf = False
|
|
||||||
for i in entries:
|
|
||||||
if ".pdf" in i:
|
|
||||||
pdf = i
|
|
||||||
if pdf:
|
|
||||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
|
||||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
|
||||||
print("Test Completed... Cleaning up Stations")
|
|
||||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
assert station
|
assert station
|
||||||
else:
|
else:
|
||||||
@@ -78,10 +71,10 @@ class TestDataplaneThroughputBridge(object):
|
|||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
def test_client_wpa2_personal_5g(self, get_vif_state,
|
def test_tcp_upd_5g_band(self, get_vif_state, lf_tools,
|
||||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
||||||
"""Dataplane THroughput Bridge Mode
|
"""Dataplane THroughput BRIDGE Mode
|
||||||
pytest -m "dataplane_throughput_test and bridge and wpa2_personal and fiveg"
|
pytest -m "dataplane_throughput_test and BRIDGE and wpa2_personal and fiveg"
|
||||||
"""
|
"""
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssid_name = profile_data["ssid_name"]
|
ssid_name = profile_data["ssid_name"]
|
||||||
@@ -99,19 +92,13 @@ class TestDataplaneThroughputBridge(object):
|
|||||||
station_name=station_names_fiveg, vlan_id=vlan)
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
|
||||||
if station:
|
if station:
|
||||||
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_DPT_DPT_WPA2_5G_BRIDGE",
|
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
instance_name="TIP_DPT_DPT_WPA2_5G_BRIDGE",
|
||||||
|
vlan_id=vlan, dut_name=dut_name)
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/"+report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G")
|
||||||
pdf = False
|
|
||||||
for i in entries:
|
|
||||||
if ".pdf" in i:
|
|
||||||
pdf = i
|
|
||||||
if pdf:
|
|
||||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
|
||||||
print("Test Completed... Cleaning up Stations")
|
print("Test Completed... Cleaning up Stations")
|
||||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
assert station
|
assert station
|
||||||
else:
|
else:
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
|
|||||||
@@ -8,20 +8,22 @@ import os
|
|||||||
import pytest
|
import pytest
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.nat, pytest.mark.usefixtures("setup_test_run")]
|
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test,
|
||||||
|
pytest.mark.nat]# pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
setup_params_general = {
|
setup_params_general = {
|
||||||
"mode": "NAT",
|
"mode": "NAT",
|
||||||
"ssid_modes": {
|
"ssid_modes": {
|
||||||
"wpa2_personal": [
|
"wpa2_personal": [
|
||||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]},
|
||||||
"security_key": "something"}]},
|
|
||||||
"rf": {},
|
"rf": {},
|
||||||
"radius": False
|
"radius": False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@allure.suite("performance")
|
||||||
|
@allure.feature("BRIDGE MODE Dataplane Throughput Test")
|
||||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles',
|
'setup_profiles',
|
||||||
@@ -34,11 +36,12 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
"""Dataplane THroughput nat Mode
|
"""Dataplane THroughput nat Mode
|
||||||
pytest -m "dataplane_throughput_test and nat"
|
pytest -m "dataplane_throughput_test and nat"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
def test_client_wpa2_personal_2g(self, get_vif_state,
|
def test_tcp_upd_2g_band(self, get_vif_state, lf_tools,
|
||||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
get_configuration):
|
get_configuration):
|
||||||
"""Dataplane THroughput nat Mode
|
"""Dataplane THroughput nat Mode
|
||||||
pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog"
|
pytest -m "dataplane_throughput_test and nat and wpa2_personal and twog"
|
||||||
"""
|
"""
|
||||||
@@ -50,6 +53,7 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
band = "twog"
|
band = "twog"
|
||||||
vlan = 1
|
vlan = 1
|
||||||
dut_name = create_lanforge_chamberview_dut
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
get_vif_state.append(ssid_name)
|
||||||
if ssid_name not in get_vif_state:
|
if ssid_name not in get_vif_state:
|
||||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||||
@@ -62,15 +66,7 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
instance_name="TIP_DPT_DPT_WPA2_2G_NAT",
|
instance_name="TIP_DPT_DPT_WPA2_2G_NAT",
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
vlan_id=vlan, dut_name=dut_name)
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/" + report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G")
|
||||||
pdf = False
|
|
||||||
for i in entries:
|
|
||||||
if ".pdf" in i:
|
|
||||||
pdf = i
|
|
||||||
if pdf:
|
|
||||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
|
||||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
|
||||||
print("Test Completed... Cleaning up Stations")
|
|
||||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
assert station
|
assert station
|
||||||
else:
|
else:
|
||||||
@@ -78,8 +74,8 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
|
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
def test_client_wpa2_personal_5g(self, get_vif_state,
|
def test_tcp_upd_5g_band(self, get_vif_state, lf_tools,
|
||||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
||||||
"""Dataplane THroughput nat Mode
|
"""Dataplane THroughput nat Mode
|
||||||
pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg"
|
pytest -m "dataplane_throughput_test and nat and wpa2_personal and fiveg"
|
||||||
"""
|
"""
|
||||||
@@ -99,19 +95,13 @@ class TestDataplaneThroughputNAT(object):
|
|||||||
station_name=station_names_fiveg, vlan_id=vlan)
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
|
||||||
if station:
|
if station:
|
||||||
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_DPT_DPT_WPA2_5G_NAT",
|
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
instance_name="TIP_DPT_DPT_WPA2_5G_NAT",
|
||||||
|
vlan_id=vlan, dut_name=dut_name)
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
entries = os.listdir("../reports/"+report_name + '/')
|
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G")
|
||||||
pdf = False
|
|
||||||
for i in entries:
|
|
||||||
if ".pdf" in i:
|
|
||||||
pdf = i
|
|
||||||
if pdf:
|
|
||||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
|
||||||
print("Test Completed... Cleaning up Stations")
|
print("Test Completed... Cleaning up Stations")
|
||||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
assert station
|
assert station
|
||||||
else:
|
else:
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
|
|||||||
@@ -1,117 +1,112 @@
|
|||||||
"""
|
# """
|
||||||
|
#
|
||||||
Performance Test: Dataplane Throughput Test: vlan Mode
|
# Performance Test: Dataplane Throughput Test: VLAN Mode
|
||||||
pytest -m "dataplane_throughput_test and vlan"
|
# pytest -m "dataplane_throughput_test and VLAN"
|
||||||
|
#
|
||||||
"""
|
# """
|
||||||
import os
|
# import os
|
||||||
import pytest
|
# import pytest
|
||||||
import allure
|
# import allure
|
||||||
|
#
|
||||||
pytestmark = [pytest.mark.performance, pytest.mark.dataplane_throughput_test, pytest.mark.vlan, pytest.mark.usefixtures("setup_test_run")]
|
# pytestmark = [pytest.mark.performance,
|
||||||
|
# pytest.mark.vlan, pytest.mark.usefixtures("setup_test_run")]
|
||||||
setup_params_general = {
|
#
|
||||||
"mode": "VLAN",
|
# setup_params_general = {
|
||||||
"ssid_modes": {
|
# "mode": "VLAN",
|
||||||
"wpa2_personal": [
|
# "ssid_modes": {
|
||||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
# "wpa2_personal": [
|
||||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
# {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100},
|
||||||
"security_key": "something"}]},
|
# {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}]},
|
||||||
"rf": {},
|
# "rf": {},
|
||||||
"radius": False
|
# "radius": False
|
||||||
}
|
# }
|
||||||
|
#
|
||||||
|
#
|
||||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
|
# @allure.suite("performance")
|
||||||
@pytest.mark.parametrize(
|
# @allure.feature("VLAN MODE Dataplane Throughput Test")
|
||||||
'setup_profiles',
|
# @pytest.mark.parametrize(
|
||||||
[setup_params_general],
|
# 'setup_profiles',
|
||||||
indirect=True,
|
# [setup_params_general],
|
||||||
scope="class"
|
# indirect=True,
|
||||||
)
|
# scope="class"
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
# )
|
||||||
class TestDataplaneThroughputVLAN(object):
|
# @pytest.mark.usefixtures("setup_profiles")
|
||||||
"""Dataplane THroughput vlan Mode
|
# @pytest.mark.parametrize(
|
||||||
pytest -m "dataplane_throughput_test and vlan"
|
# 'create_vlan',
|
||||||
"""
|
# [setup_params_general],
|
||||||
@pytest.mark.wpa2_personal
|
# indirect=True,
|
||||||
@pytest.mark.twog
|
# scope="class"
|
||||||
def test_client_wpa2_personal_2g(self, get_vif_state,
|
# )
|
||||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
# @pytest.mark.usefixtures("create_vlan")
|
||||||
get_configuration):
|
# class TestDataplaneThroughputVLAN(object):
|
||||||
"""Dataplane THroughput vlan Mode
|
# """Dataplane THroughput VLAN Mode
|
||||||
pytest -m "dataplane_throughput_test and vlan and wpa2_personal and twog"
|
# pytest -m "dataplane_throughput_test and VLAN"
|
||||||
"""
|
# """
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
#
|
||||||
ssid_name = profile_data["ssid_name"]
|
# @pytest.mark.wpa2_personal
|
||||||
security_key = profile_data["security_key"]
|
# @pytest.mark.twog
|
||||||
security = "wpa2"
|
# def test_tcp_upd_2g_band(self, get_vif_state, lf_tools,
|
||||||
mode = "VLAN"
|
# lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
band = "twog"
|
# get_configuration):
|
||||||
vlan = 100
|
# """Dataplane THroughput VLAN Mode
|
||||||
dut_name = create_lanforge_chamberview_dut
|
# pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and twog"
|
||||||
if ssid_name not in get_vif_state:
|
# """
|
||||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
# ssid_name = profile_data["ssid_name"]
|
||||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
# security_key = profile_data["security_key"]
|
||||||
passkey=security_key, mode=mode, band=band,
|
# security = "wpa2"
|
||||||
station_name=station_names_twog, vlan_id=vlan)
|
# mode = "VLAN"
|
||||||
|
# band = "twog"
|
||||||
if station:
|
# vlan = 100
|
||||||
dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
|
# dut_name = create_lanforge_chamberview_dut
|
||||||
instance_name="TIP_DPT_DPT_WPA2_2G_VLAN",
|
# if ssid_name not in get_vif_state:
|
||||||
vlan_id=vlan, dut_name=dut_name)
|
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||||
entries = os.listdir("../reports/" + report_name + '/')
|
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
pdf = False
|
# passkey=security_key, mode=mode, band=band,
|
||||||
for i in entries:
|
# station_name=station_names_twog, vlan_id=vlan)
|
||||||
if ".pdf" in i:
|
#
|
||||||
pdf = i
|
# if station:
|
||||||
if pdf:
|
# dp_obj = lf_test.dataplane(station_name=station_names_twog, mode=mode,
|
||||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
# instance_name="TIP_DPT_DPT_WPA2_2G_VLAN",
|
||||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
# vlan_id=vlan, dut_name=dut_name)
|
||||||
print("Test Completed... Cleaning up Stations")
|
# report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
# lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 2.4G")
|
||||||
assert station
|
# lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
else:
|
# assert station
|
||||||
assert False
|
# else:
|
||||||
|
# assert False
|
||||||
@pytest.mark.wpa2_personal
|
#
|
||||||
@pytest.mark.fiveg
|
# @pytest.mark.wpa2_personal
|
||||||
def test_client_wpa2_personal_5g(self, get_vif_state,
|
# @pytest.mark.fiveg
|
||||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
# def test_tcp_upd_5g_band(self, get_vif_state, lf_tools,
|
||||||
"""Dataplane THroughput vlan Mode
|
# lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
|
||||||
pytest -m "dataplane_throughput_test and vlan and wpa2_personal and fiveg"
|
# """Dataplane THroughput VLAN Mode
|
||||||
"""
|
# pytest -m "dataplane_throughput_test and VLAN and wpa2_personal and fiveg"
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
# """
|
||||||
ssid_name = profile_data["ssid_name"]
|
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
security_key = profile_data["security_key"]
|
# ssid_name = profile_data["ssid_name"]
|
||||||
security = "wpa2"
|
# security_key = profile_data["security_key"]
|
||||||
mode = "VLAN"
|
# security = "wpa2"
|
||||||
band = "fiveg"
|
# mode = "VLAN"
|
||||||
vlan = 100
|
# band = "fiveg"
|
||||||
dut_name = create_lanforge_chamberview_dut
|
# vlan = 100
|
||||||
if ssid_name not in get_vif_state:
|
# dut_name = create_lanforge_chamberview_dut
|
||||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
# if ssid_name not in get_vif_state:
|
||||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||||
passkey=security_key, mode=mode, band=band,
|
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
station_name=station_names_fiveg, vlan_id=vlan)
|
# passkey=security_key, mode=mode, band=band,
|
||||||
|
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
if station:
|
#
|
||||||
dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
|
# if station:
|
||||||
instance_name="TIP_DPT_DPT_WPA2_5G_VLAN", vlan_id=vlan, dut_name=dut_name)
|
# dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode,
|
||||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
# instance_name="TIP_DPT_DPT_WPA2_5G_VLAN",
|
||||||
entries = os.listdir("../reports/"+report_name + '/')
|
# vlan_id=vlan, dut_name=dut_name)
|
||||||
pdf = False
|
# report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
for i in entries:
|
# lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Dataplane Throughput Test - TCP-UDP 5G")
|
||||||
if ".pdf" in i:
|
# print("Test Completed... Cleaning up Stations")
|
||||||
pdf = i
|
# lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
if pdf:
|
# assert station
|
||||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
# else:
|
||||||
print("Test Completed... Cleaning up Stations")
|
# assert False
|
||||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
|
||||||
assert station
|
|
||||||
else:
|
|
||||||
assert False
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user