Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add warning messages
  • Loading branch information
kairu-ms committed Apr 25, 2025
commit 6c113bbfbf5cc1f55ce506917313b07da7794eb5
7 changes: 4 additions & 3 deletions src/azure-cli-core/azure/cli/core/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,11 @@ def get_clouds(cli_ctx):
"2019-03-01-hybrid",
"2020-09-01-hybrid",
):
raise CLIError(
"The azure stack profile '{}' has been deprecated and removed, please use the 'latest' profile instead."
"To continue using Azure Stack please install the CLI 2.66.* (LTS) version.".format(c.profile)
logger.error(
"The azure stack profile '{}' has been deprecated and removed, using the 'latest' profile instead.\n"
"To continue using Azure Stack please install the CLI `2.66.*` (LTS) version.".format(c.profile)
)
c.profile = 'latest'
else:
raise CLIError('Profile {} does not exist or is not supported.'.format(c.profile))
if not c.endpoints.has_endpoint_set('management') and \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def load_arguments(self, command):
# pylint: disable=line-too-long
with self.argument_context('cloud') as c:
c.argument('cloud_name', options_list=('--name', '-n'), help='Name of a registered cloud', completer=get_cloud_name_completion_list)
c.argument('profile', help='Profile to use for this cloud', choices=list(API_PROFILES))
c.argument('profile', help='Profile to use for this cloud. The azure stack profiles `2017-03-09-profile` `2018-03-01-hybrid` `2019-03-01-hybrid` and `2020-09-01-hybrid` have been deprecated and removed. To continue using Azure Stack please install the CLI 2.66.* (LTS) version.', choices=list(API_PROFILES))
c.argument('cloud_config', options_list=('--cloud-config',), help='JSON encoded cloud configuration. Use @{file} to load from a file.', type=shell_safe_json_parse)
c.argument('endpoint_management', help='The management service endpoint')
c.argument('endpoint_resource_manager', help='The resource management endpoint')
Expand Down
Loading