private static final short FIB_TABLE = 21;
private static final short DEFAULT_FLOW_PRIORITY = 10;
private static final String NEXTHOP_ID_POOL_NAME = "nextHopPointerPool";
+ private static final long FIXED_DELAY_IN_MILLISECONDS = 4000;
private static final FutureCallback<Void> DEFAULT_CALLBACK =
new FutureCallback<Void>() {
addVpnNexthopToDS(dpnId, vpnId, ipAddress, groupId);
// install Group
- // FIXME: mdsalManager.syncInstallGroup(groupEntity);
- mdsalManager.installGroup(groupEntity);
+ mdsalManager.syncInstallGroup(groupEntity, FIXED_DELAY_IN_MILLISECONDS);
} else {
//nexthop exists already; a new flow is going to point to it, increment the flowrefCount by 1
localDpnId, remoteDpnId, vpnId, prefixIp, nextHopIp);
LOG.trace("getRemoteNextHopPointer: Calling ITM with localDpnId {} ", localDpnId);
- try{
- // here use the config for tunnel type param
- tunnelIfName = getTunnelInterfaceName(remoteDpnId, IpAddressBuilder.getDefaultInstance(nextHopIp));
- }catch(Exception ex){
- LOG.error("Error while retrieving nexthop pointer for DC Gateway : ", ex.getMessage());
+ if (nextHopIp != null && !nextHopIp.isEmpty()) {
+ try{
+ // here use the config for tunnel type param
+ tunnelIfName = getTunnelInterfaceName(remoteDpnId, IpAddressBuilder.getDefaultInstance(nextHopIp));
+ }catch(Exception ex){
+ LOG.error("Error while retrieving nexthop pointer for nexthop {} : ", nextHopIp, ex.getMessage());
+ }
}
return tunnelIfName;
}
GroupEntity groupEntity = MDSALUtil.buildGroupEntity(
dpnId, nh.getEgressPointer(), ipAddress, GroupTypes.GroupIndirect, null);
// remove Group ...
- // FIXME: mdsalManager.syncRemoveGroup(groupEntity);
mdsalManager.removeGroup(groupEntity);
//update MD-SAL DS
removeVpnNexthopFromDS(vpnId, ipAddress);
.child(VpnInterface.class, new VpnInterfaceKey(vpnInterfaceName)).augmentation(
Adjacencies.class).child(Adjacency.class, new AdjacencyKey(ipAddress)).build();
}
+
+ InstanceIdentifier<Adjacencies> getAdjListPath(String vpnInterfaceName) {
+ return InstanceIdentifier.builder(VpnInterfaces.class)
+ .child(VpnInterface.class, new VpnInterfaceKey(vpnInterfaceName)).augmentation(
+ Adjacencies.class).build();
+ }
}