From 6efdb9bc192a8d6807e5a734994ed9d3be46981c Mon Sep 17 00:00:00 2001 From: Lili Deng Date: Thu, 30 May 2024 11:08:00 +0800 Subject: [PATCH] fix test skip issue for SCSI disk controller type when it is gen2 image --- lisa/sut_orchestrator/azure/platform_.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisa/sut_orchestrator/azure/platform_.py b/lisa/sut_orchestrator/azure/platform_.py index eb2df22def..be92739da5 100644 --- a/lisa/sut_orchestrator/azure/platform_.py +++ b/lisa/sut_orchestrator/azure/platform_.py @@ -2768,11 +2768,12 @@ def _set_disk_features( allowed_types = azure_runbook.image.disk_controller_type if node_space.disk.disk_controller_type: - node_space.disk.disk_controller_type = ( - node_space.disk.disk_controller_type.intersect(allowed_types) + allowed_types = search_space.intersect_setspace_by_priority( + node_space.disk.disk_controller_type, # type: ignore + azure_runbook.image.disk_controller_type, # type: ignore + [], ) - else: - node_space.disk.disk_controller_type = allowed_types + node_space.disk.disk_controller_type = allowed_types def _get_os_disk_size(self, azure_runbook: AzureNodeSchema) -> int: assert azure_runbook