ucentral vlan config fix

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-07-27 22:24:30 +05:30
parent a6271d2d1c
commit 6b0e3ea34b
4 changed files with 177 additions and 135 deletions

View File

@@ -243,6 +243,22 @@ class UProfileUtility:
del self.base_profile_config['interfaces'][1] del self.base_profile_config['interfaces'][1]
self.base_profile_config['interfaces'][0]['ssids'] = [] self.base_profile_config['interfaces'][0]['ssids'] = []
self.base_profile_config['interfaces'] = [] self.base_profile_config['interfaces'] = []
wan_section_vlan = {
"name": "WAN",
"role": "upstream",
"services": ["lldp"],
"ethernet": [
{
"select-ports": [
"WAN*"
]
}
],
"ipv4": {
"addressing": "dynamic"
}
}
self.base_profile_config['interfaces'].append(wan_section_vlan)
else: else:
print("Invalid Mode") print("Invalid Mode")
return 0 return 0
@@ -310,10 +326,6 @@ class UProfileUtility:
self.base_profile_config['interfaces'].append(vlan_section) self.base_profile_config['interfaces'].append(vlan_section)
print(vlan_section) print(vlan_section)
vsection = 0 vsection = 0
# Add to the ssid section
# print(self.base_profile_config)
# self.base_profile_config['interfaces'][vsection]['vlan'] = {'id': int(vid)}
# self.base_profile_config['interfaces'][vsection]['ssids'].append(ssid_info)
else: else:
print("invalid mode") print("invalid mode")
pytest.exit("invalid Operating Mode") pytest.exit("invalid Operating Mode")
@@ -328,17 +340,24 @@ class UProfileUtility:
verify=False, timeout=100) verify=False, timeout=100)
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), basic_cfg_str, uri) self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), basic_cfg_str, uri)
print(resp.url) print(resp.url)
# resp.close()() resp.close()()
print(resp) print(resp)
# controller = { if __name__ == '__main__':
# 'url': 'https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
# 'username': "tip@ucentral.com",
# 'password': 'openwifi', controller = {
# } 'url': 'https://sec-ucentral-qa01.cicd.lab.wlan.tip.build:16001', # API base url for the controller
# obj = UController(controller_data=controller) 'username': "tip@ucentral.com",
# 'password': 'openwifi',
# print(obj.get_devices()) }
# obj = UController(controller_data=controller)
# obj.logout() profile = UProfileUtility(sdk_client=obj)
profile.set_mode(mode="VLAN")
profile.set_radio_config()
ssid = {"ssid_name": "ssid_wpa2_2g_nat", "appliedRadios": ["2G"], "security": "psk", "security_key": "something", "vlan": 100}
profile.add_ssid(ssid_data=ssid)
# profile.push_config(serial_number="903cb39d6918")
# print(obj.get_devices())
obj.logout()

View File

