mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-24 23:41:52 +08:00
fix(region): delete aliyun account bugfix
This commit is contained in:
@@ -2289,7 +2289,7 @@ func (self *SManagedVirtualizationRegionDriver) RequestElasticcacheUpdateBackupP
|
||||
}
|
||||
|
||||
func (self *SManagedVirtualizationRegionDriver) ValidateCreateElasticcacheAccountData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) {
|
||||
if name, _ := data.GetString("name");name == "root" {
|
||||
if name, _ := data.GetString("name"); name == "root" {
|
||||
return nil, httperrors.NewConflictError("account name 'root' is not allowed")
|
||||
}
|
||||
|
||||
|
||||
@@ -882,7 +882,8 @@ func (self *SElasticcache) GetSecurityGroupIds() ([]string, error) {
|
||||
func (self *SElasticcache) GetICloudElasticcacheAccount(accountId string) (cloudprovider.ICloudElasticcacheAccount, error) {
|
||||
segs := strings.Split(accountId, "/")
|
||||
if len(segs) < 2 {
|
||||
return nil, errors.Wrap(fmt.Errorf("%s", accountId), "elasticcache.GetICloudElasticcacheAccount invalid account id ")
|
||||
log.Debugf("elasticcache.GetICloudElasticcacheAccount invalid account id %s", accountId)
|
||||
return nil, errors.Wrap(cloudprovider.ErrNotFound, "invalid account id")
|
||||
}
|
||||
|
||||
return self.GetICloudElasticcacheAccountByName(segs[1])
|
||||
|
||||
Reference in New Issue
Block a user