diff options
author | James Slagle <jslagle@redhat.com> | 2017-02-16 16:19:23 -0500 |
---|---|---|
committer | James Slagle <jslagle@redhat.com> | 2017-02-17 10:39:18 -0500 |
commit | c5e5d21a61808f7c09b85a2750a905bb57b54be1 (patch) | |
tree | 86175d01d0f92e74910a7bf93368a34427722c9a | |
parent | 71bac87cffcfc69f8b99babca39e34a9dc6e4588 (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
-rwxr-xr-x | deployed-server/scripts/get-occ-config.sh | 2 |
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 |