mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-03 04:18:15 +00:00
removed lanforge-scripts
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
Submodule lanforge/lanforge-scripts deleted from 7b596c3f2f
@@ -32,6 +32,8 @@ import lf_dataplane_test
|
|||||||
from lf_dataplane_test import DataplaneTest
|
from lf_dataplane_test import DataplaneTest
|
||||||
from csv_to_influx import CSVtoInflux
|
from csv_to_influx import CSVtoInflux
|
||||||
from influx2 import RecordInflux
|
from influx2 import RecordInflux
|
||||||
|
import lf_rvr_test
|
||||||
|
from lf_rvr_test import RvrTest
|
||||||
|
|
||||||
|
|
||||||
class RunTest:
|
class RunTest:
|
||||||
@@ -271,6 +273,7 @@ class RunTest:
|
|||||||
raw_lines = [['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types: UDP;TCP'],
|
raw_lines = [['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types: UDP;TCP'],
|
||||||
["show_3s: 1"], ["show_ll_graphs: 1"], ["show_log: 1"]]
|
["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,
|
||||||
@@ -298,6 +301,41 @@ class RunTest:
|
|||||||
|
|
||||||
return self.dataplane_obj
|
return self.dataplane_obj
|
||||||
|
|
||||||
|
def ratevsrange(self, station_name=None, mode="BRIDGE", vlan_id=100, download_rate="85%", dut_name="TIP",
|
||||||
|
upload_rate="0", duration="1m", instance_name="test_demo", raw_lines=None):
|
||||||
|
if mode == "BRIDGE":
|
||||||
|
self.client_connect.upstream_port = self.upstream_port
|
||||||
|
elif mode == "NAT":
|
||||||
|
self.client_connect.upstream_port = self.upstream_port
|
||||||
|
elif mode == "VLAN":
|
||||||
|
self.client_connect.upstream_port = self.upstream_port + "." + str(vlan_id)
|
||||||
|
|
||||||
|
self.rvr_obj = RvrTest(lf_host=self.lanforge_ip,
|
||||||
|
lf_port=self.lanforge_port,
|
||||||
|
ssh_port=self.lf_ssh_port,
|
||||||
|
local_path=self.local_report_path,
|
||||||
|
lf_user="lanforge",
|
||||||
|
lf_password="lanforge",
|
||||||
|
instance_name=instance_name,
|
||||||
|
config_name="rvr_config",
|
||||||
|
upstream="1.1." + self.upstream_port,
|
||||||
|
pull_report=True,
|
||||||
|
load_old_cfg=False,
|
||||||
|
upload_speed=upload_rate,
|
||||||
|
download_speed=download_rate,
|
||||||
|
duration=duration,
|
||||||
|
station="1.1." + station_name[0],
|
||||||
|
dut=dut_name,
|
||||||
|
raw_lines=raw_lines)
|
||||||
|
self.rvr_obj.setup()
|
||||||
|
self.rvr_obj.run()
|
||||||
|
report_name = self.rvr_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
influx = CSVtoInflux(influxdb=self.influxdb, _influx_tag=self.influx_params["influx_tag"],
|
||||||
|
target_csv=self.local_report_path + report_name + "/kpi.csv")
|
||||||
|
influx.post_to_influx()
|
||||||
|
|
||||||
|
return self.rvr_obj
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
lanforge_data = {
|
lanforge_data = {
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ from create_chamberview_dut import DUT
|
|||||||
import time
|
import time
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
class ChamberView:
|
class ChamberView:
|
||||||
|
|
||||||
@@ -104,4 +106,22 @@ 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 ):
|
||||||
|
if column_name == None:
|
||||||
|
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', engine='python')
|
||||||
|
if df.empty == True:
|
||||||
|
return "empty"
|
||||||
|
else:
|
||||||
|
return df
|
||||||
|
else:
|
||||||
|
df = pd.read_csv("../reports/" + str(dir_name) + "/kpi.csv", sep=r'\t', usecols=column_name, engine='python')
|
||||||
|
if df.empty == True:
|
||||||
|
return "empty"
|
||||||
|
else:
|
||||||
|
return df
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,56 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
CONFIGURATION = {
|
CONFIGURATION = {
|
||||||
"basic-01": {
|
"advanced-02": {
|
||||||
|
"controller": {
|
||||||
|
'url': "https://wlan-portal-svc-nola-01.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||||
|
'username': 'support@example.com', # cloud controller Login
|
||||||
|
'password': 'support', # Cloud Controller Login Password
|
||||||
|
'version': '1.1.0-SNAPSHOT', # Controller version
|
||||||
|
'commit_date': "2021-04-27" # Controller version sdk, commit date
|
||||||
|
},
|
||||||
|
'access_point': [
|
||||||
|
{
|
||||||
|
'model': 'eap102', # AP Model, can be found in ap console using "node" command
|
||||||
|
'mode': 'wifi6', # wifi5/wifi6 can be found on AP Hardware page on Confluence
|
||||||
|
'serial': '903cb39d6959', # "node" command has serial_number information
|
||||||
|
'jumphost': True,
|
||||||
|
# True, if you have AP On serial console and not ssh access, False, if you have AP ssh access from the machine
|
||||||
|
'ip': "localhost",
|
||||||
|
# IP Address of System, which has AP Connected to serial cable (if jumphost is True), else - AP IP Address
|
||||||
|
'username': "lanforge", # ssh username of system (lab-ctlr/ap)
|
||||||
|
'password': "pumpkin77", # ssh password for system (lab-ctlr/ap)
|
||||||
|
'port': 8803, # 22, # ssh port for system (lab-ctlr/ap)
|
||||||
|
'jumphost_tty': '/dev/ttyAP3', # if jumphost is True, enter the serial console device name
|
||||||
|
'version': "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/ecw5410/dev/eap102-2021-06-25-pending-b6743c3.tar.gz"
|
||||||
|
# Enter the Target AP Version URL for Testing
|
||||||
|
}
|
||||||
|
],
|
||||||
|
# Traffic generator
|
||||||
|
"traffic_generator": {
|
||||||
|
"name": "lanforge", # ( lanforge/ perfecto)
|
||||||
|
# Details for LANforge system
|
||||||
|
"details": {
|
||||||
|
"ip": "localhost", # localhost,
|
||||||
|
"port": 8802, # 8802,
|
||||||
|
"ssh_port": 8804,
|
||||||
|
"2.4G-Radio": ["wiphy2", "wiphy4"],
|
||||||
|
"5G-Radio": ["wiphy5", "wiphy3"],
|
||||||
|
"AX-Radio": [],
|
||||||
|
"upstream": "1.1.eth1",
|
||||||
|
"upstream_subnet": "10.28.2.1/24",
|
||||||
|
"uplink": "1.1.eth3",
|
||||||
|
"2.4G-Station-Name": "wlan0",
|
||||||
|
"5G-Station-Name": "wlan0",
|
||||||
|
"AX-Station-Name": "ax"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"basic-01": {
|
||||||
"controller": {
|
"controller": {
|
||||||
'url': "https://wlan-portal-svc-nola-02.cicd.lab.wlan.tip.build", # API base url for the controller
|
'url': "https://wlan-portal-svc-nola-02.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||||
'username': 'support@example.com',
|
'username': 'support@example.com',
|
||||||
|
|||||||
@@ -513,6 +513,13 @@ def create_lanforge_chamberview_dut(get_configuration, testbed):
|
|||||||
testbed=testbed, access_point_data=get_configuration["access_point"])
|
testbed=testbed, access_point_data=get_configuration["access_point"])
|
||||||
yield True
|
yield True
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def lf_tools(get_configuration, testbed):
|
||||||
|
""" Create a DUT on LANforge"""
|
||||||
|
obj = ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"],
|
||||||
|
testbed=testbed, access_point_data=get_configuration["access_point"])
|
||||||
|
yield obj
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def create_vlan(request, testbed, get_configuration):
|
def create_vlan(request, testbed, get_configuration):
|
||||||
|
|||||||
@@ -0,0 +1,670 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append(
|
||||||
|
os.path.dirname(
|
||||||
|
os.path.realpath(__file__)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if "libs" not in sys.path:
|
||||||
|
sys.path.append(f'../libs')
|
||||||
|
|
||||||
|
from controller.controller import ProfileUtility
|
||||||
|
import time
|
||||||
|
from lanforge.lf_tests import RunTest
|
||||||
|
from lanforge.lf_tools import ChamberView
|
||||||
|
import pytest
|
||||||
|
import allure
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def instantiate_profile():
|
||||||
|
yield ProfileUtility
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def lf_tools(get_configuration, testbed):
|
||||||
|
lf_tools_obj = ChamberView(lanforge_data=get_configuration['traffic_generator']['details'],
|
||||||
|
access_point_data=get_configuration['access_point'],
|
||||||
|
testbed=testbed)
|
||||||
|
yield lf_tools_obj
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def create_lanforge_chamberview(lf_tools):
|
||||||
|
scenario_object, scenario_name = lf_tools.Chamber_View()
|
||||||
|
return scenario_name
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def create_lanforge_chamberview_dut(lf_tools):
|
||||||
|
dut_object, dut_name = lf_tools.Create_Dut()
|
||||||
|
return dut_name
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def setup_vlan():
|
||||||
|
vlan_id = [100]
|
||||||
|
allure.attach(body=str(vlan_id), name="VLAN Created: ")
|
||||||
|
yield vlan_id[0]
|
||||||
|
|
||||||
|
|
||||||
|
@allure.feature("CLIENT CONNECTIVITY SETUP")
|
||||||
|
@pytest.fixture(scope="class")
|
||||||
|
def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment_id,
|
||||||
|
instantiate_profile, get_markers, create_lanforge_chamberview_dut, lf_tools,
|
||||||
|
get_security_flags, get_configuration, radius_info, get_apnos):
|
||||||
|
instantiate_profile = instantiate_profile(sdk_client=setup_controller)
|
||||||
|
vlan_id, mode = 0, 0
|
||||||
|
instantiate_profile.cleanup_objects()
|
||||||
|
parameter = dict(request.param)
|
||||||
|
print(parameter)
|
||||||
|
test_cases = {}
|
||||||
|
profile_data = {}
|
||||||
|
if parameter['mode'] not in ["BRIDGE", "NAT", "VLAN"]:
|
||||||
|
print("Invalid Mode: ", parameter['mode'])
|
||||||
|
allure.attach(body=parameter['mode'], name="Invalid Mode: ")
|
||||||
|
yield test_cases
|
||||||
|
|
||||||
|
if parameter['mode'] == "NAT":
|
||||||
|
mode = "NAT"
|
||||||
|
vlan_id = 1
|
||||||
|
if parameter['mode'] == "BRIDGE":
|
||||||
|
mode = "BRIDGE"
|
||||||
|
vlan_id = 1
|
||||||
|
if parameter['mode'] == "VLAN":
|
||||||
|
mode = "BRIDGE"
|
||||||
|
vlan_id = setup_vlan
|
||||||
|
|
||||||
|
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Equipment-AP-" + parameter['mode'])
|
||||||
|
|
||||||
|
profile_data["equipment_ap"] = {"profile_name": testbed + "-Equipment-AP-" + parameter['mode']}
|
||||||
|
profile_data["ssid"] = {}
|
||||||
|
for i in parameter["ssid_modes"]:
|
||||||
|
profile_data["ssid"][i] = []
|
||||||
|
for j in range(len(parameter["ssid_modes"][i])):
|
||||||
|
profile_name = testbed + "-SSID-" + i + "-" + str(j) + "-" + parameter['mode']
|
||||||
|
data = parameter["ssid_modes"][i][j]
|
||||||
|
data["profile_name"] = profile_name
|
||||||
|
if "mode" not in dict(data).keys():
|
||||||
|
data["mode"] = mode
|
||||||
|
if "vlan" not in dict(data).keys():
|
||||||
|
data["vlan"] = vlan_id
|
||||||
|
instantiate_profile.delete_profile_by_name(profile_name=profile_name)
|
||||||
|
profile_data["ssid"][i].append(data)
|
||||||
|
# print(profile_name)
|
||||||
|
# print(profile_data)
|
||||||
|
|
||||||
|
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
|
||||||
|
time.sleep(10)
|
||||||
|
"""
|
||||||
|
Setting up rf profile
|
||||||
|
"""
|
||||||
|
rf_profile_data = {
|
||||||
|
"name": "RF-Profile-" + testbed + "-" + parameter['mode'] + "-" +
|
||||||
|
get_configuration['access_point'][0]['mode']
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in parameter["rf"]:
|
||||||
|
rf_profile_data[i] = parameter['rf'][i]
|
||||||
|
# print(rf_profile_data)
|
||||||
|
|
||||||
|
try:
|
||||||
|
instantiate_profile.delete_profile_by_name(profile_name=rf_profile_data['name'])
|
||||||
|
instantiate_profile.set_rf_profile(profile_data=rf_profile_data,
|
||||||
|
mode=get_configuration['access_point'][0]['mode'])
|
||||||
|
allure.attach(body=str(rf_profile_data),
|
||||||
|
name="RF Profile Created : " + get_configuration['access_point'][0]['mode'])
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
allure.attach(body=str(e), name="Exception ")
|
||||||
|
|
||||||
|
# Radius Profile Creation
|
||||||
|
if parameter["radius"]:
|
||||||
|
radius_info = radius_info
|
||||||
|
radius_info["name"] = testbed + "-Automation-Radius-Profile-" + mode
|
||||||
|
instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + mode)
|
||||||
|
try:
|
||||||
|
instantiate_profile.create_radius_profile(radius_info=radius_info)
|
||||||
|
allure.attach(body=str(radius_info),
|
||||||
|
name="Radius Profile Created")
|
||||||
|
test_cases['radius_profile'] = True
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases['radius_profile'] = False
|
||||||
|
|
||||||
|
# SSID Profile Creation
|
||||||
|
lf_dut_data = []
|
||||||
|
for mode in profile_data['ssid']:
|
||||||
|
if mode == "open":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_open_ssid_profile(profile_data=j)
|
||||||
|
test_cases["open_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["open_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa2_personal_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa2_personal_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa2_personal_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa_wpa2_personal_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa_wpa2_personal_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa_wpa2_personal_mixed_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_personal_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa3_personal_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa3_personal_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_personal_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa3_personal_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa3_personal_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa_enterprise_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa_enterprise_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa2_enterprise_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa2_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa2_enterprise_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_enterprise_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa3_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa3_enterprise_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa_wpa2_enterprise_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa_wpa2_enterprise_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa_wpa2_enterprise_mixed_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wpa3_enterprise_mixed_ssid_profile(
|
||||||
|
profile_data=j)
|
||||||
|
test_cases["wpa3_enterprise_mixed_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa3_enterprise_mixed_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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":
|
||||||
|
for j in profile_data["ssid"][mode]:
|
||||||
|
# print(j)
|
||||||
|
if mode in get_markers.keys() and get_markers[mode]:
|
||||||
|
try:
|
||||||
|
if "twog" in get_markers.keys() and get_markers["twog"] and "is2dot4GHz" in list(
|
||||||
|
j["appliedRadios"]):
|
||||||
|
lf_dut_data.append(j)
|
||||||
|
creates_profile = instantiate_profile.create_wep_ssid_profile(profile_data=j)
|
||||||
|
test_cases["wpa3_enterprise_2g"] = True
|
||||||
|
allure.attach(body=str(creates_profile),
|
||||||
|
name="SSID Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["wpa3_enterprise_2g"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
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
|
||||||
|
try:
|
||||||
|
instantiate_profile.set_ap_profile(profile_data=profile_data['equipment_ap'])
|
||||||
|
test_cases["equipment_ap"] = True
|
||||||
|
allure.attach(body=str(profile_data['equipment_ap']),
|
||||||
|
name="Equipment AP Profile Created")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
test_cases["equipment_ap"] = False
|
||||||
|
allure.attach(body=str(e),
|
||||||
|
name="Equipment AP Profile Creation Failed")
|
||||||
|
|
||||||
|
# Push the Equipment AP Profile to AP
|
||||||
|
try:
|
||||||
|
for i in get_equipment_id:
|
||||||
|
instantiate_profile.push_profile_old_method(equipment_id=i)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print("failed to create AP Profile")
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
|
# This loop will check the VIF Config with cloud profile
|
||||||
|
vif_config = []
|
||||||
|
test_cases['vifc'] = False
|
||||||
|
for i in range(0, 18):
|
||||||
|
vif_config = list(ap_ssh.get_vif_config_ssids())
|
||||||
|
vif_config.sort()
|
||||||
|
print(vif_config)
|
||||||
|
print(ssid_names)
|
||||||
|
if ssid_names == vif_config:
|
||||||
|
test_cases['vifc'] = True
|
||||||
|
break
|
||||||
|
time.sleep(10)
|
||||||
|
allure.attach(body=str("VIF Config: " + str(vif_config) + "\n" + "SSID Pushed from Controller: " + str(ssid_names)),
|
||||||
|
name="SSID Profiles in VIF Config and Controller: ")
|
||||||
|
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||||
|
|
||||||
|
# This loop will check the VIF Config with VIF State
|
||||||
|
test_cases['vifs'] = False
|
||||||
|
for i in range(0, 18):
|
||||||
|
vif_state = list(ap_ssh.get_vif_state_ssids())
|
||||||
|
vif_state.sort()
|
||||||
|
vif_config = list(ap_ssh.get_vif_config_ssids())
|
||||||
|
vif_config.sort()
|
||||||
|
print(vif_config)
|
||||||
|
print(vif_state)
|
||||||
|
if vif_state == vif_config:
|
||||||
|
test_cases['vifs'] = True
|
||||||
|
break
|
||||||
|
time.sleep(10)
|
||||||
|
allure.attach(body=str("VIF Config: " + str(vif_config) + "\n" + "VIF State: " + str(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_data = []
|
||||||
|
print(ssid_info)
|
||||||
|
for i in range(0, len(ssid_info)):
|
||||||
|
if ssid_info[i][1] == "OPEN":
|
||||||
|
ssid_info[i].append("")
|
||||||
|
if ssid_info[i][1] == "OPEN":
|
||||||
|
ssid = ["ssid_idx=" + str(i) + " ssid=" + ssid_info[i][3] + " security=OPEN" +
|
||||||
|
" password=" + ssid_info[i][2] + " bssid=" + ssid_info[i][0]]
|
||||||
|
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]]
|
||||||
|
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]]
|
||||||
|
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]]
|
||||||
|
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]]
|
||||||
|
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]]
|
||||||
|
|
||||||
|
ssid_data.append(ssid)
|
||||||
|
|
||||||
|
# Add bssid password and security from iwinfo data
|
||||||
|
# Format SSID Data in the below format
|
||||||
|
# ssid_data = [
|
||||||
|
# ['ssid_idx=0 ssid=Default-SSID-2g security=WPA|WEP| password=12345678 bssid=90:3c:b3:94:48:58'],
|
||||||
|
# ['ssid_idx=1 ssid=Default-SSID-5gl password=12345678 bssid=90:3c:b3:94:48:59']
|
||||||
|
# ]
|
||||||
|
allure.attach(name="SSID DATA IN LF DUT", body=str(ssid_data))
|
||||||
|
lf_tools.update_ssid(ssid_data=ssid_data)
|
||||||
|
|
||||||
|
def teardown_session():
|
||||||
|
print("\nRemoving Profiles")
|
||||||
|
instantiate_profile.delete_profile_by_name(profile_name=profile_data['equipment_ap']['profile_name'])
|
||||||
|
instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["ssid"])
|
||||||
|
instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["radius"])
|
||||||
|
instantiate_profile.delete_profile(instantiate_profile.profile_creation_ids["rf"])
|
||||||
|
allure.attach(body=str(profile_data['equipment_ap']['profile_name'] + "\n"),
|
||||||
|
name="Tear Down in Profiles ")
|
||||||
|
time.sleep(20)
|
||||||
|
|
||||||
|
request.addfinalizer(teardown_session)
|
||||||
|
yield test_cases
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def lf_test(get_configuration, setup_influx):
|
||||||
|
# print(get_configuration)
|
||||||
|
obj = RunTest(lanforge_data=get_configuration['traffic_generator']['details'], influx_params=setup_influx)
|
||||||
|
# pytest.exit("")
|
||||||
|
yield obj
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def station_names_twog(request, get_configuration):
|
||||||
|
station_names = []
|
||||||
|
for i in range(0, int(request.config.getini("num_stations"))):
|
||||||
|
station_names.append(get_configuration["traffic_generator"]["details"]["2.4G-Station-Name"] + "0" + str(i))
|
||||||
|
yield station_names
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def station_names_fiveg(request, get_configuration):
|
||||||
|
station_names = []
|
||||||
|
for i in range(0, int(request.config.getini("num_stations"))):
|
||||||
|
station_names.append(get_configuration["traffic_generator"]["details"]["5G-Station-Name"] + "0" + str(i))
|
||||||
|
yield station_names
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def num_stations(request):
|
||||||
|
num_sta = int(request.config.getini("num_stations"))
|
||||||
|
yield num_sta
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="class")
|
||||||
|
def get_vif_state(get_apnos, get_configuration):
|
||||||
|
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||||
|
vif_config = list(ap_ssh.get_vif_config_ssids())
|
||||||
|
vif_state = list(ap_ssh.get_vif_state_ssids())
|
||||||
|
vif_state.sort()
|
||||||
|
vif_config.sort()
|
||||||
|
allure.attach(name="vif_state", body=str(vif_state))
|
||||||
|
yield vif_state
|
||||||
|
|
||||||
|
@pytest.fixture(scope="class")
|
||||||
|
def get_vlan_list(get_apnos, get_configuration):
|
||||||
|
ap_ssh = get_apnos(get_configuration['access_point'][0], pwd="../libs/apnos/")
|
||||||
|
vlan_list = list(ap_ssh.get_vlan())
|
||||||
|
vlan_list.sort()
|
||||||
|
allure.attach(name="vlan_list", body=str(vlan_list))
|
||||||
|
yield vlan_list
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,352 @@
|
|||||||
|
"""
|
||||||
|
|
||||||
|
Advanced Test: Rate v/s Range test under various combinations: Bridge Mode
|
||||||
|
pytest -m "ratevsrange and bridge " -s -vvv --skip-testrail --testbed=basic-01 --alluredir=../allure_reports
|
||||||
|
--> allure serve ../allure_reports/
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
import allure
|
||||||
|
import os.path
|
||||||
|
import csv
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
pytestmark = [pytest.mark.performance_advanced , pytest.mark.ratevsrange, pytest.mark.bridge ,pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "BRIDGE",
|
||||||
|
"ssid_modes": {
|
||||||
|
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||||
|
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||||
|
"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||||
|
"security_key": "something"}]},
|
||||||
|
"rf": {
|
||||||
|
"is5GHz": {"channelBandwidth": "is20MHz"},
|
||||||
|
"is5GHzL": {"channelBandwidth": "is20MHz"},
|
||||||
|
"is5GHzU": {"channelBandwidth": "is20MHz"}
|
||||||
|
},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
|
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
'setup_profiles',
|
||||||
|
[setup_params_general],
|
||||||
|
indirect=True,
|
||||||
|
scope="class"
|
||||||
|
)
|
||||||
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
|
@pytest.mark.Mhz20
|
||||||
|
class TestRatevsRangeBridge(object):
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.client11b
|
||||||
|
def test_client_wpa2_personal_2g_11b(self, get_vif_state,
|
||||||
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and client11b" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2495
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "BRIDGE"
|
||||||
|
band = "twog"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_twog, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11b'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||||
|
instance_name="BRIDGE_RVR_11B",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
print("report name ", report_name)
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
print("entries",entries)
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
|
||||||
|
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
|
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
if str(kpi_val) == "empty":
|
||||||
|
print("kpi is empty, station did not got ip, Test failed")
|
||||||
|
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||||
|
assert False
|
||||||
|
else:
|
||||||
|
print("Test passed successfully")
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.client11g
|
||||||
|
def test_client_wpa2_personal_2g_11g(self, get_vif_state,
|
||||||
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and bridge and client11g" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2496
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "BRIDGE"
|
||||||
|
band = "twog"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_twog, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11g'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||||
|
instance_name="BRIDGE_RVR_11G",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
|
script_dir = os.path.dirname(__file__) # Script directory
|
||||||
|
print(script_dir)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
if str(kpi_val) == "empty":
|
||||||
|
print("kpi is empty, station did not got ip, Test failed")
|
||||||
|
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||||
|
assert False
|
||||||
|
else:
|
||||||
|
print("Test passed successfully")
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11a
|
||||||
|
def test_client_wpa2_personal_5g_11a(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration,lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and bridge and client11a" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2497
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "BRIDGE"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11a'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="BRIDGE_RVR_11A",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=['numeric-score'], dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
if str(kpi_val) == "empty":
|
||||||
|
print("kpi is empty, station did not got ip, Test failed")
|
||||||
|
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||||
|
assert False
|
||||||
|
else:
|
||||||
|
print("Test passed successfully")
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11an
|
||||||
|
def test_client_wpa2_personal_5g_11an(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and bridge and client11an" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2498
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "BRIDGE"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11an'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="BRIDGE_RVR_11AN",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
if str(kpi_val) == "empty":
|
||||||
|
print("kpi is empty, station did not got ip, Test failed")
|
||||||
|
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||||
|
assert False
|
||||||
|
else:
|
||||||
|
print("Test passed successfully")
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11ac
|
||||||
|
def test_client_wpa2_personal_5g_11ac(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and bridge and client11ac" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2499
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "BRIDGE"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'] ,['attenuator2: 1.1.3059'], ['attenuations: 0..+50..950'],['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="BRIDGE_RVR_11AC",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
if str(kpi_val) == "empty":
|
||||||
|
print("kpi is empty, station did not got ip, Test failed")
|
||||||
|
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||||
|
assert False
|
||||||
|
else:
|
||||||
|
print("Test passed successfully")
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
315
tests/e2e/advanced/rate_vs_range/wpa2_personal/test_nat_mode.py
Normal file
315
tests/e2e/advanced/rate_vs_range/wpa2_personal/test_nat_mode.py
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
"""
|
||||||
|
|
||||||
|
Advanced Test: Rate v/s Range test under various combinations: NAT Mode
|
||||||
|
pytest -m "throughput_benchmark_test and nat" -s -vvv --skip-testrail --testbed=basic-01
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
import allure
|
||||||
|
|
||||||
|
pytestmark = [pytest.mark.performance, pytest.mark.ratevsrange, pytest.mark.nat ,pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||||
|
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||||
|
"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||||
|
"security_key": "something"}]},
|
||||||
|
"rf": {
|
||||||
|
"is5GHz": {"channelBandwidth": "is20MHz"},
|
||||||
|
"is5GHzL": {"channelBandwidth": "is20MHz"},
|
||||||
|
"is5GHzU": {"channelBandwidth": "is20MHz"}
|
||||||
|
},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
|
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
'setup_profiles',
|
||||||
|
[setup_params_general],
|
||||||
|
indirect=True,
|
||||||
|
scope="class"
|
||||||
|
)
|
||||||
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
|
@pytest.mark.Mhz20
|
||||||
|
class TestRatevsRangeNat(object):
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.client11b
|
||||||
|
def test_client_wpa2_personal_2g_11b(self, get_vif_state,
|
||||||
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and nat and 11bclient" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2495
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "NAT"
|
||||||
|
band = "twog"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_twog, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11b'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||||
|
instance_name="NAT_RVR_11B",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.client11g
|
||||||
|
def test_client_wpa2_personal_2g_11g(self, get_vif_state,
|
||||||
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and nat and client11g" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2496
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "NAT"
|
||||||
|
band = "twog"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_twog, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11G'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||||
|
instance_name="NAT_RVR_11G",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11a
|
||||||
|
def test_client_wpa2_personal_5g_11a(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and nat and client11a" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2497
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "NAT"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11a'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="NAT_RVR_11A",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11an
|
||||||
|
def test_client_wpa2_personal_5g_11an(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration,lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and nat and client11an" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2498
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "NAT"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11an'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="NAT_RVR_11AN",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11ac
|
||||||
|
def test_client_wpa2_personal_5g_11ac(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and nat and client11ac" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2499
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "NAT"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="NAT_RVR_11AC",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
313
tests/e2e/advanced/rate_vs_range/wpa2_personal/test_vlan_mode.py
Normal file
313
tests/e2e/advanced/rate_vs_range/wpa2_personal/test_vlan_mode.py
Normal file
@@ -0,0 +1,313 @@
|
|||||||
|
"""
|
||||||
|
|
||||||
|
Advanced Test: Rate v/s Range test under various combinations: VLAN Mode
|
||||||
|
pytest -m "throughput_benchmark_test and vlan" -s -vvv --skip-testrail --testbed=basic-01
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
import allure
|
||||||
|
|
||||||
|
pytestmark = [pytest.mark.performance_advanced, pytest.mark.ratevsrange, pytest.mark.vlan ,pytest.mark.usefixtures("setup_test_run")]
|
||||||
|
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "VLAN",
|
||||||
|
"ssid_modes": {
|
||||||
|
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||||
|
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||||
|
"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||||
|
"security_key": "something"}]},
|
||||||
|
"rf": {
|
||||||
|
"is5GHz": {"channelBandwidth": "is20MHz"},
|
||||||
|
"is5GHzL": {"channelBandwidth": "is20MHz"},
|
||||||
|
"is5GHzU": {"channelBandwidth": "is20MHz"}
|
||||||
|
},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
|
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
'setup_profiles',
|
||||||
|
[setup_params_general],
|
||||||
|
indirect=True,
|
||||||
|
scope="class"
|
||||||
|
)
|
||||||
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
|
@pytest.mark.Mhz20
|
||||||
|
class TestRatevsRangeVlan(object):
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.client11b
|
||||||
|
def test_client_wpa2_personal_2g_11b(self, get_vif_state,
|
||||||
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and vlan and 11bclient" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2495
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "VLAN"
|
||||||
|
band = "twog"
|
||||||
|
vlan = 100
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_twog, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11b'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||||
|
instance_name="VLAN_RVR_11B",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.client11g
|
||||||
|
def test_client_wpa2_personal_2g_11g(self, get_vif_state,
|
||||||
|
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and vlan and client11g" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2496
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "VLAN"
|
||||||
|
band = "twog"
|
||||||
|
vlan = 100
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_twog, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11g'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||||
|
instance_name="VLAN_RVR_11G",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11a
|
||||||
|
def test_client_wpa2_personal_5g_11a(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and vlan and client11a" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2497
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "VLAN"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 100
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11a'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="VLAN_RVR_11A",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11an
|
||||||
|
def test_client_wpa2_personal_5g_11an(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration,lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and vlan and client11an" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2498
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "VLAN"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 100
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11an'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="VLAN_RVR_11AN",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
|
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.client11ac
|
||||||
|
def test_client_wpa2_personal_5g_11ac(self, get_vif_state,
|
||||||
|
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||||
|
get_configuration, lf_tools):
|
||||||
|
"""
|
||||||
|
|
||||||
|
pytest -m "ratevsrange and vlan and client11ac" -s -vvv --skip-testrail --testbed=advanced-02
|
||||||
|
jira- wifi-2499
|
||||||
|
"""
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssid_name = profile_data["ssid_name"]
|
||||||
|
security_key = profile_data["security_key"]
|
||||||
|
security = "wpa2"
|
||||||
|
mode = "VLAN"
|
||||||
|
band = "fiveg"
|
||||||
|
vlan = 1
|
||||||
|
dut_name = create_lanforge_chamberview_dut
|
||||||
|
if ssid_name not in 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")
|
||||||
|
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||||
|
passkey=security_key, mode=mode, band=band,
|
||||||
|
station_name=station_names_fiveg, vlan_id=vlan)
|
||||||
|
print("station", station)
|
||||||
|
|
||||||
|
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||||
|
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||||
|
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||||
|
|
||||||
|
if station:
|
||||||
|
time.sleep(3)
|
||||||
|
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||||
|
instance_name="VLAN_RVR_11AC",
|
||||||
|
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||||
|
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||||
|
entries = os.listdir("../reports/" + report_name + '/')
|
||||||
|
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"] + "ratevsrange")
|
||||||
|
print("Test Completed... Cleaning up Stations")
|
||||||
|
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||||
|
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||||
|
print(str(kpi_val))
|
||||||
|
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||||
|
assert station
|
||||||
|
else:
|
||||||
|
assert False
|
||||||
Reference in New Issue
Block a user