Skip to content

Commit a1ae656

Browse files
authored
[connectedmachine] release preview version 2024-11-10 (#8740)
1 parent 0b60f2e commit a1ae656

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3194
-4424
lines changed

src/connectedmachine/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
2.0.0b1
6+
+++++
7+
* 2024/11/10-preview is used for aaz generation. Migrated to aaz.
8+
59
1.1.1b1
610
+++++
711
* Fix connectedmachine list command and set resource group as optional.

src/connectedmachine/azext_connectedmachine/aaz/latest/connectedmachine/_delete.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class Delete(AAZCommand):
2323
"""
2424

2525
_aaz_info = {
26-
"version": "2024-07-31-preview",
26+
"version": "2024-11-10-preview",
2727
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-07-31-preview"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-11-10-preview"],
2929
]
3030
}
3131

@@ -124,7 +124,7 @@ def url_parameters(self):
124124
def query_parameters(self):
125125
parameters = {
126126
**self.serialize_query_param(
127-
"api-version", "2024-07-31-preview",
127+
"api-version", "2024-11-10-preview",
128128
required=True,
129129
),
130130
}

src/connectedmachine/azext_connectedmachine/aaz/latest/connectedmachine/_list.py

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
)
1717
class List(AAZCommand):
1818
"""List all the hybrid machines in the specified subscription or resource group.
19+
20+
:example: sample command of list
21+
az connectedmachine list
1922
"""
2023

2124
_aaz_info = {
22-
"version": "2024-07-31-preview",
25+
"version": "2024-11-10-preview",
2326
"resources": [
24-
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hybridcompute/machines", "2024-07-31-preview"],
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines", "2024-07-31-preview"],
27+
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hybridcompute/machines", "2024-11-10-preview"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines", "2024-11-10-preview"],
2629
]
2730
}
2831

@@ -52,12 +55,12 @@ def _build_arguments_schema(cls, *args, **kwargs):
5255

5356
def _execute_operations(self):
5457
self.pre_operations()
55-
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
56-
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
58+
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
59+
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
5760
if condition_0:
58-
self.MachinesListByResourceGroup(ctx=self.ctx)()
59-
if condition_1:
6061
self.MachinesListBySubscription(ctx=self.ctx)()
62+
if condition_1:
63+
self.MachinesListByResourceGroup(ctx=self.ctx)()
6164
self.post_operations()
6265

6366
@register_callback
@@ -73,7 +76,7 @@ def _output(self, *args, **kwargs):
7376
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
7477
return result, next_link
7578

76-
class MachinesListByResourceGroup(AAZHttpOperation):
79+
class MachinesListBySubscription(AAZHttpOperation):
7780
CLIENT_TYPE = "MgmtClient"
7881

7982
def __call__(self, *args, **kwargs):
@@ -87,7 +90,7 @@ def __call__(self, *args, **kwargs):
8790
@property
8891
def url(self):
8992
return self.client.format_url(
90-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines",
93+
"/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines",
9194
**self.url_parameters
9295
)
9396

@@ -102,10 +105,6 @@ def error_format(self):
102105
@property
103106
def url_parameters(self):
104107
parameters = {
105-
**self.serialize_url_param(
106-
"resourceGroupName", self.ctx.args.resource_group,
107-
required=True,
108-
),
109108
**self.serialize_url_param(
110109
"subscriptionId", self.ctx.subscription_id,
111110
required=True,
@@ -117,10 +116,7 @@ def url_parameters(self):
117116
def query_parameters(self):
118117
parameters = {
119118
**self.serialize_query_param(
120-
"$expand", self.ctx.args.expand,
121-
),
122-
**self.serialize_query_param(
123-
"api-version", "2024-07-31-preview",
119+
"api-version", "2024-11-10-preview",
124120
required=True,
125121
),
126122
}
@@ -816,7 +812,7 @@ def _build_schema_on_200(cls):
816812

817813
return cls._schema_on_200
818814

819-
class MachinesListBySubscription(AAZHttpOperation):
815+
class MachinesListByResourceGroup(AAZHttpOperation):
820816
CLIENT_TYPE = "MgmtClient"
821817

822818
def __call__(self, *args, **kwargs):
@@ -830,7 +826,7 @@ def __call__(self, *args, **kwargs):
830826
@property
831827
def url(self):
832828
return self.client.format_url(
833-
"/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines",
829+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines",
834830
**self.url_parameters
835831
)
836832

@@ -845,6 +841,10 @@ def error_format(self):
845841
@property
846842
def url_parameters(self):
847843
parameters = {
844+
**self.serialize_url_param(
845+
"resourceGroupName", self.ctx.args.resource_group,
846+
required=True,
847+
),
848848
**self.serialize_url_param(
849849
"subscriptionId", self.ctx.subscription_id,
850850
required=True,
@@ -856,7 +856,10 @@ def url_parameters(self):
856856
def query_parameters(self):
857857
parameters = {
858858
**self.serialize_query_param(
859-
"api-version", "2024-07-31-preview",
859+
"$expand", self.ctx.args.expand,
860+
),
861+
**self.serialize_query_param(
862+
"api-version", "2024-11-10-preview",
860863
required=True,
861864
),
862865
}

src/connectedmachine/azext_connectedmachine/aaz/latest/connectedmachine/_show.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Show(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-07-31-preview",
25+
"version": "2024-11-10-preview",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-07-31-preview"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.hybridcompute/machines/{}", "2024-11-10-preview"],
2828
]
2929
}
3030

@@ -133,7 +133,7 @@ def query_parameters(self):
133133
"$expand", self.ctx.args.expand,
134134
),
135135
**self.serialize_query_param(
136-
"api-version", "2024-07-31-preview",
136+
"api-version", "2024-11-10-preview",
137137
required=True,
138138
),
139139
}

0 commit comments

Comments
 (0)