blob: 00e71455131950762a8488a06dd5683eda2cf143 [file] [log] [blame]
George Keishingbeec26d2016-11-09 06:57:28 -06001*** Settings ***
2Documentation Module for capturing BMC serial output
3
4Library Telnet newline=LF
5Library OperatingSystem
6Library Collections
7
8*** Variables ***
9
10*** Keywords ***
11
12Open Telnet Connection to BMC Serial Console
13 [Documentation] Open telnet connection session to BMC serial console
14 ... The login prompt expected, for example, for barreleye
15 ... is "barreleye login:"
16 [Arguments] ${i_host}=${OPENBMC_SERIAL_HOST}
George Keishingbfae2ff2016-11-28 04:16:10 -060017 ... ${i_port}=${OPENBMC_SERIAL_PORT}
George Keishingbeec26d2016-11-09 06:57:28 -060018 ... ${i_model}=${OPENBMC_MODEL}
19
20 Run Keyword If
21 ... '${i_host}' != '${EMPTY}' and '${i_port}' != '${EMPTY}' and '${i_model}' != '${EMPTY}'
George Keishingbfae2ff2016-11-28 04:16:10 -060022 ... Establish Telnet Session on BMC Serial Console
George Keishingbeec26d2016-11-09 06:57:28 -060023 ... ELSE Fail msg=One of the paramaters is EMPTY
24
25
26Establish Telnet Session on BMC Serial Console
27 [Documentation] Establish telnet session and set timeout to 30 mins
28 ... 30 secs.
29
30 ${prompt_string} Set Variable ${OPENBMC_MODEL} login:
George Keishingbfae2ff2016-11-28 04:16:10 -060031 Telnet.Open Connection
32 ... ${OPENBMC_SERIAL_HOST} port=${OPENBMC_SERIAL_PORT} prompt=#
George Keishingbeec26d2016-11-09 06:57:28 -060033 Set Newline \n
34 Set Newline CRLF
35 Telnet.Write \n
36 Telnet.Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
37 ... login_prompt=${prompt_string} password_prompt=Password:
38 Telnet.Set Timeout 30 minute 30 seconds
39
40
41Read and Log BMC Serial Console Output
42 [Documentation] Reads everything that is currently available
43 ... in the output.
44 ${bmc_serial_log}= Telnet.Read
45 Log ${bmc_serial_log}