[DMS] az dms project create: Change location parameter to be optional#31465
[DMS] az dms project create: Change location parameter to be optional#31465
az dms project create: Change location parameter to be optional#31465Conversation
️✔️AzureCLI-FullTest
|
|
Hi @temandr, |
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
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>
|
az dms (project) create now don't require the location parameter and correcting help inputs az dms (project) create now don't require the location parameter and correcting help inputs
…om:temandr/azure-cli into users/arpavlic/update-help_remove-location
az dms (project) create now don't require the location parameter and correcting help inputsaz dms project create now doesn't require the location parameter and correcting help inputs
| examples: | ||
| - name: Create an instance of DMS. | ||
| text: > | ||
| az dms create -l westus -n mydms -g myresourcegroup --sku-name Basic_2vCores --subnet /subscriptions/{vnetSubscriptionId}/resourceGroups/{vnetResourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --tags tagName1=tagValue1 tagWithNoValue |
There was a problem hiding this comment.
Should we mention above that this parameter is available, although it is optional and it defaults to the resource group location? Since resource groups have global scope, someone may wish to create "MySQL migrations" resource group and add a few DMS services in multiple regions, for example. And it is not clear how this could be done from the help.
az dms project create now doesn't require the location parameter and correcting help inputsaz dms project create: Change location parameter to be optional
There was a problem hiding this comment.
Pull Request Overview
This PR modifies the Azure CLI DMS (Database Migration Service) module to make the location parameter optional for the az dms project create command and the az dms create command. The changes enable automatic location detection from the associated DMS service or resource group instead of requiring explicit location specification.
- Make location parameter optional for project creation by deriving it from the DMS service
- Make location parameter optional for service creation by defaulting to resource group location
- Update test cases to remove explicit location parameters from command invocations
Reviewed Changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test_service_scenarios.py | Updated test commands to remove explicit location parameters |
| custom.py | Added location auto-detection logic and made location optional in service/project creation functions |
| _help.py | Updated help documentation examples to remove location parameter usage |
| _client_factory.py | Added resource groups client factory function for location retrieval |
|
Please fix CI issues |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az dms project create ...
az dms create ...
Description
_helpfile to reflect more accurate inputs for the MySQL connection input and for thebinlog_info.az dms project create ...command and using the service to gather that information.Testing Guide
Re-ran tests with live input and adhoc tested
az dms create ...andaz dms project create ...This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.