Adds parameters to run CI with hardware types.

This commit adds new parameters 'IRONIC_ENABLED_BOOT_INTERFACES',
'IRONIC_ENABLED_DEPLOY_INTERFACES', 'IRONIC_ENABLED_POWER_INTERFACES',
'IRONIC_ENABLED_CONSOLE_INTERFACES', 'IRONIC_ENABLED_INSPECT_INTERFACES',
'IRONIC_ENABLED_RAID_INTERFACES', 'IRONIC_ENABLED_VENDOR_INTERFACES',
'IRONIC_ENABLED_NETWORK_INTERFACES, 'IRONIC_ENABLED_STORAGE_INTERFACES'
and 'IRONIC_ENABLED_MANAGEMENT_INTERFACES' for running CI with hardware
types.

Change-Id: Ic99e551fab87cb5cea2177f5d8c82703fc2df080
This commit is contained in:
kesper 2017-05-17 09:48:45 +00:00
parent 092a789438
commit 11c1108ce0

View File

@ -149,9 +149,17 @@ fi
# driver / hardware type options
IRONIC_ENABLED_DRIVERS=${IRONIC_ENABLED_DRIVERS:-fake,pxe_ipmitool,agent_ipmitool}
# TODO(jroll) add enabled/default interfaces here
IRONIC_ENABLED_HARDWARE_TYPES=${IRONIC_ENABLED_HARDWARE_TYPES:-ipmi}
IRONIC_ENABLED_BOOT_INTERFACES=${IRONIC_ENABLED_BOOT_INTERFACES:-}
IRONIC_ENABLED_DEPLOY_INTERFACES=${IRONIC_ENABLED_DEPLOY_INTERFACES:-}
IRONIC_ENABLED_MANAGEMENT_INTERFACES=${IRONIC_ENABLED_MANAGEMENT_INTERFACES:-}
IRONIC_ENABLED_POWER_INTERFACES=${IRONIC_ENABLED_POWER_INTERFACES:-}
IRONIC_ENABLED_CONSOLE_INTERFACES=${IRONIC_ENABLED_CONSOLE_INTERFACES:-}
IRONIC_ENABLED_INSPECT_INTERFACES=${IRONIC_ENABLED_INSPECT_INTERFACES:-}
IRONIC_ENABLED_RAID_INTERFACES=${IRONIC_ENABLED_RAID_INTERFACES:-}
IRONIC_ENABLED_VENDOR_INTERFACES=${IRONIC_ENABLED_VENDOR_INTERFACES:-}
IRONIC_ENABLED_STORAGE_INTERFACES=${IRONIC_ENABLED_STORAGE_INTERFACES:-}
IRONIC_ENABLED_NETWORK_INTERFACES=${IRONIC_ENABLED_NETWORK_INTERFACES:-}
# If IRONIC_VM_ENGING is explicitly set to "auto" or "kvm",
# devstack will attempt to use hardware virtualization
# (aka nested kvm). We do not enable it in the infra gates
@ -335,9 +343,6 @@ IRONIC_USE_LINK_LOCAL=$(trueorfalse False IRONIC_USE_LINK_LOCAL)
# Allow selecting dhcp provider
IRONIC_DHCP_PROVIDER=${IRONIC_DHCP_PROVIDER:-neutron}
# This flag is used to specify enabled network drivers
IRONIC_ENABLED_NETWORK_INTERFACES=${IRONIC_ENABLED_NETWORK_INTERFACES:-}
# This is the network interface to use for a node
IRONIC_NETWORK_INTERFACE=${IRONIC_NETWORK_INTERFACE:-}
@ -526,7 +531,7 @@ function is_deployed_by_oneview {
}
function is_deployed_by_ilo {
[[ -z "${IRONIC_DEPLOY_DRIVER##*_ilo}" ]] && return 0
[[ -z "${IRONIC_DEPLOY_DRIVER##*ilo}" ]] && return 0
return 1
}
@ -560,6 +565,14 @@ function is_deploy_iso_required {
return 1
}
function configure_enabled_interfaces {
local interface_name=$1
local interface_implementations=$2
if [[ -n $interface_implementations ]]; then
iniset $IRONIC_CONF_FILE DEFAULT enabled_${interface_name}_interfaces $interface_implementations
fi
}
IRONIC_DEFAULT_IMAGE_NAME=cirros-${CIRROS_VERSION}-x86_64-uec
if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then
IRONIC_DEFAULT_IMAGE_NAME=cirros-d160722-x86_64-uec
@ -1119,6 +1132,17 @@ function configure_ironic_conductor {
iniset $IRONIC_CONF_FILE DEFAULT enabled_drivers $IRONIC_ENABLED_DRIVERS
iniset $IRONIC_CONF_FILE DEFAULT enabled_hardware_types $IRONIC_ENABLED_HARDWARE_TYPES
configure_enabled_interfaces "boot" $IRONIC_ENABLED_BOOT_INTERFACES
configure_enabled_interfaces "deploy" $IRONIC_ENABLED_DEPLOY_INTERFACES
configure_enabled_interfaces "management" $IRONIC_ENABLED_MANAGEMENT_INTERFACES
configure_enabled_interfaces "power" $IRONIC_ENABLED_POWER_INTERFACES
configure_enabled_interfaces "console" $IRONIC_ENABLED_CONSOLE_INTERFACES
configure_enabled_interfaces "inspect" $IRONIC_ENABLED_INSPECT_INTERFACES
configure_enabled_interfaces "raid" $IRONIC_ENABLED_RAID_INTERFACES
configure_enabled_interfaces "vendor" $IRONIC_ENABLED_VENDOR_INTERFACES
configure_enabled_interfaces "storage" $IRONIC_ENABLED_STORAGE_INTERFACES
configure_enabled_interfaces "network" $IRONIC_ENABLED_NETWORK_INTERFACES
if is_deployed_by_redfish; then
# TODO(lucasagomes): We need to make it easier to configure
# specific driver interfaces in DevStack
@ -1213,9 +1237,6 @@ function configure_ironic_conductor {
iniset $IRONIC_CONF_FILE neutron port_setup_delay 15
fi
if [[ -n "$IRONIC_ENABLED_NETWORK_INTERFACES" ]]; then
iniset $IRONIC_CONF_FILE DEFAULT enabled_network_interfaces $IRONIC_ENABLED_NETWORK_INTERFACES
fi
iniset $IRONIC_CONF_FILE dhcp dhcp_provider $IRONIC_DHCP_PROVIDER
# TODO(dtantsur): change this when we change the default value.