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:
Yousong Zhou
2019-06-20 11:03:38 +00:00
parent b27a2c4180
commit bb1fd0bc59
10 changed files with 41 additions and 37 deletions
@@ -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)
}