feat(apis): add const VPC_OVN_ENCAP_COST

This commit is contained in:
Yousong Zhou
2020-12-17 21:36:58 +08:00
parent 172d84d46f
commit e255cbf222
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -18,6 +18,8 @@ import (
"yunion.io/x/pkg/util/netutils"
)
const VPC_OVN_ENCAP_COST = 58
const (
VPC_EXTERNAL_ACCESS_MODE_DISTGW = "distgw" // distgw only
VPC_EXTERNAL_ACCESS_MODE_EIP_DISTGW = "eip-distgw" // eip when available, distgw otherwise
+1 -1
View File
@@ -296,7 +296,7 @@ func (keeper *OVNNorthboundKeeper) ClaimNetwork(ctx context.Context, network *ag
mdIp, "0.0.0.0",
"0.0.0.0/0", network.GuestGateway,
}
mtu -= 58
mtu -= apis.VPC_OVN_ENCAP_COST
const (
leaseTime = 86400 * 365 * 3
renewTime = 86400