Merge "Add support for Cisco drivers in Ironic devstack"
This commit is contained in:
commit
ef5ed93b9e
@ -54,12 +54,32 @@ IRONIC_HW_NODE_RAM=${IRONIC_HW_NODE_RAM:-512}
|
||||
IRONIC_HW_NODE_DISK=${IRONIC_HW_NODE_DISK:-10}
|
||||
IRONIC_HW_EPHEMERAL_DISK=${IRONIC_HW_EPHEMERAL_DISK:-0}
|
||||
IRONIC_HW_ARCH=${IRONIC_HW_ARCH:-x86_64}
|
||||
# The file is composed of multiple lines, each line includes four field
|
||||
# separated by white space: IPMI address, MAC address, IPMI username
|
||||
# and IPMI password.
|
||||
|
||||
# The file is composed of multiple lines, each line includes fields
|
||||
# separated by white space, in the format:
|
||||
#
|
||||
# 192.168.110.107 00:1e:67:57:50:4c root otc123
|
||||
IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-$IRONIC_DATA_DIR/hardware_info}
|
||||
# <BMC address> <MAC address> <BMC username> <BMC password> [<driver specfic fields>]
|
||||
#
|
||||
# For example:
|
||||
#
|
||||
# 192.168.110.107 00:1e:67:57:50:4c root otc123
|
||||
#
|
||||
# Supported IRONIC_DEPLOY_DRIVERs:
|
||||
# *_ipmitool:
|
||||
# <BMC address> <MAC address> <BMC username> <BMC password>
|
||||
#
|
||||
# *_cimc:
|
||||
# <BMC address> <MAC address> <BMC username> <BMC password>
|
||||
#
|
||||
# *_ucs:
|
||||
# <BMC address> <MAC address> <BMC username> <BMC password> <UCS service profile>
|
||||
#
|
||||
# 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
|
||||
deprecated "IRONIC_IPMIINFO_FILE is deprecated, please switch to IRONIC_HWINFO_FILE. IRONIC_IPMIINFO_FILE will be removed in Ocata."
|
||||
fi
|
||||
IRONIC_HWINFO_FILE=${IRONIC_HWINFO_FILE:-${IRONIC_IPMIINFO_FILE:-$IRONIC_DATA_DIR/hardware_info}}
|
||||
|
||||
# Set up defaults for functional / integration testing
|
||||
IRONIC_NODE_UUID=${IRONIC_NODE_UUID:-`uuidgen`}
|
||||
@ -219,6 +239,16 @@ function is_deployed_by_ipmitool {
|
||||
return 1
|
||||
}
|
||||
|
||||
function is_deployed_by_cimc {
|
||||
[[ -z "${IRONIC_DEPLOY_DRIVER##*_cimc}" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
function is_deployed_by_ucs {
|
||||
[[ -z "${IRONIC_DEPLOY_DRIVER##*_ucs}" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
function is_deployed_with_ipa_ramdisk {
|
||||
is_deployed_by_agent || [[ "$IRONIC_DEPLOY_DRIVER_ISCSI_WITH_IPA" == "True" ]] && return 0
|
||||
return 1
|
||||
@ -740,9 +770,7 @@ function enroll_nodes {
|
||||
local ironic_node_disk=$IRONIC_HW_NODE_DISK
|
||||
local ironic_ephemeral_disk=$IRONIC_HW_EPHEMERAL_DISK
|
||||
local ironic_node_arch=$IRONIC_HW_ARCH
|
||||
if [[ -z "${IRONIC_DEPLOY_DRIVER##*_ipmitool}" ]]; then
|
||||
local ironic_hwinfo_file=$IRONIC_IPMIINFO_FILE
|
||||
fi
|
||||
local ironic_hwinfo_file=$IRONIC_HWINFO_FILE
|
||||
fi
|
||||
|
||||
local total_nodes=0
|
||||
@ -757,23 +785,33 @@ function enroll_nodes {
|
||||
vbmc_port=$(echo $hardware_info | awk '{print $2}')
|
||||
node_options+=" -i ipmi_port=$vbmc_port"
|
||||
fi
|
||||
|
||||
elif is_deployed_by_ipmitool; then
|
||||
local ipmi_address
|
||||
ipmi_address=$(echo $hardware_info |awk '{print $1}')
|
||||
local mac_address
|
||||
mac_address=$(echo $hardware_info |awk '{print $2}')
|
||||
local ironic_ipmi_username
|
||||
ironic_ipmi_username=$(echo $hardware_info |awk '{print $3}')
|
||||
local ironic_ipmi_passwd
|
||||
ironic_ipmi_passwd=$(echo $hardware_info |awk '{print $4}')
|
||||
else
|
||||
# Currently we require all hardware platform have same CPU/RAM/DISK info
|
||||
# in future, this can be enhanced to support different type, and then
|
||||
# we create the bare metal flavor with minimum value
|
||||
local node_options="-i ipmi_address=$ipmi_address -i ipmi_password=$ironic_ipmi_passwd\
|
||||
-i ipmi_username=$ironic_ipmi_username"
|
||||
node_options+=" -i deploy_kernel=$IRONIC_DEPLOY_KERNEL_ID"
|
||||
local bmc_address
|
||||
bmc_address=$(echo $hardware_info |awk '{print $1}')
|
||||
local mac_address
|
||||
mac_address=$(echo $hardware_info |awk '{print $2}')
|
||||
local bmc_username
|
||||
bmc_username=$(echo $hardware_info |awk '{print $3}')
|
||||
local bmc_passwd
|
||||
bmc_passwd=$(echo $hardware_info |awk '{print $4}')
|
||||
local node_options="-i deploy_kernel=$IRONIC_DEPLOY_KERNEL_ID"
|
||||
node_options+=" -i deploy_ramdisk=$IRONIC_DEPLOY_RAMDISK_ID"
|
||||
|
||||
if is_deployed_by_ipmitool; then
|
||||
node_options+=" -i ipmi_address=$bmc_address -i ipmi_password=$bmc_passwd\
|
||||
-i ipmi_username=$bmc_username"
|
||||
elif is_deployed_by_cimc; then
|
||||
node_options+=" -i cimc_address=$bmc_address -i cimc_password=$bmc_passwd\
|
||||
-i cimc_username=$bmc_username"
|
||||
elif is_deployed_by_ucs; then
|
||||
local ucs_service_profile
|
||||
ucs_service_profile=$(echo $hardware_info |awk '{print $5}')
|
||||
node_options+=" -i ucs_address=$bmc_address -i ucs_password=$bmc_passwd\
|
||||
-i ucs_username=$bmc_username -i ucs_service_profile=$ucs_service_profile"
|
||||
fi
|
||||
fi
|
||||
|
||||
# First node created will be used for testing in ironic w/o glance
|
||||
|
Loading…
Reference in New Issue
Block a user