mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #750 in YUNIONIO/onecloud from ~LIZEXI/onecloud:bugfix/lzx-region-gpu-not-work to release/2.3.0
* commit '55a8c869f7598d78090bd32fd9aad616298417e1': fix: gpu server not work
This commit is contained in:
@@ -461,7 +461,7 @@ func (man *SIsolatedDeviceManager) GetSpecIdent(spec *jsonutils.JSONDict) []stri
|
||||
|
||||
func (self *SIsolatedDevice) GetShortDesc() *jsonutils.JSONDict {
|
||||
desc := self.getDesc()
|
||||
desc.Add(jsonutils.NewString(self.Keyword()), "res_name")
|
||||
desc.Add(jsonutils.NewString(IsolatedDeviceManager.Keyword()), "res_name")
|
||||
return desc
|
||||
}
|
||||
|
||||
|
||||
@@ -425,7 +425,14 @@ func (d *SchedData) fillIsolatedDeviceInfo(sjson *simplejson.Json) error {
|
||||
}
|
||||
dev, err := newIsolatedDeviceFromDesc(s.MustString())
|
||||
if err != nil {
|
||||
return err
|
||||
dev = new(IsolatedDevice)
|
||||
dev.ID = s.Get("id").MustString()
|
||||
dev.Model = s.Get("model").MustString()
|
||||
dev.Vendor = s.Get("vendor").MustString()
|
||||
dev.Type = s.Get("dev_type").MustString()
|
||||
if len(dev.ID) == 0 && len(dev.Model) == 0 {
|
||||
return fmt.Errorf("Invalid isolated device description")
|
||||
}
|
||||
}
|
||||
devs = append(devs, dev)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user