Skip to content

Commit ffa9224

Browse files
{SQL VM} Migrate util function of calling Compute module to aaz-based implementation (#32849)
1 parent 5cf3dae commit ffa9224

File tree

2 files changed

+654
-3510
lines changed

2 files changed

+654
-3510
lines changed

src/azure-cli/azure/cli/command_modules/sqlvm/_util.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,10 @@ def create_ama_and_dcra(cmd, curr_subscription, resource_group_name,
256256
dcra_url = f"{base_url}{dcra_name}{api_version}"
257257
if not does_name_exist(cmd, dcra_url):
258258
break
259-
from azure.cli.command_modules.vm.custom import get_vm
259+
from azure.cli.command_modules.vm.custom import get_vm_by_aaz
260260

261-
vm = get_vm(
262-
cmd,
263-
resource_group_name,
264-
sql_virtual_machine_name,
265-
'instanceView')
266-
amainstall = build_ama_install_resource(
267-
sql_virtual_machine_name, vm.location)
261+
vm = get_vm_by_aaz(cmd, resource_group_name, sql_virtual_machine_name, 'instanceView')
262+
amainstall = build_ama_install_resource(sql_virtual_machine_name, vm.get('location'))
268263

269264
master_template.add_resource(amainstall)
270265

0 commit comments

Comments
 (0)