mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
treewide: 将default:"true"的bool字段改为tristate.TriState
使用以下命令进行字段类型更改 ag 'bool .*`.*default:"true"' pkg \ | grep models \ | cut -f1 -d: \ | xargs sed -i -r -e 's/bool (.*)default:"true"/tristate.TriState \1default:"true"/'
This commit is contained in:
@@ -74,7 +74,7 @@ func (p *DiskSchedtagPredicate) GetResources(c core.Candidater) []ISchedtagCandi
|
||||
|
||||
func (p *DiskSchedtagPredicate) IsResourceFitInput(u *core.Unit, c core.Candidater, res ISchedtagCandidateResource, input ISchedtagCustomer) error {
|
||||
storage := res.(*api.CandidateStorage)
|
||||
if storage.Status == computeapi.STORAGE_OFFLINE || !storage.Enabled {
|
||||
if storage.Status == computeapi.STORAGE_OFFLINE || storage.Enabled.IsFalse() {
|
||||
return fmt.Errorf("Storage status is %s, enable is %v", storage.Status, storage.Enabled)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user