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-05-20 #7797

Merged
merged 30 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5698c7d
generate code
yaotongms Jun 12, 2024
6116ff6
update version
yaotongms Jun 12, 2024
39a73c6
Merge branch 'Azure:main' into main
yaotongms Jun 26, 2024
1e84b86
add gateway commands
yaotongms Jun 26, 2024
ddf586c
Merge branch 'main' of https://github.com/yaotongms/azure-cli-extensions
yaotongms Jun 26, 2024
059fd5d
remove vmware update
yaotongms Jun 26, 2024
a290808
run tests
yaotongms Jun 26, 2024
ed0fc9a
add gateway tests
yaotongms Jul 15, 2024
31e5c04
Merge branch 'main' of https://github.com/yaotongms/azure-cli-extensions
yaotongms Jul 15, 2024
d290b62
add tests
yaotongms Jul 16, 2024
a1d2f75
hide subscription
yaotongms Jul 16, 2024
40a3138
add arc module
yaotongms Jul 17, 2024
4f50f13
add gateway tests
yaotongms Jul 17, 2024
aa82a6b
add NSP get test
yaotongms Jul 17, 2024
b4cb88d
add service name for gateway
yaotongms Jul 17, 2024
bf609e6
add 200 response in nsp reconcile
yaotongms Jul 19, 2024
379ad08
remove NSP PATCH
yaotongms Jul 22, 2024
a3fb34f
fix pylint errors
yaotongms Jul 23, 2024
9059a54
update codebase
yaotongms Jul 23, 2024
f3fa4ec
Update src/connectedmachine/azext_connectedmachine/aaz/latest/connect…
yaotongms Jul 24, 2024
302e139
fix ci error
yaotongms Jul 25, 2024
0a546cd
Merge branch 'main' of https://github.com/yaotongms/azure-cli-extensions
yaotongms Jul 25, 2024
92b2296
Merge branch 'Azure:main' into main
yaotongms Jul 25, 2024
fa34403
fix ci
yaotongms Jul 25, 2024
910992a
fix ci
yaotongms Jul 26, 2024
9b03a62
remove arc
yaotongms Jul 30, 2024
793c4f2
Merge branch 'Azure:main' into main
yaotongms Jul 30, 2024
b307113
fix comment
yaotongms Aug 1, 2024
07446da
fix comment
yaotongms Aug 1, 2024
9444e1e
fix comment
yaotongms Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/connectedmachine/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Release History
===============
2.0.0b1
yaotongms marked this conversation as resolved.
Show resolved Hide resolved
+++++
* Add reconcile command from Network Security Perimeter API's and more payGo features. 2024/05/20-preview is used for aaz generation. Migrated to aaz.
* Add gateway and setting command from Gateway and Setting API. 2024/05/20-preview is used for aaz generation.

1.0.0b1
+++++
* Add ESU license and Network Security Perimeter API's. 2024/03/31-preview is used for aaz generation. Migrated to aaz.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"connectedmachine",
)
class __CMDGroup(AAZCommandGroup):
"""Manage an Azure Arc-Enabled Server.
"""Manage Azure Arc-Enabled Server.
"""
pass

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

_aaz_info = {
"version": "2024-03-31-preview",
"version": "2024-05-20-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/assesspatches", "2024-03-31-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/assesspatches", "2024-05-20-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-03-31-preview",
"api-version", "2024-05-20-preview",
required=True,
),
}
Expand Down Expand Up @@ -179,6 +179,7 @@ def _build_schema_on_200(cls):
)
_schema_on_200.error_details = AAZObjectType(
serialized_name="errorDetails",
flags={"read_only": True},
)
_AssessPatchesHelper._build_schema_error_detail_read(_schema_on_200.error_details)
_schema_on_200.last_modified_date_time = AAZStrType(
Expand Down Expand Up @@ -259,7 +260,9 @@ def _build_schema_error_detail_read(cls, _schema):
_schema.target = cls._schema_error_detail_read.target
return

cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType()
cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType(
flags={"read_only": True}
)

error_detail_read = _schema_error_detail_read
error_detail_read.additional_info = AAZListType(
Expand All @@ -283,12 +286,17 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)

details = _schema_error_detail_read.details
details.Element = AAZObjectType()
details.Element = AAZObjectType(
flags={"read_only": True},
)
cls._build_schema_error_detail_read(details.Element)

_schema.additional_info = cls._schema_error_detail_read.additional_info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete operation to delete an Azure Arc-Enabled Server.
"""Delete an Azure Arc-Enabled Server.

