mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
account&provider health status check
This commit is contained in:
@@ -147,7 +147,7 @@ func (self *SCloudaccount) IsAvailable() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if self.HealthStatus != api.CLOUD_PROVIDER_HEALTH_NORMAL {
|
||||
if !utils.IsInStringArray(self.HealthStatus, api.CLOUD_PROVIDER_VALID_HEALTH_STATUS) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -1153,7 +1153,7 @@ func (self *SCloudprovider) IsAvailable() bool {
|
||||
if !utils.IsInStringArray(self.Status, api.CLOUD_PROVIDER_VALID_STATUS) {
|
||||
return false
|
||||
}
|
||||
if self.HealthStatus != api.CLOUD_PROVIDER_HEALTH_NORMAL {
|
||||
if !utils.IsInStringArray(self.HealthStatus, api.CLOUD_PROVIDER_VALID_HEALTH_STATUS) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user