Issue 51 pcu group methods#52
Merged
Merged
Conversation
- POST /v2/pcus/types (pcuGetTypes): get available PCU types with optional region/provider filters
- GET /v2/pcus/actions/get/{datacenterUUID} (pcuGroupGetByDatacenterUUID): get PCU group for a given datacenter
- New schemas: PCUGroupTypesRequest, PCUGroupTypeResponse, PCUGroupTypeDetails, PCUGroupType
- Use '500' literal response codes (not 5XX wildcard) consistent with repo convention
- Regenerated astra.gen.go
toptobes
approved these changes
Jul 2, 2026
toptobes
left a comment
There was a problem hiding this comment.
Looks good to me. It's strange that pcuGroupGetByDatacenterUUID returns an array but it seems to be for backwards compatibility from the API so we probably shouldn't do anything about it here since it's just an autogenerated wrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two missing PCU endpoints to the OpenAPI spec and regenerates the Go client.
New endpoints
/v2/pcus/types(pcuGetTypes): Returns available PCU types, accepting optionalregion/provider filters via
PCUGroupTypesRequestbody. Response is an array ofPCUGroupTypeResponse./v2/pcus/actions/get/{datacenterUUID}(pcuGroupGetByDatacenterUUID): Returns the PCUgroup for a given datacenter UUID. Response is an array of
PCUGroup.Both endpoints are tagged
PCUand match the upstream public spec.New schemas
PCUGroupTypesRequestpcuGetTypes— optionalproviderandregionfiltersPCUGroupTypeResponsepcuGetTypesresponsePCUGroupTypeDetailsPCUGroupTypeResponse(vCPU, memory, disk cache)PCUGroupTypeResponse code format
New PCU endpoints use literal
'500'/'400'response codes as required byoapi-codegen.Usage examples
List PCU types (all providers/regions)
List PCU types filtered by provider and region
Get PCU group for a datacenter
Checklist
make generatepasses cleanlymake buildcompiles cleanlyCloses #51