blob: 8c0f239b8652d5dc222209e4690416740f4a2e6a [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}
17 ... ${i_port}=OPENBMC_SERIAL_PORT
18 ... ${i_model}=${OPENBMC_MODEL}
19
20 Run Keyword If
21 ... '${i_host}' != '${EMPTY}' and '${i_port}' != '${EMPTY}' and '${i_model}' != '${EMPTY}'
22 ... Establish Telnet Session
23 ... 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:
31 Telnet.Open Connection ${TELNET_HOST} port=${TELNET_PORT} prompt=#
32 Set Newline \n
33 Set Newline CRLF
34 Telnet.Write \n
35 Telnet.Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
36 ... login_prompt=${prompt_string} password_prompt=Password:
37 Telnet.Set Timeout 30 minute 30 seconds
38
39
40Read and Log BMC Serial Console Output
41 [Documentation] Reads everything that is currently available
42 ... in the output.
43 ${bmc_serial_log}= Telnet.Read
44 Log ${bmc_serial_log}