Skip to content

Commit

Permalink
[connectedmachine] release preview version 2024-03-31 (#7673)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaotongms committed Jun 7, 2024
1 parent 0ce81fa commit 90dc93c
Show file tree
Hide file tree
Showing 62 changed files with 6,296 additions and 1,292 deletions.
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.0.0b1
+++++
* Add ESU license and Network Security Perimeter API's. 2024/03/31-preview is used for aaz generation. Migrated to aaz.

0.7.0
+++++
* Add run-commands API's. 2023/10/03-preview is used for aaz generation. Migrated to aaz.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

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

_aaz_info = {
"version": "2022-12-27",
"version": "2024-03-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/assesspatches", "2022-12-27"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/assesspatches", "2024-03-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", "2022-12-27",
"api-version", "2024-03-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": "2023-10-03-preview",
"version": "2024-03-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2023-10-03-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-03-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", "2023-10-03-preview",
"api-version", "2024-03-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": "2022-12-27",
"version": "2024-03-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/installpatches", "2022-12-27"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/installpatches", "2024-03-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", "2022-12-27",
"api-version", "2024-03-31-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ class List(AAZCommand):
"""

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

AZ_SUPPORT_PAGINATION = True

def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
Expand Down Expand Up @@ -118,7 +120,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2023-10-03-preview",
"api-version", "2024-03-31-preview",
required=True,
),
}
Expand Down Expand Up @@ -499,6 +501,20 @@ def _build_schema_on_200(cls):
license_details.state = AAZStrType()
license_details.target = AAZStrType()
license_details.type = AAZStrType()
license_details.volume_license_details = AAZListType(
serialized_name="volumeLicenseDetails",
)

volume_license_details = cls._schema_on_200.value.Element.properties.license_profile.esu_profile.assigned_license.properties.license_details.volume_license_details
volume_license_details.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element.properties.license_profile.esu_profile.assigned_license.properties.license_details.volume_license_details.Element
_element.invoice_id = AAZStrType(
serialized_name="invoiceId",
)
_element.program_year = AAZStrType(
serialized_name="programYear",
)

tags = cls._schema_on_200.value.Element.properties.license_profile.esu_profile.assigned_license.tags
tags.Element = AAZStrType()
Expand All @@ -507,7 +523,7 @@ def _build_schema_on_200(cls):
esu_keys.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element.properties.license_profile.esu_profile.esu_keys.Element
_element.license_status = AAZStrType(
_element.license_status = AAZIntType(
serialized_name="licenseStatus",
)
_element.sku = AAZStrType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2023-10-03-preview",
"version": "2024-03-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2023-10-03-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-03-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", "2023-10-03-preview",
"api-version", "2024-03-31-preview",
required=True,
),
}
Expand Down Expand Up @@ -503,6 +503,20 @@ def _build_schema_on_200(cls):
license_details.state = AAZStrType()
license_details.target = AAZStrType()
license_details.type = AAZStrType()
license_details.volume_license_details = AAZListType(
serialized_name="volumeLicenseDetails",
)

volume_license_details = cls._schema_on_200.properties.license_profile.esu_profile.assigned_license.properties.license_details.volume_license_details
volume_license_details.Element = AAZObjectType()

_element = cls._schema_on_200.properties.license_profile.esu_profile.assigned_license.properties.license_details.volume_license_details.Element
_element.invoice_id = AAZStrType(
serialized_name="invoiceId",
)
_element.program_year = AAZStrType(
serialized_name="programYear",
)

tags = cls._schema_on_200.properties.license_profile.esu_profile.assigned_license.tags
tags.Element = AAZStrType()
Expand All @@ -511,7 +525,7 @@ def _build_schema_on_200(cls):
esu_keys.Element = AAZObjectType()

_element = cls._schema_on_200.properties.license_profile.esu_profile.esu_keys.Element
_element.license_status = AAZStrType(
_element.license_status = AAZIntType(
serialized_name="licenseStatus",
)
_element.sku = AAZStrType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Update(AAZCommand):
"""

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

Expand Down Expand Up @@ -317,6 +317,29 @@ def _build_arguments_schema(cls, *args, **kwargs):
nullable=True,
enum={"pCore": "pCore", "vCore": "vCore"},
)
license_details.volume_license_details = AAZListArg(
options=["volume-license-details"],
help="A list of volume license details.",
nullable=True,
)

volume_license_details = cls._args_schema.license_profile.esu_profile.assigned_license.license_details.volume_license_details
volume_license_details.Element = AAZObjectArg(
nullable=True,
)

_element = cls._args_schema.license_profile.esu_profile.assigned_license.license_details.volume_license_details.Element
_element.invoice_id = AAZStrArg(
options=["invoice-id"],
help="The invoice id for the volume license.",
nullable=True,
)
_element.program_year = AAZStrArg(
options=["program-year"],
help="Describes the program year the volume license is for.",
nullable=True,
enum={"Year 1": "Year 1", "Year 2": "Year 2", "Year 3": "Year 3"},
)

tags = cls._args_schema.license_profile.esu_profile.assigned_license.tags
tags.Element = AAZStrArg(
Expand Down Expand Up @@ -528,7 +551,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2023-10-03-preview",
"api-version", "2024-03-31-preview",
required=True,
),
}
Expand Down Expand Up @@ -614,7 +637,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2023-10-03-preview",
"api-version", "2024-03-31-preview",
required=True,
),
}
Expand Down Expand Up @@ -747,6 +770,16 @@ def _update_instance(self, instance):
license_details.set_prop("state", AAZStrType, ".state")
license_details.set_prop("target", AAZStrType, ".target")
license_details.set_prop("type", AAZStrType, ".type")
license_details.set_prop("volumeLicenseDetails", AAZListType, ".volume_license_details")

