Availability default and max_cap

Add a catch for if maximize_capability is set and the availability type is set to default. It should use availability sets if the tags or properties are set.
This commit is contained in:
Kameron Carr 2024-02-07 10:31:55 -08:00 коммит произвёл Chi Song
Родитель acf03627c7
Коммит a75cfdda41
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -2397,6 +2397,15 @@ class Availability(AzureFeatureMixin, features.Availability):
"Or consider changing the disk type or location."
)
# If the availability_type is still set to Default, then
# resolve the default without considering capabilities
if params.availability_type == AvailabilityType.Default:
params.availability_type = (
AvailabilityType.AvailabilitySet
if params.availability_set_tags or params.availability_set_properties
else AvailabilityType.NoRedundancy
)
# Once the availability type has been determined, clear the unecessary
# fields for clarity
if params.availability_type == AvailabilityType.AvailabilitySet: