Browse code

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

Vladyslav Drok authored on 2015/04/29 19:36:52
Showing 2 changed files
... ...
@@ -58,6 +58,7 @@ IRONIC_HW_EPHEMERAL_DISK=${IRONIC_HW_EPHEMERAL_DISK:-0}
58 58
 IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-$IRONIC_DATA_DIR/hardware_info}
59 59
 
60 60
 # Set up defaults for functional / integration testing
61
+IRONIC_NODE_UUID=${IRONIC_NODE_UUID:-`uuidgen`}
61 62
 IRONIC_SCRIPTS_DIR=${IRONIC_SCRIPTS_DIR:-$TOP_DIR/tools/ironic/scripts}
62 63
 IRONIC_TEMPLATES_DIR=${IRONIC_TEMPLATES_DIR:-$TOP_DIR/tools/ironic/templates}
63 64
 IRONIC_BAREMETAL_BASIC_OPS=$(trueorfalse False IRONIC_BAREMETAL_BASIC_OPS)
... ...
@@ -619,7 +620,12 @@ function enroll_nodes {
619 619
             node_options+=" -i $_IRONIC_DEPLOY_RAMDISK_KEY=$IRONIC_DEPLOY_RAMDISK_ID"
620 620
         fi
621 621
 
622
-        local node_id=$(ironic node-create --chassis_uuid $chassis_id \
622
+        # First node created will be used for testing in ironic w/o glance
623
+        # scenario, so we need to know its UUID.
624
+        local standalone_node_uuid=$([ $total_nodes -eq 0 ] && echo "--uuid $IRONIC_NODE_UUID")
625
+
626
+        local node_id=$(ironic node-create $standalone_node_uuid\
627
+            --chassis_uuid $chassis_id \
623 628
             --driver $IRONIC_DEPLOY_DRIVER \
624 629
             -p cpus=$ironic_node_cpu\
625 630
             -p memory_mb=$ironic_node_ram\
... ...
@@ -481,6 +481,8 @@ function configure_tempest {
481 481
     if [ "$VIRT_DRIVER" = "ironic" ] ; then
482 482
         iniset $TEMPEST_CONFIG baremetal driver_enabled True
483 483
         iniset $TEMPEST_CONFIG baremetal unprovision_timeout 300
484
+        iniset $TEMPEST_CONFIG baremetal deploy_img_dir $FILES
485
+        iniset $TEMPEST_CONFIG baremetal node_uuid $IRONIC_NODE_UUID
484 486
         iniset $TEMPEST_CONFIG compute-feature-enabled change_password False
485 487
         iniset $TEMPEST_CONFIG compute-feature-enabled console_output False
486 488
         iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False