Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@

def format_what_if_operation_result(what_if_operation_result, enable_color=True):
builder = ColoredStringBuilder(enable_color)
_format_preview_notice(builder)
_format_noise_notice(builder)
_format_change_type_legend(builder, what_if_operation_result.changes)
_format_resource_changes(builder, what_if_operation_result.changes)
_format_resource_changes_stats(builder, what_if_operation_result.changes)
return builder.build()


def _format_preview_notice(builder):
def _format_noise_notice(builder):
builder.append_line(
"""Note: As What-If is currently in preview, the result may contain false positive predictions (noise).
"""Note: The result may contain false positive predictions (noise).
You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues."""
)
builder.append_line()
Expand Down
6 changes: 3 additions & 3 deletions src/azure-cli/azure/cli/command_modules/resource/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ def load_arguments(self, _):

deployment_what_if_result_format_type = CLIArgumentType(options_list=['--result-format', '-r'],
arg_type=get_enum_type(WhatIfResultFormat, "FullResourcePayloads"),
is_preview=True, min_api='2019-07-01')
min_api='2019-07-01')
deployment_what_if_no_pretty_print_type = CLIArgumentType(options_list=['--no-pretty-print'], action='store_true',
help='Disable pretty-print for What-If results. When set, the output format type will be used.')
deployment_what_if_confirmation_type = CLIArgumentType(options_list=['--confirm-with-what-if', '-c'], action='store_true',
help='Instruct the command to run deployment What-If before executing the deployment. It then prompts you to acknowledge resource changes before it continues.',
is_preview=True, min_api='2019-07-01')
min_api='2019-07-01')
deployment_what_if_exclude_change_types_type = CLIArgumentType(nargs="+", options_list=['--exclude-change-types', '-x'],
arg_type=get_enum_type(ChangeType),
help='Space-separated list of resource change types to be excluded from What-If results.',
is_preview=True, min_api='2019-07-01')
min_api='2019-07-01')
tag_name_type = CLIArgumentType(options_list=['--name', '-n'], help='The tag name.')
tag_value_type = CLIArgumentType(options_list='--value', help='The tag value.')
tag_resource_id_type = CLIArgumentType(options_list='--resource-id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def load_command_table(self, _):
g.custom_command('create', 'deploy_arm_template_at_subscription_scope', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('what-if', 'what_if_deploy_arm_template_at_subscription_scope', validator=process_deployment_create_namespace,
exception_handler=handle_template_based_exception, is_preview=True, min_api='2019-07-01')
exception_handler=handle_template_based_exception, min_api='2019-07-01')
g.custom_command('export', 'export_template_at_subscription_scope')
g.custom_wait_command('wait', 'get_deployment_at_subscription_scope')
g.custom_command('cancel', 'cancel_deployment_at_subscription_scope')
Expand Down Expand Up @@ -315,7 +315,7 @@ def load_command_table(self, _):
g.custom_command('create', 'deploy_arm_template_at_resource_group', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('what-if', 'what_if_deploy_arm_template_at_resource_group', validator=process_deployment_create_namespace,
exception_handler=handle_template_based_exception, is_preview=True, min_api='2019-07-01')
exception_handler=handle_template_based_exception, min_api='2019-07-01')
g.custom_command('export', 'export_template_at_resource_group')
g.custom_wait_command('wait', 'get_deployment_at_resource_group')
g.custom_command('cancel', 'cancel_deployment_at_resource_group')
Expand All @@ -334,7 +334,7 @@ def load_command_table(self, _):
g.custom_command('create', 'deploy_arm_template_at_management_group', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('what-if', 'what_if_deploy_arm_template_at_management_group', validator=process_deployment_create_namespace,
exception_handler=handle_template_based_exception, is_preview=True, min_api='2019-10-01')
exception_handler=handle_template_based_exception, min_api='2019-10-01')
g.custom_command('export', 'export_template_at_management_group')
g.custom_wait_command('wait', 'get_deployment_at_management_group')
g.custom_command('cancel', 'cancel_deployment_at_management_group')
Expand All @@ -353,7 +353,7 @@ def load_command_table(self, _):
g.custom_command('create', 'deploy_arm_template_at_tenant_scope', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('what-if', 'what_if_deploy_arm_template_at_tenant_scope', validator=process_deployment_create_namespace,
exception_handler=handle_template_based_exception, is_preview=True, min_api='2019-10-01')
exception_handler=handle_template_based_exception, min_api='2019-10-01')
g.custom_command('export', 'export_template_at_tenant_scope')
g.custom_wait_command('wait', 'get_deployment_at_tenant_scope')
g.custom_command('cancel', 'cancel_deployment_at_tenant_scope')
Expand Down