Move rebooting HW node before the booting cfg node
MOSSUST-109
Change-Id: Ic9c27851098837ee1be45d108fdec9e2489b2b97
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index 72ff052..e83a94b 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -780,3 +780,16 @@
return ret
}
}
+def reboot_hardware_nodes(creds_name) {
+ bm_ips_file = readFile("tcp_tests/templates/${creds_name}")
+ bm_ips = bm_ips_file.split("\n")
+ withCredentials([
+ [$class : 'UsernamePasswordMultiBinding',
+ credentialsId : creds_name,
+ passwordVariable: 'lab_pass',
+ usernameVariable: 'lab_user']
+ ]) {
+ for (String ip : bm_ips) { sh ("ipmitool -H ${ip} -U ${lab_user} -P ${lab_pass} -I lanplus chassis power off")}
+ for (String ip : bm_ips) { sh ("ipmitool -H ${ip} -U ${lab_user} -P ${lab_pass} -I lanplus chassis bootdev pxe")}
+ }
+}