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# 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_PASSWORD}  0penBmc
34${SERVICE_USER_PASSWORD}   0penBmc
35
36${CHASSIS_ID}  chassis
37${COMPONENT_NAME_OF_POWER_SUPPLY}  powersupply
38
39# MTLS_ENABLED indicates whether mTLS is enabled.
40${MTLS_ENABLED}        False
41# Valid mTLS certificate for authentication.
42${VALID_CERT}          ${EMPTY}
43# Path of mTLS certificates directory.
44${CERT_DIR_PATH}       ${EMPTY}
45
46${IPMI_PASSWORD}       0penBmc
47${MACHINE_TYPE}    palmetto
48${DBUS_POLL_INTERVAL}      15s
49${OPENBMC_REBOOT_TIMEOUT}   ${10}
50# IPMI_COMMAND here is set to "External" by default. User
51# can override to "Dbus" from command line.
52${IPMI_COMMAND}    External
53# IPMI chipher default.
54${IPMI_CIPHER_LEVEL}  ${17}
55# IPMI timeout default.
56${IPMI_TIMEOUT}       ${3}
57
58# PDU related parameters
59${PDU_TYPE}         ${EMPTY}
60${PDU_IP}           ${EMPTY}
61${PDU_USERNAME}     ${EMPTY}
62${PDU_PASSWORD}     ${EMPTY}
63${PDU_SLOT_NO}      ${EMPTY}
64
65# User define input SSH and HTTPS related parameters
66${SSH_PORT}         22
67${HTTPS_PORT}       443
68${IPMI_PORT}        623
69${HOST_SOL_PORT}    2200
70${OPENBMC_SERIAL_HOST}      ${EMPTY}
71${OPENBMC_SERIAL_PORT}      ${EMPTY}
72
73# OS related parameters.
74${OS_HOST}          ${EMPTY}
75${OS_USERNAME}      ${EMPTY}
76${OS_PASSWORD}      ${EMPTY}
77${OS_WAIT_TIMEOUT}  ${15*60}
78
79# Networking related parameters
80${NETWORK_PORT}            80
81${PACKET_TYPE}             tcp
82${ICMP_PACKETS}            icmp
83${NETWORK_RETRY_TIME}      6
84${NETWORK_TIMEOUT}         18
85${ICMP_TIMESTAMP_REQUEST}  13
86${ICMP_ECHO_REQUEST}       8
87${CHANNEL_NUMBER}          1
88${TCP_PACKETS}             tcp
89${ICMP_NETMASK_REQUEST}    17
90${REDFISH_INTERFACE}       443
91${SYN_PACKETS}             SYN
92${RESET_PACKETS}           RST
93${FIN_PACKETS}             FIN
94${SYN_ACK_RESET}           SAR
95${ALL_FLAGS}               ALL
96# Used to set BMC static IPv4 configuration.
97${STATIC_IP}            10.10.10.10
98${NETMASK}              255.255.255.0
99${GATEWAY}              10.10.10.10
100
101# BMC debug tarball parameter
102${DEBUG_TARBALL_PATH}  ${EMPTY}
103
104# Upload Image parameters
105${TFTP_SERVER}                  ${EMPTY}
106${PNOR_TFTP_FILE_NAME}          ${EMPTY}
107${BMC_TFTP_FILE_NAME}           ${EMPTY}
108${IMAGE_FILE_PATH}              ${EMPTY}
109${ALTERNATE_IMAGE_FILE_PATH}    ${EMPTY}
110${PNOR_IMAGE_FILE_PATH}         ${EMPTY}
111${BMC_IMAGE_FILE_PATH}          ${EMPTY}
112${BAD_IMAGES_DIR_PATH}          ${EMPTY}
113${SKIP_UPDATE_IF_ACTIVE}        false
114
115# Parameters for doing N-1 and N+1 code updates.
116${N_MINUS_ONE_IMAGE_FILE_PATH}    ${EMPTY}
117${N_PLUS_ONE_IMAGE_FILE_PATH}     ${EMPTY}
118
119# The caller must set this to the string "true" in order to delete images. The
120# code is picky.
121${DELETE_OLD_PNOR_IMAGES}   false
122${DELETE_OLD_GUARD_FILE}    false
123
124# Caller can specify a value for LAST_KNOWN_GOOD_VERSION to indicate that if
125# the machine already has that version on it, the update should be skipped.
126${LAST_KNOWN_GOOD_VERSION}  ${EMPTY}
127
128# By default field mode is disabled.
129${FIELD_MODE}               ${False}
130
131# LDAP related variables.
132${LDAP_BASE_DN}             ${EMPTY}
133${LDAP_BIND_DN}             ${EMPTY}
134${LDAP_SERVER_HOST}         ${EMPTY}
135${LDAP_SECURE_MODE}         ${EMPTY}
136${LDAP_BIND_DN_PASSWORD}    ${EMPTY}
137${LDAP_SEARCH_SCOPE}        ${EMPTY}
138${LDAP_TYPE}                ${EMPTY}
139${LDAP_USER}                ${EMPTY}
140${LDAP_USER_PASSWORD}       ${EMPTY}
141
142*** Keywords ***
143Get Inventory Schema
144    [Documentation]  Get inventory schema.
145    [Arguments]    ${machine}
146    [Return]    &{INVENTORY}[${machine}]
147
148Get Inventory Items Schema
149    [Documentation]  Get inventory items schema.
150    [Arguments]    ${machine}
151    [Return]    &{INVENTORY_ITEMS}[${machine}]
152
153Get Sensor Schema
154    [Documentation]  Get sensors schema.
155    [Arguments]    ${machine}
156    [Return]    &{SENSORS}[${machine}]
157