@@ -278,7 +278,6 @@ def setup_controller(request, get_configuration, test_access_point):
request.addfinalizer(teardown_ucontroller) request.addfinalizer(teardown_ucontroller)
except Exception as e: except Exception as e:
print(e) print(e)
allure.attach(body=str(e), name="Controller Instantiation Failed: ") allure.attach(body=str(e), name="Controller Instantiation Failed: ")
@@ -290,44 +289,56 @@ def setup_controller(request, get_configuration, test_access_point):
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def instantiate_firmware(request, setup_controller, get_configuration): def instantiate_firmware(request, setup_controller, get_configuration):
"""sets up firmware utility and yields the object for firmware upgrade""" """sets up firmware utility and yields the object for firmware upgrade"""
firmware_client_obj = [] if request.config.getoption("--1.x"):
firmware_client_obj = []
for access_point_info in get_configuration['access_point']: for access_point_info in get_configuration['access_point']:
version = access_point_info["version"] version = access_point_info["version"]
if request.config.getini("build").__contains__("https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/"): if request.config.getini("build").__contains__("https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/"):
version = request.config.getini("build") version = request.config.getini("build")
firmware_client = FirmwareUtility(sdk_client=setup_controller, firmware_client = FirmwareUtility(sdk_client=setup_controller,
model=access_point_info["model"], model=access_point_info["model"],
version_url=version) version_url=version)
firmware_client_obj.append(firmware_client) firmware_client_obj.append(firmware_client)
yield firmware_client_obj yield firmware_client_obj
else:
# 2.x
pass
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def get_latest_firmware(instantiate_firmware): def get_latest_firmware(request, instantiate_firmware):
"""yields the list of firmware version""" """yields the list of firmware version"""
fw_version_list = [] if request.config.getoption("--1.x"):
try:
for fw_obj in instantiate_firmware:
latest_firmware = fw_obj.get_fw_version()
latest_firmware = latest_firmware.replace(".tar.gz", "")
fw_version_list.append(latest_firmware)
except Exception as e:
print(e)
fw_version_list = [] fw_version_list = []
try:
yield fw_version_list for fw_obj in instantiate_firmware:
latest_firmware = fw_obj.get_fw_version()
latest_firmware = latest_firmware.replace(".tar.gz", "")
fw_version_list.append(latest_firmware)
except Exception as e:
print(e)
fw_version_list = []
yield fw_version_list
else:
# 2.x
pass
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def upload_firmware(should_upload_firmware, instantiate_firmware): def upload_firmware(request, should_upload_firmware, instantiate_firmware):
"""yields the firmware_id that is uploaded to cloud""" """yields the firmware_id that is uploaded to cloud"""
firmware_id_list = [] if request.config.getoption("--1.x"):
for i in range(0, len(instantiate_firmware)): firmware_id_list = []
firmware_id = instantiate_firmware[i].upload_fw_on_cloud(force_upload=should_upload_firmware) for i in range(0, len(instantiate_firmware)):
firmware_id_list.append(firmware_id) firmware_id = instantiate_firmware[i].upload_fw_on_cloud(force_upload=should_upload_firmware)
yield firmware_id_list firmware_id_list.append(firmware_id)
yield firmware_id_list
else:
# 2.x release
yield True
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
@@ -335,85 +346,101 @@ def upgrade_firmware(request, instantiate_firmware, get_equipment_id, check_ap_f
should_upgrade_firmware, should_upload_firmware, get_apnos, get_configuration): should_upgrade_firmware, should_upload_firmware, get_apnos, get_configuration):
"""yields the status of upgrade of firmware. waits for 300 sec after each upgrade request""" """yields the status of upgrade of firmware. waits for 300 sec after each upgrade request"""
print(should_upgrade_firmware, should_upload_firmware) print(should_upgrade_firmware, should_upload_firmware)
status_list = [] if request.config.getoption("--1.x"):
active_fw_list = [] status_list = []
try:
for access_point in get_configuration['access_point']:
ap_ssh = get_apnos(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = [] active_fw_list = []
print(active_fw_list, get_latest_firmware) try:
if get_latest_firmware != active_fw_list: for access_point in get_configuration['access_point']:
if request.config.getoption("--skip-upgrade"): ap_ssh = get_apnos(access_point)
status = "skip-upgrade" active_fw = ap_ssh.get_active_firmware()
status_list.append(status) active_fw_list.append(active_fw)
else: except Exception as e:
print(e)
for i in range(0, len(instantiate_firmware)): active_fw_list = []
status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_id[i], force_upload=True, print(active_fw_list, get_latest_firmware)
force_upgrade=should_upgrade_firmware) if get_latest_firmware != active_fw_list:
allure.attach(name="Firmware Upgrade Request", body=str(status)) if request.config.getoption("--skip-upgrade"):
status = "skip-upgrade"
status_list.append(status) status_list.append(status)
else:
for i in range(0, len(instantiate_firmware)):
status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_id[i], force_upload=True,
force_upgrade=should_upgrade_firmware)
allure.attach(name="Firmware Upgrade Request", body=str(status))
status_list.append(status)
else:
if should_upgrade_firmware:
for i in range(0, len(instantiate_firmware)):
status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_id[i],
force_upload=should_upload_firmware,
force_upgrade=should_upgrade_firmware)
allure.attach(name="Firmware Upgrade Request", body=str(status))
status_list.append(status)
else:
status = "skip-upgrade Version Already Available"
status_list.append(status)
yield status_list
else: else:
if should_upgrade_firmware: # 2.x release
for i in range(0, len(instantiate_firmware)): pass
status = instantiate_firmware[i].upgrade_fw(equipment_id=get_equipment_id[i],
force_upload=should_upload_firmware,
force_upgrade=should_upgrade_firmware)
allure.attach(name="Firmware Upgrade Request", body=str(status))
status_list.append(status)
else:
status = "skip-upgrade Version Already Available"
status_list.append(status)
yield status_list
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def check_ap_firmware_cloud(setup_controller, get_equipment_id): def check_ap_firmware_cloud(request, setup_controller, get_equipment_id):
"""yields the active version of firmware on cloud""" """yields the active version of firmware on cloud"""
ap_fw_list = [] if request.config.getoption("--1.x"):
for i in get_equipment_id: ap_fw_list = []
ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i)) for i in get_equipment_id:
yield ap_fw_list ap_fw_list.append(setup_controller.get_ap_firmware_old_method(equipment_id=i))
yield ap_fw_list
else:
# 2.x
pass
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def check_ap_firmware_ssh(get_configuration): def check_ap_firmware_ssh(get_configuration, request):
"""yields the active version of firmware on ap""" """yields the active version of firmware on ap"""
active_fw_list = [] if request.config.getoption("--1.x"):
try:
for access_point in get_configuration['access_point']:
ap_ssh = APNOS(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = [] active_fw_list = []
yield active_fw_list try:
for access_point in get_configuration['access_point']:
ap_ssh = APNOS(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = []
yield active_fw_list
else:
# 2.x
pass
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def setup_test_run(setup_controller, upgrade_firmware, get_configuration, get_equipment_id, get_latest_firmware, def setup_test_run(setup_controller, request, upgrade_firmware, get_configuration,
get_equipment_id, get_latest_firmware,
get_apnos): get_apnos):
"""used to upgrade the firmware on AP and should be called on each test case on a module level""" """used to upgrade the firmware on AP and should be called on each test case on a module level"""
if request.config.getoption("--1.x"):
active_fw_list = []
try:
for access_point in get_configuration['access_point']:
ap_ssh = get_apnos(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = [] active_fw_list = []
print(active_fw_list, get_latest_firmware) try:
if active_fw_list == get_latest_firmware: for access_point in get_configuration['access_point']:
yield True ap_ssh = get_apnos(access_point)
active_fw = ap_ssh.get_active_firmware()
active_fw_list.append(active_fw)
except Exception as e:
print(e)
active_fw_list = []
print(active_fw_list, get_latest_firmware)
if active_fw_list == get_latest_firmware:
yield True
else:
pytest.exit("AP is not Upgraded tp Target Firmware versions")
else: else:
pytest.exit("AP is not Upgraded tp Target Firmware versions") # 2.x
pass
""" """
@@ -565,11 +592,12 @@ def create_lanforge_chamberview_dut(get_configuration, testbed):
testbed=testbed, access_point_data=get_configuration["access_point"]) testbed=testbed, access_point_data=get_configuration["access_point"])
yield True yield True
@pytest.fixture(scope="session") @pytest.fixture(scope="session")
def lf_tools(get_configuration, testbed): def lf_tools(get_configuration, testbed):
""" Create a DUT on LANforge""" """ Create a DUT on LANforge"""
obj = ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"], obj = ChamberView(lanforge_data=get_configuration["traffic_generator"]["details"],
testbed=testbed, access_point_data=get_configuration["access_point"]) testbed=testbed, access_point_data=get_configuration["access_point"])
yield obj yield obj
@@ -601,6 +629,7 @@ def setup_influx(request, testbed, get_configuration):
} }
yield influx_params yield influx_params
# Need for Perforce Mobile Device Execution # Need for Perforce Mobile Device Execution
def pytest_sessionstart(session): def pytest_sessionstart(session):
session.results = dict() session.results = dict()

