mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 13:42:10 +08:00
fix: cloud account filter revisit (#21342)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -97,25 +97,25 @@ type CloudenvResourceListInput struct {
|
||||
// swagger:ignore
|
||||
// Deprecated
|
||||
// description: this param will be deprecate at 3.0
|
||||
PublicCloud bool `json:"public_cloud"`
|
||||
PublicCloud *bool `json:"public_cloud"`
|
||||
// swagger:ignore
|
||||
// Deprecated
|
||||
// description: this param will be deprecate at 3.0
|
||||
IsPublic bool `json:"is_public"`
|
||||
IsPublic *bool `json:"is_public"`
|
||||
|
||||
// swagger:ignore
|
||||
// Deprecated
|
||||
// description: this param will be deprecate at 3.0
|
||||
PrivateCloud bool `json:"private_cloud"`
|
||||
PrivateCloud *bool `json:"private_cloud"`
|
||||
// swagger:ignore
|
||||
// Deprecated
|
||||
// description: this param will be deprecate at 3.0
|
||||
IsPrivate bool `json:"is_private"`
|
||||
IsPrivate *bool `json:"is_private"`
|
||||
|
||||
// swagger:ignore
|
||||
// Deprecated
|
||||
// description: this param will be deprecate at 3.0
|
||||
IsOnPremise bool `json:"is_on_premise"`
|
||||
IsOnPremise *bool `json:"is_on_premise"`
|
||||
|
||||
// 以平台名称排序
|
||||
// pattern:asc|desc
|
||||
|
||||
@@ -221,11 +221,11 @@ func (input *ManagedResourceListInput) AfterUnmarshal() {
|
||||
if len(input.CloudEnv) > 0 {
|
||||
return
|
||||
}
|
||||
if input.PublicCloud || input.IsPublic {
|
||||
if (input.PublicCloud != nil && *input.PublicCloud) || (input.IsPublic != nil && *input.IsPublic) {
|
||||
input.CloudEnv = CLOUD_ENV_PUBLIC_CLOUD
|
||||
} else if input.PrivateCloud || input.IsPrivate {
|
||||
} else if (input.PrivateCloud != nil && *input.PrivateCloud) || (input.IsPrivate != nil && *input.IsPrivate) {
|
||||
input.CloudEnv = CLOUD_ENV_PRIVATE_CLOUD
|
||||
} else if input.IsOnPremise {
|
||||
} else if input.IsOnPremise != nil && *input.IsOnPremise {
|
||||
input.CloudEnv = CLOUD_ENV_ON_PREMISE
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user