mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): vm gpu notes (#18651)
This commit is contained in:
@@ -5184,9 +5184,6 @@ func (self *SGuest) GetSpec(checkStatus bool) *jsonutils.JSONDict {
|
||||
gpuSpecs = append(gpuSpecs, *gs)
|
||||
}
|
||||
}
|
||||
if gs := self.GetGpuSpec(); gs != nil {
|
||||
gpuSpecs = append(gpuSpecs, *gs)
|
||||
}
|
||||
|
||||
spec.Set("gpu", jsonutils.Marshal(gpuSpecs))
|
||||
return spec
|
||||
@@ -5283,6 +5280,10 @@ func (self *SGuest) GetShortDesc(ctx context.Context) *jsonutils.JSONDict {
|
||||
if len(self.InstanceType) > 0 {
|
||||
desc.Set("instance_type", jsonutils.NewString(self.InstanceType))
|
||||
}
|
||||
if gp := self.GetGpuSpec(); gp != nil {
|
||||
desc.Set("gpu_model", jsonutils.NewString(gp.Model))
|
||||
desc.Set("gpu_count", jsonutils.NewString(gp.Amount))
|
||||
}
|
||||
|
||||
address := jsonutils.NewString(strings.Join(self.GetRealIPs(), ","))
|
||||
desc.Set("ip_addr", address)
|
||||
|
||||
Reference in New Issue
Block a user