use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.DPNTEPsInfo in project genius by opendaylight.
the class ItmInternalTunnelAddWorker method updateDpnTepInfoToConfig.
private static void updateDpnTepInfoToConfig(DPNTEPsInfo dpn, WriteTransaction tx) {
LOG.debug("Updating CONFIGURATION datastore with DPN {} ", dpn);
InstanceIdentifier<DpnEndpoints> dep = InstanceIdentifier.builder(DpnEndpoints.class).build();
List<DPNTEPsInfo> dpnList = new ArrayList<>();
dpnList.add(dpn);
DpnEndpoints tnlBuilder = new DpnEndpointsBuilder().setDPNTEPsInfo(dpnList).build();
tx.merge(LogicalDatastoreType.CONFIGURATION, dep, tnlBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.DPNTEPsInfo in project genius by opendaylight.
the class ItmInternalTunnelAddWorker method wireUpWithinTransportZone.
private void wireUpWithinTransportZone(DPNTEPsInfo srcDpn, DPNTEPsInfo dstDpn, IMdsalApiManager mdsalManager, WriteTransaction transaction) {
LOG.trace("Wiring up within Transport Zone for Dpns {}, {} ", srcDpn, dstDpn);
List<TunnelEndPoints> srcEndPts = srcDpn.getTunnelEndPoints();
List<TunnelEndPoints> dstEndPts = dstDpn.getTunnelEndPoints();
for (TunnelEndPoints srcte : srcEndPts) {
for (TunnelEndPoints dstte : dstEndPts) {
// Compare the Transport zones
if (!srcDpn.getDPNID().equals(dstDpn.getDPNID())) {
if (!ItmUtils.getIntersection(srcte.getTzMembership(), dstte.getTzMembership()).isEmpty()) {
// wire them up
wireUpBidirectionalTunnel(srcte, dstte, srcDpn.getDPNID(), dstDpn.getDPNID(), mdsalManager, transaction);
if (!ItmTunnelAggregationHelper.isTunnelAggregationEnabled()) {
// CHECK THIS -- Assumption -- One end point per Dpn per transport zone
break;
}
}
}
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.DPNTEPsInfo in project genius by opendaylight.
the class DPNTEPsInfoCache method getDPNTepListFromDPNId.
public List<DPNTEPsInfo> getDPNTepListFromDPNId(List<BigInteger> dpnIds) {
Collection<DPNTEPsInfo> meshedDpnList = this.getAllPresent();
List<DPNTEPsInfo> cfgDpnList = new ArrayList<>();
for (BigInteger dpnId : dpnIds) {
for (DPNTEPsInfo teps : meshedDpnList) {
if (dpnId.equals(teps.getDPNID())) {
cfgDpnList.add(teps);
}
}
}
return cfgDpnList;
}
Aggregations