Skip to content

Commit

Permalink
fix(region): vm gpu notes (#18651)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioito authored Nov 13, 2023
1 parent bb3f8eb commit f0b9b73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/compute/models/guests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f0b9b73

Please sign in to comment.