From 8d2a0087e54bc658adb691fd98a908ce09c0b5fa Mon Sep 17 00:00:00 2001 From: Thiago Paiva Date: Wed, 24 Aug 2016 13:00:00 -0300 Subject: [PATCH] OneView test nodes to use dynamic allocation Now that the dynamic allocation feature has merged, the testing of *_oneview drivers shall use the new allocation model on the CI infra. To allow this, we're adding a new parameter to the hwinfo file to indicate when the dynamic_allocation flag should be added to the node and managing the logic when it is present. Change-Id: I40ed9abe96dd15701b31e0ad0b7d71ff065488ef --- devstack/lib/ironic | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 983d68e3e6..ccc4b905b0 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1049,9 +1049,17 @@ function enroll_nodes { mac_address=$(echo $hardware_info |awk '{print $5}') local applied_server_profile_uri applied_server_profile_uri=$(echo $hardware_info |awk '{print $6}') + local dynamic_allocation + dynamic_allocation=$(echo $hardware_info |awk '{print $7}') + dynamic_allocation=$(trueorfalse False dynamic_allocation) node_options+=" -i server_hardware_uri=$server_hardware_uri" - node_options+=" -i applied_server_profile_uri=$applied_server_profile_uri" + if [[ -n "$applied_server_profile_uri" ]]; then + node_options+=" -i applied_server_profile_uri=$applied_server_profile_uri" + fi + if [[ "$dynamic_allocation" == "True" ]]; then + node_options+=" -i dynamic_allocation=$dynamic_allocation" + fi node_options+=" -p capabilities=" node_options+="server_hardware_type_uri:$server_hardware_type_uri," node_options+="enclosure_group_uri:$enclosure_group_uri,"