use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.DcGatewayIpList in project genius by opendaylight.
the class ItmTepAddWorker method call.
@Override
public List<ListenableFuture<Void>> call() {
List<ListenableFuture<Void>> futures = new ArrayList<>();
this.meshedDpnList = ItmUtils.getDpnTEPsInfos(dataBroker);
LOG.debug("Invoking Internal Tunnel build method with Configured DpnList {} ; Meshed DpnList {} ", cfgdDpnList, meshedDpnList);
futures.addAll(itmInternalTunnelAddWorker.buildAllTunnels(mdsalManager, cfgdDpnList, meshedDpnList));
// IF EXTERNAL TUNNELS NEEDS TO BE BUILT, DO IT HERE. IT COULD BE TO DC GATEWAY OR TOR SWITCH
List<DcGatewayIp> dcGatewayIpList = ItmUtils.getDcGatewayIpList(dataBroker);
if (dcGatewayIpList != null && !dcGatewayIpList.isEmpty()) {
for (DcGatewayIp dcGatewayIp : dcGatewayIpList) {
futures.addAll(externalTunnelAddWorker.buildTunnelsToExternalEndPoint(cfgdDpnList, dcGatewayIp.getIpAddress(), dcGatewayIp.getTunnnelType()));
}
}
// futures.addAll(ItmExternalTunnelAddWorker.buildTunnelsToExternalEndPoint(dataBroker,meshedDpnList, extIp) ;
LOG.debug("invoking build hwVtepTunnels with hwVteplist {}", cfgdHwVteps);
futures.addAll(externalTunnelAddWorker.buildHwVtepsTunnels(cfgdDpnList, cfgdHwVteps));
return futures;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.DcGatewayIpList in project genius by opendaylight.
the class ItmTepRemoveWorker method call.
@Override
public List<ListenableFuture<Void>> call() {
List<ListenableFuture<Void>> futures = new ArrayList<>();
this.meshedDpnList = dpnTEPsInfoCache.getAllPresent();
futures.addAll(itmInternalTunnelDeleteWorker.deleteTunnels(mdsalManager, delDpnList, meshedDpnList));
LOG.debug("Invoking Internal Tunnel delete method with DpnList to be deleted {} ; Meshed DpnList {} ", delDpnList, meshedDpnList);
// IF EXTERNAL TUNNELS NEEDS TO BE DELETED, DO IT HERE, IT COULD BE TO DC GATEWAY OR TOR SWITCH
List<DcGatewayIp> dcGatewayIpList = ItmUtils.getDcGatewayIpList(dataBroker);
if (dcGatewayIpList != null && !dcGatewayIpList.isEmpty()) {
List<DPNTEPsInfo> dpnDeleteList = new ArrayList<>();
for (DPNTEPsInfo dpnTEPInfo : delDpnList) {
List<TunnelEndPoints> tunnelEndPointsList = dpnTEPInfo.getTunnelEndPoints();
if (tunnelEndPointsList.size() == 1) {
dpnDeleteList.add(dpnTEPInfo);
} else {
LOG.error("DPNTEPInfo not available in data store for dpnId {}. Unable to delete external tunnel " + "for dpn ", dpnTEPInfo.getDPNID());
}
}
for (DcGatewayIp dcGatewayIp : dcGatewayIpList) {
futures.addAll(ItmExternalTunnelDeleteWorker.deleteTunnels(dataBroker, dpnDeleteList, meshedDpnList, dcGatewayIp.getIpAddress(), dcGatewayIp.getTunnnelType()));
}
}
futures.addAll(ItmExternalTunnelDeleteWorker.deleteHwVtepsTunnels(dataBroker, delDpnList, cfgdHwVteps, this.originalTZone));
return futures;
}
Aggregations