From 41309002fa1a1c00f8485ef71acdec93fbfbd014 Mon Sep 17 00:00:00 2001 From: Vladyslav Drok Date: Wed, 29 Apr 2015 13:36:52 +0300 Subject: [PATCH] Add new options to baremetal config section This change adds setting of deploy_img_dir and node_uuid baremetal config options during tempest configuration to enable ironic w/o glance scenario testing. Needed for change I171e85cb8a21fae4da45028f1f798988a36f6c95 Change-Id: I6fd393390389c4c643b93198fa461fc2adc415ae --- lib/ironic | 8 +++++++- lib/tempest | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ironic b/lib/ironic index 4a37f0aafa..7493c3cab2 100644 --- a/lib/ironic +++ b/lib/ironic @@ -58,6 +58,7 @@ IRONIC_HW_EPHEMERAL_DISK=${IRONIC_HW_EPHEMERAL_DISK:-0} IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-$IRONIC_DATA_DIR/hardware_info} # Set up defaults for functional / integration testing +IRONIC_NODE_UUID=${IRONIC_NODE_UUID:-`uuidgen`} IRONIC_SCRIPTS_DIR=${IRONIC_SCRIPTS_DIR:-$TOP_DIR/tools/ironic/scripts} IRONIC_TEMPLATES_DIR=${IRONIC_TEMPLATES_DIR:-$TOP_DIR/tools/ironic/templates} IRONIC_BAREMETAL_BASIC_OPS=$(trueorfalse False IRONIC_BAREMETAL_BASIC_OPS) @@ -619,7 +620,12 @@ function enroll_nodes { node_options+=" -i $_IRONIC_DEPLOY_RAMDISK_KEY=$IRONIC_DEPLOY_RAMDISK_ID" fi - local node_id=$(ironic node-create --chassis_uuid $chassis_id \ + # First node created will be used for testing in ironic w/o glance + # scenario, so we need to know its UUID. + local standalone_node_uuid=$([ $total_nodes -eq 0 ] && echo "--uuid $IRONIC_NODE_UUID") + + local node_id=$(ironic node-create $standalone_node_uuid\ + --chassis_uuid $chassis_id \ --driver $IRONIC_DEPLOY_DRIVER \ -p cpus=$ironic_node_cpu\ -p memory_mb=$ironic_node_ram\ diff --git a/lib/tempest b/lib/tempest index cd8fbd725f..44b2f96101 100644 --- a/lib/tempest +++ b/lib/tempest @@ -481,6 +481,8 @@ function configure_tempest { if [ "$VIRT_DRIVER" = "ironic" ] ; then iniset $TEMPEST_CONFIG baremetal driver_enabled True iniset $TEMPEST_CONFIG baremetal unprovision_timeout 300 + iniset $TEMPEST_CONFIG baremetal deploy_img_dir $FILES + iniset $TEMPEST_CONFIG baremetal node_uuid $IRONIC_NODE_UUID iniset $TEMPEST_CONFIG compute-feature-enabled change_password False iniset $TEMPEST_CONFIG compute-feature-enabled console_output False iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False