mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #14947 from zexi/automated-cherry-pick-of-#14946-upstream-master
Automated cherry pick of #14946: fix(region): gpu_models in capabilities' response
This commit is contained in:
@@ -743,6 +743,7 @@ func getGPUs(region *SCloudregion, zone *SZone, domainId string) []string {
|
||||
hosts := hostQuery.SubQuery()
|
||||
|
||||
q := devices.Query(devices.Field("model"))
|
||||
q = q.Startswith("dev_type", "GPU")
|
||||
if region != nil {
|
||||
subq := getRegionZoneSubq(region)
|
||||
q = q.Join(hosts, sqlchemy.Equals(devices.Field("host_id"), hosts.Field("id")))
|
||||
|
||||
Reference in New Issue
Block a user