Skip to content

Commit 2e0117c

Browse files
authored
Merge branch 'Azure:dev' into dev2
2 parents c0c36b5 + 8377138 commit 2e0117c

File tree

17 files changed

+1531
-15
lines changed

17 files changed

+1531
-15
lines changed

.github/policies/resourceManagement.yml

+32-4
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,18 @@ configuration:
692692
- bberera
693693
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
694694
assignMentionees: False
695+
- if:
696+
- hasLabel:
697+
label: Service Attention
698+
- hasLabel:
699+
label: CodeSigning
700+
then:
701+
- mentionUsers:
702+
mentionees:
703+
- Jaxelr
704+
- DawnWang17
705+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
706+
assignMentionees: False
695707
- if:
696708
- hasLabel:
697709
label: Service Attention
@@ -1419,8 +1431,8 @@ configuration:
14191431
then:
14201432
- mentionUsers:
14211433
mentionees:
1422-
- raedJarrar
1423-
- jifems
1434+
- dlacy7
1435+
- NateB2
14241436
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
14251437
assignMentionees: False
14261438
- if:
@@ -1576,7 +1588,9 @@ configuration:
15761588
then:
15771589
- mentionUsers:
15781590
mentionees:
1579-
- jfggdl
1591+
- Kishp01
1592+
- veyaddan
1593+
- santoshallumicrosoft
15801594
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
15811595
assignMentionees: False
15821596
- if:
@@ -1624,6 +1638,7 @@ configuration:
16241638
mentionees:
16251639
- dkershaw10
16261640
- baywet
1641+
- SteveMutungi254
16271642
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
16281643
assignMentionees: False
16291644
- if:
@@ -2125,7 +2140,6 @@ configuration:
21252140
then:
21262141
- mentionUsers:
21272142
mentionees:
2128-
- SameergMS
21292143
- yairgil
21302144
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
21312145
assignMentionees: False
@@ -3094,6 +3108,7 @@ configuration:
30943108
mentionees:
30953109
- AzureAppServiceCLI
30963110
- antcp
3111+
- yutanglin16
30973112
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
30983113
assignMentionees: False
30993114
- if:
@@ -3108,6 +3123,19 @@ configuration:
31083123
- vicancy
31093124
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
31103125
assignMentionees: False
3126+
- if:
3127+
- hasLabel:
3128+
label: Service Attention
3129+
- hasLabel:
3130+
label: Workloads
3131+
then:
3132+
- mentionUsers:
3133+
mentionees:
3134+
- jaskisin
3135+
- ajaygit158
3136+
- praveennet
3137+
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
3138+
assignMentionees: False
31113139
description: Triage issues to the service team
31123140
- if:
31133141
- payloadType: Pull_Request

src/azure-cli/azure/cli/command_modules/acr/cache.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def acr_cache_create(cmd,
5656
resource_group_name=None,
5757
cred_set=None):
5858

