From c5e5d21a61808f7c09b85a2750a905bb57b54be1 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Thu, 16 Feb 2017 16:19:23 -0500 Subject: Sort ResourceGroup resource list We should sort the results by resource_name when listing resources in the ResourceGroup stack in get-occ-config.sh, as the order is not guaranteed. We want the order to always be numerical ascending by resource_name (which are just integers starting at 0). Change-Id: Iccef81e4dfd9586e0030f20bdde131d1a885eb19 Closes-Bug: #1665458 --- deployed-server/scripts/get-occ-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deployed-server') diff --git a/deployed-server/scripts/get-occ-config.sh b/deployed-server/scripts/get-occ-config.sh index 6c196f97..d0cc4dff 100755 --- a/deployed-server/scripts/get-occ-config.sh +++ b/deployed-server/scripts/get-occ-config.sh @@ -63,7 +63,7 @@ for role in $OVERCLOUD_ROLES; do rg_stack=$(openstack stack resource show overcloud $role -c physical_resource_id -f value) done - stacks=$(openstack stack resource list $rg_stack -c physical_resource_id -f value) + stacks=$(openstack stack resource list $rg_stack -c resource_name -c physical_resource_id -f json | jq -r "sort_by(.resource_name) | .[] | .physical_resource_id") i=0 -- cgit 1.2.3-korg