Merge "[ussuri][goal] Drop python 2.7 support and testing"
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
index 9948ca8..4f8bfe8 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
@@ -602,6 +602,14 @@
# 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 remove_raid_configuration(self):
+ self.baremetal_client.set_node_raid_config(self.node['uuid'], {})
+
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..b1ddecc 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,15 @@
@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()
+ # Removes RAID configuration
+ # TODO(TheJulia): We _should_ tear the raid configuration down
+ # however bouncing neutron ports with known DHCP reload bugs
+ # is not a super great idea for tempest tests.
+ self.remove_raid_configuration()
class SoftwareRaidDirect(bsm.BaremetalStandaloneScenarioTest):
@@ -138,3 +147,12 @@
@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()
+ # Removes RAID configuration
+ # TODO(TheJulia): We _should_ tear the raid configuration down
+ # however bouncing neutron ports with known DHCP reload bugs
+ # is not a super great idea for tempest tests.
+ self.remove_raid_configuration()
diff --git a/ironic_tempest_plugin/tests/scenario/test_baremetal_basic_ops.py b/ironic_tempest_plugin/tests/scenario/test_baremetal_basic_ops.py
index 4fa73ee..7912788 100644
--- a/ironic_tempest_plugin/tests/scenario/test_baremetal_basic_ops.py
+++ b/ironic_tempest_plugin/tests/scenario/test_baremetal_basic_ops.py
@@ -133,16 +133,7 @@
def validate_ports(self):
node_uuid = self.node['uuid']
- vifs = []
- # TODO(vsaienko) switch to get_node_vifs() when all stable releases
- # supports Ironic API 1.28
- if self._is_version_supported('1.28'):
- vifs = self.get_node_vifs(node_uuid)
- else:
- for port in self.get_ports(self.node['uuid']):
- vif = port['extra'].get('vif_port_id')
- if vif:
- vifs.append({'id': vif})
+ vifs = self.get_node_vifs(node_uuid)
ir_ports = self.get_ports(node_uuid)
ir_ports_addresses = [x['address'] for x in ir_ports]