[App Service] Fix #28836, #30100: Wire through --protocol and --domain-validation-method params#33063
[App Service] Fix #28836, #30100: Wire through --protocol and --domain-validation-method params#33063
--protocol and --domain-validation-method params#33063Conversation
… and `--domain-validation-method` params Add --protocol (Smb/Nfs) parameter to `az webapp config storage-account add/update` to support NFS protocol for Azure Files storage mounts (fixes Azure#28836). Add --domain-validation-method parameter to `az webapp config ssl create` to support managed certificate creation for child DNS zones (fixes Azure#30100). Both parameters were already supported by the underlying SDK models but were not wired through the CLI commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
️✔️AzureCLI-FullTest
|
|
Hi @seligj95, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| functionapp config ssl create | cmd functionapp config ssl create added parameter domain_validation_method |
||
| webapp config ssl create | cmd webapp config ssl create added parameter domain_validation_method |
||
| webapp config storage-account add | cmd webapp config storage-account add added parameter protocol |
||
| webapp config storage-account update | cmd webapp config storage-account update added parameter protocol |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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
Wires through previously-unexposed SDK fields in the App Service CLI module so users can (1) set Azure Files mount protocol (SMB/NFS) for storage-account configs and (2) choose managed certificate domain validation method when creating SSL certs.
Changes:
- Added
--protocoltoaz webapp config storage-account add/updateand passed it through toAzureStorageInfoValue. - Added
--domain-validation-methodtoaz webapp config ssl createand passed it through to theCertificatemodel. - Added unit tests and updated help examples covering both new parameters.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/appservice/custom.py |
Plumbs protocol into storage-account add/update and domain_validation_method into managed cert creation. |
src/azure-cli/azure/cli/command_modules/appservice/_params.py |
Exposes new CLI parameters --protocol and --domain-validation-method. |
src/azure-cli/azure/cli/command_modules/appservice/_help.py |
Adds help examples demonstrating NFS mounts and TXT-based domain validation. |
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py |
Adds unit tests asserting both parameters are forwarded into the corresponding SDK models. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add --validation-method as shorter alias for --domain-validation-method to satisfy option_length_too_long (HIGH severity) linter rule - Add missing_parameter_test_coverage exclusions for new params: domain_validation_method (webapp/functionapp config ssl create) protocol (webapp config storage-account add/update) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Consolidated into #33067 — all commits from this PR have been cherry-picked into the primary branch. |
Description
Fixes #28836 and #30100 by wiring through two existing SDK parameters that were missing from CLI commands.
Fix #28836 —
--protocolforaz webapp config storage-account add/updateThe
AzureStorageInfoValuemodel inazure-mgmt-webalready supports aprotocolparameter (Smb/Nfs), but neitheradd_azure_storage_account()norupdate_azure_storage_account()passed it through. This blocked users from mounting NFS Azure Files shares.Changes:
--protocolparameter (choices:Smb,Nfs) to thewebapp config storage-accountargument context in_params.pycustom.pyto accept and passprotocoltoAzureStorageInfoValue()_help.pyFix #30100 —
--domain-validation-methodforaz webapp config ssl createThe
Certificatemodel already supportsdomain_validation_method, butcreate_managed_ssl_cert()did not pass it. This prevented managed certificate creation for child DNS zones that require TXT record validation.Changes:
--domain-validation-methodparameter to theconfig ssl createargument context in_params.pycreate_managed_ssl_cert()incustom.pyto accept and pass the parameter_help.pyTesting
test_webapp_commands_thru_mock.pyazdev style appservicepasses (pylint + flake8)This checklist is used to make sure that common guidelines for a pull request are followed.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com