mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.4.0 -> release/2.5.0
* commit 'c5e96e7c1f6a99c6a9ac59f9f1a39ed098eb50b4': 修复: spec 显示没有 enabled 的宿主机
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user