Merge pull request #4307 from ioito/hotfix/qx-openstack-host-status

fix: 同步openstack宿主机关闭服务后状态
This commit is contained in:
yunion-ci-robot
2019-12-26 01:50:14 +08:00
committed by GitHub
+3
View File
@@ -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