blob: e3c1f083729c93ee079193a90642bf54e136e7a5 [file] [log] [blame]
Joy Onyerikwua8074172018-04-20 07:08:19 -05001*** Settings ***
2
3Documentation Install RHEL OS and run an HTX bootme.
4
5# TEST PARAMETERS:
6# OPENBMC_HOST The BMC host name or IP address.
7# OPENBMC_USERNAME The BMC user name.
8# OPENBMC_PASSWORD The BMC password.
9# OS_HOST The OS host name or IP address.
10# OS_USERNAME The OS Host user name.
11# OS_PASSWORD The OS Host password.
12# FTP_USERNAME The FTP username.
13# FTP_PASSWORD The FTP password.
14# OS_REPO_URL The URL for the OS to be installed.
15# (e.g "ftp.com/redhat/RHEL/Server/os/").
Gunnar Mills7732c7e2018-08-14 11:54:24 -050016# Optional Parameters:
Joy Onyerikwua8074172018-04-20 07:08:19 -050017# HTX_DURATION The duration of the HTX run (e.g 2h,3m)
18# Defaults to 2h.
19# HTX_INTERVAL The time delay between checks of HTX
20# status, defaults to 10m.
21# HTX_LOOPS The number of times to loop through
22# htx, defualts to 2.
23# DEBUG If this is set, extra debug information
24# will be printed out, defaults to 1.
25
26Resource ../syslib/utils_install.robot
27
28Suite Teardown Collect HTX Log Files
29
30*** Variables ***
31${HTX_DURATION} 2h
32${HTX_INTERVAL} 10m
33${HTX_LOOPS} 2
34${DEBUG} 1
35
36
37*** Test Cases ***
38OS Install
39 [Documentation] Install the given OS through the network.
40 [Tags] OS_Install
41
42 ${cmd}= Catenate sol_utils.tcl --os_host=${OS_HOST}
43 ... --os_password=${OS_PASSWORD} --os_username=${OS_USERNAME}
44 ... --openbmc_host=${OPENBMC_HOST}
45 ... --openbmc_password=${OPENBMC_PASSWORD}
46 ... --openbmc_username=${OPENBMC_USERNAME}
47 ... --proc_name=install_os --debug=${DEBUG}
48 ... --ftp_username=${FTP_USERNAME} --ftp_password=${FTP_PASSWORD}
49 ... --os_repo_url=${os_repo_url}
50 ${rc} ${out_buf}= Cmd Fnc ${cmd}
51
52
53 Configure Yum Repository For FTP3
54 [Documentation] Configure Yum repository for ftp3 server on pegas.
55 ... This is needed for HTX to be installed.
56 [Tags] Configure_Yum_Repository_For_FTP3
57
58 ${cmd}= Catenate
59 ... printf "[pegas-ga-ftp3-server]\nname=pegas-ga-ftp3-server
60 ... \nbaseurl=ftp://${FTP_USERNAME}:${FTP_PASSWORD}@${OS_REPO_URL}
61 ... \nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/pegas_ga.repo
62 ${stdout} ${stderr} ${rc}= OS Execute Command ${cmd}
63 ${stdout} ${stderr} ${rc}= OS Execute Command yum update
64 Should Be Empty ${stderr}
65 ... msg=Yum update returned an error. Verify ftp credentials.
66
67
68Install HTX And Run Bootme
69 [Documentation] Install HTX and start extended bootme run.
70 [Tags] Install_HTX_And_Run_Bootme
71
72 Install HTX On RedHat ${htx_rpm}
73 Login To OS
74 Repeat Keyword ${HTX_LOOPS} times Run Keywords
75 ... Run MDT Profile
76 ... AND Repeat Keyword ${HTX_DURATION}
77 ... Check HTX Run Status ${HTX_INTERVAL}
Gunnar Mills7732c7e2018-08-14 11:54:24 -050078 ... AND Shutdown HTX Exerciser