mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-11-03 20:38:05 +00:00 
			
		
		
		
	firmware url given from command line
Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
		@@ -209,6 +209,7 @@ class Controller(ConfigureController):
 | 
				
			|||||||
        payload = {}
 | 
					        payload = {}
 | 
				
			||||||
        headers = self.configuration.api_key_prefix
 | 
					        headers = self.configuration.api_key_prefix
 | 
				
			||||||
        response = requests.request("GET", url, headers=headers, data=payload)
 | 
					        response = requests.request("GET", url, headers=headers, data=payload)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if response.status_code == 200:
 | 
					        if response.status_code == 200:
 | 
				
			||||||
            status_data = response.json()
 | 
					            status_data = response.json()
 | 
				
			||||||
            # print(status_data)
 | 
					            # print(status_data)
 | 
				
			||||||
@@ -216,9 +217,10 @@ class Controller(ConfigureController):
 | 
				
			|||||||
                current_ap_fw = status_data[2]['details']['reportedSwVersion']
 | 
					                current_ap_fw = status_data[2]['details']['reportedSwVersion']
 | 
				
			||||||
                # print(current_ap_fw)
 | 
					                # print(current_ap_fw)
 | 
				
			||||||
                return current_ap_fw
 | 
					                return current_ap_fw
 | 
				
			||||||
            except:
 | 
					            except Exception as e:
 | 
				
			||||||
 | 
					                print(e)
 | 
				
			||||||
                current_ap_fw = "error"
 | 
					                current_ap_fw = "error"
 | 
				
			||||||
                return False
 | 
					                return e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
