blob: f93c4f9438c054a143d232147a980a2433e98075 [file] [log] [blame]
Rahul Maheshwarie95622c2017-02-24 10:04:29 -06001*** Settings ***
2
3Documentation Test auto reboot functionality of host.
4
5Resource ../lib/openbmc_ffdc.robot
6Resource ../lib/rest_client.robot
7Resource ../lib/state_manager.robot
8
9Test Setup Open Connection And Log In
10Test Teardown Post Testcase Execution
11
12*** Variables ***
13
14
15*** Test Cases ***
16
Rahul Maheshwarie95622c2017-02-24 10:04:29 -060017Verify Host Quiesce State Without Auto Reboot During Boot
18 # Description of template fields:
Rahul Maheshwariffd30de2017-06-27 05:57:45 -050019 # Auto Reboot Initial Host State Expected Host Action
20 no Booting No Reboot
Rahul Maheshwarie95622c2017-02-24 10:04:29 -060021 [Documentation] Validate "Quiesce" state during IPL.
22 [Tags] Verify_Host_Quiesce_State_Without_Auto_Reboot_During_Boot
23 [Template] Verify Host Quiesce State
24
George Keishing37cfa6b2017-06-15 10:25:55 -050025
Rahul Maheshwarie95622c2017-02-24 10:04:29 -060026Verify Host Quiesce State With Auto Reboot During Boot
27 # Description of template fields:
Rahul Maheshwariffd30de2017-06-27 05:57:45 -050028 # Auto Reboot Initial Host State Expected Host Action
29 yes Booting Reboot
Rahul Maheshwarie95622c2017-02-24 10:04:29 -060030 [Documentation] Validate "Quiesce" state during IPL.
31 [Tags] Verify_Host_Quiesce_State_With_Auto_Reboot_During_Boot
32 [Template] Verify Host Quiesce State
33
34
35*** Keywords ***
36
37Verify Host Quiesce State
38 [Documentation] Inject watchdog error on host to reach "Quiesce" state.
39 ... Later recover host from this state.
Rahul Maheshwariffd30de2017-06-27 05:57:45 -050040 [Arguments] ${auto_reboot} ${initial_host_state} ${action}
41 # Description of argument(s):
42 # auto_reboot Auto reboot setting ("yes" or "no").
43 # initial_host_state State of host before injecting error.
44 # action Action of host due to error ("No Reboot" or
45 "Reboot").
Rahul Maheshwarie95622c2017-02-24 10:04:29 -060046
47 Set Auto Reboot ${auto_reboot}
48
Rahul Maheshwariffd30de2017-06-27 05:57:45 -050049 Run Keyword If '${initial_host_state}' == 'Booting'
50 # Booting refers to host OS starting in progress.
51 ... Run Keywords Get Boot Progress To OS Starting State
Rahul Maheshwarie95622c2017-02-24 10:04:29 -060052
53 Trigger Host Watchdog Error
54 ${resp}= Run Keyword And Return Status Is Host Rebooted
55
56 Run Keyword If '${action}' == 'No Reboot'
57 ... Run Keywords Should Be Equal ${resp} ${False} AND
58 ... Wait Until Keyword Succeeds 3 min 5 sec Is Host Quiesced AND
59 ... Recover Quiesced Host
60 ... ELSE IF '${action}' == 'Reboot'
61 ... Wait Until Keyword Succeeds 3 min 5 sec Is Host Rebooted
62
63
64Post Testcase Execution
65 [Documentation] Do the post test teardown.
66 ... 1. Capture FFDC on test failure.
67 ... 2. Set default value for auto reboot.
68 ... 3. Close all open SSH connections.
69
70 FFDC On Test Case Fail
71 Set Auto Reboot yes
72 Close All Connections