From b686182ad5c32954f8e8afff7303453bc2d1b2ee Mon Sep 17 00:00:00 2001 From: jiapei Date: Mon, 10 Dec 2018 07:06:05 +0000 Subject: [PATCH] Enroll XClarity machines in Ironic's devstack setting In the current XClarity CI environment, we have to manually add XClarity machines. This patch is going to update Ironic's devstack setting to enroll XClarity machines automatically. Change-Id: I5f664706439c9c10311749b6a9b5520e2c1dc6db Story: 2004577 Task: 28353 --- devstack/lib/ironic | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index da8430559d..740ca632b7 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -650,6 +650,11 @@ function is_deployed_by_irmc { return 1 } +function is_deployed_by_xclarity { + [[ "$IRONIC_DEPLOY_DRIVER" == xclarity ]] && return 0 + return 1 +} + function is_drac_enabled { [[ -z "${IRONIC_ENABLED_HARDWARE_TYPES%%*idrac*}" ]] && return 0 return 1 @@ -1955,6 +1960,13 @@ function enroll_nodes { if [[ -n "$IRONIC_DEPLOY_ISO_ID" ]]; then node_options+=" --driver-info irmc_deploy_iso=$IRONIC_DEPLOY_ISO_ID" fi + elif is_deployed_by_xclarity; then + local xclarity_hardware_id + xclarity_hardware_id=$(echo $hardware_info |awk '{print $5}') + node_options+=" --driver-info xclarity_manager_ip=$bmc_address \ + --driver-info xclarity_password=$bmc_passwd \ + --driver-info xclarity_username=$bmc_username \ + --driver-info xclarity_hardware_id=$xclarity_hardware_id" fi interface_info="${mac_address}"