Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.69k stars 5.12k forks source link

For virtual WAN/virtual Hub, there is no way to fetch the HubVirtualNetworkConnectionStatus via Python SDK #29298

Open danielchiu-MSFT opened 5 months ago

danielchiu-MSFT commented 5 months ago

API Spec link

https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-network_25.3.0/sdk/network/azure-mgmt-network/generated_samples/hub_virtual_network_connection_list.py

API Spec version

25.3.0

Question/Query

I was informed by Azure Python SDK engineer to move the issue here. Previous Git issue in Azure SDK for Python is: https://github.com/Azure/azure-sdk-for-python/issues/35773

In Azure Portal, it is possible to check the virtual network connectivity status (Connected, Disconnected) in virtual WAN/hub: image

With Azure SDK for Python, the only relevant method is through HubVirtualNetworkConnections Operations Class: https://learn.microsoft.com/en-us/python/api/azure-mgmt-network/azure.mgmt.network.operations.hubvirtualnetworkconnectionsoperations?view=azure-python

But this would not return the connectivity status of virtual network connection: https://learn.microsoft.com/en-us/python/api/azure-mgmt-network/azure.mgmt.network.models.hubvirtualnetworkconnection?view=azure-python

However; the connectivity status of hub virtual network connection actually exists in this model: https://learn.microsoft.com/en-us/python/api/azure-mgmt-network/azure.mgmt.network.models.hubvirtualnetworkconnectionstatus?view=azure-python

But there is no operation/class to fetch this data.

Python SDK engineer said that Python SDK is generated by swagger definitions, so they can't decide its features, and asked to check here.

Please suggest if this is going to be implement in the future or there is any workaround for it.

Environment

No response

zzhxiaofeng commented 5 months ago

@msyyc please help have a look, thank you.

msyyc commented 5 months ago

As declared in https://github.com/Azure/azure-sdk-for-python/issues/35773#issuecomment-2141626052, SDK is generated with swagger while SDK team doesn't know much domain knowledge which API shall use in specific scenario. Since service team develops the portal, so if they can find which REST API of network provider the azure portal uses, SDK team can help find the related SDK API.

osten33 commented 5 days ago

this sounds to me like a very simple thing to fix. Is there some way we can get service teams attention?