fix host details output

This commit is contained in:
wanyaoqi
2020-04-30 15:04:59 +08:00
parent 8e55ffa23e
commit db2d02fe00
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -163,6 +163,8 @@ type HostDetails struct {
IsPrepaidRecycle bool `json:"is_prepaid_recycle"`
CanPrepare bool `json:"can_prepare"`
PrepareFailReason string `json:"prepare_fail_reason"`
// 允许开启宿主机健康检查
EnableHealthCheck bool `json:"enable_health_check"`
// 标签
Metadata map[string]string `json:"metadata"`
+3
View File
@@ -2606,6 +2606,9 @@ func (self *SHost) getMoreDetails(ctx context.Context, out api.HostDetails, show
}
}
if self.EnableHealthCheck && hostHealthChecker != nil {
out.EnableHealthCheck = true
}
return out
}