mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): remove ctyun useless env paramenter (#18292)
This commit is contained in:
@@ -83,7 +83,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.20231012084845-993de02e8d38
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012092902-f5b98c301971
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
|
||||
yunion.io/x/jsonutils v1.0.1-0.20230613121553-0f3b41e2ef19
|
||||
yunion.io/x/log v1.0.1-0.20230411060016-feb3f46ab361
|
||||
|
||||
@@ -1174,8 +1174,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.20231012084845-993de02e8d38 h1:Amc4EnJqEXx5M3/WoYUHIKmD+MJzqaEEF5SosSCJztg=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012084845-993de02e8d38/go.mod h1:2sgCN7nRPQL3woLfdgqLDd92vwAHqtlz3KKiHxC5BAw=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012092902-f5b98c301971 h1:QmALtZI/hajZWEoxWcy8Fzu7JY/DULHV6bl09dYrQE4=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012092902-f5b98c301971/go.mod h1:2sgCN7nRPQL3woLfdgqLDd92vwAHqtlz3KKiHxC5BAw=
|
||||
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=
|
||||
|
||||
Vendored
+1
-1
@@ -1432,7 +1432,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.20231012084845-993de02e8d38
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012092902-f5b98c301971
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
|
||||
+2
-7
@@ -49,12 +49,8 @@ func (self *SCtyunProviderFactory) ValidateCreateCloudaccountData(ctx context.Co
|
||||
if len(input.AccessKeySecret) == 0 {
|
||||
return output, errors.Wrap(cloudprovider.ErrMissingParameter, "access_key_secret")
|
||||
}
|
||||
if len(input.Environment) == 0 {
|
||||
return output, errors.Wrap(cloudprovider.ErrMissingParameter, "environment")
|
||||
}
|
||||
output.Account = input.AccessKeyId
|
||||
output.Secret = input.AccessKeySecret
|
||||
output.AccessUrl = input.Environment
|
||||
return output, nil
|
||||
}
|
||||
|
||||
@@ -90,7 +86,6 @@ func (self *SCtyunProviderFactory) GetProvider(cfg cloudprovider.ProviderConfig)
|
||||
|
||||
func (self *SCtyunProviderFactory) GetClientRC(info cloudprovider.SProviderInfo) (map[string]string, error) {
|
||||
ret := map[string]string{
|
||||
"CTYUN_ACCESS_URL": info.Url,
|
||||
"CTYUN_ACCESS_KEY": info.Account,
|
||||
"CTYUN_SECRET": info.Secret,
|
||||
"CTYUN_REGION": "cn-beijing-5",
|
||||
@@ -139,8 +134,8 @@ func (self *SCtyunProvider) GetBalance() (*cloudprovider.SBalanceInfo, error) {
|
||||
return &cloudprovider.SBalanceInfo{
|
||||
Amount: 0.0,
|
||||
Currency: "CNY",
|
||||
Status: api.CLOUD_PROVIDER_HEALTH_UNKNOWN,
|
||||
}, cloudprovider.ErrNotSupported
|
||||
Status: api.CLOUD_PROVIDER_HEALTH_NORMAL,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (self *SCtyunProvider) GetIProjects() ([]cloudprovider.ICloudProject, error) {
|
||||
|
||||
Reference in New Issue
Block a user