Skip to content

Commit 20c2630

Browse files
committed
Merge branch 'dev' into wzl/add-what-if
2 parents d39cff0 + b80331e commit 20c2630

File tree

161 files changed

+60307
-59935
lines changed

Some content is hidden

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

161 files changed

+60307
-59935
lines changed

.github/policies/resourceManagement.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,9 @@ configuration:
19551955
mentionees:
19561956
- ambhatna
19571957
- deepthiprasad
1958+
- akning-ms
1959+
- junsu-msft
1960+
- coffeemug
19581961
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
19591962
assignMentionees: False
19601963
- if:
@@ -2295,6 +2298,9 @@ configuration:
22952298
mentionees:
22962299
- ambhatna
22972300
- deepthiprasad
2301+
- akning-ms
2302+
- junsu-msft
2303+
- coffeemug
22982304
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
22992305
assignMentionees: False
23002306
- if:
@@ -2308,6 +2314,9 @@ configuration:
23082314
- daeunyim
23092315
- rajsell
23102316
- deepthiprasad
2317+
- akning-ms
2318+
- junsu-msft
2319+
- coffeemug
23112320
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
23122321
assignMentionees: False
23132322
- if:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def register(self, cli_ctx):
266266
if not arg:
267267
continue
268268
arg.deprecate_info = self.appended_status_tag(cli_ctx, arg.deprecate_info, self.to_tag(cli_ctx))
269-
arg.action = _argument_breaking_change_action(cli_ctx, arg.deprecate_info, arg.options['action'])
269+
arg.action = _argument_breaking_change_action(cli_ctx, arg.deprecate_info, arg.options.get('action'))
270270
elif self.is_command_group(cli_ctx):
271271
command_group = cli_ctx.invocation.commands_loader.command_group_table[self.command_name]
272272
if not command_group:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ def default_api_version(self):
214214
ResourceType.MGMT_MONITOR: None,
215215
ResourceType.MGMT_MSI: '2023-01-31',
216216
ResourceType.MGMT_APPSERVICE: '2024-11-01',
217-
ResourceType.MGMT_IOTHUB: '2023-06-30-preview',
218-
ResourceType.MGMT_IOTDPS: '2021-10-15',
219-
ResourceType.MGMT_IOTCENTRAL: '2021-11-01-preview',
217+
ResourceType.MGMT_IOTHUB: None,
218+
ResourceType.MGMT_IOTDPS: None,
219+
ResourceType.MGMT_IOTCENTRAL: None,
220220
ResourceType.MGMT_ARO: '2023-11-22',
221221
ResourceType.MGMT_DATABOXEDGE: '2021-02-01-preview',
222222
ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview',

src/azure-cli/azure/cli/command_modules/acs/azurecontainerstorage/_validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def _validate_nodepools( # pylint: disable=too-many-branches,too-many-locals
661661
'and retry the Azure Container Storage operation.'
662662
)
663663
vm_size = agentpool.get("vm_size")
664-
if vm_size is not None:
664+
if vm_size is not None and vm_size != "":
665665
cpu_value, nvme_enabled = get_vm_sku_details(vm_size.lower())
666666
if cpu_value is None or nvme_enabled is None:
667667
raise UnknownError(

src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8825,7 +8825,7 @@ def update_azure_container_storage(self, mc: ManagedCluster) -> ManagedCluster:
88258825
except Exception as ex:
88268826
raise UnknownError(
88278827
f"An error occurred while checking the version of Azure Container Storage"
8828-
f"extension installed on the cluster: {str(ex)}"
8828+
f" extension installed on the cluster: {str(ex)}"
88298829
) from ex
88308830

88318831
disable_azure_container_storage_v1 = disable_azure_container_storage_param is not None and is_container_storage_v1_extension_installed

src/azure-cli/azure/cli/command_modules/appservice/_params.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ def load_arguments(self, _):
233233

234234
with self.argument_context('functionapp list-flexconsumption-locations') as c:
235235
c.argument('zone_redundant', arg_type=get_three_state_flag(),
236-
help='Filter the list to return only locations which support zone redundancy.', is_preview=True)
236+
help='Filter the list to return only locations which support zone redundancy.')
237237
c.argument('show_details', options_list=['--show-details'], arg_type=get_three_state_flag(),
238-
help='Include the runtime details of the regions.', is_preview=True)
239-
c.argument('runtime', help="limit the output to just the specified runtime", is_preview=True)
238+
help='Include the runtime details of the regions.')
239+
c.argument('runtime', help="limit the output to just the specified runtime")
240240

