1*** Settings ***
2Library           Collections
3Library           String
4Library           RequestsLibrary
5Library           OperatingSystem
6Variables         ../data/variables.py
7
8*** Variables ***
9
10# By default power, support x86 as well.
11${PLATFORM_ARCH_TYPE}             power
12
13# FFDC Redfish OEM path /<oem>/v1/
14${OEM_REDFISH_PATH}               ${EMPTY}
15
16# Transition REST vs Redfish ONLY temporary changes for stagging
17# automation infrastructure change and for continuity.
18${REDFISH_SUPPORT_TRANS_STATE}    ${0}
19
20# By default Delete all Redfish session per boot run.
21${REDFISH_DELETE_SESSIONS}        ${1}
22
23${OPENBMC_MODEL}           ${EMPTY}
24${OPENBMC_HOST}            ${EMPTY}
25${DBUS_PREFIX}             ${EMPTY}
26${PORT}                    ${EMPTY}
27
28# AUTH_SUFFIX here is derived from variables.py
29${AUTH_URI}                https://${OPENBMC_HOST}${AUTH_SUFFIX}
30${OPENBMC_USERNAME}        root
31${OPENBMC_PASSWORD}        ${EMPTY}
32${OPENBMC_ADMIN_USERNAME}  admin
33${OPENBMC_ADMIN_PASSWORD}  ${EMPTY}
34
35# For users privilege admin or sudo.
36${USER_TYPE}               ${EMPTY}
37
38${MANAGER_ID}              bmc
39${CHASSIS_ID}              chassis
40
41# MTLS_ENABLED indicates whether mTLS is enabled.
42${MTLS_ENABLED}            False
43# Valid mTLS certificate for authentication.
44${VALID_CERT}              ${EMPTY}
45# Path of mTLS certificates directory.
46${CERT_DIR_PATH}           ${EMPTY}
47
48${IPMI_USERNAME}           root
49# Assign BMC password as default. User can input using -v option to key in
50# IPMI password if different.
51${IPMI_PASSWORD}           ${OPENBMC_PASSWORD}
52
53${OPENBMC_REBOOT_TIMEOUT}   ${10}
54
55# IPMI_COMMAND here is set to "External" by default. User
56# can override to "Dbus" from command line.
57${IPMI_COMMAND}        External
58
59# IPMI chipher default.
60${IPMI_CIPHER_LEVEL}   ${17}
61
62# IPMI timeout default.
63${IPMI_TIMEOUT}        ${3}
64${GEN_ID_BYTE_1}       ${20}
65${GEN_ID_BYTE_2}       ${00}
66
67# Log default path for IPMI SOL.
68${IPMI_SOL_LOG_FILE}    ${EXECDIR}${/}logs${/}sol_${OPENBMC_HOST}
69
70# IPMI SOL console output types/parameters to verify.
71${SOL_BIOS_OUTPUT}          ${EMPTY}
72${SOL_LOGIN_OUTPUT}         ${EMPTY}
73
74# PDU related parameters
75${PDU_TYPE}         ${EMPTY}
76${PDU_IP}           ${EMPTY}
77${PDU_USERNAME}     ${EMPTY}
78${PDU_PASSWORD}     ${EMPTY}
79${PDU_SLOT_NO}      ${EMPTY}
80
81# User define input SSH and HTTPS related parameters
82${SSH_PORT}         22
83${HTTPS_PORT}       443
84${IPMI_PORT}        623
85${HOST_SOL_PORT}    2200
86${OPENBMC_SERIAL_HOST}      ${EMPTY}
87${OPENBMC_SERIAL_PORT}      ${EMPTY}
88${OPENBMC_CONSOLE_CLIENT}   ${EMPTY}
89
90# OS related parameters.
91${OS_HOST}          ${EMPTY}
92${OS_USERNAME}      ${EMPTY}
93${OS_PASSWORD}      ${EMPTY}
94${OS_WAIT_TIMEOUT}  ${15*60}
95
96# Networking related parameters
97${NETWORK_PORT}            80
98${PACKET_TYPE}             tcp
99${ICMP_PACKETS}            icmp
100${NETWORK_RETRY_TIME}      6
101${NETWORK_TIMEOUT}         18
102${ICMP_TIMESTAMP_REQUEST}  13
103${ICMP_ECHO_REQUEST}       8
104${CHANNEL_NUMBER}          1
105${SECONDARY_CHANNEL_NUMBER}      2
106${TCP_PACKETS}             tcp
107${TCP_CONNECTION}          tcp-connect
108${ICMP_NETMASK_REQUEST}    17
109${REDFISH_INTERFACE}       443
110${SYN_PACKETS}             SYN
111${RESET_PACKETS}           RST
112${FIN_PACKETS}             FIN
113${SYN_ACK_RESET}           SAR
114${ALL_FLAGS}               ALL
115
116# Used to set BMC static IPv4 configuration.
117${STATIC_IP}            10.10.10.10
118${NETMASK}              255.255.255.0
119${GATEWAY}              10.10.10.10
120
121# BMC debug tarball parameter
122${DEBUG_TARBALL_PATH}  ${EMPTY}
123
124# Upload Image parameters
125${TFTP_SERVER}                  ${EMPTY}
126${PNOR_TFTP_FILE_NAME}          ${EMPTY}
127${BMC_TFTP_FILE_NAME}           ${EMPTY}
128${IMAGE_FILE_PATH}              ${EMPTY}
129${ALTERNATE_IMAGE_FILE_PATH}    ${EMPTY}
130${PNOR_IMAGE_FILE_PATH}         ${EMPTY}
131${BMC_IMAGE_FILE_PATH}          ${EMPTY}
132${BAD_IMAGES_DIR_PATH}          ${EMPTY}
133${SKIP_UPDATE_IF_ACTIVE}        false
134
135# Parameters for doing N-1 and N+1 code updates.
136${N_MINUS_ONE_IMAGE_FILE_PATH}    ${EMPTY}
137${N_PLUS_ONE_IMAGE_FILE_PATH}     ${EMPTY}
138
139# The caller must set this to the string "true" in order to delete images. The
140# code is picky.
141${DELETE_OLD_PNOR_IMAGES}   false
142${DELETE_OLD_GUARD_FILE}    false
143
144# Caller can specify a value for LAST_KNOWN_GOOD_VERSION to indicate that if
145# the machine already has that version on it, the update should be skipped.
146${LAST_KNOWN_GOOD_VERSION}  ${EMPTY}
147
148# By default field mode is disabled.
149${FIELD_MODE}               ${False}
150
151# LDAP related variables.
152${LDAP_BASE_DN}             ${EMPTY}
153${LDAP_BIND_DN}             ${EMPTY}
154${LDAP_SERVER_HOST}         ${EMPTY}
155${LDAP_SECURE_MODE}         ${EMPTY}
156${LDAP_BIND_DN_PASSWORD}    ${EMPTY}
157${LDAP_SEARCH_SCOPE}        ${EMPTY}
158${LDAP_TYPE}                ${EMPTY}
159${LDAP_USER}                ${EMPTY}
160${LDAP_USER_PASSWORD}       ${EMPTY}
161${GROUP_PRIVILEGE}          ${EMPTY}
162${GROUP_NAME}               ${EMPTY}
163${LDAP_SERVER_URI}          ldap://${LDAP_SERVER_HOST}
164
165# General tool variables
166# FFDC_DEFAULT == 1; use Default FFDC methods
167${FFDC_DEFAULT}            ${1}
168
169# NTP Server Address
170# NTP Address needs to be given as an list.
171# For example,
172# 1 NTP Address - 14.139.60.103
173# 2 NTP Address - 14.139.60.103  14.139.60.106
174@{NTP_SERVER_ADDRESSES}    ${EMPTY}
175
176# Client related parameters
177${CLIENT_PASSWORD}         ${EMPTY}
178
179# Task Service related variables.
180${TASK_JSON_FILE_PATH}   data/task_state.json
181
182
183*** Keywords ***
184
185Get Inventory Schema
186    [Documentation]  Get inventory schema.
187    [Arguments]    ${machine}
188    [Return]    &{INVENTORY}[${machine}]
189
190Get Inventory Items Schema
191    [Documentation]  Get inventory items schema.
192    [Arguments]    ${machine}
193    [Return]    &{INVENTORY_ITEMS}[${machine}]
194
195Get Sensor Schema
196    [Documentation]  Get sensors schema.
197    [Arguments]    ${machine}
198    [Return]    &{SENSORS}[${machine}]
199