From 64dedf4cc6b240b837fb547d5226129bc1d8e9f1 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Fri, 25 Jan 2013 18:07:17 +1300 Subject: [PATCH] Make flavor-list regexp more robust This was failing for me due to different amounts of whitespace in the output. Change-Id: Id8cb7b63f770504df535542dd420f20a70b4b071 --- tools/nova_create_flavors.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nova_create_flavors.sh b/tools/nova_create_flavors.sh index 6c760fea5f..246e775ce8 100755 --- a/tools/nova_create_flavors.sh +++ b/tools/nova_create_flavors.sh @@ -75,7 +75,7 @@ fi # flavors we're about to create, and no others FLAVORS="t1\.micro|m1\.tiny|m1\.small|m1\.medium|m1\.large|m1\.xlarge|m2\.xlarge|m2\.2xlarge|m2\.4xlarge|c1\.medium|c1\.xlarge|cc1\.4xlarge" -for f in $(nova flavor-list | grep -E "^\| [0-9]+\s+ \| ($FLAVORS)\s" | awk '{print $2}') +for f in $(nova flavor-list | grep -E "^\|\s+[0-9]+\s+\|\s+($FLAVORS)\s" | awk '{print $2}') do retry_cmd "nova flavor-delete $f" done