Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connectedmachine] release preview version 2024-07-31 #8214

Merged
merged 18 commits into from
Nov 18, 2024
4 changes: 4 additions & 0 deletions src/connectedmachine/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Release History
===============
1.1.0
+++++
* Add Pay-as-you-go features. 2024/07/31-preview is used for aaz generation. Migrated to aaz.

1.0.0
+++++
* 2024/07/10-stable is used for aaz generation. Migrated to aaz.
Expand Down
48 changes: 13 additions & 35 deletions src/connectedmachine/azext_connectedmachine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=unused-import
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

import azext_connectedmachine._help
from azure.cli.core import AzCommandsLoader
from azext_connectedmachine._help import helps # pylint: disable=unused-import


class ConnectedMachineCommandsLoader(AzCommandsLoader):
class connectedmachineCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_connectedmachine.generated._client_factory import cf_connectedmachine_cl
connectedmachine_custom = CliCommandType(
operations_tmpl='azext_connectedmachine.custom#{}',
client_factory=cf_connectedmachine_cl)
parent = super(ConnectedMachineCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=connectedmachine_custom)
custom_command_type = CliCommandType(
operations_tmpl='azext_connectedmachine.custom#{}')
super().__init__(cli_ctx=cli_ctx,
custom_command_type=custom_command_type)

def load_command_table(self, args):
from azext_connectedmachine.generated.commands import load_command_table
from azext_connectedmachine.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
Expand All @@ -38,27 +32,11 @@ def load_command_table(self, args):
args=args
)
load_command_table(self, args)
try:
from azext_connectedmachine.manual.commands import load_command_table as load_command_table_manual
load_command_table_manual(self, args)
except ImportError as e:
if e.name.endswith('manual.commands'):
pass
else:
raise e
return self.command_table

def load_arguments(self, command):
from azext_connectedmachine.generated._params import load_arguments
from azext_connectedmachine._params import load_arguments
load_arguments(self, command)
try:
from azext_connectedmachine.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError as e:
if e.name.endswith('manual._params'):
pass
else:
raise e


COMMAND_LOADER_CLS = ConnectedMachineCommandsLoader
COMMAND_LOADER_CLS = connectedmachineCommandsLoader
27 changes: 9 additions & 18 deletions src/connectedmachine/azext_connectedmachine/_help.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import
# pylint: disable=unused-import
from .generated._help import helps # pylint: disable=reimported
try:
from .manual._help import helps # pylint: disable=reimported
except ImportError as e:
if e.name.endswith('manual._help'):
pass
else:
raise e
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=line-too-long
# pylint: disable=too-many-lines

from knack.help_files import helps # pylint: disable=unused-import
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# coding=utf-8
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

VERSION = "1.0.0b1"
# pylint: disable=too-many-lines
# pylint: disable=too-many-statements


def load_arguments(self, _): # pylint: disable=unused-argument
pass
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
Loading
Loading