View File

@@ -14,9 +14,9 @@ pytestmark = [pytest.mark.client_connectivity, pytest.mark.bridge, pytest.mark.g
setup_params_general = { setup_params_general = {
"mode": "BRIDGE", "mode": "BRIDGE",
"ssid_modes": { "ssid_modes": {
"open": [{"ssid_name": "ssid_open_2g_br", "appliedRadios": ["2G"], "security_key": "something", }, "open": [{"ssid_name": "ssid_open_2g_br", "appliedRadios": ["2G"], "security_key": "something" },
{"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"], {"ssid_name": "ssid_open_5g_br", "appliedRadios": ["5G"],
"security_key": "something", }], "security_key": "something" }],
"wpa": [{"ssid_name": "ssid_wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"}, "wpa": [{"ssid_name": "ssid_wpa_2g_br", "appliedRadios": ["2G"], "security_key": "something"},
{"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"], {"ssid_name": "ssid_wpa_5g_br", "appliedRadios": ["5G"],
"security_key": "something"}], "security_key": "something"}],

View File

@@ -14,7 +14,7 @@ pytestmark = [pytest.mark.client_connectivity, pytest.mark.nat, pytest.mark.gene
setup_params_general = { setup_params_general = {
"mode": "NAT", "mode": "NAT",
"ssid_modes": { "ssid_modes": {
"open": [{"ssid_name": "ssid_shivam", "appliedRadios": ["2G"], "security_key": "something"}, "open": [{"ssid_name": "ssid_open_2g_nat", "appliedRadios": ["2G"], "security_key": "something"},
{"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"], {"ssid_name": "ssid_open_5g_nat", "appliedRadios": ["5G"],
"security_key": "something"}], "security_key": "something"}],
"wpa": [{"ssid_name": "ssid_wpa_2g_nat", "appliedRadios": ["2G"], "security_key": "something"}, "wpa": [{"ssid_name": "ssid_wpa_2g_nat", "appliedRadios": ["2G"], "security_key": "something"},
@@ -71,7 +71,6 @@ class TestNATModeConnectivitySuiteA(object):
passkey=security_key, mode=mode, band=band, passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan) station_name=station_names_twog, vlan_id=vlan)
assert result assert result
@pytest.mark.open @pytest.mark.open
@@ -80,7 +79,7 @@ class TestNATModeConnectivitySuiteA(object):
def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg, def test_open_ssid_5g(self, get_vif_state, get_lanforge_data, lf_test, test_cases, station_names_fiveg,
update_report): update_report):
"""Client Connectivity open ssid 5G """Client Connectivity open ssid 5G
pytest -m "client_connectivity and bridge and general and open and fiveg" pytest -m "client_connectivity and NAT and general and open and fiveg"
""" """
profile_data = setup_params_general["ssid_modes"]["open"][1] profile_data = setup_params_general["ssid_modes"]["open"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -97,7 +96,6 @@ class TestNATModeConnectivitySuiteA(object):
passkey=security_key, mode=mode, band=band, passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan) station_name=station_names_fiveg, vlan_id=vlan)
assert result assert result
@pytest.mark.sanity_light @pytest.mark.sanity_light
@@ -107,7 +105,7 @@ class TestNATModeConnectivitySuiteA(object):
def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report, def test_wpa_ssid_2g(self, get_vif_state, get_lanforge_data, update_report,
lf_test, test_cases, station_names_twog): lf_test, test_cases, station_names_twog):
"""Client Connectivity wpa ssid 2.4G """Client Connectivity wpa ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa and twog" pytest -m "client_connectivity and NAT and general and wpa and twog"
""" """
profile_data = setup_params_general["ssid_modes"]["wpa"][0] profile_data = setup_params_general["ssid_modes"]["wpa"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -124,7 +122,6 @@ class TestNATModeConnectivitySuiteA(object):
passkey=security_key, mode=mode, band=band, passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan) station_name=station_names_twog, vlan_id=vlan)
assert result assert result
@pytest.mark.sanity_light @pytest.mark.sanity_light
@@ -134,7 +131,7 @@ class TestNATModeConnectivitySuiteA(object):
def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg, def test_wpa_ssid_5g(self, get_vif_state, lf_test, update_report, test_cases, station_names_fiveg,
get_lanforge_data): get_lanforge_data):
"""Client Connectivity wpa ssid 5G """Client Connectivity wpa ssid 5G
pytest -m "client_connectivity and bridge and general and wpa and fiveg" pytest -m "client_connectivity and NAT and general and wpa and fiveg"
""" """
profile_data = setup_params_general["ssid_modes"]["wpa"][1] profile_data = setup_params_general["ssid_modes"]["wpa"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -151,7 +148,6 @@ class TestNATModeConnectivitySuiteA(object):
passkey=security_key, mode=mode, band=band, passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan) station_name=station_names_fiveg, vlan_id=vlan)
assert result assert result
@pytest.mark.sanity_light @pytest.mark.sanity_light
@@ -161,7 +157,7 @@ class TestNATModeConnectivitySuiteA(object):
def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases, def test_wpa2_personal_ssid_2g(self, get_vif_state, get_lanforge_data, lf_test, update_report, test_cases,
station_names_twog): station_names_twog):
"""Client Connectivity wpa2_personal ssid 2.4G """Client Connectivity wpa2_personal ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa2_personal and twog" pytest -m "client_connectivity and NAT and general and wpa2_personal and twog"
""" """
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0] profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -178,7 +174,6 @@ class TestNATModeConnectivitySuiteA(object):
passkey=security_key, mode=mode, band=band, passkey=security_key, mode=mode, band=band,
station_name=station_names_twog, vlan_id=vlan) station_name=station_names_twog, vlan_id=vlan)
assert result assert result
@pytest.mark.sanity_light @pytest.mark.sanity_light
@@ -189,7 +184,7 @@ class TestNATModeConnectivitySuiteA(object):
station_names_fiveg, station_names_fiveg,
lf_test): lf_test):
"""Client Connectivity wpa2_personal ssid 5G """Client Connectivity wpa2_personal ssid 5G
pytest -m "client_connectivity and bridge and general and wpa2_personal and fiveg" pytest -m "client_connectivity and NAT and general and wpa2_personal and fiveg"
""" """
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1] profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -206,12 +201,11 @@ class TestNATModeConnectivitySuiteA(object):
passkey=security_key, mode=mode, band=band, passkey=security_key, mode=mode, band=band,
station_name=station_names_fiveg, vlan_id=vlan) station_name=station_names_fiveg, vlan_id=vlan)
assert result assert result
setup_params_general_two = { setup_params_general_two = {
"mode": "BRIDGE", "mode": "NAT",
"ssid_modes": { "ssid_modes": {
"wpa3_personal": [ "wpa3_personal": [
{"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"}, {"ssid_name": "ssid_wpa3_p_2g", "appliedRadios": ["2G"], "security_key": "something"},
@@ -232,7 +226,7 @@ setup_params_general_two = {
@pytest.mark.suiteB @pytest.mark.suiteB
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY") @allure.feature("NAT MODE CLIENT CONNECTIVITY")
@pytest.mark.parametrize( @pytest.mark.parametrize(
'setup_profiles', 'setup_profiles',
[setup_params_general_two], [setup_params_general_two],
@@ -240,9 +234,9 @@ setup_params_general_two = {
scope="class" scope="class"
) )
@pytest.mark.usefixtures("setup_profiles") @pytest.mark.usefixtures("setup_profiles")
class TestBridgeModeConnectivitySuiteB(object): class TestNATModeConnectivitySuiteB(object):
""" Client Connectivity SuiteA """ Client Connectivity SuiteA
pytest -m "client_connectivity and bridge and suiteB" pytest -m "client_connectivity and NAT and suiteB"
""" """
@pytest.mark.uc_sanity @pytest.mark.uc_sanity
@@ -253,7 +247,7 @@ class TestBridgeModeConnectivitySuiteB(object):
update_report, update_report,
test_cases): test_cases):
"""Client Connectivity open ssid 2.4G """Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa3_personal and twog" pytest -m "client_connectivity and NAT and general and wpa3_personal and twog"
""" """
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0] profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -279,7 +273,7 @@ class TestBridgeModeConnectivitySuiteB(object):
def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, def test_wpa3_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report): update_report):
"""Client Connectivity open ssid 2.4G """Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa3_personal and fiveg" pytest -m "client_connectivity and NAT and general and wpa3_personal and fiveg"
""" """
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1] profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -307,7 +301,7 @@ class TestBridgeModeConnectivitySuiteB(object):
update_report, update_report,
test_cases): test_cases):
"""Client Connectivity open ssid 2.4G """Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa3_personal_mixed and twog" pytest -m "client_connectivity and NAT and general and wpa3_personal_mixed and twog"
""" """
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0] profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -334,7 +328,7 @@ class TestBridgeModeConnectivitySuiteB(object):
test_cases, test_cases,
update_report): update_report):
"""Client Connectivity open ssid 2.4G """Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa3_personal_mixed and fiveg" pytest -m "client_connectivity and NAT and general and wpa3_personal_mixed and fiveg"
""" """
profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1] profile_data = setup_params_general_two["ssid_modes"]["wpa3_personal_mixed"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -362,7 +356,7 @@ class TestBridgeModeConnectivitySuiteB(object):
update_report, update_report,
test_cases): test_cases):
"""Client Connectivity open ssid 2.4G """Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa_wpa2_personal_mixed and twog" pytest -m "client_connectivity and NAT and general and wpa_wpa2_personal_mixed and twog"
""" """
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0] profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][0]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -389,7 +383,7 @@ class TestBridgeModeConnectivitySuiteB(object):
def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases, def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, station_names_fiveg, get_lanforge_data, lf_test, test_cases,
update_report): update_report):
"""Client Connectivity open ssid 2.4G """Client Connectivity open ssid 2.4G
pytest -m "client_connectivity and bridge and general and wpa_wpa2_personal_mixed and fiveg" pytest -m "client_connectivity and NAT and general and wpa_wpa2_personal_mixed and fiveg"
""" """
profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1] profile_data = setup_params_general_two["ssid_modes"]["wpa_wpa2_personal_mixed"][1]
ssid_name = profile_data["ssid_name"] ssid_name = profile_data["ssid_name"]
@@ -411,7 +405,7 @@ class TestBridgeModeConnectivitySuiteB(object):
# WEP Security Feature not available # WEP Security Feature not available
# setup_params_wep = { # setup_params_wep = {
# "mode": "BRIDGE", # "mode": "NAT",
# "ssid_modes": { # "ssid_modes": {
# "wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["2G"], "default_key_id": 1, # "wep": [ {"ssid_name": "ssid_wep_2g", "appliedRadios": ["2G"], "default_key_id": 1,
# "wep_key": 1234567890}, # "wep_key": 1234567890},
@@ -431,7 +425,7 @@ class TestBridgeModeConnectivitySuiteB(object):
# scope="class" # scope="class"
# ) # )
# @pytest.mark.usefixtures("setup_profiles") # @pytest.mark.usefixtures("setup_profiles")
# class TestBridgeModeWEP(object): # class TestNATModeWEP(object):
# #
# @pytest.mark.wep # @pytest.mark.wep
# @pytest.mark.twog # @pytest.mark.twog
@@ -452,12 +446,12 @@ class TestBridgeModeConnectivitySuiteB(object):
# if passes: # if passes:
# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], # update_report.update_testrail(case_id=test_cases["2g_wpa_nat"],
# status_id=1, # status_id=1,
# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str( # msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
# passes)) # passes))
# else: # else:
# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], # update_report.update_testrail(case_id=test_cases["2g_wpa_nat"],
# status_id=5, # status_id=5,
# msg='2G WPA Client Connectivity Failed - bridge mode' + str( # msg='2G WPA Client Connectivity Failed - NAT mode' + str(
# passes)) # passes))
# assert passes # assert passes
# #
@@ -480,11 +474,11 @@ class TestBridgeModeConnectivitySuiteB(object):
# if passes: # if passes:
# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], # update_report.update_testrail(case_id=test_cases["2g_wpa_nat"],
# status_id=1, # status_id=1,
# msg='2G WPA Client Connectivity Passed successfully - bridge mode' + str( # msg='2G WPA Client Connectivity Passed successfully - NAT mode' + str(
# passes)) # passes))
# else: # else:
# update_report.update_testrail(case_id=test_cases["2g_wpa_nat"], # update_report.update_testrail(case_id=test_cases["2g_wpa_nat"],
# status_id=5, # status_id=5,
# msg='2G WPA Client Connectivity Failed - bridge mode' + str( # msg='2G WPA Client Connectivity Failed - NAT mode' + str(
# passes)) # passes))
# assert passes # assert passes