def test_pfc_pause_multi_lossy_prio_reboot( ixia_api, ixia_testbed_config, conn_graph_facts, fanout_graph_facts, localhost, duthosts, rand_one_dut_hostname, rand_one_dut_portname_oper_up, lossless_prio_list, lossy_prio_list, prio_dscp_map, reboot_type): """ Test if PFC will impact multiple lossy priorities after various kinds of reboots Args: ixia_api (pytest fixture): IXIA session ixia_testbed_config (pytest fixture): testbed configuration information conn_graph_facts (pytest fixture): connection graph fanout_graph_facts (pytest fixture): fanout graph localhost (pytest fixture): localhost handle duthosts (pytest fixture): list of DUTs rand_one_dut_hostname (str): hostname of DUT rand_one_dut_portname_oper_up (str): port to test, e.g., 's6100-1|Ethernet0' lossless_prio_list (pytest fixture): list of all the lossless priorities lossy_prio_list (pytest fixture): list of all the lossy priorities prio_dscp_map (pytest fixture): priority vs. DSCP map (key = priority). reboot_type (str): reboot type to be issued on the DUT Returns: N/A """ dut_hostname, dut_port = rand_one_dut_portname_oper_up.split('|') pytest_require(rand_one_dut_hostname == dut_hostname, "Port is not mapped to the expected DUT") duthost = duthosts[rand_one_dut_hostname] skip_warm_reboot(duthost, reboot_type) testbed_config, port_config_list = ixia_testbed_config pause_prio_list = lossy_prio_list test_prio_list = lossy_prio_list bg_prio_list = lossless_prio_list logger.info("Issuing a {} reboot on the dut {}".format( reboot_type, duthost.hostname)) reboot(duthost, localhost, reboot_type=reboot_type) logger.info("Wait until the system is stable") pytest_assert( wait_until(300, 20, 0, duthost.critical_services_fully_started), "Not all critical services are fully started") run_pfc_test(api=ixia_api, testbed_config=testbed_config, port_config_list=port_config_list, conn_data=conn_graph_facts, fanout_data=fanout_graph_facts, duthost=duthost, dut_port=dut_port, global_pause=False, pause_prio_list=pause_prio_list, test_prio_list=test_prio_list, bg_prio_list=bg_prio_list, prio_dscp_map=prio_dscp_map, test_traffic_pause=False)
def test_pfcwd_basic_single_lossless_prio_reboot( ixia_api, ixia_testbed_config, conn_graph_facts, fanout_graph_facts, localhost, duthosts, rand_one_dut_hostname, rand_one_dut_portname_oper_up, rand_one_dut_lossless_prio, prio_dscp_map, reboot_type, trigger_pfcwd): """ Verify PFC watchdog basic test works on a single lossless priority after various types of reboot Args: ixia_api (pytest fixture): IXIA session ixia_testbed_config (pytest fixture): testbed configuration information conn_graph_facts (pytest fixture): connection graph fanout_graph_facts (pytest fixture): fanout graph localhost (pytest fixture): localhost handle duthosts (pytest fixture): list of DUTs rand_one_dut_hostname (str): hostname of DUT rand_one_dut_portname_oper_up (str): name of port to test, e.g., 's6100-1|Ethernet0' rand_one_dut_lossless_prio (str): name of lossless priority to test, e.g., 's6100-1|3' prio_dscp_map (pytest fixture): priority vs. DSCP map (key = priority) reboot_type (str): reboot type to be issued on the DUT trigger_pfcwd (bool): if PFC watchdog is expected to be triggered Returns: N/A """ dut_hostname, dut_port = rand_one_dut_portname_oper_up.split('|') dut_hostname2, lossless_prio = rand_one_dut_lossless_prio.split('|') pytest_require(rand_one_dut_hostname == dut_hostname == dut_hostname2, "Priority and port are not mapped to the expected DUT") duthost = duthosts[rand_one_dut_hostname] skip_pfcwd_test(duthost=duthost, trigger_pfcwd=trigger_pfcwd) skip_warm_reboot(duthost, reboot_type) testbed_config, port_config_list = ixia_testbed_config lossless_prio = int(lossless_prio) logger.info("Issuing a {} reboot on the dut {}".format( reboot_type, duthost.hostname)) reboot(duthost, localhost, reboot_type=reboot_type) logger.info("Wait until the system is stable") pytest_assert( wait_until(300, 20, 0, duthost.critical_services_fully_started), "Not all critical services are fully started") run_pfcwd_basic_test(api=ixia_api, testbed_config=testbed_config, port_config_list=port_config_list, conn_data=conn_graph_facts, fanout_data=fanout_graph_facts, duthost=duthost, dut_port=dut_port, prio_list=[lossless_prio], prio_dscp_map=prio_dscp_map, trigger_pfcwd=trigger_pfcwd)