
Signed-off-by: Zhang Dewan <513619464@qq.com> --- jobs/reset-tbox.yaml | 3 +-- tests/reset-tbox | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jobs/reset-tbox.yaml b/jobs/reset-tbox.yaml index 9c3f4f01..2ceccdb9 100644 --- a/jobs/reset-tbox.yaml +++ b/jobs/reset-tbox.yaml @@ -1,10 +1,9 @@ suite: reset-tbox -testcase: reset-tbox testbox: dc-8g os_mount: container docker_image: 172.168.131.2:5001/reset-tbox -queue: reset +queue: reset-tbox host_name: reset-tbox: diff --git a/tests/reset-tbox b/tests/reset-tbox index b0f645d7..5b1279b6 100755 --- a/tests/reset-tbox +++ b/tests/reset-tbox @@ -7,11 +7,12 @@ hosts_file=/etc/lab/hosts_file # require $host_name host_ibmc_ip=$(grep -w $host_name $hosts_file | awk '{print $1}') -if [[ "$host_ibmc_ip" =~ ^[0-9]+.* ]]; then +if [[ "$host_ibmc_ip" =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then echo ">>> exec ipmitool commamd!" ipmitool -I lanplus -H $host_ibmc_ip -U $iBMC_user -P $iBMC_passwd power reset - [ $? -eq 0 ] && echo "succeed!" + [ $? -eq 0 ] && echo "reboot $host_name succeed!" || \ + "echo reboot $host_name failed!" else - echo "specify host cannot found0!" + echo "specify host cannot found!" exit fi -- 2.23.0