/*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
+ * Copyright © 2016, 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
*/
Iterator<String> interfacelistIter = srcDpninterfacelist.iterator();
String intfName = null;
- List<Uuid> subnetList = new ArrayList<Uuid>();
- Map<Long, String> vpnIdRdMap = new HashMap<Long, String>();
+ List<Uuid> subnetList = new ArrayList<>();
+ Map<Long, String> vpnIdRdMap = new HashMap<>();
while (interfacelistIter.hasNext()) {
intfName = interfacelistIter.next();
subnetList.add(subnetId);
}
}
-
//Populate the map for VpnId-to-Rd
long vpnId = VpnUtil.getVpnId(dataBroker, vpnInterface.getVpnInstanceName());
rd = VpnUtil.getVpnRd(dataBroker, vpnInterface.getVpnInstanceName());
vpnInterface);
for (Adjacency adj : adjList) {
prefix = adj.getIpAddress();
+ long label = adj.getLabel();
if ((tunnelAction == TunnelAction.TUNNEL_EP_ADD)
&& (tunTypeVal == VpnConstants.ITMTunnelLocType.Internal.getValue())) {
- fibManager.manageRemoteRouteOnDPN(true, srcDpnId, vpnId, rd, prefix, destTepIp);
+ fibManager.manageRemoteRouteOnDPN(true, srcDpnId, vpnId, rd, prefix, destTepIp, label);
}
if ((tunnelAction == TunnelAction.TUNNEL_EP_DELETE)
&& (tunTypeVal == VpnConstants.ITMTunnelLocType.Internal.getValue())) {
- fibManager.manageRemoteRouteOnDPN(false, srcDpnId, vpnId, rd, prefix, destTepIp);
+ fibManager.manageRemoteRouteOnDPN(false, srcDpnId, vpnId, rd, prefix, destTepIp, label);
}
}
}
}
//Iterate over the VpnId-to-Rd map.
- Iterator<Map.Entry<Long, String>> entries = vpnIdRdMap.entrySet().iterator();
- while (entries.hasNext()) {
- Map.Entry<Long, String> entry = entries.next();
+ for (Map.Entry<Long, String> entry : vpnIdRdMap.entrySet()) {
Long vpnId = entry.getKey();
rd = entry.getValue();
if ((tunnelAction == TunnelAction.TUNNEL_EP_ADD)