Skip to content

Commit

Permalink
move default timezone to generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiquanJiang-ms committed Jul 10, 2024
1 parent 7405f58 commit 661e0f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/acat/azext_acat/aaz/latest/acat/report/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The information of 'bring your own storage' binding to the report",
)
_args_schema.time_zone = AAZStrArg(
options=["--time-zone-hidden"],
options=["--time-zone"],
arg_group="Properties",
help="Report collection trigger time's time zone, the available list can be obtained by executing \"Get-TimeZone -ListAvailable\" in PowerShell. An example of valid timezone id is \"Pacific Standard Time\".",
required=True,
default="UTC",
)
_args_schema.trigger_time = AAZDateTimeArg(
options=["--trigger-time-hidden"],
Expand Down
10 changes: 0 additions & 10 deletions src/acat/azext_acat/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
args_schema = super()._build_arguments_schema(*args, **kwargs)
from azure.cli.core.aaz import AAZDateTimeArg, AAZStrArg

args_schema.time_zone._required = False
args_schema.time_zone._registered = False
args_schema.time_zone_with_default = AAZStrArg(
options=["--time-zone"],
arg_group="Properties",
help="""Report collection trigger time\'s time zone, the available list can be obtained by executing
"Get-TimeZone -ListAvailable" in PowerShell. An example of valid timezone id is "Pacific Standard Time".""",
default="UTC",
)
args_schema.trigger_time._required = False
args_schema.trigger_time._registered = False
args_schema.trigger_time_with_default = AAZDateTimeArg(
Expand All @@ -157,7 +148,6 @@ def pre_operations(self):
)
LongRunningOperation(self.cli_ctx)(poller)
args = self.ctx.args
args.time_zone = args.time_zone_with_default
args.trigger_time = args.trigger_time_with_default


Expand Down

0 comments on commit 661e0f1

Please sign in to comment.