azure-sdk-for-go
azure-sdk-for-go copied to clipboard
Azure reservations are missing fields in the reservations.Response
Import path of package in question: "github.com/Azure/azure-sdk-for-go/services/preview/reservations/mgmt/2020-10-25/reservations"
SDK version: 54.0.0 go.mod file shows this information: github.com/Azure/azure-sdk-for-go v54.0.0+incompatible
Output of go version go version go1.16 linux/amd64
What happened?
We are converting from an existing implementation which uses straight HTTP requests to use the go SDK and observed that certain fields are missing from the reservations.Response properties when listing the reservations (ie we are using the List function)
The data is in the HTTP response body so it should be straight forward to add the new fields to the struct.
The missing fields are
archived (a boolean) capabilties (a string) swapProperties (a struct, which usually seems to have swapSource and swapDestination, uncertain about any other possible values)
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @corquiri.
Issue Details
Import path of package in question: "github.com/Azure/azure-sdk-for-go/services/preview/reservations/mgmt/2020-10-25/reservations"
SDK version: 54.0.0 go.mod file shows this information: github.com/Azure/azure-sdk-for-go v54.0.0+incompatible
Output of go version go version go1.16 linux/amd64
What happened?
We are converting from an existing implementation which uses straight HTTP requests to use the go SDK and observed that certain fields are missing from the reservations.Response properties when listing the reservations (ie we are using the List function)
The data is in the HTTP response body so it should be straight forward to add the new fields to the struct.
The missing fields are
archived (a boolean) capabilties (a string) swapProperties (a struct, which usually seems to have swapSource and swapDestination, uncertain about any other possible values)
Author: | ianeal |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
Hi @ianeal thanks for opening this issue!
Those properties are missing because we are also missing those in the swagger from which this SDK is generated.
We need the corresponding service team to add these properties so that we could have those in our next round of generation. I have added the tags, so that the corresponding service team could take this a look.
Hi, I was wondering if there are any updates on this one?
Is any additional information required?
Hi @ianeal sorry for the inconvenience but we are now waiting for the corresponding service team to response on this issue and they should either update the swagger accordingly so that we could regenerate our SDK, or they could provide some justification for not doing so.
Thanks for bringing this up we are actively working on pushing the new swagger out
Updated to the latest Azure SDK (ie v66.0.0) and changed my go dependencies
from "github.com/Azure/azure-sdk-for-go/services/preview/reservations/mgmt/2020-10-25/reservations" to "github.com/Azure/azure-sdk-for-go/services/reservations/mgmt/2022-03-01/reservations
I compared the models and I agree that for archived and capabilities the properties are there.
However, I still do not see Properties.SwapProperties.SwapSource nor Properties.SwapProperties.SwapDestination?
I'd like to update to using the 2022-03-01/reservations but without this data, I need to keep using my autorest implementation to retrieve the raw JSON response using 2019-04-01 API endpoint
Any idea why swap properties was not added as well?
Has it been renamed to something else or made unsupported or deprecated?
Swap source and swap destination are shown in the following microsoft documentation so I'd expect it to be reflected in the SDK
https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/reservation/list?tabs=HTTP
@ArcturusZhang @rkapso Swap source and swap destination are shown in the following microsoft documentation so I'd expect it to be reflected in the SDK
https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/reservation/list?tabs=HTTP
Any update on why swap properties was not included in the fix for this ticket?
@ArcturusZhang With regard to the missing swap properties which I noted above. I can see now that the swagger API for this was updated to include swap properties on Oct 4, 2022.
Is it known when the SDK will be regenerated?
Also will the newer github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/reservations/armreservations API be updated as well?