59+
rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
5960
if cred_set:
6061
sub_id = get_subscription_id(cmd.cli_ctx)
61-
rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
6262
# Format the credential set ID using subscription ID, resource group, registry name, and credential set name
6363
cred_set_id = CREDENTIAL_SET_RESOURCE_ID_TEMPLATE.format(
6464
sub_id=sub_id,

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Purge(AAZCommand):
1818
"""Removes a content from AzureFrontDoor.
1919
2020
:example: Remove all cached contents under directory "/script" for domain www.contoso.com
21-
az afd endpoint purge -g group --profile-name profile --domains www.contoso.com --content-paths '/scripts/*'
21+
az afd endpoint purge -g group --profile-name profile --domains [www.contoso.com,www.contoso1.com] --content-paths '/scripts/*'
2222
"""
2323

2424
_aaz_info = {
@@ -73,7 +73,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
7373
_args_schema.domains = AAZListArg(
7474
options=["--domains"],
7575
arg_group="Contents",
76-
help="List of domains. Example: \"[www.contoso.com,www.contoso1.com]\"",
76+
help="List of domains. Example: \"www.contoso.com, www.contoso1.com\"",
7777
)
7878

7979
content_paths = cls._args_schema.content_paths

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .__cmd_group import *
1212
from ._create import *
1313
from ._delete import *
14+
from ._get_boot_diagnostic_log import *
1415
from ._list import *
1516
from ._reimage import *
1617
from ._restart import *
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command(
15+
"network virtual-appliance get-boot-diagnostic-log",
16+
)
17+
class GetBootDiagnosticLog(AAZCommand):
18+
"""Retrieve the boot diagnostic logs for a VM instance belonging to the specified Network Virtual Appliance.
19+
20+
:example: Get boot diagnostic logs
21+
az network virtual-appliance get-boot-diagnostic-log --resource-group rg --network-virtual-appliance-name name --scs-sas-url serialconsole-sas-url --css-sas-url consoleScreenshot-sas-url
22+
"""
23+
24+
_aaz_info = {
25+
"version": "2024-07-01",
26+
"resources": [
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/getbootdiagnosticlogs", "2024-07-01"],
28+
]
29+
}
30+
31+
AZ_SUPPORT_NO_WAIT = True
32+
33+
def _handler(self, command_args):
34+
super()._handler(command_args)
35+
return self.build_lro_poller(self._execute_operations, self._output)
36+
37+
_args_schema = None
38+
39+
@classmethod
40+
def _build_arguments_schema(cls, *args, **kwargs):
41+
if cls._args_schema is not None:
42+
return cls._args_schema
43+
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
44+
45+
# define Arg Group ""
46+
47+
_args_schema = cls._args_schema
48+
_args_schema.network_virtual_appliance_name = AAZStrArg(
49+
options=["-n", "--name", "--network-virtual-appliance-name"],
50+
help="The name of Network Virtual Appliance.",
51+
required=True,
52+
id_part="name",
53+
fmt=AAZStrArgFormat(
54+
pattern="^[A-Za-z0-9_]+",
55+
),
56+
)
57+
_args_schema.resource_group = AAZResourceGroupNameArg(
58+
required=True,
59+
)
60+
61+
# define Arg Group "Request"
62+
63+
_args_schema = cls._args_schema
64+
_args_schema.console_screenshot_storage_sas_url = AAZStrArg(
65+
options=["--css-sas-url", "--console-screenshot-storage-sas-url"],
66+
arg_group="Request",
67+
help="Specify the sas-url to the storage blob into which console screen shot for the requested instance will be written",
68+
)
69+
_args_schema.instance_id = AAZIntArg(
70+
options=["--instance-id"],
71+
arg_group="Request",
72+
help="The network virtual appliance instance id for which boot diagnostic logs is being requested",
73+
)
74+
_args_schema.serial_console_storage_sas_url = AAZStrArg(
75+
options=["--scs-sas-url", "--serial-console-storage-sas-url"],
76+
arg_group="Request",
77+
help="Specify the sas-url to the storage blob into which serial console logs for the requested instance will be written",
78+
)
79+
return cls._args_schema
80+
81+
def _execute_operations(self):
82+
self.pre_operations()
83+
yield self.NetworkVirtualAppliancesGetBootDiagnosticLogs(ctx=self.ctx)()
84+
self.post_operations()
85+
86+
@register_callback
87+
def pre_operations(self):
88+
pass
89+
90+
@register_callback
91+
def post_operations(self):
92+
pass
93+
94+
def _output(self, *args, **kwargs):
95+
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
96+
return result
97+
98+
class NetworkVirtualAppliancesGetBootDiagnosticLogs(AAZHttpOperation):
99+
CLIENT_TYPE = "MgmtClient"
100+
101+
def __call__(self, *args, **kwargs):
102+
request = self.make_request()
103+
session = self.client.send_request(request=request, stream=False, **kwargs)
104+
if session.http_response.status_code in [202]:
105+
return self.client.build_lro_polling(
106+
self.ctx.args.no_wait,
107+
session,
108+
self.on_200,
109+
self.on_error,
110+
lro_options={"final-state-via": "location"},
111+
path_format_arguments=self.url_parameters,
112+
)
113+
if session.http_response.status_code in [200]:
114+
return self.client.build_lro_polling(
115+
self.ctx.args.no_wait,
116+
session,
117+
self.on_200,
118+
self.on_error,
119+
lro_options={"final-state-via": "location"},
120+
path_format_arguments=self.url_parameters,
121+
)
122+
123+
return self.on_error(session.http_response)
124+
125+
@property
126+
def url(self):
127+
return self.client.format_url(
128+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/getBootDiagnosticLogs",
129+
**self.url_parameters
130+
)
131+
132+
@property
133+
def method(self):
134+
return "POST"
135+
136+
@property
137+
def error_format(self):
138+
return "ODataV4Format"
139+
140+
@property
141+
def url_parameters(self):
142+
parameters = {
143+
**self.serialize_url_param(
144+
"networkVirtualApplianceName", self.ctx.args.network_virtual_appliance_name,
145+
required=True,
146+
),
147+
**self.serialize_url_param(
148+
"resourceGroupName", self.ctx.args.resource_group,
149+
required=True,
150+
),
151+
**self.serialize_url_param(
152+
"subscriptionId", self.ctx.subscription_id,
153+
required=True,
154+
),
155+
}
156+
return parameters
157+
158+
@property
159+
def query_parameters(self):
160+
parameters = {
161+
**self.serialize_query_param(
162+
"api-version", "2024-07-01",
163+
required=True,
164+
),
165+
}
166+
return parameters
167+
168+
@property
169+
def header_parameters(self):
170+
parameters = {
171+
**self.serialize_header_param(
172+
"Content-Type", "application/json",
173+
),
174+
**self.serialize_header_param(
175+
"Accept", "application/json",
176+
),
177+
}
178+
return parameters
179+
180+
@property
181+
def content(self):
182+
_content_value, _builder = self.new_content_builder(
183+
self.ctx.args,
184+
typ=AAZObjectType,
185+
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
186+
)
187+
_builder.set_prop("consoleScreenshotStorageSasUrl", AAZStrType, ".console_screenshot_storage_sas_url")
188+
_builder.set_prop("instanceId", AAZIntType, ".instance_id")
189+
_builder.set_prop("serialConsoleStorageSasUrl", AAZStrType, ".serial_console_storage_sas_url")
190+
191+
return self.serialize_content(_content_value)
192+
193+
def on_200(self, session):
194+
data = self.deserialize_http_content(session)
195+
self.ctx.set_var(
196+
"instance",
197+
data,
198+
schema_builder=self._build_schema_on_200
199+
)
200+
201+
_schema_on_200 = None
202+
203+
@classmethod
204+
def _build_schema_on_200(cls):
205+
if cls._schema_on_200 is not None:
206+
return cls._schema_on_200
207+
208+
cls._schema_on_200 = AAZObjectType()
209+
210+
_schema_on_200 = cls._schema_on_200
211+
_schema_on_200.instance_id = AAZIntType(
212+
serialized_name="instanceId",
213+
)
214+
215+
return cls._schema_on_200
216+
217+
218+
class _GetBootDiagnosticLogHelper:
219+
"""Helper class for GetBootDiagnosticLog"""
220+
221+
222+
__all__ = ["GetBootDiagnosticLog"]

0 commit comments

Comments
 (0)