diff --git a/releasenotes/notes/add-compute-feature-ide-bus-b63802502c378083.yaml b/releasenotes/notes/add-compute-feature-ide-bus-b63802502c378083.yaml new file mode 100644 index 0000000000..43a0e8c53c --- /dev/null +++ b/releasenotes/notes/add-compute-feature-ide-bus-b63802502c378083.yaml @@ -0,0 +1,10 @@ +--- +other: + - | + A new ``[compute-feature-enabled]ide_bus`` config option has been + introduced to indicate if the environment supports attaching disks to an + instance using an ``IDE`` bus. + + This currently defaults to ``True`` but should be set to ``False`` when + using the libvirt OpenStack Nova virt driver *and* the ``q35`` machine type + as support for this bus is no longer provided. diff --git a/tempest/api/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py index c222893341..a9f8c09521 100644 --- a/tempest/api/compute/servers/test_server_rescue.py +++ b/tempest/api/compute/servers/test_server_rescue.py @@ -158,8 +158,14 @@ class BaseServerStableDeviceRescueTest(base.BaseV2ComputeTest): self.servers_client, server_id, 'ACTIVE') -class ServerStableDeviceRescueTest(BaseServerStableDeviceRescueTest): - """Test rescuing server specifying type of device for the rescue disk""" +class ServerStableDeviceRescueTestIDE(BaseServerStableDeviceRescueTest): + """Test rescuing server using an IDE device for the rescue disk""" + + @classmethod + def skip_checks(cls): + super().skip_checks() + if not CONF.compute_feature_enabled.ide_bus: + raise cls.skipException("IDE bus not available.") @decorators.idempotent_id('947004c3-e8ef-47d9-9f00-97b74f9eaf96') def test_stable_device_rescue_cdrom_ide(self): @@ -168,6 +174,10 @@ class ServerStableDeviceRescueTest(BaseServerStableDeviceRescueTest): hw_rescue_device='cdrom', hw_rescue_bus='ide') self._test_stable_device_rescue(server_id, rescue_image_id) + +class ServerStableDeviceRescueTest(BaseServerStableDeviceRescueTest): + """Test rescuing server specifying type of device for the rescue disk""" + @decorators.idempotent_id('16865750-1417-4854-bcf7-496e6753c01e') def test_stable_device_rescue_disk_virtio(self): """Test rescuing server with disk and virtio as the rescue disk""" diff --git a/tempest/config.py b/tempest/config.py index 0df50451cd..c2378d116d 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -636,6 +636,10 @@ ComputeFeaturesGroup = [ "APIs that only worked with that driver " "have been removed and there's nothing to " "test after Ussuri."), + cfg.BoolOpt('ide_bus', + default=True, + help='Does the test environment support attaching devices ' + 'using an IDE bus to the instance?'), ]