mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
elastic cache auth_mode status & password reset bugfix
This commit is contained in:
@@ -401,6 +401,10 @@ func (self *SRegion) syncSecgroupRules(secgroupId string, rules []secrules.Secur
|
||||
|
||||
for _, r := range DeleteRules {
|
||||
if err := self.delSecurityGroupRule(secgroupId, &r); err != nil {
|
||||
if strings.Contains(err.Error(), "InvalidPermission.NotFound") {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Errorf("delSecurityGroupRule %v error: %s", r, err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func (self *SElasticcacheAccount) ResetPassword(input cloudprovider.SCloudElasti
|
||||
params := jsonutils.NewDict()
|
||||
params.Set("old_password", jsonutils.NewString(*input.OldPassword))
|
||||
params.Set("new_password", jsonutils.NewString(input.NewPassword))
|
||||
err := DoUpdateWithSpec(self.cacheDB.region.ecsClient.Elasticcache.UpdateInContextWithSpec, self.GetId(), "password", params)
|
||||
err := DoUpdateWithSpec(self.cacheDB.region.ecsClient.Elasticcache.UpdateInContextWithSpec, self.cacheDB.GetId(), "password", params)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "elasticcacheAccount.ResetPassword")
|
||||
}
|
||||
|
||||
@@ -681,9 +681,9 @@ func (self *SElasticcache) UpdateAuthMode(noPwdAccess bool) error {
|
||||
func (self *SElasticcache) GetAuthMode() string {
|
||||
switch self.NoPasswordAccess {
|
||||
case "true":
|
||||
return "on"
|
||||
default:
|
||||
return "off"
|
||||
default:
|
||||
return "on"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ const (
|
||||
DIGITS = "23456789"
|
||||
LETTERS = "abcdefghjkmnpqrstuvwxyz"
|
||||
UPPERS = "ABCDEFGHJKMNPRSTUVWXYZ"
|
||||
PUNC = "@%^-+="
|
||||
PUNC = "@^-+="
|
||||
|
||||
ALL_DIGITS = "0123456789"
|
||||
ALL_LETTERS = "abcdefghijklmnopqrstuvwxyz"
|
||||
|
||||
Reference in New Issue
Block a user