While investigating the referenced story/bug I noticed that
wait_for_status in
openstackclient.tests.functional.compute.v2.test_aggregate.AggregateTests
was doing a lot more than it should ever need to (it probably got copied
in from somewhere). The two places calling it only need to a) check the
output of `openstack aggregate show`, and b) try once -- since they just
got done creating the aggregate synchronously, there should never be a
need to delay/retry. So this commit removes the helper method and just
inlines the check.
At the same time, the addCleanup(aggregate delete) directives are moved
above their respective creates. This is a defensive best practice which
makes sure cleanup happens even if something fails very soon after the
actual back-end create (as was in fact the case with the referenced
bug/story).
It is unknown whether this will impact the referenced bug.
Change-Id: I0d7432f13642fbccd5ca79da9c76adfcbabb5fa9
Story: 2006811
Related-Bug: #1851391