String.format("%s %s", ItmUtils.convertTunnelTypetoString(dpnTepInfo.getTunnelType()),
"Trunk Interface"), true, dpnTepInfo.getTunnelType(),
srcDpnTEPsInfo.get(0).getTunnelEndPoints().get(0).getIpAddress(),
- dstDpnTEPsInfo.get(0).getTunnelEndPoints().get(0).getIpAddress(),
+ dstDpnTEPsInfo.get(0).getTunnelEndPoints().get(0).getIpAddress(),true,
dpnTepInfo.isMonitoringEnabled(), TunnelMonitoringTypeBfd.class,
monitoringInt, true, null);
}
interfaceName, firstEndPt.getIpAddress(), extIp, gwyIpAddress);
Interface iface = ItmUtils.buildTunnelInterface(teps.getDPNID(), trunkInterfaceName,
String.format("%s %s", ItmUtils.convertTunnelTypetoString(tunType), "Trunk Interface"),
- true, tunType, firstEndPt.getIpAddress(), extIp, false,
+ true, tunType, firstEndPt.getIpAddress(), extIp, false, false,
ITMConstants.DEFAULT_MONITOR_PROTOCOL, null, useOfTunnel, tunOptions);
LOG.debug(" Trunk Interface builder - {} ", iface);
dstIp, gwyIpAddress);
Interface extTunnelIf = ItmUtils.buildTunnelInterface(dpnId, tunnelIfName,
String.format("%s %s", tunType.getName(), "Trunk Interface"), true, tunType, srcIp, dstIp,
- monitorEnabled, monitorProtocol, monitorInterval, remoteIpFlow, null);
+ false, monitorEnabled, monitorProtocol, monitorInterval, remoteIpFlow, null);
InstanceIdentifier<Interface> ifIID = InstanceIdentifier.builder(Interfaces.class).child(Interface.class,
new InterfaceKey(tunnelIfName)).build();
LOG.trace(" Writing Trunk Interface to Config DS {}, {} ", ifIID, extTunnelIf);
Boolean isMonitorEnabled = !tunType.isAssignableFrom(TunnelTypeLogicalGroup.class) && isTunnelMonitoringEnabled;
Interface iface = ItmUtils.buildTunnelInterface(srcDpnId, trunkInterfaceName,
String.format("%s %s",ItmUtils.convertTunnelTypetoString(tunType), "Trunk Interface"),
- true, tunType, srcte.getIpAddress(), dstte.getIpAddress(),
+ true, tunType, srcte.getIpAddress(), dstte.getIpAddress(), true,
isMonitorEnabled, monitorProtocol, monitorInterval, useOfTunnel, parentInterfaceName, tunOptions);
LOG.debug(" Trunk Interface builder - {} ", iface);
InstanceIdentifier<Interface> trunkIdentifier = ItmUtils.buildId(trunkInterfaceName);
Boolean isMonitorEnabled = !tunType.isAssignableFrom(TunnelTypeLogicalGroup.class) && isTunnelMonitoringEnabled;
Interface iface = ItmUtils.buildTunnelInterface(srcDpnId, trunkInterfaceName,
String.format("%s %s",ItmUtils.convertTunnelTypetoString(srcte.getTunnelType()), "Trunk Interface"),
- true, tunType, srcte.getIpAddress(), dstte.getIpAddress(),
+ true, tunType, srcte.getIpAddress(), dstte.getIpAddress(), true,
isMonitorEnabled, monitorProtocol, monitorInterval, useOfTunnel, parentInterfaceName, tunOptions);
LOG.debug("Trunk Interface builder - {} ", iface);
public static Interface buildTunnelInterface(BigInteger dpn, String ifName, String desc, boolean enabled,
Class<? extends TunnelTypeBase> tunType, IpAddress localIp,
- IpAddress remoteIp,
+ IpAddress remoteIp, boolean internal,
Boolean monitorEnabled,
Class<? extends TunnelMonitoringTypeBase> monitorProtocol,
Integer monitorInterval, boolean useOfTunnel,
List<TunnelOptions> tunOptions) {
- return buildTunnelInterface(dpn, ifName, desc, enabled, tunType, localIp, remoteIp,
+ return buildTunnelInterface(dpn, ifName, desc, enabled, tunType, localIp, remoteIp, internal,
monitorEnabled, monitorProtocol, monitorInterval, useOfTunnel, null,
tunOptions);
}
public static Interface buildTunnelInterface(BigInteger dpn, String ifName, String desc, boolean enabled,
Class<? extends TunnelTypeBase> tunType, IpAddress localIp,
- IpAddress remoteIp,
+ IpAddress remoteIp, boolean internal,
Boolean monitorEnabled,
Class<? extends TunnelMonitoringTypeBase> monitorProtocol,
Integer monitorInterval, boolean useOfTunnel, String parentIfaceName,
.setTunnelSource(localIp).setTunnelInterfaceType(tunType)
.setMonitorEnabled(monitorEnabled).setMonitorProtocol(monitorProtocol)
.setMonitorInterval(monitoringInterval).setTunnelRemoteIpFlow(useOfTunnel)
- .setTunnelOptions(tunnelOptions)
+ .setTunnelOptions(tunnelOptions).setInternal(internal)
.build();
builder.addAugmentation(IfTunnel.class, tunnel);
return builder.build();
.PhysAddress.getDefaultInstance("AA:AA:AA:AA:AA:AA"))
.setIfIndex(100).setLowerLayerIf(lowerLayerIfList).setType(L2vlan.class).build();
interfaceTestNew = ItmUtils.buildTunnelInterface(dpId1, tunnelInterfaceName, destinationDevice, enabled,
- TunnelTypeVxlan.class, ipAddress1, ipAddress2, enabled,monitorProtocol,
+ TunnelTypeVxlan.class, ipAddress1, ipAddress2, true, enabled,monitorProtocol,
interval, false, null);
doReturn(mockReadTx).when(dataBroker).newReadOnlyTransaction();
doReturn(mockWriteTx).when(dataBroker).newWriteOnlyTransaction();
dpId1.toString(), tunnelType1));
iface = ItmUtils.buildTunnelInterface(dpId1,trunkInterfaceName, String.format("%s %s",
ItmUtils.convertTunnelTypetoString(tunnelType1), "Trunk Interface"), true, tunnelType1, ipAddress3,
- ipAddress2, false, monitorProtocol, null, false,
+ ipAddress2, false, false, monitorProtocol, null, false,
null);
externalTunnel = ItmUtils.buildExternalTunnel(dpId1.toString(), ipAddress2.stringValue(),
tunnelType1, trunkInterfaceName);
final Interface extTunnelIf1 = ItmUtils.buildTunnelInterface(dpId1, "tun030025bd04f",
String.format("%s %s", tunnelType1.getName(), "Trunk Interface"), true, tunnelType1,
- tunnelEndPointsVxlan.getIpAddress(), ipAddress1,
+ tunnelEndPointsVxlan.getIpAddress(), ipAddress1, false,
false, monitorProtocol, ITMConstants.BFD_DEFAULT_MONITOR_INTERVAL, false,
null);
final Interface hwTunnelIf2 = ItmUtils.buildHwTunnelInterface("tun9a55a9c38f2",
ITMConstants.BFD_DEFAULT_MONITOR_INTERVAL);
final Interface extTunnelIf3 = ItmUtils.buildTunnelInterface(dpId1, "tun17c6e20c283",
String.format("%s %s", tunnelType1.getName(), "Trunk Interface"), true, tunnelType1,
- tunnelEndPointsVxlan.getIpAddress(), ipAddress2, false, monitorProtocol,
+ tunnelEndPointsVxlan.getIpAddress(), ipAddress2, false, false, monitorProtocol,
ITMConstants.BFD_DEFAULT_MONITOR_INTERVAL, false, null);
final Interface hwTunnelIf4 = ItmUtils.buildHwTunnelInterface("tunaa109b6c8c5",
String.format("%s %s", tunnelType1.getName(), "Trunk Interface"), true, hwVtep1.getTopoId(),
.setTunnelType(tunnelType1).setDestinationNode(destinationDevice).setSourceNode(sourceDevice).build();
iface = ItmUtils.buildTunnelInterface(dpId1,trunkInterfaceName, String.format("%s %s",
ItmUtils.convertTunnelTypetoString(tunnelType1), "Trunk Interface"),true,tunnelType1,
- tunnelEndPointsVxlan.getIpAddress(),ipAddress1, false,
+ tunnelEndPointsVxlan.getIpAddress(),ipAddress1, false, false,
monitorProtocol,null, false, null);
transportZone = new TransportZoneBuilder().setZoneName(transportZone1)
iface = ItmUtils.buildTunnelInterface(ItmTestConstants.DP_ID_1,trunkInterfaceName, String.format("%s %s",
ItmUtils.convertTunnelTypetoString(ItmTestConstants.TUNNEL_TYPE_VXLAN), "Trunk Interface"),
true,ItmTestConstants.TUNNEL_TYPE_VXLAN,tunnelEndPointsVxlan.getIpAddress(),
- ItmTestConstants.IP_ADDRESS_3,false, ItmTestConstants.MONITOR_PROTOCOL,null, false, null);
+ ItmTestConstants.IP_ADDRESS_3,false,false, ItmTestConstants.MONITOR_PROTOCOL,null, false, null);
transportZone = new TransportZoneBuilder().setZoneName(ItmTestConstants.TZ_NAME)
.setTunnelType(ItmTestConstants.TUNNEL_TYPE_VXLAN)