From 4f1416ad459f0def95a40984b8510e064db5df3e Mon Sep 17 00:00:00 2001 From: rajinir Date: Mon, 29 Aug 2016 11:31:32 -0500 Subject: [PATCH] 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 --- devstack/lib/ironic | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 983d68e3e6..b92db06b9a 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -85,6 +85,9 @@ IRONIC_HW_ARCH=${IRONIC_HW_ARCH:-x86_64} # *_oneview: # # +# *_drac: +# +# # IRONIC_IPMIINFO_FILE is deprecated, please use IRONIC_HWINFO_FILE. IRONIC_IPMIINFO_FILE will be removed in Ocata. IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-""} if [ ! -z "$IRONIC_IPMIINFO_FILE" ]; then @@ -195,7 +198,8 @@ fi # are ``pxe_ssh``, ``pxe_ipmitool``, ``agent_ssh`` and ``agent_ipmitool``. # # 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} # Support entry points installation of console scripts @@ -336,6 +340,11 @@ function is_deployed_by_ilo { return 1 } +function is_deployed_by_drac { + [[ -z "${IRONIC_DEPLOY_DRIVER##*_drac}" ]] && return 0 + return 1 +} + function is_glance_configuration_required { is_deployed_by_agent || [[ "$IRONIC_CONFIGURE_GLANCE_WITH_SWIFT" == "True" ]] && return 0 return 1 @@ -1062,6 +1071,9 @@ function enroll_nodes { if [[ $IRONIC_DEPLOY_DRIVER -ne "pxe_ilo" ]]; then node_options+=" -i ilo_deploy_iso=$IRONIC_DEPLOY_ISO_ID" 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