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
This commit is contained in:
James Slagle 2017-02-16 16:19:23 -05:00
parent 71bac87cff
commit c5e5d21a61
1 changed files with 1 additions and 1 deletions

View File

@ -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