+ ipv4Prefix, outgoingInterfaceName, vrfId, hostName);
+ }
+ }
+
+ private void addStaticRouteToPublicInterface(String hostName, long vrfId) {
+ Ipv4Address physicalInterfaceIp = hostRelatedInfoContainer
+ .getPhysicalInterfaceState(hostName)
+ .getIp(PhysicalInterfaces.PhysicalInterfaceType.PUBLIC).getIpv4Address();
+ String physicalInterfaceName = hostRelatedInfoContainer
+ .getPhysicalInterfaceState(hostName)
+ .getName(PhysicalInterfaces.PhysicalInterfaceType.PUBLIC);
+ if (physicalInterfaceName != null && !physicalInterfaceName.isEmpty()) {
+ if (!staticRoutingHelper.addSingleStaticRouteInRoutingProtocol(hostName, vrfId,
+ Constants.PUBLIC_SUBNET_UUID, physicalInterfaceIp,
+ IpAddressUtil.toIpV4Prefix(physicalInterfaceIp), physicalInterfaceName)) {
+ LOG.warn("Failed to add route for physical interface in vrf {} compute host {}", vrfId, hostName);
+ } else {
+ LOG.debug("Added route for physical interface {} in vrf {}", physicalInterfaceName, vrfId);
+ }