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