241241
with self.argument_context('functionapp flex-migration start') as c:
242242
c.argument('source_resource_group', help='The resource group of the source function app to migrate from.')
@@ -492,20 +492,20 @@ def load_arguments(self, _):
492492
c.argument('dapr_enable_api_logging', options_list=['--dapr-enable-api-logging', '--dal'], help="Enable/Disable API logging for the Dapr sidecar.", arg_type=get_three_state_flag(return_label=True))
493493
c.argument('workload_profile_name', help="The name of the workload profile to run the app on.", is_preview=True)
494494
c.argument('cpu', type=float, help="Required CPU in cores from 0.5 to 2.0.", is_preview=True)
495-
c.argument('memory', help="Required momory from 1.0 to 4.0 ending with Gi e.g. 1.0Gi, ", is_preview=True)
495+
c.argument('memory', help="Required memory from 1.0 to 4.0 ending with Gi e.g. 1.0Gi, ", is_preview=True)
496496

497497
with self.argument_context('functionapp runtime config') as c:
498-
c.argument('runtime_version', help='The version of the functions runtime stack. Use "az functionapp list-flexconsumption-runtimes" to check supported runtimes and versions', is_preview=True)
498+
c.argument('runtime_version', help='The version of the functions runtime stack. Use "az functionapp list-flexconsumption-runtimes" to check supported runtimes and versions')
499499

500500
with self.argument_context('functionapp scale config') as c:
501-
c.argument('maximum_instance_count', type=int, help="The maximum number of instances.", is_preview=True)
502-
c.argument('instance_memory', type=int, help="The instance memory size in MB.", is_preview=True)
503-
c.argument('trigger_type', help="The type of trigger.", is_preview=True)
504-
c.argument('trigger_settings', nargs='+', help="space-separated settings for the trigger type in the format `<name>=<value>`", is_preview=True)
501+
c.argument('maximum_instance_count', type=int, help="The maximum number of instances.")
502+
c.argument('instance_memory', type=int, help="The instance memory size in MB.")
503+
c.argument('trigger_type', help="The type of trigger.")
504+
c.argument('trigger_settings', nargs='+', help="space-separated settings for the trigger type in the format `<name>=<value>`")
505505

506506
with self.argument_context('functionapp scale config always-ready') as c:
507-
c.argument('setting_names', nargs='+', help="space-separated always-ready setting names", is_preview=True)
508-
c.argument('settings', nargs='+', help="space-separated configuration for the number of pre-allocated instances in the format `<name>=<value>`", is_preview=True)
507+
c.argument('setting_names', nargs='+', help="space-separated always-ready setting names")
508+
c.argument('settings', nargs='+', help="space-separated configuration for the number of pre-allocated instances in the format `<name>=<value>`")
509509

