mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(cloudid): vendor update (#19847)
This commit is contained in:
@@ -88,7 +88,7 @@ require (
|
||||
k8s.io/client-go v0.19.3
|
||||
k8s.io/cluster-bootstrap v0.19.3
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240329124141-d15a857c94a0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240401032225-9a152ed52202
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
|
||||
yunion.io/x/jsonutils v1.0.1-0.20240203102553-4096f103b401
|
||||
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
|
||||
|
||||
@@ -1204,8 +1204,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240329124141-d15a857c94a0 h1:Hjjtyn6teI4BXBfzt6vAzLOBmpohAIyhUa0w3eRsX5c=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240329124141-d15a857c94a0/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240401032225-9a152ed52202 h1:nufuDeVPNxkYT8IbVbkwSb4SbGYxWV1w1DhrhR7++tE=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240401032225-9a152ed52202/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug=
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
|
||||
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
|
||||
|
||||
@@ -194,20 +194,10 @@ func (self *SCloudaccount) GetCloudgroups(managerId string) ([]SCloudgroup, erro
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudaccountManager) GetSupportCloudIdAccounts() ([]SCloudaccount, error) {
|
||||
accounts := []SCloudaccount{}
|
||||
q := manager.Query().In("provider", cloudprovider.GetSupportCloudIdProvider())
|
||||
err := db.FetchModelObjects(manager, q, &accounts)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "db.FetchModelObjects")
|
||||
}
|
||||
return accounts, nil
|
||||
}
|
||||
|
||||
func (manager *SCloudaccountManager) SyncCloudaccountResources(ctx context.Context, userCred mcclient.TokenCredential, isStart bool) {
|
||||
accounts, err := manager.GetSupportCloudIdAccounts()
|
||||
accounts, err := manager.GetCloudaccounts()
|
||||
if err != nil {
|
||||
log.Errorf("GetSupportCloudIdAccounts error: %v", err)
|
||||
log.Errorf("GetCloudaccounts error: %v", err)
|
||||
return
|
||||
}
|
||||
for i := range accounts {
|
||||
|
||||
@@ -132,9 +132,9 @@ func (self *SCloudprovider) StartCloudproviderSyncResourcesTask(ctx context.Cont
|
||||
return task.ScheduleRun(nil)
|
||||
}
|
||||
|
||||
func (manager *SCloudproviderManager) GetSupportCloudIdProviders() ([]SCloudprovider, error) {
|
||||
func (manager *SCloudproviderManager) GetCloudproviders() ([]SCloudprovider, error) {
|
||||
ret := []SCloudprovider{}
|
||||
q := manager.Query().In("provider", cloudprovider.GetSupportCloudIdProvider())
|
||||
q := manager.Query()
|
||||
err := db.FetchModelObjects(manager, q, &ret)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "db.FetchModelObjects")
|
||||
@@ -143,9 +143,9 @@ func (manager *SCloudproviderManager) GetSupportCloudIdProviders() ([]SCloudprov
|
||||
}
|
||||
|
||||
func (manager *SCloudproviderManager) SyncCloudproviderResources(ctx context.Context, userCred mcclient.TokenCredential, isStart bool) {
|
||||
managers, err := manager.GetSupportCloudIdProviders()
|
||||
managers, err := manager.GetCloudproviders()
|
||||
if err != nil {
|
||||
log.Errorf("GetSupportCloudIdAccounts error: %v", err)
|
||||
log.Errorf("GetCloudproviders error: %v", err)
|
||||
return
|
||||
}
|
||||
for i := range managers {
|
||||
|
||||
Vendored
+1
-1
@@ -1472,7 +1472,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
|
||||
# sigs.k8s.io/yaml v1.2.0
|
||||
## explicit; go 1.12
|
||||
sigs.k8s.io/yaml
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240329124141-d15a857c94a0
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240401032225-9a152ed52202
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
|
||||
-79
@@ -218,18 +218,6 @@ type ICloudProviderFactory interface {
|
||||
|
||||
IsNeedForceAutoCreateProject() bool
|
||||
|
||||
IsCloudpolicyWithSubscription() bool // 自定义权限属于订阅级别资源
|
||||
IsClouduserpolicyWithSubscription() bool // 绑定用户权限需要指定订阅
|
||||
|
||||
IsSupportCloudIdService() bool
|
||||
IsSupportClouduserPolicy() bool
|
||||
IsSupportResetClouduserPassword() bool
|
||||
GetClouduserMinPolicyCount() int
|
||||
IsClouduserNeedInitPolicy() bool
|
||||
IsSupportCreateCloudgroup() bool
|
||||
|
||||
IsSystemCloudpolicyUnified() bool // 国内国外权限是否一致
|
||||
|
||||
IsSupportCrossCloudEnvVpcPeering() bool
|
||||
IsSupportCrossRegionVpcPeering() bool
|
||||
IsSupportVpcPeeringVpcCidrOverlap() bool
|
||||
@@ -672,16 +660,6 @@ func GetPrivateProviders() []string {
|
||||
return providers
|
||||
}
|
||||
|
||||
func GetSupportCloudgroupProviders() []string {
|
||||
providers := []string{}
|
||||
for p, d := range providerTable {
|
||||
if d.IsSupportCreateCloudgroup() {
|
||||
providers = append(providers, p)
|
||||
}
|
||||
}
|
||||
return providers
|
||||
}
|
||||
|
||||
func GetOnPremiseProviders() []string {
|
||||
providers := make([]string, 0)
|
||||
for p, d := range providerTable {
|
||||
@@ -692,26 +670,6 @@ func GetOnPremiseProviders() []string {
|
||||
return providers
|
||||
}
|
||||
|
||||
func GetSupportCloudIdProvider() []string {
|
||||
providers := []string{}
|
||||
for p, d := range providerTable {
|
||||
if d.IsSupportCloudIdService() {
|
||||
providers = append(providers, p)
|
||||
}
|
||||
}
|
||||
return providers
|
||||
}
|
||||
|
||||
func GetClouduserpolicyWithSubscriptionProviders() []string {
|
||||
providers := []string{}
|
||||
for p, d := range providerTable {
|
||||
if d.IsClouduserpolicyWithSubscription() {
|
||||
providers = append(providers, p)
|
||||
}
|
||||
}
|
||||
return providers
|
||||
}
|
||||
|
||||
func GetProviderCloudEnv(provider string) string {
|
||||
p, err := GetProviderFactory(provider)
|
||||
if err != nil {
|
||||
@@ -769,43 +727,6 @@ func (factory *baseProviderFactory) IsNeedForceAutoCreateProject() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsCloudpolicyWithSubscription() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsClouduserpolicyWithSubscription() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsSupportCloudIdService() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsSupportClouduserPolicy() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsSupportResetClouduserPassword() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsClouduserNeedInitPolicy() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) GetClouduserMinPolicyCount() int {
|
||||
// unlimited
|
||||
return -1
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsSystemCloudpolicyUnified() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
-12
@@ -43,18 +43,6 @@ func (self *SAliyunProviderFactory) IsCloudeventRegional() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SAliyunProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SAliyunProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SAliyunProviderFactory) IsSystemCloudpolicyUnified() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *SAliyunProviderFactory) IsSupportSAMLAuth() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
-12
@@ -54,18 +54,6 @@ func (self *SAwsProviderFactory) IsSupportPrepaidResources() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (self *SAwsProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SAwsProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SAwsProviderFactory) IsSystemCloudpolicyUnified() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *SAwsProviderFactory) IsSupportSAMLAuth() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
-1
@@ -1004,7 +1004,6 @@ func (self *SAzureClient) GetCapabilities() []string {
|
||||
cloudprovider.CLOUD_CAPABILITY_CACHE + cloudprovider.READ_ONLY_SUFFIX,
|
||||
cloudprovider.CLOUD_CAPABILITY_EVENT,
|
||||
cloudprovider.CLOUD_CAPABILITY_CLOUDID,
|
||||
cloudprovider.CLOUD_CAPABILITY_SAML_AUTH,
|
||||
cloudprovider.CLOUD_CAPABILITY_WAF,
|
||||
cloudprovider.CLOUD_CAPABILITY_QUOTA + cloudprovider.READ_ONLY_SUFFIX,
|
||||
cloudprovider.CLOUD_CAPABILITY_CACHE + cloudprovider.READ_ONLY_SUFFIX,
|
||||
|
||||
-8
@@ -64,14 +64,6 @@ func (self *SAzureProviderFactory) IsSupportPrepaidResources() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (self *SAzureProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SAzureProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SAzureProviderFactory) ValidateCreateCloudaccountData(ctx context.Context, input cloudprovider.SCloudaccountCredential) (cloudprovider.SCloudaccount, error) {
|
||||
output := cloudprovider.SCloudaccount{}
|
||||
if len(input.DirectoryId) == 0 {
|
||||
|
||||
-24
@@ -51,30 +51,6 @@ func (self *SGoogleProviderFactory) IsClouduserSupportPassword() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *SGoogleProviderFactory) IsCloudpolicyWithSubscription() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SGoogleProviderFactory) IsClouduserpolicyWithSubscription() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SGoogleProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SGoogleProviderFactory) IsClouduserNeedInitPolicy() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SGoogleProviderFactory) IsSupportResetClouduserPassword() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *SGoogleProviderFactory) GetClouduserMinPolicyCount() int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func (self *SGoogleProviderFactory) IsClouduserBelongCloudprovider() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
-1
@@ -505,7 +505,6 @@ func (self *SHuaweiClient) GetCapabilities() []string {
|
||||
cloudprovider.CLOUD_CAPABILITY_CACHE,
|
||||
cloudprovider.CLOUD_CAPABILITY_EVENT,
|
||||
cloudprovider.CLOUD_CAPABILITY_CLOUDID,
|
||||
cloudprovider.CLOUD_CAPABILITY_SAML_AUTH,
|
||||
cloudprovider.CLOUD_CAPABILITY_NAT,
|
||||
cloudprovider.CLOUD_CAPABILITY_NAS,
|
||||
cloudprovider.CLOUD_CAPABILITY_MODELARTES,
|
||||
|
||||
-12
@@ -50,18 +50,6 @@ func (self *SHCSOProviderFactory) GetMaxCloudEventKeepDays() int {
|
||||
return 7
|
||||
}
|
||||
|
||||
func (self *SHCSOProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SHCSOProviderFactory) IsSupportClouduserPolicy() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (self *SHCSOProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SHCSOProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
-12
@@ -49,18 +49,6 @@ func (self *SHuaweiProviderFactory) GetMaxCloudEventKeepDays() int {
|
||||
return 7
|
||||
}
|
||||
|
||||
func (self *SHuaweiProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SHuaweiProviderFactory) IsSupportClouduserPolicy() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (self *SHuaweiProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (factory *SHuaweiProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
-8
@@ -52,14 +52,6 @@ func (self *SQcloudProviderFactory) GetMaxCloudEventKeepDays() int {
|
||||
return 30
|
||||
}
|
||||
|
||||
func (self *SQcloudProviderFactory) IsSupportCloudIdService() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SQcloudProviderFactory) IsSupportCreateCloudgroup() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (self *SQcloudProviderFactory) IsSupportSAMLAuth() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user