Wait for power off before allocation tests

There is a race sometimes when power off persists after the allocation
query, causing it to fail[1].

[1] https://zuul.opendev.org/t/openstack/build/aab3ecc1f63f4a52b1015f726fd8d229

Closes-issue: https://mirantis.jira.com/browse/PRODX-9564
Change-Id: I2b854a3a6b0f40f46dfa030b84d58715572f3ad4
(cherry picked from commit 3fbd0a9d77d999bc633946889400f316a7e3e561)
diff --git a/ironic_tempest_plugin/tests/api/admin/test_allocations.py b/ironic_tempest_plugin/tests/api/admin/test_allocations.py
index b46c8af..51e8102 100644
--- a/ironic_tempest_plugin/tests/api/admin/test_allocations.py
+++ b/ironic_tempest_plugin/tests/api/admin/test_allocations.py
@@ -27,6 +27,8 @@
         cls.provide_node(node_id, cleaning_timeout)
         # Force non-empty power state, otherwise allocation API won't pick it
         cls.client.set_node_power_state(node_id, 'power off')
+        waiters.wait_for_bm_node_status(cls.client, node_id,
+                                        'power_state', 'power off')
 
     def setUp(self):
         super(Base, self).setUp()