volume_license_details = _builder.get(".properties.licenseProfile.esuProfile.assignedLicense.properties.licenseDetails.volumeLicenseDetails")
if volume_license_details is not None:
volume_license_details.set_elements(AAZObjectType, ".")

_elements = _builder.get(".properties.licenseProfile.esuProfile.assignedLicense.properties.licenseDetails.volumeLicenseDetails[]")
if _elements is not None:
_elements.set_prop("invoiceId", AAZStrType, ".invoice_id")
_elements.set_prop("programYear", AAZStrType, ".program_year")

tags = _builder.get(".properties.licenseProfile.esuProfile.assignedLicense.tags")
if tags is not None:
Expand Down Expand Up @@ -1273,6 +1306,20 @@ def _build_schema_machine_read(cls, _schema):
license_details.state = AAZStrType()
license_details.target = AAZStrType()
license_details.type = AAZStrType()
license_details.volume_license_details = AAZListType(
serialized_name="volumeLicenseDetails",
)

volume_license_details = _schema_machine_read.properties.license_profile.esu_profile.assigned_license.properties.license_details.volume_license_details
volume_license_details.Element = AAZObjectType()

_element = _schema_machine_read.properties.license_profile.esu_profile.assigned_license.properties.license_details.volume_license_details.Element
_element.invoice_id = AAZStrType(
serialized_name="invoiceId",
)
_element.program_year = AAZStrType(
serialized_name="programYear",
)

tags = _schema_machine_read.properties.license_profile.esu_profile.assigned_license.tags
tags.Element = AAZStrType()
Expand All @@ -1281,7 +1328,7 @@ def _build_schema_machine_read(cls, _schema):
esu_keys.Element = AAZObjectType()

_element = _schema_machine_read.properties.license_profile.esu_profile.esu_keys.Element
_element.license_status = AAZStrType(
_element.license_status = AAZIntType(
serialized_name="licenseStatus",
)
_element.sku = AAZStrType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class UpgradeExtension(AAZCommand):
"""

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

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

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

Expand Down Expand Up @@ -258,7 +258,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-10-03-preview",
"api-version", "2024-03-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": "2023-10-03-preview",
"version": "2024-03-31-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/extensions/{}", "2023-10-03-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/extensions/{}", "2024-03-31-preview"],
]
}

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

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

AZ_SUPPORT_PAGINATION = True

def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
Expand Down Expand Up @@ -131,7 +133,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2023-10-03-preview",
"api-version", "2024-03-31-preview",
required=True,
),
}
Expand Down
Loading

0 comments on commit 90dc93c

Please sign in to comment.