{AFD} Fix Issue 31584: make location parameter as unrequired.#31588
Conversation
️✔️AzureCLI-FullTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| afd profile identity | sub group afd profile identity added |
||
| cdn endpoint update | cmd cdn endpoint update update parameter query_string_caching_behavior: added property aaz_default=None |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes Issue 31584 by making the location parameter optional for AFD commands and updates the API version strings from "2024-09-01" to "2025-04-15" across multiple commands. Additionally, it refactors some internal conditional logic and renames inner classes within the listing operations.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/cdn/custom/custom_afdx.py | Sets location parameter as unrequired. |
| src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/log_scrubbing/_show.py | Updates API version in command info and query parameters. |
| src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/_wait.py | Introduces new Wait command for profile identity. |
| src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/_show.py | Updates API version and adds subresource selector logic. |
| src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/init.py src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/__cmd_group.py |
Adds/imports module definitions. |
| src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/_wait.py, _update.py, _show.py, _list.py, _delete.py, _create.py |
Updates API versions and adjusts the command execution/argument logic. |
| condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True | ||
| if condition_0: | ||
| self.ProfilesList(ctx=self.ctx)() | ||
| if condition_1: | ||
| self.ProfilesListByResourceGroup(ctx=self.ctx)() | ||
| if condition_1: |
There was a problem hiding this comment.
The updated conditional logic in the ProfilesList operation appears to be inverted; please verify that the conditions correctly differentiate between listing by subscription and by resource group.
| return result, next_link | ||
|
|
||
| class ProfilesList(AAZHttpOperation): | ||
| class ProfilesListByResourceGroup(AAZHttpOperation): |
There was a problem hiding this comment.
The renaming of the inner classes (ProfilesList and ProfilesListByResourceGroup) appears to be swapped; please ensure that the class names correctly represent their intended functionality.
| class ProfilesListByResourceGroup(AAZHttpOperation): | |
| class ProfilesList(AAZHttpOperation): |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
#31584