diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7467e71e..11f4110e 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -16,6 +16,7 @@ function configure { iniset $TEMPEST_CONFIG whitebox cpu_model $WHITEBOX_CPU_MODEL iniset $TEMPEST_CONFIG whitebox cpu_model_extra_flags $WHITEBOX_CPU_MODEL_EXTRA_FLAGS iniset $TEMPEST_CONFIG whitebox rx_queue_size $WHITEBOX_RX_QUEUE_SIZE + iniset $TEMPEST_CONFIG whitebox default_video_model $WHITEBOX_DEFAULT_VIDEO_MODEL iniset $TEMPEST_CONFIG whitebox-nova-compute config_path "$WHITEBOX_NOVA_COMPUTE_CONFIG_PATH" iniset $TEMPEST_CONFIG whitebox-nova-compute stop_command "$WHITEBOX_NOVA_COMPUTE_STOP_COMMAND" diff --git a/devstack/settings b/devstack/settings index 0f282162..63450603 100644 --- a/devstack/settings +++ b/devstack/settings @@ -4,6 +4,7 @@ WHITEBOX_AVAILABLE_CINDER_STORAGE=${WHITEBOX_AVAILABLE_CINDER_STORAGE:-24} SMT_HOSTS=${SMT_HOSTS:-''} WHITEBOX_FILE_BACKED_MEMORY_SIZE=${WHITEBOX_FILE_BACKED_MEMORY_SIZE:-8192} WHITEBOX_RX_QUEUE_SIZE=${WHITEBOX_RX_QUEUE_SIZE:-1024} +WHITEBOX_DEFAULT_VIDEO_MODEL=${WHITEBOX_DEFAULT_VIDEO_MODEL:-'virtio'} WHITEBOX_NOVA_COMPUTE_CONFIG_PATH=${WHITEBOX_NOVA_COMPUTE_CONFIG_PATH:-/etc/nova/nova-cpu.conf} WHITEBOX_NOVA_COMPUTE_STOP_COMMAND=${WHITEBOX_NOVA_COMPUTE_STOP_COMMAND:-'systemctl stop devstack@n-cpu'} diff --git a/whitebox_tempest_plugin/api/compute/test_hw_video_type.py b/whitebox_tempest_plugin/api/compute/test_hw_video_type.py index a792fcd5..2f308798 100644 --- a/whitebox_tempest_plugin/api/compute/test_hw_video_type.py +++ b/whitebox_tempest_plugin/api/compute/test_hw_video_type.py @@ -14,9 +14,13 @@ # under the License. from tempest.common import waiters +from tempest import config +import testtools from whitebox_tempest_plugin.api.compute import base +CONF = config.CONF + class HwVideoModelTest(base.BaseWhiteboxComputeTest): """Tests the support of different hardware video model type @@ -58,3 +62,10 @@ class HwVideoModelTest(base.BaseWhiteboxComputeTest): waiters.wait_for_server_status(self.servers_client, server['id'], 'ACTIVE') self._assert_hw_video_type(server, 'none') + + @testtools.skipUnless(CONF.whitebox.default_video_model, + 'Requires expected default video model') + def test_default_hw_device(self): + expected_video_model = CONF.whitebox.default_video_model + server = self.create_test_server() + self._assert_hw_video_type(server, expected_video_model) diff --git a/whitebox_tempest_plugin/config.py b/whitebox_tempest_plugin/config.py index 25d66b3f..ecf1155b 100644 --- a/whitebox_tempest_plugin/config.py +++ b/whitebox_tempest_plugin/config.py @@ -113,7 +113,11 @@ general_opts = [ cfg.IntOpt( 'rx_queue_size', help='The queue size set in the [libvirt]/rx_queue_size config option ' - 'on the compute hosts.') + 'on the compute hosts.'), + cfg.StrOpt( + 'default_video_model', + default=None, + help='The expected default video display for the guest') ] nova_compute_group = cfg.OptGroup(