Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@

@register_command_group(
"compute-fleet",
is_preview=True,
)
Comment thread
sabanermsft marked this conversation as resolved.
class __CMDGroup(AAZCommandGroup):
"""Manage for Azure Compute Fleet
Operations for Azure Compute Fleet
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ._create import *
from ._delete import *
from ._list import *
from ._list_vms import *
from ._list_vmss import *
from ._show import *
from ._update import *
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
class Delete(AAZCommand):
"""Delete an Azure Compute Fleet

Delete an Azure Compute Fleet

:example: Fleets_Delete
az azure-fleet delete --resource-group rgazurefleet --fleet-name testFleet
az compute-fleet delete --resource-group rgazurefleet --fleet-name testFleet
"""

_aaz_info = {
"version": "2024-11-01",
"version": "2026-04-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2024-11-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets/{}", "2026-04-01-preview"],
]
}

Expand Down Expand Up @@ -149,7 +147,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-11-01",
"api-version", "2026-04-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
class List(AAZCommand):
"""List Fleet resources by subscription ID and resource group

List Fleet resources by subscription ID and resource group

:example: Fleets_ListBySubscription
az azure-fleet list
az compute-fleet list
"""

_aaz_info = {
"version": "2024-11-01",
"version": "2026-04-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurefleet/fleets", "2024-11-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets", "2024-11-01"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurefleet/fleets", "2026-04-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurefleet/fleets", "2026-04-01-preview"],
]
}

Expand Down Expand Up @@ -119,7 +117,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-11-01",
"api-version", "2026-04-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -237,10 +235,14 @@ def _build_schema_on_200(cls):
properties.additional_locations_profile = AAZObjectType(
serialized_name="additionalLocationsProfile",
)
properties.capacity_type = AAZStrType(
serialized_name="capacityType",
)
properties.compute_profile = AAZObjectType(
serialized_name="computeProfile",
flags={"required": True},
)
properties.mode = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
Expand All @@ -262,10 +264,16 @@ def _build_schema_on_200(cls):
properties.vm_attributes = AAZObjectType(
serialized_name="vmAttributes",
)
properties.vm_name_prefix = AAZStrType(
serialized_name="vmNamePrefix",
)
properties.vm_sizes_profile = AAZListType(
serialized_name="vmSizesProfile",
flags={"required": True},
)
properties.zone_allocation_policy = AAZObjectType(
serialized_name="zoneAllocationPolicy",
)

additional_locations_profile = cls._schema_on_200.value.Element.properties.additional_locations_profile
additional_locations_profile.location_profiles = AAZListType(
Expand Down Expand Up @@ -437,6 +445,24 @@ def _build_schema_on_200(cls):
)
_element.rank = AAZIntType()

zone_allocation_policy = cls._schema_on_200.value.Element.properties.zone_allocation_policy
zone_allocation_policy.distribution_strategy = AAZStrType(
serialized_name="distributionStrategy",
flags={"required": True},
)
zone_allocation_policy.zone_preferences = AAZListType(
serialized_name="zonePreferences",
)

zone_preferences = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences
zone_preferences.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences.Element
_element.rank = AAZIntType()
_element.zone = AAZStrType(
flags={"required": True},
)

system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
Expand Down Expand Up @@ -505,7 +531,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-11-01",
"api-version", "2026-04-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -623,10 +649,14 @@ def _build_schema_on_200(cls):
properties.additional_locations_profile = AAZObjectType(
serialized_name="additionalLocationsProfile",
)
properties.capacity_type = AAZStrType(
serialized_name="capacityType",
)
properties.compute_profile = AAZObjectType(
serialized_name="computeProfile",
flags={"required": True},
)
properties.mode = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
Expand All @@ -648,10 +678,16 @@ def _build_schema_on_200(cls):
properties.vm_attributes = AAZObjectType(
serialized_name="vmAttributes",
)
properties.vm_name_prefix = AAZStrType(
serialized_name="vmNamePrefix",
)
properties.vm_sizes_profile = AAZListType(
serialized_name="vmSizesProfile",
flags={"required": True},
)
properties.zone_allocation_policy = AAZObjectType(
serialized_name="zoneAllocationPolicy",
)

additional_locations_profile = cls._schema_on_200.value.Element.properties.additional_locations_profile
additional_locations_profile.location_profiles = AAZListType(
Expand Down Expand Up @@ -823,6 +859,24 @@ def _build_schema_on_200(cls):
)
_element.rank = AAZIntType()

zone_allocation_policy = cls._schema_on_200.value.Element.properties.zone_allocation_policy
zone_allocation_policy.distribution_strategy = AAZStrType(
serialized_name="distributionStrategy",
flags={"required": True},
)
zone_allocation_policy.zone_preferences = AAZListType(
serialized_name="zonePreferences",
)

zone_preferences = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences
zone_preferences.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element.properties.zone_allocation_policy.zone_preferences.Element
_element.rank = AAZIntType()
_element.zone = AAZStrType(
flags={"required": True},
)

system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
Expand Down Expand Up @@ -1024,7 +1078,7 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema):
flags={"read_only": True},
)
properties.publisher = AAZStrType()
properties.settings = AAZFreeFormDictType()
properties.settings = AAZDictType()
properties.suppress_failures = AAZBoolType(
serialized_name="suppressFailures",
)
Expand All @@ -1047,6 +1101,9 @@ def _build_schema_base_virtual_machine_profile_read(cls, _schema):
provision_after_extensions = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.provision_after_extensions
provision_after_extensions.Element = AAZStrType()

settings = _schema_base_virtual_machine_profile_read.extension_profile.extensions.Element.properties.settings
settings.Element = AAZAnyType()

hardware_profile = _schema_base_virtual_machine_profile_read.hardware_profile
hardware_profile.vm_size_properties = AAZObjectType(
serialized_name="vmSizeProperties",
Expand Down
Loading
Loading