避免腾讯云eip长度超过限制

This commit is contained in:
屈轩
2019-03-15 14:32:16 +08:00
parent ffb25c7121
commit d63c000b78
+3
View File
@@ -249,6 +249,9 @@ func (region *SRegion) AllocateEIP(name string, bwMbps int, chargeType TInternet
if err != nil {
return nil, err
}
if len(name) > 20 {
name = name[:20]
}
if len(addRessSet) > 0 {
params["AddressId"] = addRessSet[0]
params["AddressName"] = name