Change-Id: I9e78a1f98c0ba8d449e127a415baac8c469389a3
Fixes: bug #1100365
exit 1
fi
-for f in $(nova flavor-list | grep "^| [0-9]" | awk '{print $2}')
+# This list should match the flavor-creates below to be sure we remove the
+# 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}')
do
retry_cmd "nova flavor-delete $f"
done