Skip to content

Commit b07dde5

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-cli into albertofori/strip_comments
2 parents 8cc3fdb + 7dbe9d5 commit b07dde5

File tree

23 files changed

+6673
-3429
lines changed

23 files changed

+6673
-3429
lines changed

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/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)

src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/diagnostic_settings/_create.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
6363
)
6464
_args_schema.logs = AAZListArg(
6565
options=["--logs"],
66-
help="JSON encoded list of logs settings. Use '@{file}' to load from a file.For more information, visit: https://learn.microsoft.com/rest/api/monitor/diagnosticsettings/createorupdate#logsettings.",
66+
help="JSON encoded list of logs settings. Use '@{file}' to load from a file. For more information, visit: https://learn.microsoft.com/rest/api/monitor/diagnosticsettings/createorupdate#logsettings.",
6767
)
6868
_args_schema.marketplace_partner_id = AAZStrArg(
6969
options=["--marketplace-partner-id"],
@@ -100,12 +100,12 @@ def _build_arguments_schema(cls, *args, **kwargs):
100100
)
101101
_element.enabled = AAZBoolArg(
102102
options=["enabled"],
103-
help="a value indicating whether this log is enabled.",
103+
help="A value indicating whether this log is enabled.",
104104
required=True,
105105
)
106106
_element.retention_policy = AAZObjectArg(
107107
options=["retention-policy"],
108-
help="the retention policy for this log.",
108+
help="The retention policy for this log.",
109109
)
110110
cls._build_args_retention_policy_create(_element.retention_policy)
111111

@@ -119,17 +119,17 @@ def _build_arguments_schema(cls, *args, **kwargs):
119119
)
120120
_element.enabled = AAZBoolArg(
121121
options=["enabled"],
122-
help="a value indicating whether this category is enabled.",
122+
help="A value indicating whether this category is enabled.",
123123
required=True,
124124
)
125125
_element.retention_policy = AAZObjectArg(
126126
options=["retention-policy"],
127-
help="the retention policy for this category.",
127+
help="The retention policy for this category.",
128128
)
129129
cls._build_args_retention_policy_create(_element.retention_policy)
130130
_element.time_grain = AAZDurationArg(
131131
options=["time-grain"],
132-
help="the timegrain of the metric in ISO8601 format.",
132+
help="The timegrain of the metric in ISO8601 format.",
133133
)
134134

135135
# define Arg Group "Target Resource"
@@ -157,15 +157,15 @@ def _build_args_retention_policy_create(cls, _schema):
157157
retention_policy_create = cls._args_retention_policy_create
158158
retention_policy_create.days = AAZIntArg(
159159
options=["days"],
160-
help="the number of days for the retention in days. A value of 0 will retain the events indefinitely.",
160+
help="The number of days for the retention. A value of 0 will retain the events indefinitely.",
161161
required=True,
162162
fmt=AAZIntArgFormat(
163163
minimum=0,
164164
),
165165
)
166166
retention_policy_create.enabled = AAZBoolArg(
167167
options=["enabled"],
168-
help="a value indicating whether the retention policy is enabled.",
168+
help="A value indicating whether the retention policy is enabled.",
169169
required=True,
170170
)
171171

src/azure-cli/azure/cli/command_modules/monitor/operations/diagnostics_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
8080
options=['--export-to-resource-specific'],
8181
help="Indicate that the export to LA must be done to a resource specific table, a.k.a. "
8282
"dedicated or fixed schema table, as opposed to the default dynamic schema table called "
83-
"AzureDiagnostics. This argument is effective only when the argument --workspace is also given."
84-
" Allowed values: false, true."
83+
"AzureDiagnostics. This argument is effective only when the argument --workspace is also given. "
84+
"Allowed values: false, true."
8585
)
8686
arg_schema.log_analytics_destination_type._registered = False # pylint:disable=protected-access
8787
arg_schema.service_bus_rule_id._registered = False # pylint:disable=protected-access

src/azure-cli/azure/cli/command_modules/vm/_client_factory.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ def cf_images(cli_ctx, _):
6767
return _compute_client_factory(cli_ctx).images
6868

6969

70-
def cf_run_commands(cli_ctx, _):
71-
return _compute_client_factory(cli_ctx).virtual_machine_run_commands
72-
73-
7470
def cf_vmss_run_commands(cli_ctx, _):
7571
return _compute_client_factory(cli_ctx).virtual_machine_scale_set_vm_run_commands
7672

src/azure-cli/azure/cli/command_modules/vm/_help.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,16 +1957,6 @@
19571957
"https://mystorageaccount.blob.core.windows.net/mycontainer/RuncommandOutput.txt?sp=racw&st=2022-10-17T19:02:15Z&se=2022-10-18T03:02:15Z&spr=https&sv=2021-06-08&sr=b&sig=3BxtEasfdasdfasdfdYki9yvYsqc60V0%3D"
19581958
"""
19591959

1960-
helps['vm run-command delete'] = """
1961-
type: command
1962-
short-summary: "The operation to delete the run command."
1963-
examples:
1964-
- name: Delete a run command.
1965-
text: |-
1966-
az vm run-command delete --resource-group "myResourceGroup" --run-command-name \
1967-
"myRunCommand" --vm-name "myVM"
1968-
"""
1969-
19701960
helps['vm run-command wait'] = """
19711961
type: command
19721962
short-summary: Place the CLI in a waiting state until a condition of the res virtual-machine-run-command is met.

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,10 +953,6 @@ def load_arguments(self, _):
953953
c.argument('output_blob_uri', help='Specify the Azure storage blob (SAS URI) where script output stream will be uploaded.')
954954
c.argument('error_blob_uri', help='Specify the Azure storage blob where script error stream will be uploaded.')
955955

956-
with self.argument_context('vm run-command delete') as c:
957-
c.argument('vm_name', run_cmd_vm_name)
958-
c.argument('run_command_name', run_cmd_name_type)
959-
960956
with self.argument_context('vm run-command list') as c:
961957
c.argument('vm_name', run_cmd_vm_name, id_part=None)
962958
c.argument('expand', help='The expand expression to apply on the operation.')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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_group(
15+
"vm run-command",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage run commands on a Virtual Machine.
19+
20+
For more information, see https://learn.microsoft.com/azure/virtual-machines/windows/run-command or https://learn.microsoft.com/azure/virtual-machines/linux/run-command.
21+
"""
22+
pass
23+
24+
25+
__all__ = ["__CMDGroup"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 .__cmd_group import *
12+
from ._create import *
13+
from ._delete import *
14+
from ._invoke import *
15+
from ._list import *
16+
from ._list_by_subscription import *
17+
from ._show import *
18+
from ._show_by_id import *
19+
from ._update import *
20+
from ._wait import *

0 commit comments

Comments
 (0)