From: Steven Hardy Date: Wed, 24 Oct 2012 12:41:34 +0000 (+0100) Subject: heat-keystone-setup workaround keystone output reordering X-Git-Tag: 2014.1~1273 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b3b56ff59d1402ba2188778e683d5b3725fb941e;p=openstack-build%2Fheat-build.git heat-keystone-setup workaround keystone output reordering Folsom version of keystoneclient orders the columns for keystone user-list differently, so we need to detect the new format to extract the correct field Fixes #273 Change-Id: I46f653dd3a8f7b5a68648fbd72671f95b386a547 Signed-off-by: Steven Hardy --- diff --git a/bin/heat-keystone-setup b/bin/heat-keystone-setup index a9085556..74691bd0 100755 --- a/bin/heat-keystone-setup +++ b/bin/heat-keystone-setup @@ -44,10 +44,21 @@ get_id () { get_data 1 id 2 "$@" } +get_column_num() { + local name=$1 + shift + $@ | awk -F'|' "NR == 2 { for (i=2; i&2