Add GPU support: gpu_card / vgpu_profile data sources and GPU on service offerings - #315
Open
poddm wants to merge 2 commits into
Open
Add GPU support: gpu_card / vgpu_profile data sources and GPU on service offerings#315poddm wants to merge 2 commits into
poddm wants to merge 2 commits into
Conversation
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 GPU support to the provider, aligned with the GPU/vGPU APIs introduced in
recent CloudStack releases. This lets operators discover GPU cards and vGPU
profiles and attach GPUs to service offerings.
What's included
New data sources
cloudstack_gpu_card— looks up a GPU card via thelistGpuCardsAPI.Exposes
id,name,device_id,device_name,vendor_id,vendor_name.cloudstack_vgpu_profile— looks up a vGPU profile via thelistVgpuProfilesAPI. Exposes
id,name,description,device_id,device_name,gpu_card_id,gpu_card_name,max_heads,max_resolution_x,max_resolution_y,max_vgpu_per_physical_gpu,vendor_id,vendor_name,video_ram.Both data sources support the standard
filterblock (regex matching onreturned fields).
Service offering GPU configuration
gpunested block to the service offering resources(constrained / fixed / unconstrained), with:
vgpu_profile_id(required) — vGPU profile to associate with the offeringcount(optional) — number of GPUs assigned to the guest VMdisplay(optional) — whether the GPU is presented as a display deviceDocs
gpu_cardandvgpu_profiledata sources.Dependency
github.com/apache/cloudstack-go/v2fromv2.18.1tov2.19.1for theGPU API bindings.
Example usage