CVM v6 SKUs are being added. We should reduce the need to update lists of SKU families by relying on the capabilities.
This commit is contained in:
Kameron Carr 2024-10-14 14:41:39 -07:00 коммит произвёл Kameron Carr
Родитель 71701aadc8
Коммит 40e352bed3
1 изменённых файлов: 4 добавлений и 17 удалений

Просмотреть файл

@ -2299,25 +2299,12 @@ class SecurityProfile(AzureFeatureMixin, features.SecurityProfile):
and raw_capabilities.get("TrustedLaunchDisabled", "False") == "False" and raw_capabilities.get("TrustedLaunchDisabled", "False") == "False"
): ):
capabilities.append(SecurityProfileType.SecureBoot) capabilities.append(SecurityProfileType.SecureBoot)
# https://learn.microsoft.com/en-us/azure/confidential-computing/confidential-vm-overview # noqa: E501
if cvm_value and resource_sku.family.casefold() in [ if cvm_value and cvm_value.casefold() == "snp":
"standarddcasv5family",
"standarddcadsv5family",
"standardecasv5family",
"standardecadsv5family",
"standarddcev5family",
"standarddcedv5family",
"standardecev5family",
"standardecedv5family",
]:
capabilities.append(SecurityProfileType.CVM) capabilities.append(SecurityProfileType.CVM)
if cvm_value == "TDX" and resource_sku.family.casefold() in [ if cvm_value and cvm_value.casefold() == "tdx":
"standarddcev5family", capabilities.append(SecurityProfileType.CVM)
"standarddcedv5family",
"standardecev5family",
"standardecedv5family",
]:
capabilities.append(SecurityProfileType.Stateless) capabilities.append(SecurityProfileType.Stateless)
return SecurityProfileSettings( return SecurityProfileSettings(