aboutsummaryrefslogtreecommitdiffstats
path: root/deployed-server/scripts/get-occ-config.sh
diff options
context:
space:
mode:
authorJames Slagle <jslagle@redhat.com>2017-02-16 16:19:23 -0500
committerJames Slagle <jslagle@redhat.com>2017-03-27 20:14:10 +0000
commite7e8161c921ab9e6bc194d53b2e390f25749e710 (patch)
tree76167bb4a155e1d37e323801a931569c1a202bd4 /deployed-server/scripts/get-occ-config.sh
parentdeb15192411331b52648af315f08813a94e2ed58 (diff)
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 (cherry picked from commit c5e5d21a61808f7c09b85a2750a905bb57b54be1)
Diffstat (limited to 'deployed-server/scripts/get-occ-config.sh')
-rwxr-xr-xdeployed-server/scripts/get-occ-config.sh2
1 files changed, 1 insertions, 1 deletions
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