Automatic merge from release/2.4.0 -> release/2.5.0

* commit 'c5e96e7c1f6a99c6a9ac59f9f1a39ed098eb50b4':
  修复: spec 显示没有 enabled 的宿主机
This commit is contained in:
邱剑
2019-01-10 22:35:20 +08:00
+3
View File
@@ -787,6 +787,9 @@ func (self *SHost) ClearSchedDescCache() error {
func (self *SHost) GetSpec(statusCheck bool) *jsonutils.JSONDict {
if statusCheck {
if !self.Enabled {
return nil
}
if utils.IsInStringArray(self.Status, []string{BAREMETAL_INIT, BAREMETAL_PREPARE_FAIL, BAREMETAL_PREPARE}) ||
self.GetBaremetalServer() != nil {
return nil