Skip to content

Commit de8007a

Browse files
authored
Add support for test_power_off_reboot for Cisco 8808 chassis (#16736)
Description of PR Add support for test_power_off_reboot for Cisco 8808 chassis. For chassis, till we can add calculation to find minimum number of PSU up based on the load of the system, we will bringup all the PSU before we continue the test. Summary: Fixes # (issue) Approach What is the motivation for this PR? Add support for test_power_off_reboot for Cisco 8808 chassis. For chassis, till we can add calculation to find minimum number of PSU up based on the load of the system, we will bringup all the PSU before we continue the test. How did you do it? How did you verify/test it? On T2 profiles Any platform specific information? Cisco 8808 chassis Supported testbed topology if it's a new test case? Documentation =========================================================================================== PASSES =========================================================================================== ______________________________________________________________________________ test_power_off_reboot[5-yy39-rp] ______________________________________________________________________________ _____________________________________________________________________________ test_power_off_reboot[15-yy39-rp] ______________________________________________________________________________ ------------------------------------------ generated xml file: /run_logs/20590_nightly/platform_tests/test_power_off_reboot_2025-01-30-22-08-39.xml ------------------------------------------ ================================================================================== short test summary info =================================================================================== PASSED platform_tests/test_power_off_reboot.py::test_power_off_reboot[5-yy39-rp] PASSED platform_tests/test_power_off_reboot.py::test_power_off_reboot[15-yy39-rp] ========================================================================= 2 passed, 1 warning in 2467.92s (0:41:07) ========================================================================== co-authorized by: jianquanye@microsoft.com
1 parent d01efa9 commit de8007a

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

tests/platform_tests/test_power_off_reboot.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ def test_power_off_reboot(duthosts, localhost, enum_supervisor_dut_hostname, con
8282
@param power_off_delay: Pytest parameter. The delay between turning off and on the PSU
8383
"""
8484
duthost = duthosts[enum_supervisor_dut_hostname]
85-
UNSUPPORTED_ASIC_TYPE = ["cisco-8000"]
86-
if duthost.facts["asic_type"] in UNSUPPORTED_ASIC_TYPE:
87-
pytest.skip("Skipping test_power_off_reboot. Test unsupported on {} platform"
88-
.format(duthost.facts["asic_type"]))
8985
pdu_ctrl = get_pdu_controller(duthost)
9086
if pdu_ctrl is None:
9187
pytest.skip("No PSU controller for %s, skip rest of the testing in this case" % duthost.hostname)
@@ -114,14 +110,25 @@ def test_power_off_reboot(duthosts, localhost, enum_supervisor_dut_hostname, con
114110
poweroff_reboot_kwargs = {"dut": duthost}
115111

116112
try:
117-
for power_on_seq in power_on_seq_list:
113+
if is_chassis and duthost.facts["asic_type"] in ["cisco-8000"]:
118114
poweroff_reboot_kwargs["pdu_ctrl"] = pdu_ctrl
119115
poweroff_reboot_kwargs["all_outlets"] = all_outlets
120-
poweroff_reboot_kwargs["power_on_seq"] = power_on_seq
116+
poweroff_reboot_kwargs["power_on_seq"] = all_outlets
121117
poweroff_reboot_kwargs["delay_time"] = power_off_delay
122-
reboot_and_check(localhost, duthost, conn_graph_facts.get("device_conn", {}).get(duthost.hostname, {}),
123-
xcvr_skip_list, REBOOT_TYPE_POWEROFF, _power_off_reboot_helper,
124-
poweroff_reboot_kwargs, duthosts)
118+
reboot_and_check(
119+
localhost, duthost, conn_graph_facts.get("device_conn", {}).get(duthost.hostname, {}),
120+
xcvr_skip_list, REBOOT_TYPE_POWEROFF,
121+
_power_off_reboot_helper, poweroff_reboot_kwargs, duthosts=duthosts)
122+
else:
123+
for power_on_seq in power_on_seq_list:
124+
poweroff_reboot_kwargs["pdu_ctrl"] = pdu_ctrl
125+
poweroff_reboot_kwargs["all_outlets"] = all_outlets
126+
poweroff_reboot_kwargs["power_on_seq"] = power_on_seq
127+
poweroff_reboot_kwargs["delay_time"] = power_off_delay
128+
reboot_and_check(
129+
localhost, duthost, conn_graph_facts.get("device_conn", {}).get(duthost.hostname, {}),
130+
xcvr_skip_list, REBOOT_TYPE_POWEROFF,
131+
_power_off_reboot_helper, poweroff_reboot_kwargs)
125132

126133
except Exception as e:
127134
logging.debug("Restore power after test failure")

0 commit comments

Comments
 (0)