Option to enroll nodes with drac driver

This patch allows import and enroll nodes with pxe_drac
driver from space separated hardware info node file.

Change-Id: Ie87fed29cc2bb7b156b89ec026cd0c59eb07fb11
This commit is contained in:
rajinir 2016-08-29 11:31:32 -05:00
parent 57838f01da
commit 4f1416ad45

View File

@ -85,6 +85,9 @@ IRONIC_HW_ARCH=${IRONIC_HW_ARCH:-x86_64}
# *_oneview: # *_oneview:
# <Server Hardware URI> <Server Hardware Type URI> <Enclosure Group URI> <Server Profile Template URI> <MAC of primary connection> <Applied Server Profile URI> # <Server Hardware URI> <Server Hardware Type URI> <Enclosure Group URI> <Server Profile Template URI> <MAC of primary connection> <Applied Server Profile URI>
# #
# *_drac:
# <BMC address> <MAC address> <BMC username> <BMC password>
#
# IRONIC_IPMIINFO_FILE is deprecated, please use IRONIC_HWINFO_FILE. IRONIC_IPMIINFO_FILE will be removed in Ocata. # IRONIC_IPMIINFO_FILE is deprecated, please use IRONIC_HWINFO_FILE. IRONIC_IPMIINFO_FILE will be removed in Ocata.
IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-""} IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-""}
if [ ! -z "$IRONIC_IPMIINFO_FILE" ]; then if [ ! -z "$IRONIC_IPMIINFO_FILE" ]; then
@ -195,7 +198,8 @@ fi
# are ``pxe_ssh``, ``pxe_ipmitool``, ``agent_ssh`` and ``agent_ipmitool``. # are ``pxe_ssh``, ``pxe_ipmitool``, ``agent_ssh`` and ``agent_ipmitool``.
# #
# Additional valid choices if IRONIC_IS_HARDWARE == true are: # Additional valid choices if IRONIC_IS_HARDWARE == true are:
# ``pxe_iscsi_cimc``, ``pxe_agent_cimc``, ``pxe_ucs``, ``pxe_cimc`` and ``*_pxe_oneview`` # ``pxe_iscsi_cimc``, ``pxe_agent_cimc``, ``pxe_ucs``, ``pxe_cimc``,
# ``*_pxe_oneview`` and ``pxe_drac``
IRONIC_DEPLOY_DRIVER=${IRONIC_DEPLOY_DRIVER:-pxe_ssh} IRONIC_DEPLOY_DRIVER=${IRONIC_DEPLOY_DRIVER:-pxe_ssh}
# Support entry points installation of console scripts # Support entry points installation of console scripts
@ -336,6 +340,11 @@ function is_deployed_by_ilo {
return 1 return 1
} }
function is_deployed_by_drac {
[[ -z "${IRONIC_DEPLOY_DRIVER##*_drac}" ]] && return 0
return 1
}
function is_glance_configuration_required { function is_glance_configuration_required {
is_deployed_by_agent || [[ "$IRONIC_CONFIGURE_GLANCE_WITH_SWIFT" == "True" ]] && return 0 is_deployed_by_agent || [[ "$IRONIC_CONFIGURE_GLANCE_WITH_SWIFT" == "True" ]] && return 0
return 1 return 1
@ -1062,6 +1071,9 @@ function enroll_nodes {
if [[ $IRONIC_DEPLOY_DRIVER -ne "pxe_ilo" ]]; then if [[ $IRONIC_DEPLOY_DRIVER -ne "pxe_ilo" ]]; then
node_options+=" -i ilo_deploy_iso=$IRONIC_DEPLOY_ISO_ID" node_options+=" -i ilo_deploy_iso=$IRONIC_DEPLOY_ISO_ID"
fi fi
elif is_deployed_by_drac; then
node_options+=" -i drac_host=$bmc_address -i drac_password=$bmc_passwd\
-i drac_username=$bmc_username"
fi fi
fi fi