diff --git a/lisa/sut_orchestrator/azure/arm_template.json b/lisa/sut_orchestrator/azure/arm_template.json index 20bea4efdd..d8184188a3 100644 --- a/lisa/sut_orchestrator/azure/arm_template.json +++ b/lisa/sut_orchestrator/azure/arm_template.json @@ -92,6 +92,13 @@ "metadata": { "description": "data disk array." } + }, + "is_ultradisk": { + "type": "bool", + "defaultValue": false, + "metadata": { + "description": "whether to use ultra disk" + } } }, "variables": { @@ -129,10 +136,10 @@ "count": "[variables('node_count')]" }, "properties": { - "publicIPAllocationMethod": "Static" + "publicIPAllocationMethod": "[if(parameters('is_ultradisk'), 'Static', 'Dynamic')]" }, "sku": { - "name": "Standard" + "name": "[if(parameters('is_ultradisk'), 'Standard', 'Basic')]" }, "zones": "[if(variables('use_availability_zones'), variables('availability_zones'), json('null'))]" }, diff --git a/lisa/sut_orchestrator/azure/common.py b/lisa/sut_orchestrator/azure/common.py index dcc4a14ec0..c2b162e2be 100644 --- a/lisa/sut_orchestrator/azure/common.py +++ b/lisa/sut_orchestrator/azure/common.py @@ -651,6 +651,7 @@ class AzureArmParameter: virtual_network_resource_group: str = "" virtual_network_name: str = AZURE_VIRTUAL_NETWORK_NAME subnet_prefix: str = AZURE_SUBNET_PREFIX + is_ultradisk: bool = False def __post_init__(self, *args: Any, **kwargs: Any) -> None: add_secret(self.admin_username, PATTERN_HEADTAIL) diff --git a/lisa/sut_orchestrator/azure/platform_.py b/lisa/sut_orchestrator/azure/platform_.py index 0a5feee636..3acc1571ee 100644 --- a/lisa/sut_orchestrator/azure/platform_.py +++ b/lisa/sut_orchestrator/azure/platform_.py @@ -1208,6 +1208,14 @@ def _create_deployment_parameters( node_arm_parameters = self._create_node_arm_parameters(node.capability, log) nodes_parameters.append(node_arm_parameters) + arm_parameters.is_ultradisk = any( + [ + x + for x in nodes_parameters + if x.data_disk_type + == features.get_azure_disk_type(schema.DiskType.UltraSSDLRS) + ] + ) # Set data disk array arm_parameters.data_disks = self._generate_data_disks( node, node_arm_parameters