510510
with self.argument_context('webapp config connection-string list') as c:
511511
c.argument('name', arg_type=webapp_name_arg_type, id_part=None)
@@ -871,33 +871,33 @@ def load_arguments(self, _):
871871
c.argument('dapr_http_read_buffer_size', type=int, options_list=['--dapr-http-read-buffer-size', '--dhrbs'], help="Max size of http header read buffer in KB to handle when sending multi-KB headers.")
872872
c.argument('dapr_log_level', help="The log level for the Dapr sidecar", arg_type=get_enum_type(DAPR_LOG_LEVELS))
873873
c.argument('dapr_enable_api_logging', options_list=['--dapr-enable-api-logging', '--dal'], help="Enable/Disable API logging for the Dapr sidecar.", arg_type=get_three_state_flag(return_label=True))
874-
c.argument('always_ready_instances', nargs='+', help="space-separated configuration for the number of pre-allocated instances in the format `<name>=<value>`", is_preview=True)
875-
c.argument('maximum_instance_count', type=int, help="The maximum number of instances.", is_preview=True)
876-
c.argument('instance_memory', type=int, help="The instance memory size in MB. See https://aka.ms/flex-instance-sizes for more information on the supported values.", is_preview=True)
874+
c.argument('always_ready_instances', nargs='+', help="space-separated configuration for the number of pre-allocated instances in the format `<name>=<value>`")
875+
c.argument('maximum_instance_count', type=int, help="The maximum number of instances.")
876+
c.argument('instance_memory', type=int, help="The instance memory size in MB. See https://aka.ms/flex-instance-sizes for more information on the supported values.")
877877
c.argument('flexconsumption_location', options_list=['--flexconsumption-location', '-f'],
878-
help="Geographic location where function app will be hosted. Use `az functionapp list-flexconsumption-locations` to view available locations.", is_preview=True)
878+
help="Geographic location where function app will be hosted. Use `az functionapp list-flexconsumption-locations` to view available locations.")
879879
c.argument('workspace', help="Name of an existing log analytics workspace to be used for the application insights component")
880880
c.argument('workload_profile_name', help="The workload profile name to run the container app on.", is_preview=True)
881881
c.argument('cpu', type=float, help="The CPU in cores of the container app. e.g 0.75", is_preview=True)
882882
c.argument('memory', help="The memory size of the container app. e.g. 1.0Gi, ", is_preview=True)
883-
c.argument('deployment_storage_name', options_list=['--deployment-storage-name', '--dsn'], help="The deployment storage account name.", is_preview=True)
884-
c.argument('deployment_storage_container_name', options_list=['--deployment-storage-container-name', '--dscn'], help="The deployment storage account container name.", is_preview=True)
885-
c.argument('deployment_storage_auth_type', options_list=['--deployment-storage-auth-type', '--dsat'], arg_type=get_enum_type(DEPLOYMENT_STORAGE_AUTH_TYPES), help="The deployment storage account authentication type.", is_preview=True)
883+
c.argument('deployment_storage_name', options_list=['--deployment-storage-name', '--dsn'], help="The deployment storage account name.")
884+
c.argument('deployment_storage_container_name', options_list=['--deployment-storage-container-name', '--dscn'], help="The deployment storage account container name.")
885+
c.argument('deployment_storage_auth_type', options_list=['--deployment-storage-auth-type', '--dsat'], arg_type=get_enum_type(DEPLOYMENT_STORAGE_AUTH_TYPES), help="The deployment storage account authentication type.")
886886
c.argument('deployment_storage_auth_value', options_list=['--deployment-storage-auth-value', '--dsav'], help="The deployment storage account authentication value. For the user-assigned managed identity authentication type, "
887887
"this should be the user assigned identity resource id. For the storage account connection string authentication type, this should be the name of the app setting that will contain the storage account connection "
888-
"string. For the system assigned managed-identity authentication type, this parameter is not applicable and should be left empty.", is_preview=True)
888+
"string. For the system assigned managed-identity authentication type, this parameter is not applicable and should be left empty.")
889889
c.argument('zone_redundant', arg_type=get_three_state_flag(),
890-
help='Enable zone redundancy for high availability. Applies to Flex Consumption SKU only.', is_preview=True)
890+
help='Enable zone redundancy for high availability. Applies to Flex Consumption SKU only.')
891891
c.argument('configure_networking_later', options_list=['--configure-networking-later', '--cnl'], arg_type=get_three_state_flag(),
892892
help='Use this option if you want to configure networking later for an app using network-restricted storage.')
893893

894894
with self.argument_context('functionapp deployment config set') as c:
895-
c.argument('deployment_storage_name', options_list=['--deployment-storage-name', '--dsn'], help="The deployment storage account name.", is_preview=True)
896-
c.argument('deployment_storage_container_name', options_list=['--deployment-storage-container-name', '--dscn'], help="The deployment storage account container name.", is_preview=True)
897-
c.argument('deployment_storage_auth_type', options_list=['--deployment-storage-auth-type', '--dsat'], arg_type=get_enum_type(DEPLOYMENT_STORAGE_AUTH_TYPES), help="The deployment storage account authentication type.", is_preview=True)
895+
c.argument('deployment_storage_name', options_list=['--deployment-storage-name', '--dsn'], help="The deployment storage account name.")
896+
c.argument('deployment_storage_container_name', options_list=['--deployment-storage-container-name', '--dscn'], help="The deployment storage account container name.")
897+
c.argument('deployment_storage_auth_type', options_list=['--deployment-storage-auth-type', '--dsat'], arg_type=get_enum_type(DEPLOYMENT_STORAGE_AUTH_TYPES), help="The deployment storage account authentication type.")
898898
c.argument('deployment_storage_auth_value', options_list=['--deployment-storage-auth-value', '--dsav'], help="The deployment storage account authentication value. For the user-assigned managed identity authentication type, "
899899
"this should be the user assigned identity resource id. For the storage account connection string authentication type, this should be the name of the app setting that will contain the storage account connection "
900-
"string. For the system assigned managed-identity authentication type, this parameter is not applicable and should be left empty.", is_preview=True)
900+
"string. For the system assigned managed-identity authentication type, this parameter is not applicable and should be left empty.")
901901

