DevStack: Enroll node with iRMC hardware

This patch enables enrolling nodes with a hardware info file when iRMC
hardware type (or classic driver) is used.

Change-Id: Ibdbdb11fbbf7a8872d6ad02e21ceddae6b180506
This commit is contained in:
Hironori Shiina 2018-03-28 20:31:45 +09:00
parent 57bca71bc6
commit aafa9accf2

View File

@ -109,6 +109,9 @@ IRONIC_HW_ARCH=${IRONIC_HW_ARCH:-x86_64}
# *_drac:
# <BMC address> <MAC address> <BMC username> <BMC password>
#
# * irmc:
# <BMC address> <MAC address> <BMC username> <BMC password>
#
IRONIC_HWINFO_FILE=${IRONIC_HWINFO_FILE:-$IRONIC_DATA_DIR/hardware_info}
# Set up defaults for functional / integration testing
@ -624,6 +627,11 @@ function is_deployed_by_redfish {
return 1
}
function is_deployed_by_irmc {
[[ -z "${IRONIC_DEPLOY_DRIVER##*irmc}" ]] && return 0
return 1
}
function is_drac_enabled {
[[ -z "${IRONIC_ENABLED_DRIVERS##*_drac}" ]] && return 0
return 1
@ -1936,6 +1944,13 @@ function enroll_nodes {
node_options+=" --driver-info drac_host=$bmc_address \
--driver-info drac_password=$bmc_passwd \
--driver-info drac_username=$bmc_username"
elif is_deployed_by_irmc; then
node_options+=" --driver-info irmc_address=$bmc_address \
--driver-info irmc_password=$bmc_passwd \
--driver-info irmc_username=$bmc_username"
if [[ -n "$IRONIC_DEPLOY_ISO_ID" ]]; then
node_options+=" --driver-info irmc_deploy_iso=$IRONIC_DEPLOY_ISO_ID"
fi
fi
interface_info="${mac_address}"