Skip to content

Commit

Permalink
generate code
Browse files Browse the repository at this point in the history
  • Loading branch information
yaotongms committed Oct 28, 2024
1 parent d528e6a commit a31e166
Show file tree
Hide file tree
Showing 52 changed files with 5,466 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class AssessPatches(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-10",
"version": "2024-07-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/assesspatches", "2024-07-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/assesspatches", "2024-07-31-preview"],
]
}

Expand Down Expand Up @@ -137,7 +137,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-10",
"api-version", "2024-07-31-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-10",
"version": "2024-07-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-07-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-07-31-preview"],
]
}

Expand Down Expand Up @@ -124,7 +124,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-10",
"api-version", "2024-07-31-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class InstallPatches(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-10",
"version": "2024-07-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/installpatches", "2024-07-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/installpatches", "2024-07-31-preview"],
]
}

Expand Down Expand Up @@ -222,7 +222,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-10",
"api-version", "2024-07-31-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ class List(AAZCommand):
:example: Sample command for list
az connectedmachine list --resource-group myResourceGroup
az connectedmachine list
"""

_aaz_info = {
"version": "2024-07-10",
"version": "2024-07-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines", "2024-07-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines", "2024-07-31-preview"],
]
}

Expand Down Expand Up @@ -120,7 +119,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2024-07-10",
"api-version", "2024-07-31-preview",
required=True,
),
}
Expand Down Expand Up @@ -245,6 +244,14 @@ def _build_schema_on_200(cls):
flags={"read_only": True},
)
properties.extensions = AAZListType()
properties.firmware_profile = AAZObjectType(
serialized_name="firmwareProfile",
flags={"read_only": True},
)
properties.hardware_profile = AAZObjectType(
serialized_name="hardwareProfile",
flags={"read_only": True},
)
properties.last_status_change = AAZStrType(
serialized_name="lastStatusChange",
flags={"read_only": True},
Expand Down Expand Up @@ -304,6 +311,10 @@ def _build_schema_on_200(cls):
properties.status = AAZStrType(
flags={"read_only": True},
)
properties.storage_profile = AAZObjectType(
serialized_name="storageProfile",
flags={"read_only": True},
)
properties.vm_id = AAZStrType(
serialized_name="vmId",
)
Expand Down Expand Up @@ -405,6 +416,42 @@ def _build_schema_on_200(cls):
extensions.Element = AAZObjectType()
_ListHelper._build_schema_machine_extension_instance_view_read(extensions.Element)

firmware_profile = cls._schema_on_200.value.Element.properties.firmware_profile
firmware_profile.serial_number = AAZStrType(
serialized_name="serialNumber",
flags={"read_only": True},
)
firmware_profile.type = AAZStrType(
flags={"read_only": True},
)

hardware_profile = cls._schema_on_200.value.Element.properties.hardware_profile
hardware_profile.number_of_cpu_sockets = AAZIntType(
serialized_name="numberOfCpuSockets",
flags={"read_only": True},
)
hardware_profile.processors = AAZListType(
flags={"read_only": True},
)
hardware_profile.total_physical_memory_in_bytes = AAZIntType(
serialized_name="totalPhysicalMemoryInBytes",
flags={"read_only": True},
)

processors = cls._schema_on_200.value.Element.properties.hardware_profile.processors
processors.Element = AAZObjectType(
flags={"read_only": True},
)

_element = cls._schema_on_200.value.Element.properties.hardware_profile.processors.Element
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.number_of_cores = AAZIntType(
serialized_name="numberOfCores",
flags={"read_only": True},
)

license_profile = cls._schema_on_200.value.Element.properties.license_profile
license_profile.esu_profile = AAZObjectType(
serialized_name="esuProfile",
Expand Down Expand Up @@ -619,9 +666,14 @@ def _build_schema_on_200(cls):
)

_element = cls._schema_on_200.value.Element.properties.network_profile.network_interfaces.Element
_element.id = AAZStrType()
_element.ip_addresses = AAZListType(
serialized_name="ipAddresses",
)
_element.mac_address = AAZStrType(
serialized_name="macAddress",
)
_element.name = AAZStrType()

ip_addresses = cls._schema_on_200.value.Element.properties.network_profile.network_interfaces.Element.ip_addresses
ip_addresses.Element = AAZObjectType(
Expand Down Expand Up @@ -678,6 +730,31 @@ def _build_schema_on_200(cls):
)
_ListHelper._build_schema_service_status_read(service_statuses.guest_configuration_service)

storage_profile = cls._schema_on_200.value.Element.properties.storage_profile
storage_profile.disks = AAZListType()

disks = cls._schema_on_200.value.Element.properties.storage_profile.disks
disks.Element = AAZObjectType(
flags={"read_only": True},
)

_element = cls._schema_on_200.value.Element.properties.storage_profile.disks.Element
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.generated_id = AAZStrType(
serialized_name="generatedId",
)
_element.id = AAZStrType()
_element.max_size_in_bytes = AAZIntType(
serialized_name="maxSizeInBytes",
)
_element.name = AAZStrType()
_element.path = AAZStrType()
_element.used_space_in_bytes = AAZIntType(
serialized_name="usedSpaceInBytes",
)

resources = cls._schema_on_200.value.Element.resources
resources.Element = AAZObjectType()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-10",
"version": "2024-07-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-07-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-07-31-preview"],
]
}

Expand Down Expand Up @@ -133,7 +133,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2024-07-10",
"api-version", "2024-07-31-preview",
required=True,
),
}
Expand Down Expand Up @@ -247,6 +247,14 @@ def _build_schema_on_200(cls):
flags={"read_only": True},
)
properties.extensions = AAZListType()
properties.firmware_profile = AAZObjectType(
serialized_name="firmwareProfile",
flags={"read_only": True},
)
properties.hardware_profile = AAZObjectType(
serialized_name="hardwareProfile",
flags={"read_only": True},
)
properties.last_status_change = AAZStrType(
serialized_name="lastStatusChange",
flags={"read_only": True},
Expand Down Expand Up @@ -306,6 +314,10 @@ def _build_schema_on_200(cls):
properties.status = AAZStrType(
flags={"read_only": True},
)
properties.storage_profile = AAZObjectType(
serialized_name="storageProfile",
flags={"read_only": True},
)
properties.vm_id = AAZStrType(
serialized_name="vmId",
)
Expand Down Expand Up @@ -407,6 +419,42 @@ def _build_schema_on_200(cls):
extensions.Element = AAZObjectType()
_ShowHelper._build_schema_machine_extension_instance_view_read(extensions.Element)

firmware_profile = cls._schema_on_200.properties.firmware_profile
firmware_profile.serial_number = AAZStrType(
serialized_name="serialNumber",
flags={"read_only": True},
)
firmware_profile.type = AAZStrType(
flags={"read_only": True},
)

hardware_profile = cls._schema_on_200.properties.hardware_profile
hardware_profile.number_of_cpu_sockets = AAZIntType(
serialized_name="numberOfCpuSockets",
flags={"read_only": True},
)
hardware_profile.processors = AAZListType(
flags={"read_only": True},
)
hardware_profile.total_physical_memory_in_bytes = AAZIntType(
serialized_name="totalPhysicalMemoryInBytes",
flags={"read_only": True},
)

processors = cls._schema_on_200.properties.hardware_profile.processors
processors.Element = AAZObjectType(
flags={"read_only": True},
)

_element = cls._schema_on_200.properties.hardware_profile.processors.Element
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.number_of_cores = AAZIntType(
serialized_name="numberOfCores",
flags={"read_only": True},
)

license_profile = cls._schema_on_200.properties.license_profile
license_profile.esu_profile = AAZObjectType(
serialized_name="esuProfile",
Expand Down Expand Up @@ -621,9 +669,14 @@ def _build_schema_on_200(cls):
)

_element = cls._schema_on_200.properties.network_profile.network_interfaces.Element
_element.id = AAZStrType()
_element.ip_addresses = AAZListType(
serialized_name="ipAddresses",
)
_element.mac_address = AAZStrType(
serialized_name="macAddress",
)
_element.name = AAZStrType()

ip_addresses = cls._schema_on_200.properties.network_profile.network_interfaces.Element.ip_addresses
ip_addresses.Element = AAZObjectType(
Expand Down Expand Up @@ -680,6 +733,31 @@ def _build_schema_on_200(cls):
)
_ShowHelper._build_schema_service_status_read(service_statuses.guest_configuration_service)

storage_profile = cls._schema_on_200.properties.storage_profile
storage_profile.disks = AAZListType()

disks = cls._schema_on_200.properties.storage_profile.disks
disks.Element = AAZObjectType(
flags={"read_only": True},
)

_element = cls._schema_on_200.properties.storage_profile.disks.Element
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.generated_id = AAZStrType(
serialized_name="generatedId",
)
_element.id = AAZStrType()
_element.max_size_in_bytes = AAZIntType(
serialized_name="maxSizeInBytes",
)
_element.name = AAZStrType()
_element.path = AAZStrType()
_element.used_space_in_bytes = AAZIntType(
serialized_name="usedSpaceInBytes",
)

resources = cls._schema_on_200.resources
resources.Element = AAZObjectType()

Expand Down
Loading

0 comments on commit a31e166

Please sign in to comment.