mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #8468 from ioito/hotfix/qx-rds-fix
fix: qcloud 5.5 single zone
This commit is contained in:
@@ -273,6 +273,15 @@ func (man *SDBInstanceManager) QueryDistinctExtraField(q *sqlchemy.SQuery, field
|
||||
return q, httperrors.ErrNotFound
|
||||
}
|
||||
|
||||
func (manager *SDBInstanceManager) BatchCreateValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) {
|
||||
input := api.DBInstanceCreateInput{}
|
||||
err := data.Unmarshal(&input)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "data.Unmarshal")
|
||||
}
|
||||
return manager.ValidateCreateData(ctx, userCred, ownerId, query, input)
|
||||
}
|
||||
|
||||
func (man *SDBInstanceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.DBInstanceCreateInput) (*jsonutils.JSONDict, error) {
|
||||
data := input.JSON(input)
|
||||
networkV := validators.NewModelIdOrNameValidator("network", "network", ownerId)
|
||||
|
||||
@@ -758,6 +758,9 @@ func (self *SRegion) CreateMySQLDBInstance(opts *cloudprovider.SManagedDBInstanc
|
||||
params["BackupZone"] = opts.Zone3
|
||||
}
|
||||
}
|
||||
if opts.EngineVersion == "5.5" { // 5.5 不支持多可用区部署
|
||||
params["DeployMode"] = "0"
|
||||
}
|
||||
params["ClientToken"] = utils.GenRequestId(20)
|
||||
resp, err := self.cdbRequest(action, params)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user