mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
Merge pull request #10375 from ioito/automated-cherry-pick-of-#10374-upstream-release-3.7
Automated cherry pick of #10374: fix: aliyun public ip bandwidth
This commit is contained in:
@@ -577,10 +577,12 @@ func (self *SRegion) CreateInstance(name string, imageId string, instanceType st
|
||||
params["InternetChargeType"] = "PayByTraffic"
|
||||
params["InternetMaxBandwidthIn"] = "200"
|
||||
params["InternetMaxBandwidthOut"] = "100"
|
||||
if publicIp.PublicIpBw > 0 && publicIp.PublicIpChargeType == cloudprovider.ElasticipChargeTypeByBandwidth {
|
||||
params["InternetChargeType"] = "PayByBandwidth"
|
||||
if publicIp.PublicIpBw > 0 {
|
||||
params["InternetMaxBandwidthOut"] = fmt.Sprintf("%d", publicIp.PublicIpBw)
|
||||
}
|
||||
if publicIp.PublicIpChargeType == cloudprovider.ElasticipChargeTypeByBandwidth {
|
||||
params["InternetChargeType"] = "PayByBandwidth"
|
||||
}
|
||||
params["HostName"] = stringutils2.GenerateHostName(name, osType)
|
||||
if len(passwd) > 0 {
|
||||
params["Password"] = passwd
|
||||
|
||||
Reference in New Issue
Block a user