-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Compute} Migrate util function to aaz-based implementation #32849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -256,15 +256,10 @@ def create_ama_and_dcra(cmd, curr_subscription, resource_group_name, | |||||
| dcra_url = f"{base_url}{dcra_name}{api_version}" | ||||||
| if not does_name_exist(cmd, dcra_url): | ||||||
| break | ||||||
| from azure.cli.command_modules.vm.custom import get_vm | ||||||
| from azure.cli.command_modules.vm.custom import get_vm_by_aaz | ||||||
|
|
||||||
| vm = get_vm( | ||||||
| cmd, | ||||||
| resource_group_name, | ||||||
| sql_virtual_machine_name, | ||||||
| 'instanceView') | ||||||
| amainstall = build_ama_install_resource( | ||||||
| sql_virtual_machine_name, vm.location) | ||||||
| vm = get_vm_by_aaz(cmd, resource_group_name, sql_virtual_machine_name, 'instanceView') | ||||||
| amainstall = build_ama_install_resource(sql_virtual_machine_name, vm.get('location')) | ||||||
|
||||||
| amainstall = build_ama_install_resource(sql_virtual_machine_name, vm.get('location')) | |
| amainstall = build_ama_install_resource(sql_virtual_machine_name, vm['location']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching from
get_vm(management SDK) toget_vm_by_aazchanges the underlying VM GET to AAZ’s API version (currently2025-04-01). The existing sqlvm scenario test recordingtest_sqlvm_mgmt_assessment.yamlincludes a VM GET atapi-version=2024-11-01, so playback is likely to break unless recordings are re-generated (or the call is adjusted to keep the previous api-version).