-
Notifications
You must be signed in to change notification settings - Fork 945
[AutoPR sdk-resourcemanager/avs/armavs]-generated-from-SDK Generation - Go-5462159 #25441
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
base: main
Are you sure you want to change the base?
[AutoPR sdk-resourcemanager/avs/armavs]-generated-from-SDK Generation - Go-5462159 #25441
Conversation
…AVS/tspconfig.yaml', API Version: 2025-09-01, SDK Release Type: stable, and CommitSHA: '76b0b83db710d3e15c4cba3cc96b9cb57f590eee' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5462159 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is green. Change log looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the AVS (Azure VMware Solution) Go management SDK to API version 2025-09-01 and bumps the module version to v2.2.0. It introduces new resource clients (Maintenances, Licenses, ServiceComponents), expands the model surface (maintenance operations, license classifications, VCF license support), and updates all existing example tests to the new API version.
- Bumps API version from 2024-09-01 to 2025-09-01 across all clients and examples.
- Adds new clients and polymorphic model types (maintenance operations, license & VCF license types, service component availability).
- Updates module version to v2.2.0 (new functionality) and regenerates example test files.
Reviewed Changes
Copilot reviewed 66 out of 67 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| workloadnetworks_client.go | Updates API version query parameter to 2025-09-01 in all WorkloadNetworks operations. |
| virtualmachines_client.go | Updates API version and keeps existing VM operations aligned. |
| skus_client.go | Updates API version for SKU listing. |
| servicecomponents_client.go | Adds new ServiceComponents client; introduces method and poller for availability check. |
| responses.go | Adds new response wrappers for Licenses, Maintenances, PrivateCloud VCF license, and ServiceComponents. |
| responses_serde.go | Adds custom JSON unmarshalling for new polymorphic response types. |
| polymorphic_helpers.go | Adds helper unmarshallers for new polymorphic models (licenses, maintenance operations, constraints, VCF license). |
| models.go | Introduces new model types (licenses, maintenance entities, VCF license, constraints). |
| models_serde.go | Serialization logic for new models and polymorphic types. |
| options.go | Adds option structs for new clients (Licenses, Maintenances, ServiceComponents, PrivateCloud GetVcfLicense). |
| privateclouds_client.go | Adds GetVcfLicense operation and integrates VcfLicense model into PrivateCloud properties. |
| maintenances_client_example_test.go | New examples for maintenance operations (get, list, schedule, reschedule, initiate checks). |
| version.go | Bumps moduleVersion to v2.2.0. |
| privateclouds_client_example_test.go | Adds VcfLicense usage to PrivateCloud create & get examples. |
| various *_client_example_test.go | Regenerates examples to reflect new API version 2025-09-01. |
| iscsipaths_client.go | Updates API version for iSCSI path management. |
| locations_client.go | Updates API version for location-based quota/trial checks. |
| hosts_client_example_test.go | Updates host examples to new API version. |
| tsp-location.yaml | Points to new REST spec commit SHA. |
| testdata/_metadata.json | Updates apiVersion and emitterVersion metadata. |
| if err != nil { | ||
| return nil, err | ||
| } | ||
| if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LRO initiation checks only for http.StatusAccepted (202). Many Azure LRO patterns also return 200 (OK) when the operation completes immediately. Restricting to 202 will incorrectly treat a 200 response as an error. Consider allowing both 200 and 202 (e.g., HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted)).
| if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { | |
| if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { |
| // serviceComponentsClientBegincheckAvailabilityOptions contains the optional parameters for the ServiceComponentsClient.BegincheckAvailability | ||
| // method. | ||
| type serviceComponentsClientBegincheckAvailabilityOptions struct { |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options type is unexported (lowercase initial) while the method BegincheckAvailability is exported; external consumers cannot construct this options struct and must pass nil. Export this type and align its name with CamelCase (e.g., ServiceComponentsClientBeginCheckAvailabilityOptions) to match other client option patterns.
| // serviceComponentsClientBegincheckAvailabilityOptions contains the optional parameters for the ServiceComponentsClient.BegincheckAvailability | |
| // method. | |
| type serviceComponentsClientBegincheckAvailabilityOptions struct { | |
| // ServiceComponentsClientBeginCheckAvailabilityOptions contains the optional parameters for the ServiceComponentsClient.BegincheckAvailability | |
| // method. | |
| type ServiceComponentsClientBeginCheckAvailabilityOptions struct { |
| const ( | ||
| moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs" | ||
| moduleVersion = "v2.1.0" | ||
| moduleVersion = "v2.2.0" |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module version bumped to v2.2.0; ensure a corresponding CHANGELOG.md entry documents the new API version (2025-09-01) and added clients/models (Maintenances, Licenses, ServiceComponents, VcfLicense). Add or update the changelog before release.
| - New function `*BlockedWhileScheduleOperation.GetScheduleOperationConstraint() *ScheduleOperationConstraint` | ||
| - New function `*ClientFactory.NewLicensesClient() *LicensesClient` | ||
| - New function `*ClientFactory.NewMaintenancesClient() *MaintenancesClient` | ||
| - New function `*ClientFactory.NewServiceComponentsClient() *ServiceComponentsClient` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ServiceComponent is marked internal in the TypeSpec. Is there a way to prevent the client from being generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refer to this comment: Azure/azure-rest-api-specs#38196 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd like to have ServiceComponents not be a part of the public SDKs.
…AVS/tspconfig.yaml', API Version: 2025-09-01, SDK Release Type: stable, and CommitSHA: 'd9fea55fd43a4a37a4bbca5bfa1a0f84497f0436' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5478829 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Configurations: 'specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml', API Version: 2025-09-01, SDK Release Type: stable, and CommitSHA: '76b0b83db710d3e15c4cba3cc96b9cb57f590eee' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5462159 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=062ad53b-32aa-f011-bbd3-6045bd05dd14 Submitted by: [email protected]
Release Plan Details
Spec pull request: add Microsoft.AVS 2025-09-01 API version azure-rest-api-specs#38196
Spec API version: