mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #4307 from ioito/hotfix/qx-openstack-host-status
fix: 同步openstack宿主机关闭服务后状态
This commit is contained in:
@@ -424,6 +424,9 @@ func (host *SHost) GetHostType() string {
|
||||
}
|
||||
|
||||
func (host *SHost) GetHostStatus() string {
|
||||
if host.Status == "disabled" {
|
||||
return api.HOST_OFFLINE
|
||||
}
|
||||
switch host.State {
|
||||
case "up", "":
|
||||
return api.HOST_ONLINE
|
||||
|
||||
Reference in New Issue
Block a user