Make default_boot_option configurable in devstack

This patch adds an IRONIC_DEFAULT_BOOT_OPTION variable to our devstack
plugin (defaulting to 'netboot').

This will allow for easier setup of a DevStack environment to test local
boot with partition images.

Change-Id: I97986e4627c6c5a014cc1507f655ea824f8ea7c8
This commit is contained in:
Pavlo Shchelokovskyy 2017-06-12 08:04:57 +00:00
parent adf3461171
commit 977c064105
1 changed files with 7 additions and 2 deletions

View File

@ -461,6 +461,12 @@ if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then
fi
fi
# TODO(dtantsur): change this when we change the default value.
IRONIC_DEFAULT_BOOT_OPTION=${IRONIC_DEFAULT_BOOT_OPTION:-netboot}
if [ $IRONIC_DEFAULT_BOOT_OPTION != 'netboot' ] && [ $IRONIC_DEFAULT_BOOT_OPTION != 'local' ]; then
die $LINENO "Supported values for IRONIC_DEFAULT_BOOT_OPTION are 'netboot' and 'local' only."
fi
# Functions
# ---------
@ -1240,8 +1246,7 @@ function configure_ironic_conductor {
iniset $IRONIC_CONF_FILE dhcp dhcp_provider $IRONIC_DHCP_PROVIDER
# TODO(dtantsur): change this when we change the default value.
iniset $IRONIC_CONF_FILE deploy default_boot_option netboot
iniset $IRONIC_CONF_FILE deploy default_boot_option $IRONIC_DEFAULT_BOOT_OPTION
}
# create_ironic_cache_dir() - Part of the init_ironic() process