902902
with self.argument_context('functionapp cors credentials') as c:
903903
c.argument('enable', help='enable/disable access-control-allow-credentials', arg_type=get_three_state_flag())

src/azure-cli/azure/cli/command_modules/appservice/custom.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,12 @@ def progress_callback(current, total):
16661666
progress_message = 'Uploading {} {}%'.format(progress_bar, percents)
16671667
cmd.cli_ctx.get_progress_controller().add(message=progress_message)
16681668

1669-
blob_client = container_client.upload_blob(blob_name, src, validate_content=True, progress_hook=progress_callback)
1669+
blob_client = None
1670+
import os
1671+
with open(os.path.realpath(os.path.expanduser(src)), 'rb') as fs:
1672+
zip_content = fs.read()
1673+
blob_client = container_client.upload_blob(blob_name, zip_content, validate_content=True,
1674+
progress_hook=progress_callback)
16701675

16711676
now = datetime.datetime.utcnow()
16721677
blob_start = now - datetime.timedelta(minutes=10)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
6+
from azure.cli.core.breaking_change import register_argument_deprecate, register_output_breaking_change
7+
8+
# Arguments
9+
register_argument_deprecate(
10+
"az batch pool create",
11+
argument="--target-communication"
12+
)
13+
14+
# fixed with action=None but check with CLI team
15+
register_argument_deprecate(
16+
"az batch pool create",
17+
argument="--resource-tags"
18+
)
19+
20+
register_argument_deprecate(
21+
"az batch pool reset",
22+
argument="--target-communication"
23+
)
24+
register_argument_deprecate(
25+
"az batch pool set",
26+
argument="--target-communication"
27+
)
28+
29+
# Outputs
30+
register_output_breaking_change(
31+
"batch pool show",
32+
description="Remove output fields `targetNodeCommunicationMode`, `currentNodeCommunicationMode`, and `resourceTags`"
33+
)
34+
35+
register_output_breaking_change(
36+
"batch pool list",
37+
description="Remove output fields `targetNodeCommunicationMode`, `currentNodeCommunicationMode`, and `resourceTags`"
38+
)

src/azure-cli/azure/cli/command_modules/cognitiveservices/_params.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,21 @@ def load_arguments(self, _):
161161
c.argument('storage', help='The storage accounts for this resource, in JSON array format.')
162162
c.argument('encryption', help='The encryption properties for this resource, in JSON format.')
163163

164+
with self.argument_context('cognitiveservices account', arg_group="AI Services") as c:
165+
c.argument('allow_project_management',
166+
options_list=['--manage-projects', '--allow-project-management'],
167+
arg_type=get_three_state_flag(),
168+
help='AIServices kind only. Enables project management. Default true.')
169+
164170
with self.argument_context('cognitiveservices account create') as c:
165171
c.argument('assign_identity', help='Generate and assign an Azure Active Directory Identity for this account.')
166172
c.argument('yes', action='store_true', help='Do not prompt for terms confirmation')
167173

174+
with self.argument_context('cognitiveservices account update', arg_group="AI Services") as c:
175+
c.argument('kind',
176+
arg_type=get_enum_type(data=['AIServices', 'OpenAI']),
177+
help='The target API name to transform the existing account into.')
178+
168179
with self.argument_context('cognitiveservices account network-rule') as c:
169180
c.argument('ip_address', help='IPv4 address or CIDR range.')
170181
c.argument('subnet', help='Name or ID of subnet. If name is supplied, `--vnet-name` must be supplied.')

0 commit comments

Comments
 (0)