mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11758 from zexi/fix-baremetal-spec
fix(region): baremetal spec condition
This commit is contained in:
@@ -1118,8 +1118,7 @@ func (self *SHost) GetSpec(statusCheck bool) *jsonutils.JSONDict {
|
||||
if !self.GetEnabled() {
|
||||
return nil
|
||||
}
|
||||
if utils.IsInStringArray(self.Status, []string{api.BAREMETAL_INIT, api.BAREMETAL_PREPARE_FAIL, api.BAREMETAL_PREPARE}) ||
|
||||
self.GetBaremetalServer() != nil {
|
||||
if self.Status != api.BAREMETAL_RUNNING || self.GetBaremetalServer() != nil || self.IsMaintenance {
|
||||
return nil
|
||||
}
|
||||
if self.MemSize == 0 || self.CpuCount == 0 {
|
||||
|
||||
Reference in New Issue
Block a user