1*** Settings ***
2Library           Collections
3Library           String
4Library           RequestsLibrary.RequestsKeywords
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# Transition REST vs Redfish ONLY temporary changes for stagging
14# automation infrastructure change and for continuity.
15${REDFISH_SUPPORT_TRANS_STATE}    ${0}
16
17# By default Delete all Redfish session per boot run.
18${REDFISH_DELETE_SESSIONS}        ${1}
19
20${OPENBMC_MODEL}  ${EMPTY}
21${OPENBMC_HOST}   ${EMPTY}
22${DBUS_PREFIX}    ${EMPTY}
23${PORT}           ${EMPTY}
24# AUTH_SUFFIX here is derived from variables.py
25${AUTH_URI}       https://${OPENBMC_HOST}${AUTH_SUFFIX}
26${OPENBMC_USERNAME}    root
27${OPENBMC_PASSWORD}    0penBmc
28${REST_USERNAME}       root
29${REST_PASSWORD}       0penBmc
30
31${CHASSIS_ID}  chassis
32
33# MTLS_ENABLED indicates whether mTLS is enabled.
34${MTLS_ENABLED}        False
35# Valid mTLS certificate for authentication.
36${VALID_CERT}          ${EMPTY}
37# Path of mTLS certificates directory.
38${CERT_DIR_PATH}       ${EMPTY}
39
40${IPMI_PASSWORD}       0penBmc
41${MACHINE_TYPE}    palmetto
42${DBUS_POLL_INTERVAL}      15s
43${OPENBMC_REBOOT_TIMEOUT}   ${10}
44# IPMI_COMMAND here is set to "External" by default. User
45# can override to "Dbus" from command line.
46${IPMI_COMMAND}    External
47# IPMI chipher default.
48${IPMI_CIPHER_LEVEL}  ${17}
49# IPMI timeout default.
50${IPMI_TIMEOUT}       ${3}
51
52# PDU related parameters
53${PDU_TYPE}         ${EMPTY}
54${PDU_IP}           ${EMPTY}
55${PDU_USERNAME}     ${EMPTY}
56${PDU_PASSWORD}     ${EMPTY}
57${PDU_SLOT_NO}      ${EMPTY}
58
59# User define input SSH and HTTPS related parameters
60${SSH_PORT}         22
61${HTTPS_PORT}       443
62${IPMI_PORT}        623
63${HOST_SOL_PORT}    2200
64${OPENBMC_SERIAL_HOST}      ${EMPTY}
65${OPENBMC_SERIAL_PORT}      ${EMPTY}
66
67# OS related parameters.
68${OS_HOST}          ${EMPTY}
69${OS_USERNAME}      ${EMPTY}
70${OS_PASSWORD}      ${EMPTY}
71${OS_WAIT_TIMEOUT}  ${15*60}
72
73# Networking related parameters
74${NETWORK_PORT}            80
75${PACKET_TYPE}             tcp
76${ICMP_PACKETS}            icmp
77${NETWORK_RETRY_TIME}      6
78${NETWORK_TIMEOUT}         18
79${ICMP_TIMESTAMP_REQUEST}  13
80${ICMP_ECHO_REQUEST}       8
81${CHANNEL_NUMBER}          1
82
83# BMC debug tarball parameter
84${DEBUG_TARBALL_PATH}  ${EMPTY}
85
86# Upload Image parameters
87${TFTP_SERVER}                  ${EMPTY}
88${PNOR_TFTP_FILE_NAME}          ${EMPTY}
89${BMC_TFTP_FILE_NAME}           ${EMPTY}
90${IMAGE_FILE_PATH}              ${EMPTY}
91${ALTERNATE_IMAGE_FILE_PATH}    ${EMPTY}
92${PNOR_IMAGE_FILE_PATH}         ${EMPTY}
93${BMC_IMAGE_FILE_PATH}          ${EMPTY}
94${BAD_IMAGES_DIR_PATH}          ${EMPTY}
95${SKIP_UPDATE_IF_ACTIVE}        false
96
97# Parameters for doing N-1 and N+1 code updates.
98${N_MINUS_ONE_IMAGE_FILE_PATH}    ${EMPTY}
99${N_PLUS_ONE_IMAGE_FILE_PATH}     ${EMPTY}
100
101# The caller must set this to the string "true" in order to delete images. The
102# code is picky.
103${DELETE_OLD_PNOR_IMAGES}   false
104${DELETE_OLD_GUARD_FILE}    false
105
106# Caller can specify a value for LAST_KNOWN_GOOD_VERSION to indicate that if
107# the machine already has that version on it, the update should be skipped.
108${LAST_KNOWN_GOOD_VERSION}  ${EMPTY}
109
110# By default field mode is disabled.
111${FIELD_MODE}               ${False}
112
113# LDAP related variables.
114${LDAP_BASE_DN}             ${EMPTY}
115${LDAP_BIND_DN}             ${EMPTY}
116${LDAP_SERVER_HOST}         ${EMPTY}
117${LDAP_SECURE_MODE}         ${EMPTY}
118${LDAP_BIND_DN_PASSWORD}    ${EMPTY}
119${LDAP_SEARCH_SCOPE}        ${EMPTY}
120${LDAP_TYPE}                ${EMPTY}
121${LDAP_USER}                ${EMPTY}
122${LDAP_USER_PASSWORD}       ${EMPTY}
123
124*** Keywords ***
125Get Inventory Schema
126    [Documentation]  Get inventory schema.
127    [Arguments]    ${machine}
128    [Return]    &{INVENTORY}[${machine}]
129
130Get Inventory Items Schema
131    [Documentation]  Get inventory items schema.
132    [Arguments]    ${machine}
133    [Return]    &{INVENTORY_ITEMS}[${machine}]
134
135Get Sensor Schema
136    [Documentation]  Get sensors schema.
137    [Arguments]    ${machine}
138    [Return]    &{SENSORS}[${machine}]
139