:example: Sample command for delete
az connectedmachine delete --name myMachine --resource-group myResourceGroup
"""

_aaz_info = {
"version": "2024-03-31-preview",
"version": "2024-05-20-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-03-31-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-05-20-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-03-31-preview",
"api-version", "2024-05-20-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-03-31-preview",
"version": "2024-05-20-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/installpatches", "2024-03-31-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}/installpatches", "2024-05-20-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-03-31-preview",
"api-version", "2024-05-20-preview",
required=True,
),
}
Expand Down Expand Up @@ -312,6 +312,7 @@ def _build_schema_on_200(cls):
_schema_on_200 = cls._schema_on_200
_schema_on_200.error_details = AAZObjectType(
serialized_name="errorDetails",
flags={"read_only": True},
)
_InstallPatchesHelper._build_schema_error_detail_read(_schema_on_200.error_details)
_schema_on_200.excluded_patch_count = AAZIntType(
Expand Down Expand Up @@ -388,7 +389,9 @@ def _build_schema_error_detail_read(cls, _schema):
_schema.target = cls._schema_error_detail_read.target
return

cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType()
cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType(
flags={"read_only": True}
)

error_detail_read = _schema_error_detail_read
error_detail_read.additional_info = AAZListType(
Expand All @@ -412,12 +415,17 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)

details = _schema_error_detail_read.details
details.Element = AAZObjectType()
details.Element = AAZObjectType(
flags={"read_only": True},
)
cls._build_schema_error_detail_read(details.Element)

_schema.additional_info = cls._schema_error_detail_read.additional_info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
"connectedmachine list",
)
class List(AAZCommand):
"""List all the Azure Arc-Enabled Servers in the specified resource group.
"""List all Azure Arc-Enabled Servers in the specified resource group.

:example: Sample command for list
az connectedmachine list --resource-group myResourceGroup
az connectedmachine list
"""

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

Expand Down Expand Up @@ -120,7 +120,7 @@ def query_parameters(self):
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2024-03-31-preview",
"api-version", "2024-05-20-preview",
required=True,
),
}
Expand Down Expand Up @@ -396,7 +396,9 @@ def _build_schema_on_200(cls):
detected_properties.Element = AAZStrType()

error_details = cls._schema_on_200.value.Element.properties.error_details
error_details.Element = AAZObjectType()
error_details.Element = AAZObjectType(
flags={"read_only": True},
)
_ListHelper._build_schema_error_detail_read(error_details.Element)

extensions = cls._schema_on_200.value.Element.properties.extensions
Expand All @@ -417,7 +419,7 @@ def _build_schema_on_200(cls):
)
license_profile.product_profile = AAZObjectType(
serialized_name="productProfile",
flags={"client_flatten": True},
flags={"client_flatten": True, "read_only": True},
)
license_profile.software_assurance = AAZObjectType(
serialized_name="softwareAssurance",
Expand All @@ -434,9 +436,11 @@ def _build_schema_on_200(cls):
)
esu_profile.esu_eligibility = AAZStrType(
serialized_name="esuEligibility",
flags={"read_only": True},
)
esu_profile.esu_key_state = AAZStrType(
serialized_name="esuKeyState",
flags={"read_only": True},
)
esu_profile.esu_keys = AAZListType(
serialized_name="esuKeys",
Expand All @@ -447,6 +451,7 @@ def _build_schema_on_200(cls):
)
esu_profile.server_type = AAZStrType(
serialized_name="serverType",
flags={"read_only": True},
)