@@ -972,7 +974,6 @@ class FirmwareUtility:
 | 
				
			|||||||
            exit()
 | 
					            exit()
 | 
				
			||||||
        if (force_upgrade is True) or (self.should_upgrade_ap_fw(equipment_id=equipment_id)):
 | 
					        if (force_upgrade is True) or (self.should_upgrade_ap_fw(equipment_id=equipment_id)):
 | 
				
			||||||
            firmware_id = self.upload_fw_on_cloud(force_upload=force_upload)
 | 
					            firmware_id = self.upload_fw_on_cloud(force_upload=force_upload)
 | 
				
			||||||
            print(firmware_id)
 | 
					 | 
				
			||||||
            time.sleep(5)
 | 
					            time.sleep(5)
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
                obj = self.equipment_gateway_client.request_firmware_update(equipment_id=equipment_id,
 | 
					                obj = self.equipment_gateway_client.request_firmware_update(equipment_id=equipment_id,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,17 @@
 | 
				
			|||||||
 | 
					## Test Case Execution Suite
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```commandline
 | 
				
			||||||
 | 
					pytest -m sanity -s -vvv --testbed=basic-01 -o build=<firmware URL>
 | 
				
			||||||
 | 
					pytest -m sanity_55 -s -vvv --testbed=basic-01 -o build=<firmware URL>
 | 
				
			||||||
 | 
					pytest -m performance -s -vvv --testbed=basic-01 -o build=<firmware URL>
 | 
				
			||||||
 | 
					pytest -m firmware -s -vvv --testbed=basic-01 -o build=<firmware URL>
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					## You can customize the markets with and/or/not logical options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## wlan-testing framework Information
 | 
					## wlan-testing framework Information
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**_pytest  uses setup > test > tear_down_** <br>
 | 
					**_pytest  uses setup > test > tear_down_** <br>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,10 @@ import sys
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
import allure
 | 
					import allure
 | 
				
			||||||
 | 
					import logging
 | 
				
			||||||
 | 
					if "logs" not in os.listdir():
 | 
				
			||||||
 | 
					    os.mkdir("logs/")
 | 
				
			||||||
 | 
					logging.basicConfig(level=logging.INFO, filename="logs/"+'{:%Y-%m-%d-%H-%M-%S}.log'.format(datetime.datetime.now()))
 | 
				
			||||||
sys.path.append(
 | 
					sys.path.append(
 | 
				
			||||||
    os.path.dirname(
 | 
					    os.path.dirname(
 | 
				
			||||||
        os.path.realpath(__file__)
 | 
					        os.path.realpath(__file__)
 | 
				
			||||||
@@ -336,9 +339,19 @@ def check_ap_firmware_ssh(get_configuration):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.fixture(scope="session")
 | 
					@pytest.fixture(scope="session")
 | 
				
			||||||
def setup_test_run(setup_controller, upgrade_firmware, check_ap_firmware_cloud, check_ap_firmware_ssh):
 | 
					def setup_test_run(setup_controller, upgrade_firmware, get_configuration, get_equipment_id, get_latest_firmware,
 | 
				
			||||||
 | 
					                   get_apnos):
 | 
				
			||||||
    """used to upgrade the firmware on AP and should be called on each test case on a module level"""
 | 
					    """used to upgrade the firmware on AP and should be called on each test case on a module level"""
 | 
				
			||||||
    if check_ap_firmware_ssh == check_ap_firmware_cloud:
 | 
					    active_fw_list = []
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        for access_point in get_configuration['access_point']:
 | 
				
			||||||
 | 
					            ap_ssh = get_apnos(access_point)
 | 
				
			||||||
 | 
					            active_fw = ap_ssh.get_active_firmware()
 | 
				
			||||||
 | 
					            active_fw_list.append(active_fw)
 | 
				
			||||||
 | 
					    except Exception as e:
 | 
				
			||||||
 | 
					        print(e)
 | 
				
			||||||
 | 
					        active_fw_list = []
 | 
				
			||||||
 | 
					    if active_fw_list == get_latest_firmware:
 | 
				
			||||||
        yield True
 | 
					        yield True
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        pytest.exit("AP is not Upgraded tp Target Firmware versions")
 | 
					        pytest.exit("AP is not Upgraded tp Target Firmware versions")
 | 
				
			||||||
@@ -397,7 +410,7 @@ def get_markers(request, get_security_flags):
 | 
				
			|||||||
    for item in session.items:
 | 
					    for item in session.items:
 | 
				
			||||||
        for j in item.iter_markers():
 | 
					        for j in item.iter_markers():
 | 
				
			||||||
            markers.append(j.name)
 | 
					            markers.append(j.name)
 | 
				
			||||||
    print(set(markers))
 | 
					    # print(set(markers))
 | 
				
			||||||
    for i in security:
 | 
					    for i in security:
 | 
				
			||||||
        if set(markers).__contains__(i):
 | 
					        if set(markers).__contains__(i):
 | 
				
			||||||
            security_dict[i] = True
 | 
					            security_dict[i] = True
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -123,7 +123,7 @@ def setup_profiles(request, setup_controller, testbed, setup_vlan, get_equipment
 | 
				
			|||||||
    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-" + testbed
 | 
				
			||||||
        instantiate_profile.delete_profile_by_name(profile_name=testbed + "-Automation-Radius-Profile-" + testbed)
 | 
					        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)
 | 
				
			||||||
            allure.attach(body=str(radius_info),
 | 
					            allure.attach(body=str(radius_info),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,10 @@
 | 
				
			|||||||
import os
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Performance Test: Dataplane Throughput Test: Bridge Mode
 | 
				
			||||||
 | 
					    pytest -m "dataplane_throughput_test and bridge"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
import allure
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -17,7 +22,6 @@ setup_params_general = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.basic
 | 
					 | 
				
			||||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
					@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
				
			||||||
@pytest.mark.parametrize(
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
    'setup_profiles',
 | 
					    'setup_profiles',
 | 
				
			||||||
@@ -27,11 +31,17 @@ setup_params_general = {
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
@pytest.mark.usefixtures("setup_profiles")
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
class TestDataplaneThroughputBridge(object):
 | 
					class TestDataplaneThroughputBridge(object):
 | 
				
			||||||
 | 
					    """Dataplane THroughput Bridge Mode
 | 
				
			||||||
 | 
					       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, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					    def test_client_wpa2_personal_2g(self, get_vif_state,
 | 
				
			||||||
 | 
					                                     lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					                                     get_configuration):
 | 
				
			||||||
 | 
					        """Dataplane THroughput Bridge Mode
 | 
				
			||||||
 | 
					           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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
@@ -40,6 +50,9 @@ class TestDataplaneThroughputBridge(object):
 | 
				
			|||||||
        band = "twog"
 | 
					        band = "twog"
 | 
				
			||||||
        vlan = 1
 | 
					        vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					        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,
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
                                         passkey=security_key, mode=mode, band=band,
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
                                         station_name=station_names_twog, vlan_id=vlan)
 | 
					                                         station_name=station_names_twog, vlan_id=vlan)
 | 
				
			||||||
@@ -65,7 +78,11 @@ class TestDataplaneThroughputBridge(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.fiveg
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
    def test_client_wpa2_personal_5g(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
 | 
					    def test_client_wpa2_personal_5g(self, get_vif_state,
 | 
				
			||||||
 | 
					                                     lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
 | 
				
			||||||
 | 
					        """Dataplane THroughput Bridge Mode
 | 
				
			||||||
 | 
					           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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
@@ -74,6 +91,9 @@ class TestDataplaneThroughputBridge(object):
 | 
				
			|||||||
        band = "fiveg"
 | 
					        band = "fiveg"
 | 
				
			||||||
        vlan = 1
 | 
					        vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					        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,
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
                                         passkey=security_key, mode=mode, band=band,
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
					                                         station_name=station_names_fiveg, vlan_id=vlan)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Performance Test: Dataplane Throughput Test: nat Mode
 | 
				
			||||||
 | 
					    pytest -m "dataplane_throughput_test and nat"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
import allure
 | 
					import allure
 | 
				
			||||||
@@ -16,7 +22,6 @@ setup_params_general = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.basic
 | 
					 | 
				
			||||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
 | 
					@allure.feature("NAT MODE CLIENT CONNECTIVITY")
 | 
				
			||||||
@pytest.mark.parametrize(
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
    'setup_profiles',
 | 
					    'setup_profiles',
 | 
				
			||||||
@@ -26,11 +31,17 @@ setup_params_general = {
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
@pytest.mark.usefixtures("setup_profiles")
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
class TestDataplaneThroughputNAT(object):
 | 
					class TestDataplaneThroughputNAT(object):
 | 
				
			||||||
 | 
					    """Dataplane THroughput nat Mode
 | 
				
			||||||
 | 
					       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, setup_profiles, lf_test, station_names_twog, get_configuration,
 | 
					    def test_client_wpa2_personal_2g(self, get_vif_state,
 | 
				
			||||||
                                     create_lanforge_chamberview_dut):
 | 
					                                     lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
 | 
					                                     get_configuration):
 | 
				
			||||||
 | 
					        """Dataplane THroughput nat Mode
 | 
				
			||||||
 | 
					           pytest -m "dataplane_throughput_test and nat 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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
@@ -39,6 +50,9 @@ class TestDataplaneThroughputNAT(object):
 | 
				
			|||||||
        band = "twog"
 | 
					        band = "twog"
 | 
				
			||||||
        vlan = 1
 | 
					        vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					        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,
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
                                         passkey=security_key, mode=mode, band=band,
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
                                         station_name=station_names_twog, vlan_id=vlan)
 | 
					                                         station_name=station_names_twog, vlan_id=vlan)
 | 
				
			||||||
@@ -64,8 +78,11 @@ class TestDataplaneThroughputNAT(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.fiveg
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
    def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, get_configuration,
 | 
					    def test_client_wpa2_personal_5g(self, get_vif_state,
 | 
				
			||||||
                                     create_lanforge_chamberview_dut):
 | 
					                                     lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
 | 
				
			||||||
 | 
					        """Dataplane THroughput nat Mode
 | 
				
			||||||
 | 
					           pytest -m "dataplane_throughput_test and nat 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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
@@ -74,25 +91,27 @@ class TestDataplaneThroughputNAT(object):
 | 
				
			|||||||
        band = "fiveg"
 | 
					        band = "fiveg"
 | 
				
			||||||
        vlan = 1
 | 
					        vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					        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,
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
                                         passkey=security_key, mode=mode, band=band,
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
                                         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,
 | 
					            dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
 | 
				
			||||||
                                       instance_name="TIP_PERF_DPT_WPA2_5G",
 | 
					                              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 + '/')
 | 
					            entries = os.listdir("../reports/"+report_name + '/')
 | 
				
			||||||
            pdf = False
 | 
					            pdf = False
 | 
				
			||||||
            for i in entries:
 | 
					            for i in entries:
 | 
				
			||||||
                if ".pdf" in i:
 | 
					                if ".pdf" in i:
 | 
				
			||||||
                    pdf = i
 | 
					                    pdf = i
 | 
				
			||||||
            if pdf:
 | 
					            if pdf:
 | 
				
			||||||
                allure.attach.file(source="../reports/" + report_name + "/" + pdf,
 | 
					                allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
 | 
				
			||||||
                                   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,5 +1,10 @@
 | 
				
			|||||||
import os
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Performance Test: Dataplane Throughput Test: vlan Mode
 | 
				
			||||||
 | 
					    pytest -m "dataplane_throughput_test and vlan"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
import allure
 | 
					import allure
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -17,8 +22,6 @@ setup_params_general = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.basic
 | 
					 | 
				
			||||||
@pytest.mark.shivam
 | 
					 | 
				
			||||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
 | 
					@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
 | 
				
			||||||
@pytest.mark.parametrize(
 | 
					@pytest.mark.parametrize(
 | 
				
			||||||
    'setup_profiles',
 | 
					    'setup_profiles',
 | 
				
			||||||
@@ -28,19 +31,28 @@ setup_params_general = {
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
@pytest.mark.usefixtures("setup_profiles")
 | 
					@pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
class TestDataplaneThroughputVLAN(object):
 | 
					class TestDataplaneThroughputVLAN(object):
 | 
				
			||||||
 | 
					    """Dataplane THroughput vlan Mode
 | 
				
			||||||
 | 
					       pytest -m "dataplane_throughput_test and vlan"
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.twog
 | 
					    @pytest.mark.twog
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, setup_profiles, lf_test, station_names_twog, get_configuration,
 | 
					    def test_client_wpa2_personal_2g(self, get_vif_state,
 | 
				
			||||||
                                     create_lanforge_chamberview_dut):
 | 
					                                     lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
 | 
					                                     get_configuration):
 | 
				
			||||||
 | 
					        """Dataplane THroughput vlan Mode
 | 
				
			||||||
 | 
					           pytest -m "dataplane_throughput_test and vlan 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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					        security = "wpa2"
 | 
				
			||||||
        mode = "VLAN"
 | 
					        mode = "VLAN"
 | 
				
			||||||
        band = "twog"
 | 
					        band = "twog"
 | 
				
			||||||
        vlan = 1
 | 
					        vlan = 100
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					        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,
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
                                         passkey=security_key, mode=mode, band=band,
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
                                         station_name=station_names_twog, vlan_id=vlan)
 | 
					                                         station_name=station_names_twog, vlan_id=vlan)
 | 
				
			||||||
@@ -66,35 +78,40 @@ class TestDataplaneThroughputVLAN(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					    @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.fiveg
 | 
					    @pytest.mark.fiveg
 | 
				
			||||||
    def test_client_wpa2_personal_5g(self, setup_profiles, lf_test, station_names_fiveg, get_configuration,
 | 
					    def test_client_wpa2_personal_5g(self, get_vif_state,
 | 
				
			||||||
                                     create_lanforge_chamberview_dut):
 | 
					                                     lf_test, station_names_fiveg, create_lanforge_chamberview_dut, get_configuration):
 | 
				
			||||||
 | 
					        """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]
 | 
					        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
 | 
				
			||||||
        ssid_name = profile_data["ssid_name"]
 | 
					        ssid_name = profile_data["ssid_name"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					        security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					        security = "wpa2"
 | 
				
			||||||
        mode = "VLAN"
 | 
					        mode = "VLAN"
 | 
				
			||||||
        band = "fiveg"
 | 
					        band = "fiveg"
 | 
				
			||||||
        vlan = 1
 | 
					        vlan = 100
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					        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,
 | 
					        station = lf_test.Client_Connect(ssid=ssid_name, security=security,
 | 
				
			||||||
                                         passkey=security_key, mode=mode, band=band,
 | 
					                                         passkey=security_key, mode=mode, band=band,
 | 
				
			||||||
                                         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,
 | 
					            dp_obj = lf_test.dataplane(station_name=station_names_fiveg, mode=mode, instance_name="TIP_PERF_DPT_WPA2_5G",
 | 
				
			||||||
                                       instance_name="TIP_PERF_DPT_WPA2_5G",
 | 
					                              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 + '/')
 | 
					            entries = os.listdir("../reports/"+report_name + '/')
 | 
				
			||||||
            pdf = False
 | 
					            pdf = False
 | 
				
			||||||
            for i in entries:
 | 
					            for i in entries:
 | 
				
			||||||
                if ".pdf" in i:
 | 
					                if ".pdf" in i:
 | 
				
			||||||
                    pdf = i
 | 
					                    pdf = i
 | 
				
			||||||
            if pdf:
 | 
					            if pdf:
 | 
				
			||||||
                allure.attach.file(source="../reports/" + report_name + "/" + pdf,
 | 
					                allure.attach.file(source="../reports/" + report_name + "/" + pdf, name=get_configuration["access_point"][0]["model"] + "_dataplane")
 | 
				
			||||||
                                   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,66 +1,66 @@
 | 
				
			|||||||
"""
 | 
					# """
 | 
				
			||||||
    Performance : Wifi Capacity Test : Bridge Mode
 | 
					#     Performance : Wifi Capacity Test : Bridge Mode
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
"""
 | 
					# """
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
import pytest
 | 
					# import pytest
 | 
				
			||||||
import allure
 | 
					# import allure
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge]
 | 
					# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge]
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
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": ["is2dot4GHz"], "security_key": "something"},
 | 
				
			||||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
					#             {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
				
			||||||
             "security_key": "something"}]},
 | 
					#              "security_key": "something"}]},
 | 
				
			||||||
    "rf": {},
 | 
					#     "rf": {},
 | 
				
			||||||
    "radius": False
 | 
					#     "radius": False
 | 
				
			||||||
}
 | 
					# }
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
@pytest.mark.basic
 | 
					# @pytest.mark.basic
 | 
				
			||||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
					# @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
 | 
				
			||||||
@pytest.mark.parametrize(
 | 
					# @pytest.mark.parametrize(
 | 
				
			||||||
    'setup_profiles',
 | 
					#     'setup_profiles',
 | 
				
			||||||
    [setup_params_general],
 | 
					#     [setup_params_general],
 | 
				
			||||||
    indirect=True,
 | 
					#     indirect=True,
 | 
				
			||||||
    scope="class"
 | 
					#     scope="class"
 | 
				
			||||||
)
 | 
					# )
 | 
				
			||||||
@pytest.mark.usefixtures("setup_profiles")
 | 
					# @pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
class TestWifiCapacityBridgeMode(object):
 | 
					# class TestWifiCapacityBridgeMode(object):
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.twog
 | 
					#     @pytest.mark.twog
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					#     def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					#                                      get_configuration):
 | 
				
			||||||
        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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					#         security = "wpa2"
 | 
				
			||||||
        mode = "BRIDGE"
 | 
					#         mode = "BRIDGE"
 | 
				
			||||||
        band = "twog"
 | 
					#         band = "twog"
 | 
				
			||||||
        vlan = 1
 | 
					#         vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					#         dut_name = create_lanforge_chamberview_dut
 | 
				
			||||||
        PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
					#         PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
				
			||||||
                                     security="wpa2", mode="BRIDGE", band="twog",
 | 
					#                                      security="wpa2", mode="BRIDGE", band="twog",
 | 
				
			||||||
                                     instance_name="wct_instance", )
 | 
					#                                      instance_name="wct_instance", )
 | 
				
			||||||
        assert PASS
 | 
					#         assert PASS
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.fiveg
 | 
					#     @pytest.mark.fiveg
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					#     def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					#                                      get_configuration):
 | 
				
			||||||
        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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					#         security = "wpa2"
 | 
				
			||||||
        mode = "BRIDGE"
 | 
					#         mode = "BRIDGE"
 | 
				
			||||||
        band = "fiveg"
 | 
					#         band = "fiveg"
 | 
				
			||||||
        vlan = 1
 | 
					#         vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					#         dut_name = create_lanforge_chamberview_dut
 | 
				
			||||||
        PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
					#         PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
				
			||||||
                                     security=security, mode=mode, band=band,
 | 
					#                                      security=security, mode=mode, band=band,
 | 
				
			||||||
                                     instance_name="wct_instance", )
 | 
					#                                      instance_name="wct_instance", )
 | 
				
			||||||
        assert PASS
 | 
					#         assert PASS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,66 +1,66 @@
 | 
				
			|||||||
"""
 | 
					# """
 | 
				
			||||||
    Performance : Wifi Capacity Test : NAT Mode
 | 
					#     Performance : Wifi Capacity Test : NAT Mode
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
"""
 | 
					# """
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
import pytest
 | 
					# import pytest
 | 
				
			||||||
import allure
 | 
					# import allure
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat]
 | 
					# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.nat]
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
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": ["is2dot4GHz"], "security_key": "something"},
 | 
				
			||||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
					#             {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
				
			||||||
             "security_key": "something"}]},
 | 
					#              "security_key": "something"}]},
 | 
				
			||||||
    "rf": {},
 | 
					#     "rf": {},
 | 
				
			||||||
    "radius": False
 | 
					#     "radius": False
 | 
				
			||||||
}
 | 
					# }
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
@pytest.mark.basic
 | 
					# @pytest.mark.basic
 | 
				
			||||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
 | 
					# @allure.feature("NAT MODE CLIENT CONNECTIVITY")
 | 
				
			||||||
@pytest.mark.parametrize(
 | 
					# @pytest.mark.parametrize(
 | 
				
			||||||
    'setup_profiles',
 | 
					#     'setup_profiles',
 | 
				
			||||||
    [setup_params_general],
 | 
					#     [setup_params_general],
 | 
				
			||||||
    indirect=True,
 | 
					#     indirect=True,
 | 
				
			||||||
    scope="class"
 | 
					#     scope="class"
 | 
				
			||||||
)
 | 
					# )
 | 
				
			||||||
@pytest.mark.usefixtures("setup_profiles")
 | 
					# @pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
class TestWifiCapacityNATMode(object):
 | 
					# class TestWifiCapacityNATMode(object):
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.twog
 | 
					#     @pytest.mark.twog
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					#     def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					#                                      get_configuration):
 | 
				
			||||||
        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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					#         security = "wpa2"
 | 
				
			||||||
        mode = "NAT"
 | 
					#         mode = "NAT"
 | 
				
			||||||
        band = "twog"
 | 
					#         band = "twog"
 | 
				
			||||||
        vlan = 1
 | 
					#         vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					#         dut_name = create_lanforge_chamberview_dut
 | 
				
			||||||
        PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
					#         PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
				
			||||||
                                     security="wpa2", mode="NAT", band="twog",
 | 
					#                                      security="wpa2", mode="NAT", band="twog",
 | 
				
			||||||
                                     instance_name="wct_instance", )
 | 
					#                                      instance_name="wct_instance", )
 | 
				
			||||||
        assert PASS
 | 
					#         assert PASS
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.fiveg
 | 
					#     @pytest.mark.fiveg
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					#     def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					#                                      get_configuration):
 | 
				
			||||||
        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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					#         security = "wpa2"
 | 
				
			||||||
        mode = "NAT"
 | 
					#         mode = "NAT"
 | 
				
			||||||
        band = "fiveg"
 | 
					#         band = "fiveg"
 | 
				
			||||||
        vlan = 1
 | 
					#         vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					#         dut_name = create_lanforge_chamberview_dut
 | 
				
			||||||
        PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
					#         PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
				
			||||||
                                     security=security, mode=mode, band=band,
 | 
					#                                      security=security, mode=mode, band=band,
 | 
				
			||||||
                                     instance_name="wct_instance", )
 | 
					#                                      instance_name="wct_instance", )
 | 
				
			||||||
        assert PASS
 | 
					#         assert PASS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,66 +1,66 @@
 | 
				
			|||||||
"""
 | 
					# """
 | 
				
			||||||
    Performance : Wifi Capacity Test : VLAN Mode
 | 
					#     Performance : Wifi Capacity Test : VLAN Mode
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
"""
 | 
					# """
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
import pytest
 | 
					# import pytest
 | 
				
			||||||
import allure
 | 
					# import allure
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.vlan]
 | 
					# pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.vlan]
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
setup_params_general = {
 | 
					# setup_params_general = {
 | 
				
			||||||
    "mode": "VLAN",
 | 
					#     "mode": "VLAN",
 | 
				
			||||||
    "ssid_modes": {
 | 
					#     "ssid_modes": {
 | 
				
			||||||
        "wpa2_personal": [
 | 
					#         "wpa2_personal": [
 | 
				
			||||||
            {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
					#             {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
 | 
				
			||||||
            {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
					#             {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
 | 
				
			||||||
             "security_key": "something"}]},
 | 
					#              "security_key": "something"}]},
 | 
				
			||||||
    "rf": {},
 | 
					#     "rf": {},
 | 
				
			||||||
    "radius": False
 | 
					#     "radius": False
 | 
				
			||||||
}
 | 
					# }
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
@pytest.mark.basic
 | 
					# @pytest.mark.basic
 | 
				
			||||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
 | 
					# @allure.feature("VLAN MODE CLIENT CONNECTIVITY")
 | 
				
			||||||
@pytest.mark.parametrize(
 | 
					# @pytest.mark.parametrize(
 | 
				
			||||||
    'setup_profiles',
 | 
					#     'setup_profiles',
 | 
				
			||||||
    [setup_params_general],
 | 
					#     [setup_params_general],
 | 
				
			||||||
    indirect=True,
 | 
					#     indirect=True,
 | 
				
			||||||
    scope="class"
 | 
					#     scope="class"
 | 
				
			||||||
)
 | 
					# )
 | 
				
			||||||
@pytest.mark.usefixtures("setup_profiles")
 | 
					# @pytest.mark.usefixtures("setup_profiles")
 | 
				
			||||||
class TestWifiCapacityVLANMode(object):
 | 
					# class TestWifiCapacityVLANMode(object):
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.twog
 | 
					#     @pytest.mark.twog
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					#     def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					#                                      get_configuration):
 | 
				
			||||||
        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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					#         security = "wpa2"
 | 
				
			||||||
        mode = "VLAN"
 | 
					#         mode = "VLAN"
 | 
				
			||||||
        band = "twog"
 | 
					#         band = "twog"
 | 
				
			||||||
        vlan = 1
 | 
					#         vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					#         dut_name = create_lanforge_chamberview_dut
 | 
				
			||||||
        PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
					#         PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
				
			||||||
                                     security="wpa2", mode="VLAN", band="twog",
 | 
					#                                      security="wpa2", mode="VLAN", band="twog",
 | 
				
			||||||
                                     instance_name="wct_instance", )
 | 
					#                                      instance_name="wct_instance", )
 | 
				
			||||||
        assert PASS
 | 
					#         assert PASS
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
    @pytest.mark.wpa2_personal
 | 
					#     @pytest.mark.wpa2_personal
 | 
				
			||||||
    @pytest.mark.fiveg
 | 
					#     @pytest.mark.fiveg
 | 
				
			||||||
    def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
					#     def test_client_wpa2_personal_2g(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
 | 
				
			||||||
                                     get_configuration):
 | 
					#                                      get_configuration):
 | 
				
			||||||
        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"]
 | 
				
			||||||
        security_key = profile_data["security_key"]
 | 
					#         security_key = profile_data["security_key"]
 | 
				
			||||||
        security = "wpa2"
 | 
					#         security = "wpa2"
 | 
				
			||||||
        mode = "VLAN"
 | 
					#         mode = "VLAN"
 | 
				
			||||||
        band = "fiveg"
 | 
					#         band = "fiveg"
 | 
				
			||||||
        vlan = 1
 | 
					#         vlan = 1
 | 
				
			||||||
        dut_name = create_lanforge_chamberview_dut
 | 
					#         dut_name = create_lanforge_chamberview_dut
 | 
				
			||||||
        PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
					#         PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
 | 
				
			||||||
                                     security=security, mode=mode, band=band,
 | 
					#                                      security=security, mode=mode, band=band,
 | 
				
			||||||
                                     instance_name="wct_instance", )
 | 
					#                                      instance_name="wct_instance", )
 | 
				
			||||||
        assert PASS
 | 
					#         assert PASS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,8 @@
 | 
				
			|||||||
import allure
 | 
					import allure
 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_55]
 | 
					pytestmark = [pytest.mark.firmware, pytest.mark.sanity, pytest.mark.sanity_55,
 | 
				
			||||||
 | 
					              pytest.mark.usefixtures("setup_test_run")]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@allure.testcase("firmware upgrade from Cloud")
 | 
					@allure.testcase("firmware upgrade from Cloud")
 | 
				
			||||||
@@ -57,9 +58,19 @@ class TestFirmware(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.firmware_ap
 | 
					@pytest.mark.firmware_ap
 | 
				
			||||||
def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, update_report,
 | 
					def test_ap_firmware(get_configuration, get_apnos, get_latest_firmware, update_report,
 | 
				
			||||||
                     test_cases):
 | 
					                     test_cases):
 | 
				
			||||||
    if check_ap_firmware_ssh == get_latest_firmware:
 | 
					    """yields the active version of firmware on ap"""
 | 
				
			||||||
 | 
					    active_fw_list = []
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
 | 
					        for access_point in get_configuration['access_point']:
 | 
				
			||||||
 | 
					            ap_ssh = get_apnos(access_point)
 | 
				
			||||||
 | 
					            active_fw = ap_ssh.get_active_firmware()
 | 
				
			||||||
 | 
					            active_fw_list.append(active_fw)
 | 
				
			||||||
 | 
					    except Exception as e:
 | 
				
			||||||
 | 
					        print(e)
 | 
				
			||||||
 | 
					        active_fw_list = []
 | 
				
			||||||
 | 
					    if active_fw_list == get_latest_firmware:
 | 
				
			||||||
        update_report.update_testrail(case_id=test_cases["ap_upgrade"],
 | 
					        update_report.update_testrail(case_id=test_cases["ap_upgrade"],
 | 
				
			||||||
                                      status_id=1,
 | 
					                                      status_id=1,
 | 
				
			||||||
                                      msg='Upgrade to ' + str(get_latest_firmware) + ' successful')
 | 
					                                      msg='Upgrade to ' + str(get_latest_firmware) + ' successful')
 | 
				
			||||||
@@ -68,4 +79,4 @@ def test_ap_firmware(check_ap_firmware_ssh, get_latest_firmware, update_report,
 | 
				
			|||||||
                                      status_id=4,
 | 
					                                      status_id=4,
 | 
				
			||||||
                                      msg='Cannot reach AP after upgrade to check CLI - re-test required')
 | 
					                                      msg='Cannot reach AP after upgrade to check CLI - re-test required')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    assert check_ap_firmware_ssh == get_latest_firmware
 | 
					    assert active_fw_list == get_latest_firmware
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user