mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #10374 from ioito/hotfix/qx-aliyun-public-bandwidth
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