ctyun eip charge type fix

This commit is contained in:
TangBin
2020-02-26 16:31:29 +08:00
parent 5c3ba45f4d
commit 5140a0f7a6
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -366,7 +366,9 @@ func (self *SElasticip) SyncWithCloudEip(ctx context.Context, userCred mcclient.
self.ExternalId = ext.GetGlobalId()
self.IsEmulated = ext.IsEmulated()
self.ChargeType = ext.GetInternetChargeType()
if chargeType := ext.GetInternetChargeType(); len(chargeType) > 0 {
self.ChargeType = chargeType
}
factory, _ := provider.GetProviderFactory()
if factory != nil && factory.IsSupportPrepaidResources() {
+1 -1
View File
@@ -188,7 +188,7 @@ func (self *SEip) GetBandwidth() int {
func (self *SEip) GetInternetChargeType() string {
// todo: fix me
return api.EIP_CHARGE_TYPE_BY_BANDWIDTH
return ""
}
func (self *SEip) Delete() error {