Use Openstack cli instead in order to get the instance status

Change-Id: Ia8a90dccfd62158b69a93c5181c231a692e70bfe
This commit is contained in:
Mathieu Bultel 2016-08-11 13:31:09 +02:00
parent b9cf136906
commit 01b68d0b0c

View File

@ -78,7 +78,7 @@ function log {
function find_nova_node_by_name_or_id {
name_or_id=$1
node_status=$(nova show $name_or_id | awk '$2 ~ /^status/{print $4}')
node_status=$(openstack server show $name_or_id -f value -c status)
if ! [[ $node_status == "ACTIVE" ]]; then
log "ERROR: node $name_or_id not found to be ACTIVE. Current status is $node_status"
exit 1