SW RAID: Delete root device hint
The default root device hint can be retained and influence nodes
upon later test jobs. Since this is not a required piece of
configuration for non-raid jobs, we should go ahead and unset
the value.
Change-Id: I1199bd817438dfefdd96199dc52f438b184ad9df
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
index 9948ca8..3605c28 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
@@ -602,6 +602,11 @@
# So we only move the node to active (verifying deployment).
self.set_node_to_active()
+ def remove_root_device_hint(self):
+ patch = [{'path': '/properties/root_device',
+ 'op': 'remove'}]
+ self.update_node(self.node['uuid'], patch=patch)
+
def rescue_unrescue(self):
rescue_password = uuidutils.generate_uuid()
self.rescue_node(self.node['uuid'], rescue_password)
diff --git a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py
index eb0d4d2..ef74e01 100644
--- a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py
+++ b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_cleaning.py
@@ -106,6 +106,10 @@
@utils.services('image', 'network')
def test_software_raid(self):
self.build_raid_and_verify_node()
+ # NOTE(TheJulia): tearing down/terminating the instance does not
+ # remove the root device hint, so it is best for us to go ahead
+ # and remove it before exiting the test.
+ self.remove_root_device_hint()
class SoftwareRaidDirect(bsm.BaremetalStandaloneScenarioTest):
@@ -138,3 +142,7 @@
@utils.services('image', 'network')
def test_software_raid(self):
self.build_raid_and_verify_node()
+ # NOTE(TheJulia): tearing down/terminating the instance does not
+ # remove the root device hint, so it is best for us to go ahead
+ # and remove it before exiting the test.
+ self.remove_root_device_hint()