fix(region): add enable auto sync resource field (#20187)

This commit is contained in:
屈轩
2024-04-30 19:28:03 +08:00
committed by GitHub
parent 5fc42614c3
commit 43ac987082
4 changed files with 12 additions and 5 deletions
+4
View File
@@ -224,6 +224,8 @@ type CloudaccountCreateInput struct {
// 货币类型
// enmu: CNY, USD
Currency string `json:"currency"`
EnableAutoSyncResource *bool `json:"enable_auto_sync_resource"`
}
type SProjectMappingResourceInput struct {
@@ -405,6 +407,8 @@ type CloudaccountUpdateInput struct {
ReadOnly bool `json:"read_only"`
Currency string `json:"currency"`
EnableAutoSyncResource *bool `json:"enable_auto_sync_resource"`
}
type CloudaccountPerformPublicInput struct {
+2
View File
@@ -177,6 +177,8 @@ type SCloudaccount struct {
// 跳过部分资源同步
SkipSyncResources *api.SkipSyncResources `length:"medium" get:"user" update:"domain" list:"user"`
EnableAutoSyncResource tristate.TriState `get:"user" update:"domain" create:"optional" list:"user" default:"true"`
}
func (acnt *SCloudaccount) IsNotSkipSyncResource(res lockman.ILockedClass) bool {
+1 -1
View File
@@ -245,7 +245,7 @@ type BaseListOptions struct {
Manager []string `help:"List objects belonging to the cloud provider" json:"manager,omitempty"`
Account string `help:"List objects belonging to the cloud account" json:"account,omitempty"`
Provider []string `help:"List objects from the provider" choices:"OneCloud|VMware|Aliyun|Apsara|Qcloud|Azure|Aws|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|Cloudpods|Nutanix|BingoCloud|IncloudSphere|JDcloud|Proxmox|Ceph|Ecloud|HCSO|HCS|HCSOP|H3C|S3|RemoteFile|Ksyun|Baidu|QingCloud" json:"provider,omitempty"`
Provider []string `help:"List objects from the provider" choices:"OneCloud|VMware|Aliyun|Apsara|Qcloud|Azure|Aws|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|Cloudpods|Nutanix|BingoCloud|IncloudSphere|JDcloud|Proxmox|Ceph|CephFS|Ecloud|HCSO|HCS|HCSOP|H3C|S3|RemoteFile|Ksyun|Baidu|QingCloud|OracleCloud" json:"provider,omitempty"`
Brand []string `help:"List objects belonging to a special brand"`
CloudEnv string `help:"Cloud environment" choices:"public|private|onpremise|private_or_onpremise" json:"cloud_env,omitempty"`
PublicCloud *bool `help:"List objects belonging to public cloud" json:"public_cloud"`
+5 -4
View File
@@ -664,10 +664,11 @@ type SCloudAccountUpdateBaseOptions struct {
SCloudAccountIdOptions
Name string `help:"New name to update"`
SyncIntervalSeconds *int `help:"auto synchornize interval in seconds"`
AutoCreateProject *bool `help:"automatically create local project for new remote project" negative:"no_auto_create_project"`
ProxySetting string `help:"proxy setting name or id" json:"proxy_setting"`
SamlAuth string `help:"Enable or disable saml auth" choices:"true|false"`
SyncIntervalSeconds *int `help:"auto synchornize interval in seconds"`
AutoCreateProject *bool `help:"automatically create local project for new remote project" negative:"no_auto_create_project"`
EnableAutoSyncResource *bool `help:"automatically sync resources" negative:"disable_auto_sync_resource"`
ProxySetting string `help:"proxy setting name or id" json:"proxy_setting"`
SamlAuth string `help:"Enable or disable saml auth" choices:"true|false"`
ReadOnly *bool `help:"is account read only" negative:"no_read_only"`