*/
package org.opendaylight.vpnservice;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.L3tunnel;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.Tunnel;
import java.math.BigInteger;
import java.util.Collection;
LOG.trace("NextHops are {}", nextHops);
for (Adjacency nextHop : nextHops) {
- String key = nextHop.getIpAddress();
+ String key = rd + VpnConstants.SEPARATOR + nextHop.getIpAddress();
long label = getUniqueId(key);
value.add(new AdjacencyBuilder(nextHop).setLabel(label).build());
}
InstanceIdentifier<VpnInterface> interfaceId = VpnUtil.getVpnInterfaceIdentifier(intfName);
syncWrite(LogicalDatastoreType.OPERATIONAL, interfaceId, opInterface, DEFAULT_CALLBACK);
for (Adjacency nextHop : nextHops) {
- String key = nextHop.getIpAddress();
+ String key = rd + VpnConstants.SEPARATOR + nextHop.getIpAddress();
long label = getUniqueId(key);
updatePrefixToBGP(rd, nextHop, nextHopIp, label);
}
int priority = VpnConstants.DEFAULT_FLOW_PRIORITY;
short gotoTableId = VpnConstants.FIB_TABLE;
- if(intf.getType().equals(L3tunnel.class)){
+ if(intf.getType().equals(Tunnel.class)){
gotoTableId = VpnConstants.LFIB_TABLE;
}
label = nextHop.getLabel();
if(label == VpnConstants.INVALID_ID) {
//Generate label using ID Manager
- label = getUniqueId(nextHop.getIpAddress());
+ String key = newRd + VpnConstants.SEPARATOR + nextHop.getIpAddress();
+ label = getUniqueId(key);
}
removePrefixFromBGP(rd, nextHop);
//updatePrefixToBGP(newRd, nextHop, nextHopIp, label);
}
- private void makeTunnelIngressFlow(BigInteger dpnId, String ifName, int addOrRemoveFlow) {
+ protected void makeTunnelIngressFlow(BigInteger dpnId, String ifName, int addOrRemoveFlow) {
long portNo = 0;
String flowName = ifName;
String flowRef = getTunnelInterfaceFlowRef(dpnId, VpnConstants.LPORT_INGRESS_TABLE, ifName);
LOG.trace("Operation Interface update event - Old: {}, New: {}", original, update);
String interfaceName = update.getName();
Interface intf = getInterface(interfaceName);
- if (intf != null && intf.getType().equals(L3tunnel.class)) {
+ if (intf != null && intf.getType().equals(Tunnel.class)) {
BigInteger dpnId = interfaceManager.getDpnForInterface(interfaceName);
if(update.getOperStatus().equals(OperStatus.Up)) {
//Create ingress to LFIB
LOG.trace("Operational Interface add event - {}", add);
String interfaceName = add.getName();
Interface intf = getInterface(interfaceName);
- if (intf != null && intf.getType().equals(L3tunnel.class)) {
+ if (intf != null && intf.getType().equals(Tunnel.class)) {
BigInteger dpnId = interfaceManager.getDpnForInterface(interfaceName);
if(add.getOperStatus().equals(OperStatus.Up)) {
//Create ingress to LFIB