-
Notifications
You must be signed in to change notification settings - Fork 867
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
Empty Subnet
for Network Interfaces
#23611
Comments
@dnaeon, could you turn on logging by setting environment variable AZURE_SDK_GO_LOGGING to all and configure policy.LogOption to print the body of this call? Please help to check whether you could receive subnet info in the raw response. |
Hey @lirenhe , I've just enabled logging and printed the body of the response. I can see the Thanks! |
@jliusan, could you help to investigate the root cause? |
@dnaeon the |
Hi @dnaeon. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
@tadelesh According to the // Subnet in a virtual network resource.
type Subnet struct {
// Resource ID.
ID *string
// The name of the resource that is unique within a resource group. This name can be used to access the resource.
Name *string
// Properties of the subnet.
Properties *SubnetPropertiesFormat
// Resource type.
Type *string
// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
Etag *string
} Having the Thanks, |
@dnaeon our sdk is auto-generated from the service spec, and does not have any convenience code like cli does. since service does not return the subnet name, the sdk returns nil is by design. i'll call for help from service team. meantime, i suggest you open a ticket in icm to have more efficient resp from service team. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub. |
Bug Report
I'm using sdk/resourcemanager/network/armnetwork/v6 SDK in order to get the existing Network Interfaces.
Go version:
go version go1.23.2 darwin/arm64
SDK version:
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 v6.1.0
When getting the Network Interfaces via the SDK the
Subnet
field is alwaysnil
.The following example program prints the network interfaces from a given subscription and resource group.
Sample result.
Getting the Network Interfaces using the CLI (
az network nic list
) works as expected, however when using the SDK I always getnil
values for theSubnet
.The text was updated successfully, but these errors were encountered: