mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): vender update
This commit is contained in:
@@ -84,7 +84,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.20221216034754-bf0918b649ac
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20221219062801-7d65989751c3
|
||||
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656
|
||||
yunion.io/x/jsonutils v1.0.1-0.20220819091305-3bab322ab4fd
|
||||
yunion.io/x/log v1.0.0
|
||||
|
||||
@@ -1176,8 +1176,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.20221216034754-bf0918b649ac h1:RlNoXjmep9eB5tr/JAnO7K29nQHkIhh4EaCGAAInC2I=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20221216034754-bf0918b649ac/go.mod h1:drc/WDD65r6wI1tSejk19xcl9QwmzZlgJGXN7a9o2KQ=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20221219062801-7d65989751c3 h1:cZ+qHIlkzHsRtoXL3DZsLEjyE09+sAGPfPH+gQwOvHA=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20221219062801-7d65989751c3/go.mod h1:drc/WDD65r6wI1tSejk19xcl9QwmzZlgJGXN7a9o2KQ=
|
||||
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656 h1:0zlZD5uhZoIHgLVAWCz2aHaYk2ZrNsACCYD7R6EIBII=
|
||||
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
|
||||
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
|
||||
|
||||
Vendored
+1
-1
@@ -1439,7 +1439,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.20221216034754-bf0918b649ac
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20221219062801-7d65989751c3
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
|
||||
-1
@@ -653,7 +653,6 @@ func (self *SRegion) CreateIElasticcaches(ec *cloudprovider.SCloudElasticCacheIn
|
||||
params["ResourceGroupId"] = ec.ProjectId
|
||||
}
|
||||
|
||||
params["NetworkType"] = ec.NetworkType
|
||||
params["VpcId"] = ec.VpcId
|
||||
params["VSwitchId"] = ec.NetworkId
|
||||
params["ChargeType"] = "PostPaid"
|
||||
|
||||
+12
-6
@@ -94,6 +94,7 @@ type SHuaweiClient struct {
|
||||
|
||||
isMainProject bool // whether the project is the main project in the region
|
||||
|
||||
userId string
|
||||
ownerId string
|
||||
ownerName string
|
||||
ownerCreateTime time.Time
|
||||
@@ -496,6 +497,9 @@ func (self *SHuaweiClient) GetCapabilities() []string {
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) GetUserId() (string, error) {
|
||||
if len(self.userId) > 0 {
|
||||
return self.userId, nil
|
||||
}
|
||||
client, err := self.newGeneralAPIClient()
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "SHuaweiClient.GetUserId.newGeneralAPIClient")
|
||||
@@ -510,12 +514,15 @@ func (self *SHuaweiClient) GetUserId() (string, error) {
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "SHuaweiClient.GetUserId.DoGet")
|
||||
}
|
||||
|
||||
return ret.UserId, nil
|
||||
self.userId = ret.UserId
|
||||
return self.userId, nil
|
||||
}
|
||||
|
||||
// owner id == domain_id == account id
|
||||
func (self *SHuaweiClient) GetOwnerId() (string, error) {
|
||||
if len(self.ownerId) > 0 {
|
||||
return self.ownerId, nil
|
||||
}
|
||||
userId, err := self.GetUserId()
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "SHuaweiClient.GetOwnerId.GetUserId")
|
||||
@@ -540,7 +547,8 @@ func (self *SHuaweiClient) GetOwnerId() (string, error) {
|
||||
self.ownerName = ret.Name
|
||||
// 2021-02-02 02:43:28.0
|
||||
self.ownerCreateTime, _ = timeutils.ParseTimeStr(strings.TrimSuffix(ret.CreateTime, ".0"))
|
||||
return ret.DomainId, nil
|
||||
self.ownerId = ret.DomainId
|
||||
return self.ownerId, nil
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) GetSamlEntityId() string {
|
||||
@@ -548,11 +556,9 @@ func (self *SHuaweiClient) GetSamlEntityId() string {
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) initOwner() error {
|
||||
ownerId, err := self.GetOwnerId()
|
||||
_, err := self.GetOwnerId()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "SHuaweiClient.initOwner")
|
||||
}
|
||||
|
||||
self.ownerId = ownerId
|
||||
return nil
|
||||
}
|
||||
|
||||
+12
-6
@@ -109,6 +109,7 @@ type SHuaweiClient struct {
|
||||
isMainProject bool // whether the project is the main project in the region
|
||||
clientRegion string
|
||||
|
||||
userId string
|
||||
ownerId string
|
||||
ownerName string
|
||||
ownerCreateTime time.Time
|
||||
@@ -787,6 +788,9 @@ func (self *SHuaweiClient) GetCapabilities() []string {
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) GetUserId() (string, error) {
|
||||
if len(self.userId) > 0 {
|
||||
return self.userId, nil
|
||||
}
|
||||
client, err := self.newGeneralAPIClient()
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "SHuaweiClient.GetUserId.newGeneralAPIClient")
|
||||
@@ -801,12 +805,15 @@ func (self *SHuaweiClient) GetUserId() (string, error) {
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "SHuaweiClient.GetUserId.DoGet")
|
||||
}
|
||||
|
||||
return ret.UserId, nil
|
||||
self.userId = ret.UserId
|
||||
return self.userId, nil
|
||||
}
|
||||
|
||||
// owner id == domain_id == account id
|
||||
func (self *SHuaweiClient) GetOwnerId() (string, error) {
|
||||
if len(self.ownerId) > 0 {
|
||||
return self.ownerId, nil
|
||||
}
|
||||
userId, err := self.GetUserId()
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "SHuaweiClient.GetOwnerId.GetUserId")
|
||||
@@ -831,16 +838,15 @@ func (self *SHuaweiClient) GetOwnerId() (string, error) {
|
||||
self.ownerName = ret.Name
|
||||
// 2021-02-02 02:43:28.0
|
||||
self.ownerCreateTime, _ = timeutils.ParseTimeStr(strings.TrimSuffix(ret.CreateTime, ".0"))
|
||||
return ret.DomainId, nil
|
||||
self.ownerId = ret.DomainId
|
||||
return self.ownerId, nil
|
||||
}
|
||||
|
||||
func (self *SHuaweiClient) initOwner() error {
|
||||
ownerId, err := self.GetOwnerId()
|
||||
_, err := self.GetOwnerId()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "SHuaweiClient.initOwner")
|
||||
}
|
||||
|
||||
self.ownerId = ownerId
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user