assigned_license = cls._schema_on_200.value.Element.properties.license_profile.esu_profile.assigned_license
Expand Down Expand Up @@ -529,6 +534,10 @@ def _build_schema_on_200(cls):
_element.sku = AAZStrType()

product_profile = cls._schema_on_200.value.Element.properties.license_profile.product_profile
product_profile.billing_end_date = AAZStrType(
serialized_name="billingEndDate",
flags={"read_only": True},
)
product_profile.billing_start_date = AAZStrType(
serialized_name="billingStartDate",
flags={"read_only": True},
Expand All @@ -541,6 +550,10 @@ def _build_schema_on_200(cls):
serialized_name="enrollmentDate",
flags={"read_only": True},
)
product_profile.error = AAZObjectType(
flags={"read_only": True},
)
_ListHelper._build_schema_error_detail_read(product_profile.error)
product_profile.product_features = AAZListType(
serialized_name="productFeatures",
)
Expand All @@ -555,6 +568,10 @@ def _build_schema_on_200(cls):
product_features.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element.properties.license_profile.product_profile.product_features.Element
_element.billing_end_date = AAZStrType(
serialized_name="billingEndDate",
flags={"read_only": True},
)
_element.billing_start_date = AAZStrType(
serialized_name="billingStartDate",
flags={"read_only": True},
Expand All @@ -567,6 +584,10 @@ def _build_schema_on_200(cls):
serialized_name="enrollmentDate",
flags={"read_only": True},
)
_element.error = AAZObjectType(
flags={"read_only": True},
)
_ListHelper._build_schema_error_detail_read(_element.error)
_element.name = AAZStrType()
_element.subscription_status = AAZStrType(
serialized_name="subscriptionStatus",
Expand Down Expand Up @@ -755,7 +776,9 @@ def _build_schema_error_detail_read(cls, _schema):
_schema.target = cls._schema_error_detail_read.target
return

cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType()
cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType(
flags={"read_only": True}
)

error_detail_read = _schema_error_detail_read
error_detail_read.additional_info = AAZListType(
Expand All @@ -779,12 +802,17 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)

details = _schema_error_detail_read.details
details.Element = AAZObjectType()
details.Element = AAZObjectType(
flags={"read_only": True},
)
cls._build_schema_error_detail_read(details.Element)

_schema.additional_info = cls._schema_error_detail_read.additional_info
Expand Down Expand Up @@ -834,7 +862,9 @@ def _build_schema_machine_extension_instance_view_read(cls, _schema):
def _build_schema_patch_settings_read(cls, _schema):
if cls._schema_patch_settings_read is not None:
_schema.assessment_mode = cls._schema_patch_settings_read.assessment_mode
_schema.enable_hotpatching = cls._schema_patch_settings_read.enable_hotpatching
_schema.patch_mode = cls._schema_patch_settings_read.patch_mode
_schema.status = cls._schema_patch_settings_read.status
return

cls._schema_patch_settings_read = _schema_patch_settings_read = AAZObjectType()
Expand All @@ -843,12 +873,29 @@ def _build_schema_patch_settings_read(cls, _schema):
patch_settings_read.assessment_mode = AAZStrType(
serialized_name="assessmentMode",
)
patch_settings_read.enable_hotpatching = AAZBoolType(
serialized_name="enableHotpatching",
)
patch_settings_read.patch_mode = AAZStrType(
serialized_name="patchMode",
)
patch_settings_read.status = AAZObjectType(
flags={"read_only": True},
)

status = _schema_patch_settings_read.status
status.error = AAZObjectType(
flags={"read_only": True},
)
cls._build_schema_error_detail_read(status.error)
status.hotpatch_enablement_status = AAZStrType(
serialized_name="hotpatchEnablementStatus",
)

_schema.assessment_mode = cls._schema_patch_settings_read.assessment_mode
_schema.enable_hotpatching = cls._schema_patch_settings_read.enable_hotpatching
_schema.patch_mode = cls._schema_patch_settings_read.patch_mode
_schema.status = cls._schema_patch_settings_read.status

_schema_service_status_read = None

Expand Down
Loading
Loading