mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-10-31 02:48:11 +00:00 
			
		
		
		
	Update few DVLAN testcases to use vlan300 instead of vlan100 (#1070)
* Update DVLAN testcases Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com> * Update DVLAN testcases to use vlan300 instead of vlan100 for few testcases Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com> --------- Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com> Co-authored-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>
This commit is contained in:
		| @@ -45,119 +45,7 @@ setup_params_general = { | |||||||
|     scope="class" |     scope="class" | ||||||
| ) | ) | ||||||
| @pytest.mark.usefixtures("setup_configuration") | @pytest.mark.usefixtures("setup_configuration") | ||||||
| class TestDynamicVlan2GWpa2(object): | class TestDynamicVlan2GWpa2SuiteA(object): | ||||||
|  |  | ||||||
|     @pytest.mark.absence_of_radius_vlan_identifier |  | ||||||
|     @pytest.mark.wpa2_enterprise |  | ||||||
|     @pytest.mark.twog |  | ||||||
|     @pytest.mark.ow_sanity_lf |  | ||||||
|     @allure.title("Verify that SSID VLAN is used in the absence of radius VLAN tunnel type identifiers") |  | ||||||
|     @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5704", name="WIFI-5704") |  | ||||||
|     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, check_connectivity): |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         To verify that SSID VLAN is used in the absence of radius VLAN tunnel type identifiers |  | ||||||
|                Unique Marker:  pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan" |  | ||||||
|  |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         mode = "VLAN" |  | ||||||
|         security = "wpa2" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "twog" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordvlannotsentuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "vlannotsentuser" |  | ||||||
|         val = "" |  | ||||||
|         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') |  | ||||||
|          |  | ||||||
|  |  | ||||||
|         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, |  | ||||||
|                                                                    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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_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": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             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") |  | ||||||
|     @allure.title("Test for invalid vlan identifier") |  | ||||||
|     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, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "invalidradiusvlan and wpa2_enterprise and vlan and twog" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         mode = "VLAN" |  | ||||||
|         security = "wpa2" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "twog" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordinvalidvlanuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "invalidvlanuser" |  | ||||||
|         val = "" |  | ||||||
|         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, 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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_ip.split('.') |  | ||||||
|         if sta_ip_1[0] == "0": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.periodic_reauthentication |     @pytest.mark.periodic_reauthentication | ||||||
|     @pytest.mark.wpa2_enterprise |     @pytest.mark.wpa2_enterprise | ||||||
| @@ -230,59 +118,6 @@ class TestDynamicVlan2GWpa2(object): | |||||||
|  |  | ||||||
|         assert passes == "PASS", result |         assert passes == "PASS", result | ||||||
|  |  | ||||||
|     @pytest.mark.absenceofvlanid |  | ||||||
|     @pytest.mark.wpa2_enterprise |  | ||||||
|     @pytest.mark.twog |  | ||||||
|     @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-5708") |  | ||||||
|     @allure.title("test for ssid vlan used in absence of radius vlan") |  | ||||||
|     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, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "absenceofvlanid and wpa2_enterprise and vlan and twog" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         mode = "VLAN" |  | ||||||
|         security = "wpa2" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "twog" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordvlannotsentuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "vlannotsentuser" |  | ||||||
|         val = "" |  | ||||||
|         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') |  | ||||||
|  |  | ||||||
|         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=False, 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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_ip.split('.') |  | ||||||
|         if sta_ip_1[0] == "0": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.outofboundvlanid |     @pytest.mark.outofboundvlanid | ||||||
|     @pytest.mark.wpa2_enterprise |     @pytest.mark.wpa2_enterprise | ||||||
|     @pytest.mark.twog |     @pytest.mark.twog | ||||||
| @@ -497,3 +332,208 @@ class TestDynamicVlan2GWpa2(object): | |||||||
|                 assert False, result |                 assert False, result | ||||||
|  |  | ||||||
|             assert passes == "PASS", result |             assert passes == "PASS", result | ||||||
|  |  | ||||||
|  |  | ||||||
|  | setup_params_general = { | ||||||
|  |     "mode": "VLAN", | ||||||
|  |     "ssid_modes": { | ||||||
|  |         "wpa2_enterprise": [ | ||||||
|  |             {"ssid_name": "ssid_wpa2e_2g", "appliedRadios": ["2G"], | ||||||
|  |              "security_key": "something", | ||||||
|  |              "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA, | ||||||
|  |              "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA, | ||||||
|  |              "vlan": 300 | ||||||
|  |              }]}, | ||||||
|  |     "rf": {}, | ||||||
|  |     "radius": True | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # @allure.suite("regression") | ||||||
|  | @allure.parent_suite("Dynamic VLAN Test") | ||||||
|  | @allure.suite("WPA2 Enterprise Security") | ||||||
|  | @allure.sub_suite("2.4 GHz Band") | ||||||
|  | @allure.feature("Dynamic VLAN Test") | ||||||
|  | @pytest.mark.parametrize( | ||||||
|  |     'setup_configuration', | ||||||
|  |     [setup_params_general], | ||||||
|  |     indirect=True, | ||||||
|  |     scope="class" | ||||||
|  | ) | ||||||
|  | @pytest.mark.usefixtures("setup_configuration") | ||||||
|  | class TestDynamicVlan2GWpa2SuiteB(object): | ||||||
|  |  | ||||||
|  |     @pytest.mark.absence_of_radius_vlan_identifier | ||||||
|  |     @pytest.mark.wpa2_enterprise | ||||||
|  |     @pytest.mark.twog | ||||||
|  |     @pytest.mark.ow_sanity_lf | ||||||
|  |     @allure.title("Verify that SSID VLAN is used in the absence of radius VLAN tunnel type identifiers") | ||||||
|  |     @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5704", name="WIFI-5704") | ||||||
|  |     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, check_connectivity): | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         To verify that SSID VLAN is used in the absence of radius VLAN tunnel type identifiers | ||||||
|  |                Unique Marker:  pytest -m " absence_of_radius_vlan_identifier and wpa2_enterprise and vlan" | ||||||
|  |  | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         mode = "VLAN" | ||||||
|  |         security = "wpa2" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "twog" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordvlannotsentuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "vlannotsentuser" | ||||||
|  |         val = "" | ||||||
|  |         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') | ||||||
|  |  | ||||||
|  |         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, | ||||||
|  |                                                                               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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                            "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_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": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             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") | ||||||
|  |     @allure.title("Test for invalid vlan identifier") | ||||||
|  |     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, check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "invalidradiusvlan and wpa2_enterprise and vlan and twog" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         mode = "VLAN" | ||||||
|  |         security = "wpa2" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "twog" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordinvalidvlanuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "invalidvlanuser" | ||||||
|  |         val = "" | ||||||
|  |         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, | ||||||
|  |                                                                               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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                            "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_ip.split('.') | ||||||
|  |         if sta_ip_1[0] == "0": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|  |  | ||||||
|  |     @pytest.mark.absenceofvlanid | ||||||
|  |     @pytest.mark.wpa2_enterprise | ||||||
|  |     @pytest.mark.twog | ||||||
|  |     @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-5708") | ||||||
|  |     @allure.title("test for ssid vlan used in absence of radius vlan") | ||||||
|  |     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, | ||||||
|  |                                                               check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "absenceofvlanid and wpa2_enterprise and vlan and twog" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa2_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         mode = "VLAN" | ||||||
|  |         security = "wpa2" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "twog" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordvlannotsentuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "vlannotsentuser" | ||||||
|  |         val = "" | ||||||
|  |         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') | ||||||
|  |  | ||||||
|  |         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=False, 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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                            "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_ip.split('.') | ||||||
|  |         if sta_ip_1[0] == "0": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
| @@ -44,116 +44,7 @@ setup_params_general = { | |||||||
|     scope="class" |     scope="class" | ||||||
| ) | ) | ||||||
| @pytest.mark.usefixtures("setup_configuration") | @pytest.mark.usefixtures("setup_configuration") | ||||||
| class TestDynamicVlan5GWpa3(object): | class TestDynamicVlan5GWpa3SuiteA(object): | ||||||
|  |  | ||||||
|     @pytest.mark.absence_of_radius_vlan_identifier |  | ||||||
|     @pytest.mark.wpa3_enterprise |  | ||||||
|     @pytest.mark.fiveg |  | ||||||
|     @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6095") |  | ||||||
|     @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_wpa3(self, get_test_library, get_dut_logs_per_test_case, |  | ||||||
|                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m " absence_of_radius_vlan_identifier and wpa3_enterprise and vlan and fiveg" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         security = "wpa3" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "fiveg" |  | ||||||
|         mode = "VLAN" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordvlannotsentuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "vlannotsentuser" |  | ||||||
|         val = "" |  | ||||||
|         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') |  | ||||||
|  |  | ||||||
|         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, |  | ||||||
|                                                                     ttls_passwd=ttls_passwd, ieee80211w=0, |  | ||||||
|                                                                     identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", |  | ||||||
|                                                                     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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_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": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.invalidradiusvlan |  | ||||||
|     @pytest.mark.wpa3_enterprise |  | ||||||
|     @pytest.mark.fiveg |  | ||||||
|     @allure.testcase(name="test_dynamic_invalid_vlan", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6097") |  | ||||||
|     @allure.title("Test for invalid vlan identifier") |  | ||||||
|     def test_dynamic_invalid_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, |  | ||||||
|                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "invalidradiusvlan and wpa3_enterprise and vlan and fiveg" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         security = "wpa3" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "fiveg" |  | ||||||
|         mode = "VLAN" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordinvalidvlanuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "invalidvlanuser" |  | ||||||
|         val = "" |  | ||||||
|         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, key_mgmt="WPA-EAP-SHA256", |  | ||||||
|                                         security = security, extra_securities = extra_secu, vlan_id = vlan, |  | ||||||
|                                         mode = mode, band = band, eap = eap, 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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_ip.split('.') |  | ||||||
|         if sta_ip_1[0] == "0": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.periodic_reauthentication |     @pytest.mark.periodic_reauthentication | ||||||
|     @pytest.mark.wpa3_enterprise |     @pytest.mark.wpa3_enterprise | ||||||
|     @pytest.mark.fiveg |     @pytest.mark.fiveg | ||||||
| @@ -224,59 +115,6 @@ class TestDynamicVlan5GWpa3(object): | |||||||
|  |  | ||||||
|             assert passes == "PASS", result |             assert passes == "PASS", result | ||||||
|  |  | ||||||
|     @pytest.mark.absenceofvlanid |  | ||||||
|     @pytest.mark.wpa3_enterprise |  | ||||||
|     @pytest.mark.fiveg |  | ||||||
|     @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6100") |  | ||||||
|     @allure.title("test for ssid vlan used in absence of radius vlan") |  | ||||||
|     def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, |  | ||||||
|                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "absenceofvlanid and wpa3_enterprise and vlan and fiveg" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         security = "wpa3" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "fiveg" |  | ||||||
|         mode = "VLAN" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordvlannotsentuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "vlannotsentuser" |  | ||||||
|         val = "" |  | ||||||
|         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') |  | ||||||
|  |  | ||||||
|         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=False, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, |  | ||||||
|                                           num_sta=1, dut_data=setup_configuration, key_mgmt="WPA-EAP-SHA256") |  | ||||||
|  |  | ||||||
|         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 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_ip.split('.') |  | ||||||
|         if sta_ip_1[0] == "0": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.outofboundvlanid |     @pytest.mark.outofboundvlanid | ||||||
|     @pytest.mark.wpa3_enterprise |     @pytest.mark.wpa3_enterprise | ||||||
|     @pytest.mark.fiveg |     @pytest.mark.fiveg | ||||||
| @@ -489,3 +327,197 @@ class TestDynamicVlan5GWpa3(object): | |||||||
|                 assert False, result |                 assert False, result | ||||||
|  |  | ||||||
|             assert passes == "PASS", result |             assert passes == "PASS", result | ||||||
|  |  | ||||||
|  |  | ||||||
|  | setup_params_general = { | ||||||
|  |     "mode": "VLAN", | ||||||
|  |     "ssid_modes": { | ||||||
|  |         "wpa3_enterprise": [ | ||||||
|  |             {"ssid_name": "ssid_wpa3e_5g", "appliedRadios": ["5G"], | ||||||
|  |              "security_key": "something", | ||||||
|  |              "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA, | ||||||
|  |              "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA, | ||||||
|  |              "vlan": 300 | ||||||
|  |              }]}, | ||||||
|  |     "rf": {}, | ||||||
|  |     "radius": True | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @allure.parent_suite("Dynamic VLAN Test") | ||||||
|  | @allure.suite("WPA3 Enterprise Security") | ||||||
|  | @allure.sub_suite("5 GHz Band") | ||||||
|  | @allure.feature("Dynamic VLAN Test") | ||||||
|  | @pytest.mark.parametrize( | ||||||
|  |     'setup_configuration', | ||||||
|  |     [setup_params_general], | ||||||
|  |     indirect=True, | ||||||
|  |     scope="class" | ||||||
|  | ) | ||||||
|  | @pytest.mark.usefixtures("setup_configuration") | ||||||
|  | class TestDynamicVlan5GWpa3SuiteB(object): | ||||||
|  |  | ||||||
|  |     @pytest.mark.absence_of_radius_vlan_identifier | ||||||
|  |     @pytest.mark.wpa3_enterprise | ||||||
|  |     @pytest.mark.fiveg | ||||||
|  |     @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6095") | ||||||
|  |     @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_wpa3(self, get_test_library, get_dut_logs_per_test_case, | ||||||
|  |                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m " absence_of_radius_vlan_identifier and wpa3_enterprise and vlan and fiveg" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         security = "wpa3" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "fiveg" | ||||||
|  |         mode = "VLAN" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordvlannotsentuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "vlannotsentuser" | ||||||
|  |         val = "" | ||||||
|  |         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') | ||||||
|  |  | ||||||
|  |         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, | ||||||
|  |                                                                     ttls_passwd=ttls_passwd, ieee80211w=0, | ||||||
|  |                                                                     identity=identity, num_sta=1, key_mgmt="WPA-EAP-SHA256", | ||||||
|  |                                                                     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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                    "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_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": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|  |  | ||||||
|  |     @pytest.mark.invalidradiusvlan | ||||||
|  |     @pytest.mark.wpa3_enterprise | ||||||
|  |     @pytest.mark.fiveg | ||||||
|  |     @allure.testcase(name="test_dynamic_invalid_vlan", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6097") | ||||||
|  |     @allure.title("Test for invalid vlan identifier") | ||||||
|  |     def test_dynamic_invalid_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, | ||||||
|  |                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "invalidradiusvlan and wpa3_enterprise and vlan and fiveg" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         security = "wpa3" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "fiveg" | ||||||
|  |         mode = "VLAN" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordinvalidvlanuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "invalidvlanuser" | ||||||
|  |         val = "" | ||||||
|  |         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, key_mgmt="WPA-EAP-SHA256", | ||||||
|  |                                         security = security, extra_securities = extra_secu, vlan_id = vlan, | ||||||
|  |                                         mode = mode, band = band, eap = eap, 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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                    "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_ip.split('.') | ||||||
|  |         if sta_ip_1[0] == "0": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|  |  | ||||||
|  |     @pytest.mark.absenceofvlanid | ||||||
|  |     @pytest.mark.wpa3_enterprise | ||||||
|  |     @pytest.mark.fiveg | ||||||
|  |     @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6100") | ||||||
|  |     @allure.title("test for ssid vlan used in absence of radius vlan") | ||||||
|  |     def test_ssid_vlan_used_in_absence_of_radius_vlan_5g_wpa3(self, get_test_library, get_dut_logs_per_test_case, | ||||||
|  |                                                               get_test_device_logs, num_stations, setup_configuration, | ||||||
|  |                                                               check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "absenceofvlanid and wpa3_enterprise and vlan and fiveg" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         security = "wpa3" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "fiveg" | ||||||
|  |         mode = "VLAN" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordvlannotsentuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "vlannotsentuser" | ||||||
|  |         val = "" | ||||||
|  |         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') | ||||||
|  |  | ||||||
|  |         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=False, ttls_passwd=ttls_passwd, | ||||||
|  |                                                                               ieee80211w=0, identity=identity, | ||||||
|  |                                                                               num_sta=1, dut_data=setup_configuration, | ||||||
|  |                                                                               key_mgmt="WPA-EAP-SHA256") | ||||||
|  |  | ||||||
|  |         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 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_ip.split('.') | ||||||
|  |         if sta_ip_1[0] == "0": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|   | |||||||
| @@ -44,117 +44,7 @@ setup_params_general = { | |||||||
|     scope="class" |     scope="class" | ||||||
| ) | ) | ||||||
| @pytest.mark.usefixtures("setup_configuration") | @pytest.mark.usefixtures("setup_configuration") | ||||||
| class TestDynamicVlan2GWpa3(object): | class TestDynamicVlan2GWpa3SuiteA(object): | ||||||
|  |  | ||||||
|     @pytest.mark.absence_of_radius_vlan_identifier |  | ||||||
|     @pytest.mark.wpa3_enterprise |  | ||||||
|     @pytest.mark.twog |  | ||||||
|     @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6095") |  | ||||||
|     @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_wpa3(self, get_test_library, get_dut_logs_per_test_case, |  | ||||||
|                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "absence_of_radius_vlan_identifier and wpa3_enterprise and vlan and twog" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         mode = "VLAN" |  | ||||||
|         security = "wpa3" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "twog" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordvlannotsentuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "vlannotsentuser" |  | ||||||
|         val = "" |  | ||||||
|         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') |  | ||||||
|          |  | ||||||
|  |  | ||||||
|         passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, key_mgmt="WPA-EAP-SHA256", |  | ||||||
|                                                            security=security, extra_securities=extra_secu, |  | ||||||
|                                                            vlan_id=vlan, mode=mode, band=band, eap=eap, |  | ||||||
|                                                            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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_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": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.invalidradiusvlan |  | ||||||
|     @pytest.mark.wpa3_enterprise |  | ||||||
|     @pytest.mark.twog |  | ||||||
|     @allure.testcase(name="test_dynamic_invalid_vlan", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6097") |  | ||||||
|     @allure.title("Test for invalid vlan identifier") |  | ||||||
|     def test_dynamic_invalid_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, |  | ||||||
|                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "invalidradiusvlan and wpa3_enterprise and vlan and twog" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         mode = "VLAN" |  | ||||||
|         security = "wpa3" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "twog" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordinvalidvlanuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "invalidvlanuser" |  | ||||||
|         val = "" |  | ||||||
|         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, key_mgmt="WPA-EAP-SHA256", |  | ||||||
|                                         security = security, extra_securities = extra_secu, vlan_id = vlan, |  | ||||||
|                                         mode = mode, band = band, eap = eap, 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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + |  | ||||||
|                                    "/" + port_resources[2])["interface"]["ip"] |  | ||||||
|  |  | ||||||
|         sta_ip_1 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_ip.split('.') |  | ||||||
|         if sta_ip_1[0] == "0": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.periodic_reauthentication |     @pytest.mark.periodic_reauthentication | ||||||
|     @pytest.mark.wpa3_enterprise |     @pytest.mark.wpa3_enterprise | ||||||
|     @pytest.mark.twog |     @pytest.mark.twog | ||||||
| @@ -225,59 +115,6 @@ class TestDynamicVlan2GWpa3(object): | |||||||
|  |  | ||||||
|         assert passes == "PASS", result |         assert passes == "PASS", result | ||||||
|  |  | ||||||
|     @pytest.mark.absenceofvlanid |  | ||||||
|     @pytest.mark.wpa3_enterprise |  | ||||||
|     @pytest.mark.twog |  | ||||||
|     @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", |  | ||||||
|                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6100") |  | ||||||
|     @allure.title("test for ssid vlan used in absence of radius vlan") |  | ||||||
|     def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, |  | ||||||
|                                 get_test_device_logs, num_stations, setup_configuration, check_connectivity): |  | ||||||
|         """ |  | ||||||
|                 pytest -m "absenceofvlanid and wpa3_enterprise and vlan and twog" |  | ||||||
|         """ |  | ||||||
|  |  | ||||||
|         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] |  | ||||||
|         ssid_name = profile_data[0]["ssid_name"] |  | ||||||
|         mode = "VLAN" |  | ||||||
|         security = "wpa3" |  | ||||||
|         extra_secu = [] |  | ||||||
|         band = "twog" |  | ||||||
|         vlan = [100] |  | ||||||
|         ttls_passwd = "passwordvlannotsentuser" |  | ||||||
|         eap = "TTLS" |  | ||||||
|         identity = "vlannotsentuser" |  | ||||||
|         val = "" |  | ||||||
|         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') |  | ||||||
|  |  | ||||||
|         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=False, ttls_passwd=ttls_passwd, ieee80211w=0, identity=identity, |  | ||||||
|                                           num_sta=1, dut_data=setup_configuration, key_mgmt="WPA-EAP-SHA256") |  | ||||||
|  |  | ||||||
|         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 = station_ip.split('.') |  | ||||||
|         eth_vlan_ip_1 = eth_vlan_ip.split('.') |  | ||||||
|         if sta_ip_1[0] == "0": |  | ||||||
|             assert False, result |  | ||||||
|         elif eth_vlan_ip[0] == "0": |  | ||||||
|             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 |  | ||||||
|         if val: |  | ||||||
|             assert True, result |  | ||||||
|         elif not val: |  | ||||||
|             assert False, result |  | ||||||
|  |  | ||||||
|     @pytest.mark.outofboundvlanid |     @pytest.mark.outofboundvlanid | ||||||
|     @pytest.mark.wpa3_enterprise |     @pytest.mark.wpa3_enterprise | ||||||
|     @pytest.mark.twog |     @pytest.mark.twog | ||||||
| @@ -492,3 +329,205 @@ class TestDynamicVlan2GWpa3(object): | |||||||
|  |  | ||||||
|             assert passes == "PASS", result |             assert passes == "PASS", result | ||||||
|  |  | ||||||
|  |  | ||||||
|  | setup_params_general = { | ||||||
|  |     "mode": "VLAN", | ||||||
|  |     "ssid_modes": { | ||||||
|  |         "wpa3_enterprise": [ | ||||||
|  |             {"ssid_name": "ssid_wpa3e_2g", "appliedRadios": ["2G"], | ||||||
|  |              "security_key": "something", | ||||||
|  |              "radius_auth_data": DYNAMIC_VLAN_RADIUS_SERVER_DATA, | ||||||
|  |              "radius_acc_data": DYNAMIC_VLAN_RADIUS_ACCOUNTING_DATA, | ||||||
|  |              "vlan": 300 | ||||||
|  |              }]}, | ||||||
|  |     "rf": {}, | ||||||
|  |     "radius": True | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @allure.parent_suite("Dynamic VLAN Test") | ||||||
|  | @allure.suite("WPA3 Enterprise Security") | ||||||
|  | @allure.sub_suite("2.4 GHz Band") | ||||||
|  | @allure.feature("Dynamic VLAN Test") | ||||||
|  | @pytest.mark.parametrize( | ||||||
|  |     'setup_configuration', | ||||||
|  |     [setup_params_general], | ||||||
|  |     indirect=True, | ||||||
|  |     scope="class" | ||||||
|  | ) | ||||||
|  | @pytest.mark.usefixtures("setup_configuration") | ||||||
|  | class TestDynamicVlan2GWpa3SuiteB(object): | ||||||
|  |  | ||||||
|  |     @pytest.mark.absence_of_radius_vlan_identifier | ||||||
|  |     @pytest.mark.wpa3_enterprise | ||||||
|  |     @pytest.mark.twog | ||||||
|  |     @allure.testcase(name="test_ssid_vlan_in_the_absence_of_radius_vlan_identifier", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6095") | ||||||
|  |     @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_wpa3(self, get_test_library, | ||||||
|  |                                                                         get_dut_logs_per_test_case, | ||||||
|  |                                                                         get_test_device_logs, num_stations, | ||||||
|  |                                                                         setup_configuration, check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "absence_of_radius_vlan_identifier and wpa3_enterprise and vlan and twog" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         mode = "VLAN" | ||||||
|  |         security = "wpa3" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "twog" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordvlannotsentuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "vlannotsentuser" | ||||||
|  |         val = "" | ||||||
|  |         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') | ||||||
|  |  | ||||||
|  |         passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, key_mgmt="WPA-EAP-SHA256", | ||||||
|  |                                                                               security=security, | ||||||
|  |                                                                               extra_securities=extra_secu, | ||||||
|  |                                                                               vlan_id=vlan, mode=mode, band=band, | ||||||
|  |                                                                               eap=eap, | ||||||
|  |                                                                               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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                            "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_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": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|  |  | ||||||
|  |     @pytest.mark.invalidradiusvlan | ||||||
|  |     @pytest.mark.wpa3_enterprise | ||||||
|  |     @pytest.mark.twog | ||||||
|  |     @allure.testcase(name="test_dynamic_invalid_vlan", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6097") | ||||||
|  |     @allure.title("Test for invalid vlan identifier") | ||||||
|  |     def test_dynamic_invalid_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, | ||||||
|  |                                           get_test_device_logs, num_stations, setup_configuration, check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "invalidradiusvlan and wpa3_enterprise and vlan and twog" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         mode = "VLAN" | ||||||
|  |         security = "wpa3" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "twog" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordinvalidvlanuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "invalidvlanuser" | ||||||
|  |         val = "" | ||||||
|  |         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, key_mgmt="WPA-EAP-SHA256", | ||||||
|  |                                                                               security=security, | ||||||
|  |                                                                               extra_securities=extra_secu, vlan_id=vlan, | ||||||
|  |                                                                               mode=mode, band=band, eap=eap, | ||||||
|  |                                                                               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_ip = get_test_library.json_get("/port/" + port_resources[0] + "/" + port_resources[1] + | ||||||
|  |                                            "/" + port_resources[2])["interface"]["ip"] | ||||||
|  |  | ||||||
|  |         sta_ip_1 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_ip.split('.') | ||||||
|  |         if sta_ip_1[0] == "0": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|  |  | ||||||
|  |     @pytest.mark.absenceofvlanid | ||||||
|  |     @pytest.mark.wpa3_enterprise | ||||||
|  |     @pytest.mark.twog | ||||||
|  |     @allure.testcase(name="test_ssid_vlan_used_in_absence_of_radius_vlan", | ||||||
|  |                      url="https://telecominfraproject.atlassian.net/browse/WIFI-6100") | ||||||
|  |     @allure.title("test for ssid vlan used in absence of radius vlan") | ||||||
|  |     def test_ssid_vlan_used_in_absence_of_radius_vlan_2g_wpa3(self, get_test_library, get_dut_logs_per_test_case, | ||||||
|  |                                                               get_test_device_logs, num_stations, setup_configuration, | ||||||
|  |                                                               check_connectivity): | ||||||
|  |         """ | ||||||
|  |                 pytest -m "absenceofvlanid and wpa3_enterprise and vlan and twog" | ||||||
|  |         """ | ||||||
|  |  | ||||||
|  |         profile_data = setup_params_general["ssid_modes"]["wpa3_enterprise"] | ||||||
|  |         ssid_name = profile_data[0]["ssid_name"] | ||||||
|  |         mode = "VLAN" | ||||||
|  |         security = "wpa3" | ||||||
|  |         extra_secu = [] | ||||||
|  |         band = "twog" | ||||||
|  |         vlan = [300] | ||||||
|  |         ttls_passwd = "passwordvlannotsentuser" | ||||||
|  |         eap = "TTLS" | ||||||
|  |         identity = "vlannotsentuser" | ||||||
|  |         val = "" | ||||||
|  |         port_resources = list(get_test_library.lanforge_data['wan_ports'].keys())[0].split('.') | ||||||
|  |  | ||||||
|  |         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=False, ttls_passwd=ttls_passwd, | ||||||
|  |                                                                               ieee80211w=0, identity=identity, | ||||||
|  |                                                                               num_sta=1, dut_data=setup_configuration, | ||||||
|  |                                                                               key_mgmt="WPA-EAP-SHA256") | ||||||
|  |  | ||||||
|  |         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 = station_ip.split('.') | ||||||
|  |         eth_vlan_ip_1 = eth_vlan_ip.split('.') | ||||||
|  |         if sta_ip_1[0] == "0": | ||||||
|  |             assert False, result | ||||||
|  |         elif eth_vlan_ip[0] == "0": | ||||||
|  |             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 | ||||||
|  |         if val: | ||||||
|  |             assert True, result | ||||||
|  |         elif not val: | ||||||
|  |             assert False, result | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 bhargavi-ct
					bhargavi-ct