azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Add FQDNs parameter to VirtualMachine class in azure.mgmt.compute.v2020_06_01.models.VirtualMachine

Open r3mattia opened this issue 6 years ago • 12 comments

Is your feature request related to a problem? Please describe. I'd like to retrieve VM FQDNs with Python to compare them with DNS Zone Cname record canonical names.

Describe the solution you'd like Currently, the VirtualMachine class defined in azure.mgmt.compute.v2020_06_01.models.VirtualMachine does not have the FQDN member variable. See: https://docs.microsoft.com/en-us/python/api/azure-mgmt-compute/azure.mgmt.compute.v2020_06_01.models.virtualmachine?view=azure-python

Adding that member variable would make it very easy to find the FQDN / domain name of a VM resource.

Describe alternatives you've considered The azure cli lets you retrieve the FQDNs of a VM as follows:

az vm show --show-details --resource-group <rg_name> --name <vm_name> --query "[fqdns]"

I thought of running this command inside my Python code, but this defeats the purpose in my situation since I am using managed identities and not CLI credentials in my code (an Azure function). Also, Azure functions written in Python appears to not support CLI-usage with ease, as indicated here: https://stackoverflow.com/questions/59354593/run-azure-cli-commands-from-a-azure-function-app#:~:text=Azure%20function%20does%20not%20support,create%20resources%20and%20manage%20them.

I have also thought of comparing DNS Zone canonical names to VM names, but VM names are arbitrary and may change over time, whereas the FQDNs, albeit also possible to change, appear more static. Consequently, under those assumptions, using VM names is less reliable than using VM public DNS names when comparing them to DNS Zone CName record canonical names.

r3mattia avatar Oct 19 '20 17:10 r3mattia

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @avirishuv, @vaibhav-agar, @amjads1.

ghost avatar Oct 19 '20 22:10 ghost

Thanks for picking this up! Any information wrt resolution time?

r3mattia avatar Oct 20 '20 15:10 r3mattia

@r3mattia Let me look into this, will get back with more information.

avirishuv avatar Oct 20 '20 15:10 avirishuv

@avirishuv Any updates?

r3mattia avatar Oct 23 '20 08:10 r3mattia

Any updates on this? Thanks....

r3mattia avatar Nov 04 '20 11:11 r3mattia

hi @r3mattia apologies for the delay, still investigating internally.

avirishuv avatar Nov 05 '20 22:11 avirishuv

@avirishuv thanks for the update. It would be great if you could let me know when this gets picked up.

r3mattia avatar Nov 09 '20 12:11 r3mattia

@r3mattia could you please take a look at the properties exposed on the network interface resource, documented here: https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaces/get Does the FQDN provided here meet your requirements?

avirishuv avatar Dec 03 '20 21:12 avirishuv

hi @r3mattia please let us know if you had a chance to look at the properties documented here, and whether the FQDN provided here meets your requirements? https://docs.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaces/get

avirishuv avatar Jan 07 '21 21:01 avirishuv

Hey @avirishuv thank you for the update. I will get back to you soon with information.

r3mattia avatar Jan 11 '21 14:01 r3mattia

Hi @r3mattia, where you able to look into the suggestion from Avi?

Drewm3 avatar Feb 11 '21 08:02 Drewm3

Closing this out due to no response after a proposed solution was provided.

Drewm3 avatar Mar 11 '21 08:03 Drewm3