Skip to content

Commit 2d5ae33

Browse files
committed
Merge remote-tracking branch 'azure/dev' into claims_challenge
2 parents c6f696d + 88dcb4f commit 2d5ae33

File tree

193 files changed

+16800
-8130
lines changed

Some content is hidden

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

193 files changed

+16800
-8130
lines changed

src/azure-cli-core/azure/cli/core/profiles/_shared.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
4848
MGMT_STORAGE = ('azure.mgmt.storage', 'StorageManagementClient')
4949
MGMT_COMPUTE = ('azure.mgmt.compute', 'ComputeManagementClient')
5050
MGMT_NETWORK = ('azure.mgmt.network', 'NetworkManagementClient')
51-
MGMT_NETWORK_DNS = ('azure.mgmt.dns', 'DnsManagementClient')
5251
MGMT_NETWORK_PRIVATEDNS = ('azure.mgmt.privatedns', 'PrivateDnsManagementClient')
5352
MGMT_AUTHORIZATION = ('azure.mgmt.authorization', 'AuthorizationManagementClient')
5453
MGMT_CONTAINERREGISTRY = ('azure.mgmt.containerregistry', 'ContainerRegistryManagementClient')
@@ -186,7 +185,6 @@ def default_api_version(self):
186185
ResourceType.MGMT_RESOURCE_DEPLOYMENTSTACKS: None,
187186
ResourceType.MGMT_RESOURCE_PRIVATELINKS: '2020-05-01',
188187
ResourceType.MGMT_RESOURCE_MANAGEDAPPLICATIONS: '2019-07-01',
189-
ResourceType.MGMT_NETWORK_DNS: '2018-05-01',
190188
ResourceType.MGMT_NETWORK_PRIVATEDNS: None,
191189
ResourceType.MGMT_KEYVAULT: SDKProfile('2024-11-01', {
192190
'vaults': '2023-02-01',

src/azure-cli-core/azure/cli/core/util.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ def todict(obj, post_processor=None):
644644
"""
645645
from datetime import date, time, datetime, timedelta
646646
from enum import Enum
647+
from azure.core.serialization import attribute_list
647648
if isinstance(obj, dict):
648649
result = {k: todict(v, post_processor) for (k, v) in obj.items()}
649650
return post_processor(obj, result) if post_processor else result
@@ -657,9 +658,12 @@ def todict(obj, post_processor=None):
657658
return str(obj)
658659
# This is the only difference with knack.util.todict because for typespec generated SDKs
659660
# The base model stores data in obj.__dict__['_data'] instead of in obj.__dict__
660-
# We need to call obj.as_dict() to extract data for this kind of model
661-
if hasattr(obj, 'as_dict') and not hasattr(obj, '_attribute_map'):
662-
result = {to_camel_case(k): todict(v, post_processor) for k, v in obj.as_dict().items()}
661+
# The way to detect if it's a typespec generated model is to check the private `_is_model` attribute
662+
# azure-core provided new function `attribute_list` to list all attribute names
663+
# so that we don't need to use raw __dict__ directly
664+
if getattr(obj, "_is_model", False):
665+
result = {to_camel_case(attr): todict(getattr(obj, attr), post_processor)
666+
for attr in attribute_list(obj) if hasattr(obj, attr)}
663667
return post_processor(obj, result) if post_processor else result
664668
if hasattr(obj, '_asdict'):
665669
return todict(obj._asdict(), post_processor)

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_create.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class Create(AAZCommand):
2525
"""
2626

2727
_aaz_info = {
28-
"version": "2025-04-15",
28+
"version": "2025-06-01",
2929
"resources": [
30-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-04-15"],
30+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-06-01"],
3131
]
3232
}
3333

@@ -245,7 +245,7 @@ def url_parameters(self):
245245
def query_parameters(self):
246246
parameters = {
247247
**self.serialize_query_param(
248-
"api-version", "2025-04-15",
248+
"api-version", "2025-06-01",
249249
required=True,
250250
),
251251
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_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": "2025-04-15",
26+
"version": "2025-06-01",
2727
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-04-15"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-06-01"],
2929
]
3030
}
3131

@@ -158,7 +158,7 @@ def url_parameters(self):
158158
def query_parameters(self):
159159
parameters = {
160160
**self.serialize_query_param(
161-
"api-version", "2025-04-15",
161+
"api-version", "2025-06-01",
162162
required=True,
163163
),
164164
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_list.py

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

2424
_aaz_info = {
25-
"version": "2025-04-15",
25+
"version": "2025-06-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains", "2025-04-15"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains", "2025-06-01"],
2828
]
2929
}
3030

@@ -126,7 +126,7 @@ def url_parameters(self):
126126
def query_parameters(self):
127127
parameters = {
128128
**self.serialize_query_param(
129-
"api-version", "2025-04-15",
129+
"api-version", "2025-06-01",
130130
required=True,
131131
),
132132
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_regenerate_validation_token.py

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

2424
_aaz_info = {
25-
"version": "2025-04-15",
25+
"version": "2025-06-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}/refreshvalidationtoken", "2025-04-15"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}/refreshvalidationtoken", "2025-06-01"],
2828
]
2929
}
3030

@@ -148,7 +148,7 @@ def url_parameters(self):
148148
def query_parameters(self):
149149
parameters = {
150150
**self.serialize_query_param(
151-
"api-version", "2025-04-15",
151+
"api-version", "2025-06-01",
152152
required=True,
153153
),
154154
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_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": "2025-04-15",
25+
"version": "2025-06-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-04-15"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-06-01"],
2828
]
2929
}
3030

@@ -135,7 +135,7 @@ def url_parameters(self):
135135
def query_parameters(self):
136136
parameters = {
137137
**self.serialize_query_param(
138-
"api-version", "2025-04-15",
138+
"api-version", "2025-06-01",
139139
required=True,
140140
),
141141
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_update.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class Update(AAZCommand):
2525
"""
2626

2727
_aaz_info = {
28-
"version": "2025-04-15",
28+
"version": "2025-06-01",
2929
"resources": [
30-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-04-15"],
30+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-06-01"],
3131
]
3232
}
3333

@@ -251,7 +251,7 @@ def url_parameters(self):
251251
def query_parameters(self):
252252
parameters = {
253253
**self.serialize_query_param(
254-
"api-version", "2025-04-15",
254+
"api-version", "2025-06-01",
255255
required=True,
256256
),
257257
}
@@ -354,7 +354,7 @@ def url_parameters(self):
354354
def query_parameters(self):
355355
parameters = {
356356
**self.serialize_query_param(
357-
"api-version", "2025-04-15",
357+
"api-version", "2025-06-01",
358358
required=True,
359359
),
360360
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_wait.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
2020

2121
_aaz_info = {
2222
"resources": [
23-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-04-15"],
23+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}", "2025-06-01"],
2424
]
2525
}
2626

@@ -131,7 +131,7 @@ def url_parameters(self):
131131
def query_parameters(self):
132132
parameters = {
133133
**self.serialize_query_param(
134-
"api-version", "2025-04-15",
134+
"api-version", "2025-06-01",
135135
required=True,
136136
),
137137
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_create.py

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

2424
_aaz_info = {
25-
"version": "2025-04-15",
25+
"version": "2025-06-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-04-15"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-06-01"],
2828
]
2929
}
3030

@@ -186,7 +186,7 @@ def url_parameters(self):
186186
def query_parameters(self):
187187
parameters = {
188188
**self.serialize_query_param(
189-
"api-version", "2025-04-15",
189+
"api-version", "2025-06-01",
190190
required=True,
191191
),
192192
}

0 commit comments

Comments
 (0)