mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-22 06:40:54 +08:00
Merge pull request #3837 from tb365/bugfix/tb-bugfix-112101
redis prepaid instance create bugfix
This commit is contained in:
@@ -626,7 +626,7 @@ func (self *SRegion) CreateIElasticcaches(ec *cloudprovider.SCloudElasticCacheIn
|
||||
params["VpcId"] = ec.VpcId
|
||||
params["VSwitchId"] = ec.NetworkId
|
||||
params["ChargeType"] = ec.ChargeType
|
||||
if ec.ChargeType == billing.BILLING_TYPE_PREPAID && ec.BC != nil {
|
||||
if strings.ToLower(ec.ChargeType) == billing.BILLING_TYPE_PREPAID && ec.BC != nil {
|
||||
if ec.BC.GetMonths() >= 1 && ec.BC.GetMonths() <= 9 {
|
||||
params["Period"] = strconv.Itoa(ec.BC.GetMonths())
|
||||
} else if ec.BC.GetMonths() == 12 || ec.BC.GetMonths() == 24 || ec.BC.GetMonths() == 36 {
|
||||
|
||||
@@ -468,7 +468,7 @@ func (self *SRegion) CreateIElasticcaches(ec *cloudprovider.SCloudElasticCacheIn
|
||||
params.Set("maintain_end", jsonutils.NewString(ec.MaintainEnd))
|
||||
}
|
||||
|
||||
if ec.ChargeType == billing_api.BILLING_TYPE_PREPAID && ec.BC != nil {
|
||||
if strings.ToLower(ec.ChargeType) == billing_api.BILLING_TYPE_PREPAID && ec.BC != nil {
|
||||
bssParam := jsonutils.NewDict()
|
||||
bssParam.Set("charging_mode", jsonutils.NewString("prePaid"))
|
||||
bssParam.Set("is_auto_pay", jsonutils.NewString("true"))
|
||||
|
||||
Reference in New Issue
Block a user