mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-12-27 16:04:56 +00:00
Merge branch 'WIFI-1321-create-a-lan-forge-pip-module' of https://github.com/Telecominfraproject/wlan-testing into WIFI-11101
This commit is contained in:
@@ -110,6 +110,12 @@ def pytest_addoption(parser):
|
||||
help="Use Interop IoS Test Package for tests"
|
||||
)
|
||||
|
||||
parser.addoption(
|
||||
"--port",
|
||||
default=False,
|
||||
help="Select the port for AP Up Down tests"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_lab_info():
|
||||
@@ -135,6 +141,11 @@ def selected_testbed(request):
|
||||
current_testbed = request.config.getoption("--testbed")
|
||||
yield current_testbed
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def selected_port(request):
|
||||
"""yields the port option selection"""
|
||||
current_port = request.config.getoption("--port")
|
||||
yield current_port
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def num_stations(request):
|
||||
|
||||
@@ -1369,7 +1369,7 @@ class Test20Mhz2GChannel11PeakThroughput(object):
|
||||
@allure.title("Single client TCP Download wifi capacity 40Mhz Bw")
|
||||
@allure.sub_suite("BRIDGE Mode")
|
||||
def test_client_wpa2_personal_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
profile_data = {"ssid_name": "ssid_wpa2_personal_2g_11", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
mode = "BRIDGE"
|
||||
|
||||
@@ -49,7 +49,7 @@ class Test80Mhz5GChannel36PeakThroughput(object):
|
||||
@allure.title("Single client TCP Download wifi capacity 80Mhz Bw")
|
||||
@allure.sub_suite("BRIDGE Mode")
|
||||
def test_client_wpa2_bridge_tcp_dl(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g_36", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
mode = "BRIDGE"
|
||||
|
||||
@@ -55,7 +55,7 @@ class TestMultipskBridgeWPA2(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 1 VLAN")
|
||||
def test_client_wpa2_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and bridge and wpa_personal and vlan1 and twog"
|
||||
@@ -93,7 +93,7 @@ class TestMultipskBridgeWPA2(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 2 VLAN's")
|
||||
def test_client_wpa2_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and bridge and wpa2_personal and vlan2 and twog"
|
||||
|
||||
@@ -55,7 +55,7 @@ class TestMultipskBridgeWPA(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 1 VLAN")
|
||||
def test_client_wpa_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and bridge and wpa_personal and vlan1 and twog"
|
||||
@@ -93,7 +93,7 @@ class TestMultipskBridgeWPA(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 2 VLAN's")
|
||||
def test_client_wpa_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
BRIDGE Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and bridge and wpa and vlan2 and twog"
|
||||
|
||||
@@ -114,7 +114,7 @@ class TestRateLimitingBridge(object):
|
||||
@pytest.mark.rate_limiting_tests
|
||||
@allure.title("Test for Upload and Download batch size 1,2,5 2.4 GHz")
|
||||
def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Test Rate Limiting Scenario
|
||||
pytest -m "rate_limiting_tests and bridge and wpa2_personal and twog and upload_download and batch_size_125"
|
||||
|
||||
@@ -67,7 +67,7 @@ class TestRateLimitingWithRadiusBridge(object):
|
||||
get_test_device_logs,
|
||||
get_target_object,
|
||||
num_stations, setup_configuration, rate_radius_info,
|
||||
rate_radius_accounting_info):
|
||||
rate_radius_accounting_info, check_connectivity):
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g_br",
|
||||
"appliedRadios": ["2G"],
|
||||
"security_key": "something",
|
||||
@@ -112,7 +112,7 @@ class TestRateLimitingWithRadiusBridge(object):
|
||||
get_test_device_logs,
|
||||
get_target_object,
|
||||
num_stations, setup_configuration, rate_radius_info,
|
||||
rate_radius_accounting_info):
|
||||
rate_radius_accounting_info, check_connectivity):
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g_br",
|
||||
"appliedRadios": ["2G"],
|
||||
"security_key": "something",
|
||||
|
||||
@@ -55,7 +55,7 @@ class TestMultipskNAT(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 1 VLAN")
|
||||
def test_client_wpa2_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
NAT Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and NAT and wpa_personal and vlan1 and twog"
|
||||
@@ -93,7 +93,7 @@ class TestMultipskNAT(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 2 VLAN's")
|
||||
def test_client_wpa2_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
nat Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and nat and wpa2_personal and vlan2 and twog"
|
||||
|
||||
@@ -55,7 +55,7 @@ class TestMultipskNAT(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 1 VLAN")
|
||||
def test_client_wpa_2g_vlan1(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
NAT Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and NAT and wpa_personal and vlan1 and twog"
|
||||
@@ -93,7 +93,7 @@ class TestMultipskNAT(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-3493", name="WIFI-3493")
|
||||
@allure.title("Test for Client Connect with 2 VLAN's")
|
||||
def test_client_wpa_2g_vlan2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
NAT Mode Multipsk Test with wpa encryption 2.4 GHz Band
|
||||
pytest -m "multi_psk_tests and NAT and wpa and vlan2 and twog"
|
||||
|
||||
@@ -114,7 +114,7 @@ class TestRateLimitingNAT(object):
|
||||
@pytest.mark.rate_limiting_tests
|
||||
@allure.title("Test for Upload and Download batch size 1,2,5 2.4 GHz")
|
||||
def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Test Rate Limiting Scenario
|
||||
pytest -m "rate_limiting_tests and nat and wpa2_personal and twog and upload_download and batch_size_125"
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import allure
|
||||
import pytest
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
import importlib
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.ow_regression_lf,
|
||||
pytest.mark.ow_dvlan_tests_lf,
|
||||
pytest.mark.wpa2_enterprise,
|
||||
pytest.mark.fiveg]
|
||||
lf_library = importlib.import_module("configuration")
|
||||
DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
|
||||
pytestmark = [pytest.mark.dynamic_vlan_tests,
|
||||
pytest.mark.vlan,
|
||||
pytest.mark.ow_sanity_lf]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
@@ -31,15 +33,18 @@ setup_params_general = {
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("regression")
|
||||
# @allure.suite("regression")
|
||||
@allure.parent_suite("OpenWifi Dynamic Vlan Test")
|
||||
@allure.suite("WPA2 Enterprise Security")
|
||||
@allure.sub_suite("5 GHz Band")
|
||||
@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestDynamicVlanOverSsid5GWpa2(object):
|
||||
|
||||
@pytest.mark.dynamic_precedence_over_ssid
|
||||
@@ -47,67 +52,55 @@ class TestDynamicVlanOverSsid5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_dynamic_precedence_over_ssid_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5705")
|
||||
def test_dynamic_precedence_over_ssid_vlan_5g_wpa2(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_fiveg):
|
||||
@allure.title("Test for dynamic precedence over ssid")
|
||||
def test_dynamic_precedence_over_ssid_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = [100,200]
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan[0],
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordB", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
|
||||
|
||||
eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu, vlan_id=vlan,
|
||||
mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0,
|
||||
identity=identity, num_sta=1,
|
||||
dut_data=setup_configuration)
|
||||
station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip']
|
||||
eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
|
||||
eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_radius_vlan_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
print("vlan ip...", eth_radius_vlan_ip)
|
||||
print("eth_upstream_ip..", eth_ip)
|
||||
logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_ssid_vlan_ip}\neth.{vlan[1]}...{eth_radius_vlan_ip}"
|
||||
f"\neth_upstream_ip...{eth_ip}")
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
allure.attach("station didnt recieved ip..")
|
||||
assert False
|
||||
assert False, result
|
||||
elif eth_vlan_ip_1[0] == "0":
|
||||
print("radius configured vlan didnt recieved ip")
|
||||
assert False
|
||||
assert False, result
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
if i != j:
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
|
||||
allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
if val:
|
||||
assert True
|
||||
print("Station ip assigned as per dynamic vlan")
|
||||
assert True, result
|
||||
elif not val:
|
||||
print("Station ip not assigned as per dynamic vlan")
|
||||
assert False
|
||||
assert False, result
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import allure
|
||||
import pytest
|
||||
import time
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
import importlib
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.ow_regression_lf,
|
||||
pytest.mark.ow_dvlan_tests_lf,
|
||||
pytest.mark.wpa2_enterprise,
|
||||
pytest.mark.fiveg]
|
||||
lf_library = importlib.import_module("configuration")
|
||||
DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
|
||||
pytestmark = [pytest.mark.dynamic_vlan_tests,
|
||||
pytest.mark.vlan]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
@@ -32,122 +33,117 @@ setup_params_general = {
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("regression")
|
||||
# @allure.suite("regression")
|
||||
@allure.parent_suite("OpenWifi Dynamic Vlan Test")
|
||||
@allure.suite("WPA2 Enterprise Security")
|
||||
@allure.sub_suite("5 GHz Band")
|
||||
@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestDynamicVlan5GWpa2(object):
|
||||
|
||||
@pytest.mark.absence_of_radius_vlan_identifier
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.ow_sanity_lf
|
||||
@allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5704")
|
||||
def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_fiveg):
|
||||
@allure.title("Test for ssid vlan in the absence of radius vlan identifier")
|
||||
def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan_id = 100
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordvlannotsentuser"
|
||||
eap = "TTLS"
|
||||
identity = "vlannotsentuser"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan_id])
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg",
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu, vlan_id=vlan,
|
||||
mode=mode, band=band, eap=eap, d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0,
|
||||
identity=identity, num_sta=1,
|
||||
dut_data=setup_configuration)
|
||||
station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip']
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
|
||||
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
|
||||
print(sta_ip_1)
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
# eth_ip_1 = eth_ip.split('.')
|
||||
logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_vlan_ip}\neth_upstream_ip...{eth_ip}")
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
allure.attach("station didnt recieved ip..")
|
||||
assert False
|
||||
assert False, result
|
||||
elif eth_vlan_ip[0] == "0":
|
||||
print("ssid configured vlan didnt recieved ip")
|
||||
assert False
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
print("upstream ip...", eth_ip)
|
||||
print("ssid configured vlan ip", eth_vlan_ip)
|
||||
assert False, result
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
if i != j:
|
||||
val = False
|
||||
elif i == j:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
if val:
|
||||
assert True
|
||||
print("Station ip assigned as per ssid vlan")
|
||||
assert True, result
|
||||
elif not val:
|
||||
print("Station ip not assigned as per ssid vlan")
|
||||
assert False
|
||||
assert False, result
|
||||
|
||||
@pytest.mark.invalidradiusvlan
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_dynamic_invalid_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5706")
|
||||
def test_dynamic_invalid_vlan_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_dynamic_invalid_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "invalidradiusvlan and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan_id = 100
|
||||
vlan = 100
|
||||
ttls_passwd = "passwordinvalidvlanuser"
|
||||
eap = "TTLS"
|
||||
identity = "invalidvlanuser"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan_id])
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=[vlan])
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan_id,
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name,
|
||||
security = security, extra_securities = extra_secu, vlan_id = vlan,
|
||||
mode = mode, band = band, eap = eap, d_vlan = True, ttls_passwd = ttls_passwd,
|
||||
ieee80211w = 0, identity = identity, num_sta = 1, dut_data = setup_configuration)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
@@ -156,7 +152,7 @@ class TestDynamicVlan5GWpa2(object):
|
||||
elif eth_vlan_ip[0] == "0":
|
||||
print("ssid configured vlan didnt recieved ip")
|
||||
assert False
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("ssid vlan ip...", eth_vlan_ip)
|
||||
print("upstream ip..", eth_ip)
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
@@ -164,8 +160,8 @@ class TestDynamicVlan5GWpa2(object):
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -181,47 +177,53 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5707")
|
||||
def test_radius_vlan_info_retained_after_periodic_reauthentication_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs,
|
||||
get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_radius_vlan_info_retained_after_periodic_reauthentication_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "periodic_reauthentication and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = [100, 200]
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan[1],
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordB", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False)
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
|
||||
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid = ssid_name, security = security,
|
||||
extra_securities = extra_secu, vlan_id = vlan,
|
||||
mode = mode, band = band, eap = eap, d_vlan = True,
|
||||
ttls_passwd = ttls_passwd, ieee80211w = 0,
|
||||
identity = identity, num_sta = 1,
|
||||
dut_data = setup_configuration, cleanup=False)
|
||||
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
sta_ip = lf_test.station_ip[station_names_fiveg[0]]
|
||||
# sta_ip = station_ip
|
||||
|
||||
count = 0
|
||||
# print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
# print("station ip...", get_test_library.station_ip[station_names_fiveg[0]])
|
||||
# print("vlan ip...", eth_vlan_ip)
|
||||
# print("eth_vlan_ip..", eth_ip)
|
||||
eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_rad_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
|
||||
eth_vlan_ip_1 = eth_rad_vlan_ip.split('.')
|
||||
sta_ip_1 = sta_ip.split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
allure.attach("station didnt recieved ip..")
|
||||
@@ -240,10 +242,13 @@ class TestDynamicVlan5GWpa2(object):
|
||||
continue
|
||||
count = count + 1
|
||||
time.sleep(30)
|
||||
lf_tools.admin_up_down([station_names_fiveg[0]], option="up")
|
||||
for u in get_test_library.json_get("/port/?fields=port+type,alias")['interfaces']:
|
||||
if list(u.values())[0]['port type'] not in ['Ethernet', 'WIFI-Radio', 'NA']:
|
||||
station_name = list(u.values())[0]['alias']
|
||||
get_test_library.admin_up_down([station_name], option="up")
|
||||
|
||||
sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + station_names_fiveg[0])["interface"]["ip"]
|
||||
sta_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + station_name)["interface"]["ip"]
|
||||
sta_ip_1 = sta_ip.split('.')
|
||||
print(sta_ip)
|
||||
allure.attach(name="station ip....", body=str(sta_ip))
|
||||
@@ -265,40 +270,43 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5708")
|
||||
def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "absenceofvlanid and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordvlannotsentuser"
|
||||
eap = "TTLS"
|
||||
identity = "vlannotsentuser"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan,
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu, vlan_id=vlan, mode=mode, band=band, eap=eap,
|
||||
d_vlan=True, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("ssid configured vlan ip...", eth_vlan_ip)
|
||||
print("upstream ip..", eth_ip)
|
||||
if sta_ip_1[0] == "0":
|
||||
@@ -314,8 +322,8 @@ class TestDynamicVlan5GWpa2(object):
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -332,50 +340,50 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_dynamic_unsupported_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5710")
|
||||
def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
def test_dynamic_unsupported_vlan(self, get_vif_state, get_test_library,
|
||||
create_lanforge_chamberview_dut, get_test_library, get_configuration,
|
||||
station_names_fiveg):
|
||||
"""
|
||||
pytest -m "unsupported and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
upstream_port = lf_tools.upstream_port
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=[vlan])
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=100,
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
|
||||
sta_ip_1 = get_test_library.station_ip[station_names_fiveg[0]].split('.')
|
||||
eth_vlan_ip_1 = eth_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
print("station ip...", get_test_library.station_ip[station_names_fiveg[0]])
|
||||
print("vlan ip...", eth_vlan_ip)
|
||||
print("eth_vlan_ip..", eth_ip)
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
if i != j:
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="station ip....", body=str(get_test_library.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
|
||||
print("Station ip not assigned as per vlan")
|
||||
assert False
|
||||
else:
|
||||
assert True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="station ip....", body=str(get_test_library.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
|
||||
allure.attach(name="vlan ip....", body=str(eth_ip))
|
||||
print("Station ip assigned as per vlan")
|
||||
@@ -386,41 +394,46 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_outof_bound_vlanid",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5711")
|
||||
def test_out_of_bound_vlanid_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_out_of_bound_vlanid_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "outofboundvlanid and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordoutofboundvlanuser"
|
||||
eap = "TTLS"
|
||||
identity = "outofboundvlanuser"
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan,
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True)
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu, vlan_id=vlan,
|
||||
mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0,
|
||||
identity=identity, num_sta=1,
|
||||
dut_data=setup_configuration)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
if lf_test.station_ip[station_names_fiveg[0]] == "0.0.0.0":
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
if station_ip == "0.0.0.0":
|
||||
print("station ip...", station_ip)
|
||||
assert True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -432,43 +445,48 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_client_association_ap_with_dynamic_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5712")
|
||||
def test_client_association_ap_with_dynamic_vlan_5g_wpa2(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_client_association_ap_with_dynamic_vlan_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = [100, 200]
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan[0],
|
||||
station_name=station_names_fiveg, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordB", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu, vlan_id=vlan,
|
||||
mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0,
|
||||
identity=identity, num_sta=1,
|
||||
dut_data=setup_configuration)
|
||||
|
||||
eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
|
||||
eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_fiveg[0]].split('.')
|
||||
sta_ip_1 = get_test_library.station_ip.split('.')
|
||||
eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_fiveg[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("radius vlan ip...", eth_radius_vlan_ip)
|
||||
print("eth_upstream_ip..", eth_ip)
|
||||
if sta_ip_1[0] == "0":
|
||||
@@ -484,7 +502,7 @@ class TestDynamicVlan5GWpa2(object):
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_fiveg[0]]))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
|
||||
@@ -502,52 +520,55 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_subsequent_user_for_same_user_account",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5713")
|
||||
def test_subsequent_user_for_same_user_account_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs,
|
||||
get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_subsequent_user_for_same_user_account_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordA"
|
||||
eap = "TTLS"
|
||||
identity = "userA"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
station_list = []
|
||||
sta_ip = []
|
||||
for i in range(0, 2):
|
||||
station_list.append(lf_tools.fiveg_prefix + str(i))
|
||||
station_list.append(get_test_library.fiveg_prefix + str(i))
|
||||
print(station_list)
|
||||
print([station_list[0]])
|
||||
|
||||
for m in range(0, len(station_list)):
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=100,
|
||||
station_name=[station_list[m]], key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordA", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False)
|
||||
lf_tools.admin_up_down([station_list[m]], option="up")
|
||||
sta_ip.append(lf_test.station_ip[station_list[m]])
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu, vlan_id=vlan,
|
||||
mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0,
|
||||
identity=identity, num_sta=1,
|
||||
dut_data=setup_configuration, cleanup=False)
|
||||
get_test_library.admin_up_down([station_list[m]], option="up")
|
||||
sta_ip.append(get_test_library.station_ip[station_list[m]])
|
||||
if sta_ip[m] == "0.0.0.0":
|
||||
allure.attach("station didnt recieved ip..")
|
||||
allure.attach("station didn't recieved ip..")
|
||||
assert False
|
||||
print(sta_ip)
|
||||
time.sleep(30)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
for n in range(0, len(station_list)):
|
||||
@@ -561,7 +582,7 @@ class TestDynamicVlan5GWpa2(object):
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(sta_ip[n]))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -577,48 +598,51 @@ class TestDynamicVlan5GWpa2(object):
|
||||
@pytest.mark.fiveg
|
||||
@allure.testcase(name="test_subsequent_user_for_different_user_account_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5714")
|
||||
def test_subsequent_user_for_different_user_account_5g_wpa2(self, get_vif_state, lf_tools, get_lf_logs,
|
||||
get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_fiveg):
|
||||
def test_subsequent_user_for_different_user_account_5g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_5G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = [100, 200]
|
||||
ttls_passwd = "passwordA"
|
||||
eap = "TTLS"
|
||||
identity = "userA"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
station_list = []
|
||||
sta_ip = []
|
||||
dynamic_vlan_user = ["userA", "userB"]
|
||||
dynamic_vlan_pass = ["passwordA", "passwordB"]
|
||||
for i in range(0, 2):
|
||||
station_list.append(lf_tools.fiveg_prefix + str(i))
|
||||
station_list.append(get_test_library.fiveg_prefix + str(i))
|
||||
|
||||
for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))):
|
||||
lf_test.EAP_Connect(ssid=ssid_5G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="fiveg", vlan_id=vlan[sta],
|
||||
station_name=[station_list[sta]], key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd=user_pass, ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False)
|
||||
|
||||
sta_ip.append(lf_test.station_ip[station_list[sta]])
|
||||
sta_ip.append(get_test_library.station_ip[station_list[sta]])
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"]
|
||||
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
print(sta_ip)
|
||||
@@ -626,7 +650,7 @@ class TestDynamicVlan5GWpa2(object):
|
||||
if sta_ip_1 == "0.0.0.0":
|
||||
allure.attach("station didn't received ip..")
|
||||
assert False
|
||||
print("station ip...", lf_test.station_ip[station_list[sta]])
|
||||
print("station ip...", get_test_library.station_ip[station_list[sta]])
|
||||
print("vlan ip...", eth_vlan_ip)
|
||||
print("eth_vlan_ip..", eth_ip)
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
@@ -645,6 +669,6 @@ class TestDynamicVlan5GWpa2(object):
|
||||
elif not val:
|
||||
print(f"{station_list[sta]} ip not assigned as per radius vlan")
|
||||
assert False
|
||||
lf_tools.admin_up_down([station_list[sta]], option="up")
|
||||
get_test_library.admin_up_down([station_list[sta]], option="up")
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import allure
|
||||
import pytest
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
import importlib
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.ow_regression_lf,
|
||||
pytest.mark.ow_dvlan_tests_lf,
|
||||
pytest.mark.wpa2_enterprise,
|
||||
pytest.mark.twog]
|
||||
lf_library = importlib.import_module("configuration")
|
||||
DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
|
||||
pytestmark = [pytest.mark.dynamic_vlan_tests,
|
||||
pytest.mark.vlan,
|
||||
pytest.mark.ow_sanity_lf]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
@@ -31,15 +33,18 @@ setup_params_general = {
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("regression")
|
||||
# @allure.suite("regression")
|
||||
@allure.parent_suite("OpenWifi Dynamic Vlan Test")
|
||||
@allure.suite("WPA2 Enterprise Security")
|
||||
@allure.sub_suite("2.4 GHz Band")
|
||||
@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestDynamicVlanOverSsid2GWpa2(object):
|
||||
|
||||
@pytest.mark.dynamic_precedence_over_ssid
|
||||
@@ -47,67 +52,55 @@ class TestDynamicVlanOverSsid2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_dynamic_precedence_over_ssid_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5705")
|
||||
def test_dynamic_precedence_over_ssid_vlan_2g_wpa2(self, get_vif_state, lf_tools,get_ap_logs,get_lf_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_twog):
|
||||
@allure.title("Test for dynamic precedence over ssid")
|
||||
def test_dynamic_precedence_over_ssid_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "dynamic_precedence_over_ssid and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100,200]
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan[0],
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordB", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security,
|
||||
extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0,
|
||||
identity=identity, num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip']
|
||||
eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
|
||||
eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_radius_vlan_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
print("vlan ip...", eth_radius_vlan_ip)
|
||||
print("eth_upstream_ip..", eth_ip)
|
||||
logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_ssid_vlan_ip}\neth.{vlan[1]}...{eth_radius_vlan_ip}"
|
||||
f"\neth_upstream_ip...{eth_ip}")
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
allure.attach("station didnt recieved ip..")
|
||||
assert False
|
||||
assert False, result
|
||||
elif eth_vlan_ip_1[0] == "0":
|
||||
print("radius configured vlan didnt recieved ip")
|
||||
assert False
|
||||
assert False, result
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
if i != j:
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
|
||||
allure.attach(name="radius configured vlan ip....", body=str(eth_radius_vlan_ip))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
if val:
|
||||
assert True
|
||||
print("Station ip assigned as per dynamic vlan")
|
||||
assert True, result
|
||||
elif not val:
|
||||
print("Station ip not assigned as per dynamic vlan")
|
||||
assert False
|
||||
assert False, result
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import allure
|
||||
import pytest
|
||||
import time
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
from configuration import DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
import importlib
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.ow_regression_lf,
|
||||
pytest.mark.ow_dvlan_tests_lf,
|
||||
pytest.mark.wpa2_enterprise,
|
||||
pytest.mark.twog]
|
||||
lf_library = importlib.import_module("configuration")
|
||||
DYNAMIC_VLAN_RADIUS_SERVER_DATA = lf_library.DYNAMIC_VLAN_RADIUS_SERVER_DATA
|
||||
DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA = lf_library.DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA
|
||||
|
||||
pytestmark = [pytest.mark.dynamic_vlan_tests,
|
||||
pytest.mark.vlan]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
@@ -32,131 +33,128 @@ setup_params_general = {
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("regression")
|
||||
# @allure.suite("regression")
|
||||
@allure.parent_suite("OpenWifi Dynamic Vlan Test")
|
||||
@allure.suite("WPA2 Enterprise Security")
|
||||
@allure.sub_suite("2.4 GHz Band")
|
||||
@allure.feature("VLAN MODE wpa2_enterprise Dynamic Vlan")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestDynamicVlan2GWpa2(object):
|
||||
|
||||
@pytest.mark.absence_of_radius_vlan_identifier
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.ow_sanity_lf
|
||||
@allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5704")
|
||||
def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_twog):
|
||||
@allure.title("Test for ssid vlan in the absence of radius vlan identifier")
|
||||
def test_ssid_vlan_in_the_absence_of_radius_vlan_identifier_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan_id = 100
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordvlannotsentuser"
|
||||
eap = "TTLS"
|
||||
identity = "vlannotsentuser"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan_id])
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog",
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
|
||||
passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
station_ip = get_test_library.station_data[list(get_test_library.station_data.keys())[0]]['ip']
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
print(sta_ip_1)
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
# eth_ip_1 = eth_ip.split('.')
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
allure.attach("station didnt recieved ip..")
|
||||
assert False
|
||||
assert False, result
|
||||
elif eth_vlan_ip[0] == "0":
|
||||
print("ssid configured vlan didnt recieved ip")
|
||||
assert False
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
print("upstream ip...", eth_ip)
|
||||
print("ssid configured vlan ip", eth_vlan_ip)
|
||||
assert False, result
|
||||
logging.info(f"station ip...{sta_ip_1}\neth.{vlan[0]}...{eth_vlan_ip}\neth_upstream_ip...{eth_ip}")
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
if i != j:
|
||||
val = False
|
||||
elif i == j:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
if val:
|
||||
assert True
|
||||
print("Station ip assigned as per ssid vlan")
|
||||
assert True, result
|
||||
elif not val:
|
||||
print("Station ip not assigned as per ssid vlan")
|
||||
assert False
|
||||
assert False, result
|
||||
|
||||
@pytest.mark.invalidradiusvlan
|
||||
@pytest.mark.wpa2_enterprise
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_dynamic_invalid_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5706")
|
||||
def test_dynamic_invalid_vlan_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_twog):
|
||||
def test_dynamic_invalid_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "invalidradiusvlan and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan_id = 100
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordinvalidvlanuser"
|
||||
eap = "TTLS"
|
||||
identity = "invalidvlanuser"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan_id])
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan_id,
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan_id))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
if sta_ip_1[0] == "0":
|
||||
print("station didnt received any ip")
|
||||
allure.attach("station didnt recieved ip..")
|
||||
allure.attach("station didn't recieved ip..")
|
||||
assert False
|
||||
elif eth_vlan_ip[0] == "0":
|
||||
print("ssid configured vlan didnt recieved ip")
|
||||
assert False
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("ssid vlan ip...", eth_vlan_ip)
|
||||
print("upstream ip..", eth_ip)
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
@@ -164,8 +162,8 @@ class TestDynamicVlan2GWpa2(object):
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan_id)))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -181,44 +179,46 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_radius_vlan_info_retained_after_periodic_reauthentication",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5707")
|
||||
def test_radius_vlan_info_retained_after_periodic_reauthentication_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs,
|
||||
get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_twog):
|
||||
def test_radius_vlan_info_retained_after_periodic_reauthentication_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "periodic_reauthentication and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100, 200]
|
||||
upstream_port = lf_tools.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
# upstream_port = get_test_library.upstream_port
|
||||
# print(upstream_port)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
# print(get_test_library.dut_idx_mapping)
|
||||
# get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan[1],
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordB", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True, cleanup=False)
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration, cleanup=False)
|
||||
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
sta_ip = lf_test.station_ip[station_names_twog[0]]
|
||||
sta_ip = station_ip
|
||||
|
||||
count = 0
|
||||
# print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
# print("station ip...", station_ip)
|
||||
# print("vlan ip...", eth_vlan_ip)
|
||||
# print("eth_vlan_ip..", eth_ip)
|
||||
eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_rad_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_rad_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
|
||||
eth_vlan_ip_1 = eth_rad_vlan_ip.split('.')
|
||||
sta_ip_1 = sta_ip.split('.')
|
||||
@@ -240,10 +240,13 @@ class TestDynamicVlan2GWpa2(object):
|
||||
continue
|
||||
count = count + 1
|
||||
time.sleep(30)
|
||||
lf_tools.admin_up_down([station_names_twog[0]], option="up")
|
||||
for u in get_test_library.json_get("/port/?fields=port+type,alias")['interfaces']:
|
||||
if list(u.values())[0]['port type'] not in ['Ethernet', 'WIFI-Radio', 'NA']:
|
||||
station_name = (u.values())[0]['alias']
|
||||
get_test_library.admin_up_down(station_name, option="up")
|
||||
|
||||
sta_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + station_names_twog[0])["interface"]["ip"]
|
||||
sta_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + station_name)["interface"]["ip"]
|
||||
sta_ip_1 = sta_ip.split('.')
|
||||
print(sta_ip)
|
||||
allure.attach(name="station ip....", body=str(sta_ip))
|
||||
@@ -265,40 +268,44 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5708")
|
||||
def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_twog):
|
||||
def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "absenceofvlanid and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordvlannotsentuser"
|
||||
eap = "TTLS"
|
||||
identity = "vlannotsentuser"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan,
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordvlannotsentuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="vlannotsentuser", d_vlan=True)
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("ssid configured vlan ip...", eth_vlan_ip)
|
||||
print("upstream ip..", eth_ip)
|
||||
if sta_ip_1[0] == "0":
|
||||
@@ -314,8 +321,8 @@ class TestDynamicVlan2GWpa2(object):
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -332,50 +339,50 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_dynamic_unsupported_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5710")
|
||||
def test_dynamic_unsupported_vlan(self, get_vif_state, lf_tools,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
def test_dynamic_unsupported_vlan(self, get_vif_state, get_test_library,
|
||||
create_lanforge_chamberview_dut, get_test_library, get_configuration,
|
||||
station_names_twog):
|
||||
"""
|
||||
pytest -m "unsupported and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
upstream_port = lf_tools.upstream_port
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=[vlan])
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=100,
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordinvalidvlanuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="invalidvlanuser", d_vlan=True)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_vlan_ip_1 = eth_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("vlan ip...", eth_vlan_ip)
|
||||
print("eth_vlan_ip..", eth_ip)
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
if i != j:
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
|
||||
print("Station ip not assigned as per vlan")
|
||||
assert False
|
||||
else:
|
||||
assert True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="vlan ip....", body=str(eth_vlan_ip))
|
||||
allure.attach(name="vlan ip....", body=str(eth_ip))
|
||||
print("Station ip assigned as per vlan")
|
||||
@@ -386,41 +393,45 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_outof_bound_vlanid",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5711")
|
||||
def test_out_of_bound_vlanid_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs, get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_twog):
|
||||
def test_out_of_bound_vlanid_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "outofboundvlanid and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
upstream_port = lf_tools.upstream_port
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordoutofboundvlanuser"
|
||||
eap = "TTLS"
|
||||
identity = "outofboundvlanuser"
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan,
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordoutofboundvlanuser", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="outofboundvlanuser", d_vlan=True)
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
if lf_test.station_ip[station_names_twog[0]] == "0.0.0.0":
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
if station_ip == "0.0.0.0":
|
||||
print("station ip...", station_ip)
|
||||
assert True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -432,43 +443,47 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_client_association_ap_with_dynamic_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5712")
|
||||
def test_client_association_ap_with_dynamic_vlan_2g_wpa2(self, get_vif_state, lf_tools, get_ap_logs, get_lf_logs,
|
||||
create_lanforge_chamberview_dut, lf_test, get_configuration,
|
||||
station_names_twog):
|
||||
def test_client_association_ap_with_dynamic_vlan_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "client_association_ap_with_dynamic_vlan and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100, 200]
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan[0],
|
||||
station_name=station_names_twog, key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordB", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userB", d_vlan=True)
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration)
|
||||
|
||||
eth_ssid_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ssid_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
|
||||
eth_radius_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_radius_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[1]))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
|
||||
sta_ip_1 = lf_test.station_ip[station_names_twog[0]].split('.')
|
||||
sta_ip_1 = station_ip.split('.')
|
||||
eth_radius_vlan_ip_1 = eth_radius_vlan_ip.split('.')
|
||||
print("station ip...", lf_test.station_ip[station_names_twog[0]])
|
||||
print("station ip...", station_ip)
|
||||
print("radius vlan ip...", eth_radius_vlan_ip)
|
||||
print("eth_upstream_ip..", eth_ip)
|
||||
if sta_ip_1[0] == "0":
|
||||
@@ -484,7 +499,7 @@ class TestDynamicVlan2GWpa2(object):
|
||||
val = False
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(lf_test.station_ip[station_names_twog[0]]))
|
||||
allure.attach(name="station ip....", body=str(station_ip))
|
||||
allure.attach(name="ssid configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="ssid configured vlan ip....", body=str(eth_ssid_vlan_ip))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[1])))
|
||||
@@ -502,52 +517,54 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_subsequent_user_for_same_user_account",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5713")
|
||||
def test_subsequent_user_for_same_user_account_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs,
|
||||
get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_twog):
|
||||
def test_subsequent_user_for_same_user_account_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "subsequent_user_for_same_user_account and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
ttls_passwd = "passwordA"
|
||||
eap = "TTLS"
|
||||
identity = "userA"
|
||||
val = ""
|
||||
upstream_port = lf_tools.upstream_port
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=[vlan])
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
station_list = []
|
||||
sta_ip = []
|
||||
for i in range(0, 2):
|
||||
station_list.append(lf_tools.twog_prefix + str(i))
|
||||
station_list.append(get_test_library.twog_prefix + str(i))
|
||||
print(station_list)
|
||||
print([station_list[0]])
|
||||
|
||||
for m in range(0, len(station_list)):
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=100,
|
||||
station_name=[station_list[m]], key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd="passwordA", ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity="userA", d_vlan=True, cleanup=False)
|
||||
lf_tools.admin_up_down([station_list[m]], option="up")
|
||||
sta_ip.append(lf_test.station_ip[station_list[m]])
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name,
|
||||
security=security, extra_securities=extra_secu,
|
||||
vlan_id=vlan, mode=mode, band=band, eap=eap,d_vlan=True,
|
||||
ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity,
|
||||
num_sta=1, dut_data=setup_configuration, cleanup=False)
|
||||
get_test_library.admin_up_down([station_list[m]], option="up")
|
||||
sta_ip.append(get_test_library.station_ip[station_list[m]])
|
||||
if sta_ip[m] == "0.0.0.0":
|
||||
allure.attach("station didnt recieved ip..")
|
||||
assert False
|
||||
print(sta_ip)
|
||||
time.sleep(30)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan))["interface"]["ip"]
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[0]))["interface"]["ip"]
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
for n in range(0, len(station_list)):
|
||||
@@ -561,7 +578,7 @@ class TestDynamicVlan2GWpa2(object):
|
||||
else:
|
||||
val = True
|
||||
allure.attach(name="station ip....", body=str(sta_ip[n]))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan)))
|
||||
allure.attach(name="radius configured vlan..", body=str(port_resources[2] + "." + str(vlan[0])))
|
||||
allure.attach(name="radius configured vlan ip..", body=str(eth_vlan_ip))
|
||||
allure.attach(name="upstream port....", body=str(port_resources[2]))
|
||||
allure.attach(name="upstream ip....", body=str(eth_ip))
|
||||
@@ -577,48 +594,51 @@ class TestDynamicVlan2GWpa2(object):
|
||||
@pytest.mark.twog
|
||||
@allure.testcase(name="test_subsequent_user_for_different_user_account_vlan",
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-5714")
|
||||
def test_subsequent_user_for_different_user_account_2g_wpa2(self, get_vif_state, lf_tools, get_lf_logs,
|
||||
get_ap_logs,
|
||||
create_lanforge_chamberview_dut, lf_test,
|
||||
get_configuration,
|
||||
station_names_twog):
|
||||
def test_subsequent_user_for_different_user_account_2g_wpa2(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
"""
|
||||
pytest -m "subsequent_user_for_different_user_account and wpa2_enterprise and vlan"
|
||||
"""
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"]
|
||||
ssid_2G = profile_data[0]["ssid_name"]
|
||||
ssid_name = profile_data[0]["ssid_name"]
|
||||
mode = "VLAN"
|
||||
val = ""
|
||||
security = "wpa2"
|
||||
extra_secu = []
|
||||
band = "twog"
|
||||
vlan = [100, 200]
|
||||
upstream_port = lf_tools.upstream_port
|
||||
ttls_passwd = "passwordB"
|
||||
eap = "TTLS"
|
||||
identity = "userB"
|
||||
upstream_port = get_test_library.upstream_port
|
||||
print(upstream_port)
|
||||
port_resources = upstream_port.split(".")
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
lf_tools.reset_scenario()
|
||||
lf_tools.add_vlan(vlan_ids=vlan)
|
||||
port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.')
|
||||
print(get_test_library.dut_idx_mapping)
|
||||
get_test_library.reset_scenario()
|
||||
get_test_library.add_vlan(vlan_ids=vlan)
|
||||
|
||||
station_list = []
|
||||
sta_ip = []
|
||||
dynamic_vlan_user = ["userA", "userB"]
|
||||
dynamic_vlan_pass = ["passwordA", "passwordB"]
|
||||
for i in range(0, 2):
|
||||
station_list.append(lf_tools.twog_prefix + str(i))
|
||||
station_list.append(get_test_library.twog_prefix + str(i))
|
||||
|
||||
for user_id, user_pass, sta in zip(dynamic_vlan_user, dynamic_vlan_pass, range(0, len(station_list))):
|
||||
lf_test.EAP_Connect(ssid=ssid_2G, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
passes, result, station_ip = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, passkey="[BLANK]", security="wpa2", extra_securities=[],
|
||||
mode=mode, band="twog", vlan_id=vlan[sta],
|
||||
station_name=[station_list[sta]], key_mgmt="WPA-EAP",
|
||||
pairwise="NA", group="NA", wpa_psk="DEFAULT",
|
||||
ttls_passwd=user_pass, ieee80211w=0,
|
||||
wep_key="NA", ca_cert="NA", eap="TTLS", identity=user_id, d_vlan=True, cleanup=False)
|
||||
|
||||
sta_ip.append(lf_test.station_ip[station_list[sta]])
|
||||
sta_ip.append(station_ip)
|
||||
|
||||
eth_vlan_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_vlan_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2] + "." + str(vlan[sta]))["interface"]["ip"]
|
||||
|
||||
eth_ip = lf_tools.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
eth_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] +
|
||||
"/" + port_resources[2])["interface"]["ip"]
|
||||
eth_vlan_ip_1 = eth_vlan_ip.split('.')
|
||||
print(sta_ip)
|
||||
@@ -626,7 +646,7 @@ class TestDynamicVlan2GWpa2(object):
|
||||
if sta_ip_1 == "0.0.0.0":
|
||||
allure.attach("station didn't received ip..")
|
||||
assert False
|
||||
print("station ip...", lf_test.station_ip[station_list[sta]])
|
||||
print("station ip...", station_ip)
|
||||
print("vlan ip...", eth_vlan_ip)
|
||||
print("eth_vlan_ip..", eth_ip)
|
||||
for i, j in zip(sta_ip_1[0:2], eth_vlan_ip_1[0:2]):
|
||||
@@ -645,6 +665,6 @@ class TestDynamicVlan2GWpa2(object):
|
||||
elif not val:
|
||||
print(f"{station_list[sta]} ip not assigned as per radius vlan")
|
||||
assert False
|
||||
lf_tools.admin_up_down([station_list[sta]], option="up")
|
||||
get_test_library.admin_up_down([station_list[sta]], option="up")
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class TestMultiVlan(object):
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2169")
|
||||
@allure.title("Test VLAN with WPA Security Mode")
|
||||
def test_multi_vlan_wpa_5g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Multi VLAN Test with open encryption 2.4 GHz Band
|
||||
pytest -m "multi_vlan_tests and open and fiveg"
|
||||
@@ -101,7 +101,7 @@ class TestMultiVlan(object):
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2157")
|
||||
@allure.title("Test VLAN with WPA2 Personal Security Mode")
|
||||
def test_multi_vlan_wpa2_personal_5g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Multi VLAN Test with open encryption 2.4 GHz Band
|
||||
pytest -m "multi_vlan_tests and open and fiveg"
|
||||
@@ -154,7 +154,7 @@ class TestMultiVlan(object):
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2174")
|
||||
@allure.title("Test Disabled VLAN with WPA2 Security Mode")
|
||||
def test_disable_vlan_wpa2_5g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, fiveg
|
||||
pytest -m disable_vlan_fiveg
|
||||
|
||||
@@ -75,7 +75,7 @@ class TestMultiVlan(object):
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2168")
|
||||
@allure.title("Test VLAN with WPA Security Mode")
|
||||
def test_multi_vlan_wpa_2g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Multi VLAN Test with open encryption 2.4 GHz Band
|
||||
pytest -m "multi_vlan_tests and open and twog"
|
||||
@@ -102,7 +102,7 @@ class TestMultiVlan(object):
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2156")
|
||||
@allure.title("Test VLAN with WPA2 Personal Security Mode")
|
||||
def test_multi_vlan_wpa2_personal_2g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Multi VLAN Test with open encryption 2.4 GHz Band
|
||||
pytest -m "multi_vlan_tests and open and twog"
|
||||
@@ -155,7 +155,7 @@ class TestMultiVlan(object):
|
||||
url="https://telecominfraproject.atlassian.net/browse/WIFI-2174")
|
||||
@allure.title("Test Disabled VLAN with WPA2 Security Mode")
|
||||
def test_disable_vlan_wpa2_2g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Client connectivity using vlan, wpa2, fiveg
|
||||
pytest -m disable_vlan_fiveg
|
||||
|
||||
@@ -119,7 +119,8 @@ class TestRateLimitingVLAN(object):
|
||||
@pytest.mark.rate_limiting_tests
|
||||
@allure.title("Test for Upload and Download batch size 1,2,5 2.4 GHz")
|
||||
def test_wpa2_personal_ssid_up_dw_batch_size_125_2g(self, get_test_library, get_dut_logs_per_test_case,
|
||||
get_test_device_logs, num_stations, setup_configuration):
|
||||
get_test_device_logs, num_stations, setup_configuration,
|
||||
check_connectivity):
|
||||
"""
|
||||
Test Rate Limiting Scenario
|
||||
pytest -m "rate_limiting_tests and vlan and wpa2_personal and twog and upload_download and batch_size_125"
|
||||
|
||||
1431
tests/lab_info.json
1431
tests/lab_info.json
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@ import json
|
||||
|
||||
pytestmark = [pytest.mark.test_resources,
|
||||
pytest.mark.sanity,
|
||||
pytest.mark.ow_sanity_lf,
|
||||
pytest.mark.uc_sanity,
|
||||
pytest.mark.sanity_55,
|
||||
pytest.mark.interop_uc_sanity,
|
||||
@@ -186,7 +187,6 @@ class TestResources(object):
|
||||
|
||||
|
||||
@pytest.mark.traffic_generator_connectivity
|
||||
@pytest.mark.jitu
|
||||
@allure.testcase(name="test_traffic_generator_connectivity", url="")
|
||||
def test_traffic_generator_connectivity(self, get_test_library):
|
||||
"""Test case to verify Traffic Generator Connectivity"""
|
||||
|
||||
Reference in New Issue
Block a user