replace obsolete command (#11650)

This commit is contained in:
Alan Ren
2020-08-05 10:15:36 -07:00
committed by GitHub
parent d380328f8b
commit b71432523d
2 changed files with 7 additions and 4 deletions

View File

@@ -362,7 +362,7 @@
"if len(vm_list) == 0:\n",
" vm_image = run_command(f'az vm image list --all --location {azure_location} --offer iot_edge_vm_ubuntu --publisher microsoft_iot_edge --sku ubuntu_1604_edgeruntimeonly', returnObject=True)\n",
" image_urn = vm_image[0]['urn']\n",
" run_command(f'az vm image accept-terms --urn {image_urn}')\n",
" run_command(f'az vm image terms accept --urn {image_urn}')\n",
" vm_password_placeholder = '<admin_password>'\n",
" create_vm_command_template = f'az vm create --name {iot_device_id} --resource-group {azure_resource_group} --admin-username {vm_admin} --admin-password {vm_password_placeholder} --authentication-type password --image {image_urn} --location {azure_location} --nsg {network_security_group} --public-ip-address \\\"{public_ip_address_name}\\\" --public-ip-address-allocation static --public-ip-sku Standard --size {vm_size} --subnet {subnet_name} --subnet-address-prefix \\\"{subnet_address_prefix}\\\" --vnet-name {vnet_name} --vnet-address-prefix \\\"{vnet_address_prefix}\\\"'\n",
" run_command(create_vm_command_template.replace(vm_password_placeholder, vm_password), displayCommand=create_vm_command_template.replace(vm_password_placeholder, '******'))\n",