Search in sources :

Example 1 with RemoveFibEntryInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder in project netvirt by opendaylight.

the class EvpnSnatFlowProgrammer method evpnDelFibTsAndReverseTraffic.

public void evpnDelFibTsAndReverseTraffic(final BigInteger dpnId, final long routerId, final String externalIp, final String vpnName, String extGwMacAddress, WriteTransaction removeFlowInvTx) {
    /*
      * 1) Remove the flow INTERNAL_TUNNEL_TABLE (table=36)-> INBOUND_NAPT_TABLE (table=44)
      *    (FIP VM on DPN1 is responding back to external fixed IP on DPN2) {DNAT to SNAT traffic on
      *     different Hypervisor}
      *
      * 2) Remove the flow L3_GW_MAC_TABLE (table=19)-> INBOUND_NAPT_TABLE (table=44)
      *    (FIP VM on DPN1 is responding back to external fixed IP on DPN1 itself){DNAT to SNAT traffic on
      *     Same Hypervisor}
      *
      * 3) Remove the flow PDNAT_TABLE (table=25)-> INBOUND_NAPT_TABLE (table=44)
      *    (If there is no FIP Match on table 25 (PDNAT_TABLE) then default flow to INBOUND_NAPT_TABLE (table=44))
      *
      * 4) Remove the flow L3_FIB_TABLE (table=21)-> INBOUND_NAPT_TABLE (table=44)
      *    (FIP VM on DPN1 is responding back to external fixed Ip on DPN1 itself. ie. same Hypervisor)
      *    {DNAT to SNAT Intra DC traffic}
      */
    String rd = NatUtil.getVpnRd(dataBroker, vpnName);
    if (rd == null) {
        LOG.error("evpnDelFibTsAndReverseTraffic : Could not retrieve RD value from VPN Name {}", vpnName);
        return;
    }
    long vpnId = NatUtil.getVpnId(dataBroker, vpnName);
    if (vpnId == NatConstants.INVALID_ID) {
        LOG.error("evpnDelFibTsAndReverseTraffic : Invalid Vpn Id is found for Vpn Name {}", vpnName);
        return;
    }
    if (extGwMacAddress == null) {
        LOG.error("evpnDelFibTsAndReverseTraffic : Unable to Get External Gateway MAC address for " + "External Router ID {} ", routerId);
        return;
    }
    long l3Vni = NatEvpnUtil.getL3Vni(dataBroker, rd);
    if (l3Vni == NatConstants.DEFAULT_L3VNI_VALUE) {
        LOG.debug("evpnDelFibTsAndReverseTraffic : L3VNI value is not configured in Internet VPN {} and RD {} " + "Carve-out L3VNI value from OpenDaylight VXLAN VNI Pool and continue with installing " + "SNAT flows for External Fixed IP {}", vpnName, rd, externalIp);
        l3Vni = NatOverVxlanUtil.getInternetVpnVni(idManager, vpnName, routerId).longValue();
    }
    final String externalFixedIp = NatUtil.validateAndAddNetworkMask(externalIp);
    RemoveFibEntryInput input = new RemoveFibEntryInputBuilder().setVpnName(vpnName).setSourceDpid(dpnId).setIpAddress(externalFixedIp).setIpAddressSource(RemoveFibEntryInput.IpAddressSource.ExternalFixedIP).setServiceId(l3Vni).build();
    LOG.debug("evpnDelFibTsAndReverseTraffic : Removing custom FIB table {} --> table {} flow on " + "NAPT Switch {} with l3Vni {}, ExternalFixedIp {}, ExternalVpnName {} for RouterId {}", NwConstants.L3_FIB_TABLE, NwConstants.INBOUND_NAPT_TABLE, dpnId, l3Vni, externalIp, vpnName, routerId);
    Future<RpcResult<Void>> future = fibService.removeFibEntry(input);
    ListenableFuture<RpcResult<Void>> futureVxlan = JdkFutureAdapters.listenInPoolThread(future);
    final long finalL3Vni = l3Vni;
    Futures.addCallback(futureVxlan, new FutureCallback<RpcResult<Void>>() {

        @Override
        public void onFailure(@Nonnull Throwable error) {
            LOG.error("evpnDelFibTsAndReverseTraffic : Error in custom fib routes remove process for " + "External Fixed IP {} on DPN {} with l3Vni {}, ExternalVpnName {} for RouterId {}", externalIp, dpnId, finalL3Vni, vpnName, routerId, error);
        }

        @Override
        public void onSuccess(@Nonnull RpcResult<Void> result) {
            if (result.isSuccessful()) {
                LOG.info("evpnDelFibTsAndReverseTraffic : Successfully removed custom FIB routes for " + "External Fixed IP {} on DPN {} with l3Vni {}, ExternalVpnName {} for " + "RouterId {}", externalIp, dpnId, finalL3Vni, vpnName, routerId);
                // remove INTERNAL_TUNNEL_TABLE (table=36)-> INBOUND_NAPT_TABLE (table=44) flow
                removeTunnelTableEntry(dpnId, finalL3Vni, removeFlowInvTx);
                // remove L3_GW_MAC_TABLE (table=19)-> INBOUND_NAPT_TABLE (table=44) flow
                NatUtil.removePreDnatToSnatTableEntry(mdsalManager, dpnId, removeFlowInvTx);
                // remove PDNAT_TABLE (table=25)-> INBOUND_NAPT_TABLE (table=44) flow
                NatEvpnUtil.removeL3GwMacTableEntry(dpnId, vpnId, extGwMacAddress, mdsalManager, removeFlowInvTx);
            }
        }
    }, MoreExecutors.directExecutor());
}
Also used : RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput)

Example 2 with RemoveFibEntryInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder in project netvirt by opendaylight.

the class NatTunnelInterfaceStateListener method hndlTepDelForDnatInEachRtr.

private void hndlTepDelForDnatInEachRtr(RoutersList router, long routerId, BigInteger tepDeletedDpnId, ProviderTypes extNwProvType) {
    // DNAT : Withdraw the routes from the BGP
    String routerName = router.getRouter();
    LOG.debug("hndlTepDelForDnatInEachRtr : DNAT -> Trying to clear routes to the Floating IP " + "associated to the router {}", routerName);
    InstanceIdentifier<RouterPorts> routerPortsId = NatUtil.getRouterPortsId(routerName);
    Optional<RouterPorts> optRouterPorts = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, routerPortsId);
    if (!optRouterPorts.isPresent()) {
        LOG.debug("hndlTepDelForDnatInEachRtr : DNAT -> Could not read Router Ports data object with id: {} " + "from DNAT FloatingIpInfo", routerName);
        return;
    }
    RouterPorts routerPorts = optRouterPorts.get();
    Uuid extNwId = routerPorts.getExternalNetworkId();
    final String vpnName = NatUtil.getAssociatedVPN(dataBroker, extNwId);
    if (vpnName == null) {
        LOG.error("hndlTepDelForDnatInEachRtr : DNAT -> No External VPN associated with Ext N/W {} for Router {}", extNwId, routerName);
        return;
    }
    String rd = NatUtil.getVpnRd(dataBroker, vpnName);
    if (extNwProvType == null) {
        return;
    }
    long l3Vni = 0;
    if (extNwProvType == ProviderTypes.VXLAN) {
        // get l3Vni value for external VPN
        l3Vni = NatEvpnUtil.getL3Vni(dataBroker, rd);
        if (l3Vni == NatConstants.DEFAULT_L3VNI_VALUE) {
            LOG.debug("hndlTepDelForDnatInEachRtr : L3VNI value is not configured in Internet VPN {} and RD {} " + "Carve-out L3VNI value from OpenDaylight VXLAN VNI Pool and continue to installing " + "NAT flows", vpnName, rd);
            l3Vni = NatOverVxlanUtil.getInternetVpnVni(idManager, vpnName, routerId).longValue();
        }
    }
    List<Ports> interfaces = routerPorts.getPorts();
    for (Ports port : interfaces) {
        // Get the DPN on which this interface resides
        String interfaceName = port.getPortName();
        BigInteger fipCfgdDpnId = NatUtil.getDpnForInterface(interfaceService, interfaceName);
        if (fipCfgdDpnId.equals(BigInteger.ZERO)) {
            LOG.info("hndlTepDelForDnatInEachRtr : DNAT -> Abort processing Floating ip configuration. " + "No DPN for port : {}", interfaceName);
            continue;
        }
        if (!fipCfgdDpnId.equals(tepDeletedDpnId)) {
            LOG.info("hndlTepDelForDnatInEachRtr : DNAT -> TEP deleted DPN {} is not the DPN {} which has the " + "floating IP configured for the port: {}", tepDeletedDpnId, fipCfgdDpnId, interfaceName);
            continue;
        }
        List<InternalToExternalPortMap> intExtPortMapList = port.getInternalToExternalPortMap();
        for (InternalToExternalPortMap intExtPortMap : intExtPortMapList) {
            String internalIp = intExtPortMap.getInternalIp();
            String externalIp = intExtPortMap.getExternalIp();
            externalIp = NatUtil.validateAndAddNetworkMask(externalIp);
            LOG.debug("hndlTepDelForDnatInEachRtr : DNAT -> Withdrawing the FIB route to the floating IP {} " + "configured for the port: {}", externalIp, interfaceName);
            NatUtil.removePrefixFromBGP(bgpManager, fibManager, rd, externalIp, vpnName, LOG);
            long serviceId = 0;
            if (extNwProvType == ProviderTypes.VXLAN) {
                serviceId = l3Vni;
            } else {
                long label = floatingIPListener.getOperationalIpMapping(routerName, interfaceName, internalIp);
                if (label == NatConstants.INVALID_ID) {
                    LOG.error("hndlTepDelForDnatInEachRtr : DNAT -> Unable to remove the table 21 entry pushing the" + " MPLS label to the tunnel since label is invalid");
                    return;
                }
                serviceId = label;
            }
            RemoveFibEntryInput input = new RemoveFibEntryInputBuilder().setVpnName(vpnName).setSourceDpid(fipCfgdDpnId).setIpAddress(externalIp).setServiceId(serviceId).setIpAddressSource(RemoveFibEntryInput.IpAddressSource.FloatingIP).build();
            Future<RpcResult<Void>> future = fibRpcService.removeFibEntry(input);
            ListenableFuture<RpcResult<Void>> listenableFuture = JdkFutureAdapters.listenInPoolThread(future);
            Futures.addCallback(listenableFuture, new FutureCallback<RpcResult<Void>>() {

                @Override
                public void onFailure(@Nonnull Throwable error) {
                    LOG.error("hndlTepDelForDnatInEachRtr : DNAT -> Error in removing the table 21 entry pushing " + "the MPLS label to the tunnel since label is invalid ", error);
                }

                @Override
                public void onSuccess(@Nonnull RpcResult<Void> result) {
                    if (result.isSuccessful()) {
                        LOG.info("hndlTepDelForDnatInEachRtr : DNAT -> Successfully removed the entry pushing the " + "MPLS label to the tunnel");
                    } else {
                        LOG.error("hndlTepDelForDnatInEachRtr : DNAT -> Error in fib rpc call to remove the table " + "21 entry pushing the MPLS label to the tunnnel due to {}", result.getErrors());
                    }
                }
            }, MoreExecutors.directExecutor());
        }
    }
}
Also used : RouterPorts(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.RouterPorts) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RouterPorts(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.RouterPorts) Ports(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.router.ports.Ports) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) BigInteger(java.math.BigInteger) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput) InternalToExternalPortMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.router.ports.ports.InternalToExternalPortMap)

Example 3 with RemoveFibEntryInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder in project netvirt by opendaylight.

the class EvpnDnatFlowProgrammer method onRemoveFloatingIp.

public void onRemoveFloatingIp(final BigInteger dpnId, final String vpnName, final String externalIp, final String floatingIpInterface, final String floatingIpPortMacAddress, final long routerId, WriteTransaction removeFlowInvTx) {
    /*
     *  1) Remove the flow INTERNAL_TUNNEL_TABLE (table=36)-> PDNAT_TABLE (table=25) (SNAT VM on DPN1 is
     *     responding back to FIP VM on DPN2) {SNAT to DNAT traffic on different Hypervisor}
     *
     *  2) Remove the flow L3_FIB_TABLE (table=21)-> PDNAT_TABLE (table=25) (FIP VM1 to FIP VM2
     *    Traffic on Same Hypervisor) {DNAT to DNAT on Same Hypervisor}
     *
     *  3) Remove the flow L3_GW_MAC_TABLE (table=19)-> PDNAT_TABLE (table=25)
     *    (DC-GW is responding back to FIP VM) {DNAT Reverse traffic})
     *
     */
    String rd = NatUtil.getVpnRd(dataBroker, vpnName);
    if (rd == null) {
        LOG.error("onRemoveFloatingIp : Could not retrieve RD value from VPN Name {}  ", vpnName);
        return;
    }
    long vpnId = NatUtil.getVpnId(dataBroker, vpnName);
    if (vpnId == NatConstants.INVALID_ID) {
        LOG.error("onRemoveFloatingIp : Invalid Vpn Id is found for Vpn Name {}", vpnName);
        return;
    }
    long l3Vni = NatEvpnUtil.getL3Vni(dataBroker, rd);
    if (l3Vni == NatConstants.DEFAULT_L3VNI_VALUE) {
        LOG.debug("onRemoveFloatingIp : L3VNI value is not configured in Internet VPN {} and RD {} " + "Carve-out L3VNI value from OpenDaylight VXLAN VNI Pool and continue with installing " + "DNAT flows for FloatingIp {}", vpnName, rd, externalIp);
        l3Vni = NatOverVxlanUtil.getInternetVpnVni(idManager, vpnName, routerId).longValue();
    }
    String fibExternalIp = NatUtil.validateAndAddNetworkMask(externalIp);
    // Remove Prefix from BGP
    NatUtil.removePrefixFromBGP(bgpManager, fibManager, rd, fibExternalIp, vpnName, LOG);
    // Remove custom FIB routes flow for L3_FIB_TABLE (table=21)-> PDNAT_TABLE (table=25)
    RemoveFibEntryInput input = new RemoveFibEntryInputBuilder().setVpnName(vpnName).setSourceDpid(dpnId).setIpAddress(fibExternalIp).setServiceId(l3Vni).setIpAddressSource(RemoveFibEntryInput.IpAddressSource.FloatingIP).build();
    Future<RpcResult<Void>> future = fibService.removeFibEntry(input);
    ListenableFuture<RpcResult<Void>> futureVxlan = JdkFutureAdapters.listenInPoolThread(future);
    final long finalL3Vni = l3Vni;
    Futures.addCallback(futureVxlan, new FutureCallback<RpcResult<Void>>() {

        @Override
        public void onFailure(@Nonnull Throwable error) {
            LOG.error("onRemoveFloatingIp : Error {} in custom fib routes remove process for Floating " + "IP Prefix {} on DPN {}", error, externalIp, dpnId);
        }

        @Override
        public void onSuccess(@Nonnull RpcResult<Void> result) {
            if (result.isSuccessful()) {
                LOG.info("onRemoveFloatingIp : Successfully removed custom FIB routes for Floating " + "IP Prefix {} on DPN {}", externalIp, dpnId);
                /*  check if any floating IP information is available in vpn-to-dpn-list for given dpn id.
                      *  If exist any floating IP then do not remove
                      *  INTERNAL_TUNNEL_TABLE (table=36) -> PDNAT_TABLE (table=25) flow entry.
                      */
                if (!NatUtil.isFloatingIpPresentForDpn(dataBroker, dpnId, rd, vpnName, externalIp, false)) {
                    // Remove the flow for INTERNAL_TUNNEL_TABLE (table=36)-> PDNAT_TABLE (table=25)
                    removeTunnelTableEntry(dpnId, finalL3Vni, removeFlowInvTx);
                }
                // Remove the flow for L3_GW_MAC_TABLE (table=19)-> PDNAT_TABLE (table=25)
                NatEvpnUtil.removeL3GwMacTableEntry(dpnId, vpnId, floatingIpPortMacAddress, mdsalManager, removeFlowInvTx);
                NatUtil.waitForTransactionToComplete(removeFlowInvTx);
            } else {
                LOG.error("onRemoveFloatingIp : Error {} in rpc call to remove custom Fib entries for Floating " + "IP Prefix {} on DPN {}", result.getErrors(), externalIp, dpnId);
            }
        }
    }, MoreExecutors.directExecutor());
    // Read the FIP vpn-interface details from Operational l3vpn:vpn-interfaces model and delete from Operational DS
    InstanceIdentifier<VpnInterface> vpnIfIdentifier = NatUtil.getVpnInterfaceIdentifier(floatingIpInterface);
    Optional<VpnInterface> optionalVpnInterface = SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(dataBroker, LogicalDatastoreType.CONFIGURATION, vpnIfIdentifier);
    if (optionalVpnInterface.isPresent()) {
        WriteTransaction writeOperTxn = dataBroker.newWriteOnlyTransaction();
        for (VpnInstanceNames vpnInstance : optionalVpnInterface.get().getVpnInstanceNames()) {
            if (!vpnName.equals(vpnInstance.getVpnName())) {
                continue;
            }
            InstanceIdentifier<VpnInterfaceOpDataEntry> vpnOpIfIdentifier = NatUtil.getVpnInterfaceOpDataEntryIdentifier(floatingIpInterface, vpnName);
            writeOperTxn.delete(LogicalDatastoreType.OPERATIONAL, vpnOpIfIdentifier);
            break;
        }
        ListenableFuture<Void> futures = writeOperTxn.submit();
        String errorText = "onRemoveFloatingIp : Could not remove vpnInterface " + floatingIpInterface + " vpnName " + vpnName + " from Operational odl-l3vpn:vpn-interface-op-data";
        ListenableFutures.addErrorLogging(futures, LOG, errorText);
        LOG.debug("onRemoveFloatingIp : Remove vpnInterface {} vpnName {} " + "to Operational odl-l3vpn:vpn-interface-op-data", floatingIpInterface, vpnName);
    } else {
        LOG.debug("onRemoveFloatingIp : No vpnInterface {} found " + "in Operational odl-l3vpn:vpn-interface-op-data", floatingIpInterface);
    }
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) VpnInterface(org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface) VpnInstanceNames(org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.vpn._interface.VpnInstanceNames) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput) VpnInterfaceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntry)

Example 4 with RemoveFibEntryInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder in project netvirt by opendaylight.

the class ExternalRoutersListener method delFibTsAndReverseTraffic.

protected void delFibTsAndReverseTraffic(final BigInteger dpnId, long routerId, String extIp, final String vpnName, Uuid extNetworkId, long tempLabel, String gwMacAddress, boolean switchOver, WriteTransaction removeFlowInvTx) {
    LOG.debug("delFibTsAndReverseTraffic : Removing fib entry for externalIp {} in routerId {}", extIp, routerId);
    String routerName = NatUtil.getRouterName(dataBroker, routerId);
    if (routerName == null) {
        LOG.error("delFibTsAndReverseTraffic : Could not retrieve Router Name from Router ID {} ", routerId);
        return;
    }
    ProviderTypes extNwProvType = NatEvpnUtil.getExtNwProvTypeFromRouterName(dataBroker, routerName, extNetworkId);
    if (extNwProvType == null) {
        LOG.error("delFibTsAndReverseTraffic : External Network Provider Type Missing");
        return;
    }
    /*  Remove the flow table19->44 and table36->44 entries for SNAT reverse traffic flow if the
         * external network provided type is VxLAN
         */
    if (extNwProvType == ProviderTypes.VXLAN) {
        evpnSnatFlowProgrammer.evpnDelFibTsAndReverseTraffic(dpnId, routerId, extIp, vpnName, gwMacAddress, removeFlowInvTx);
        return;
    }
    if (tempLabel < 0) {
        LOG.error("delFibTsAndReverseTraffic : Label not found for externalIp {} with router id {}", extIp, routerId);
        return;
    }
    final long label = tempLabel;
    final String externalIp = NatUtil.validateAndAddNetworkMask(extIp);
    RemoveFibEntryInput input = new RemoveFibEntryInputBuilder().setVpnName(vpnName).setSourceDpid(dpnId).setIpAddress(externalIp).setServiceId(label).setIpAddressSource(RemoveFibEntryInput.IpAddressSource.ExternalFixedIP).build();
    Future<RpcResult<Void>> future = fibService.removeFibEntry(input);
    removeTunnelTableEntry(dpnId, label, removeFlowInvTx);
    removeLFibTableEntry(dpnId, label, removeFlowInvTx);
    if (NatUtil.isOpenStackVniSemanticsEnforcedForGreAndVxlan(elanManager, extNwProvType)) {
        // Remove the flow table 25->44 If there is no FIP Match on table 25 (PDNAT_TABLE)
        NatUtil.removePreDnatToSnatTableEntry(mdsalManager, dpnId, removeFlowInvTx);
    }
    if (!switchOver) {
        ListenableFuture<RpcResult<Void>> labelFuture = Futures.transformAsync(JdkFutureAdapters.listenInPoolThread(future), (AsyncFunction<RpcResult<Void>, RpcResult<Void>>) result -> {
            if (result.isSuccessful()) {
                NatUtil.removePreDnatToSnatTableEntry(mdsalManager, dpnId, removeFlowInvTx);
                RemoveVpnLabelInput labelInput = new RemoveVpnLabelInputBuilder().setVpnName(vpnName).setIpPrefix(externalIp).build();
                Future<RpcResult<Void>> labelFuture1 = vpnService.removeVpnLabel(labelInput);
                return JdkFutureAdapters.listenInPoolThread(labelFuture1);
            } else {
                String errMsg = String.format("RPC call to remove custom FIB entries on dpn %s for " + "prefix %s Failed - %s", dpnId, externalIp, result.getErrors());
                LOG.error(errMsg);
                return Futures.immediateFailedFuture(new RuntimeException(errMsg));
            }
        });
        Futures.addCallback(labelFuture, new FutureCallback<RpcResult<Void>>() {

            @Override
            public void onFailure(@Nonnull Throwable error) {
                LOG.error("delFibTsAndReverseTraffic : Error in removing the label:{} or custom fib entries" + "got external ip {}", label, extIp, error);
            }

            @Override
            public void onSuccess(@Nonnull RpcResult<Void> result) {
                if (result.isSuccessful()) {
                    LOG.debug("delFibTsAndReverseTraffic : Successfully removed the label for the prefix {} " + "from VPN {}", externalIp, vpnName);
                } else {
                    LOG.error("delFibTsAndReverseTraffic : Error in removing the label for prefix {} " + " from VPN {}, {}", externalIp, vpnName, result.getErrors());
                }
            }
        }, MoreExecutors.directExecutor());
    } else {
        LOG.debug("delFibTsAndReverseTraffic: switch-over is happened on DpnId {}. No need to release allocated " + "label {} for external fixed ip {} for router {}", dpnId, label, externalIp, routerId);
    }
}
Also used : NatserviceConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.config.rev170206.NatserviceConfig) RouterIds(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.router.id.name.RouterIds) FibRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.FibRpcService) ProviderTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes) InetAddress(java.net.InetAddress) Future(java.util.concurrent.Future) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) IpMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMap) Optional(com.google.common.base.Optional) Subnetmap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap) Map(java.util.Map) IBgpManager(org.opendaylight.netvirt.bgpmanager.api.IBgpManager) TunnelTypeGre(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeGre) BigInteger(java.math.BigInteger) VpnRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.VpnRpcService) CreateIdPoolInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolInput) MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) RouterIdName(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.RouterIdName) Set(java.util.Set) ActionNxLoadInPort(org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput) DataBroker(org.opendaylight.controller.md.sal.binding.api.DataBroker) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) ProtocolTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProtocolTypes) IpPortMappingKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.port.map.IpPortMappingKey) GetTunnelInterfaceNameInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetTunnelInterfaceNameInputBuilder) CreateFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInput) AllocateIdOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdOutput) ActionSetFieldTunnelId(org.opendaylight.genius.mdsalutil.actions.ActionSetFieldTunnelId) OdlInterfaceRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService) IElanService(org.opendaylight.netvirt.elanmanager.api.IElanService) INeutronVpnManager(org.opendaylight.netvirt.neutronvpn.interfaces.INeutronVpnManager) ArrayList(java.util.ArrayList) TunnelTypeVxlan(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeVxlan) ActionPuntToController(org.opendaylight.genius.mdsalutil.actions.ActionPuntToController) ActionPopMpls(org.opendaylight.genius.mdsalutil.actions.ActionPopMpls) RouterIdsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.router.id.name.RouterIdsKey) ActionGroup(org.opendaylight.genius.mdsalutil.actions.ActionGroup) GenerateVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelInputBuilder) RemoveVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInput) UnknownHostException(java.net.UnknownHostException) FutureCallback(com.google.common.util.concurrent.FutureCallback) ExecutionException(java.util.concurrent.ExecutionException) Futures(com.google.common.util.concurrent.Futures) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) UpgradeState(org.opendaylight.genius.mdsalutil.UpgradeState) IMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) IpPortMapping(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.port.map.IpPortMapping) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) GroupTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes) MetaDataUtil(org.opendaylight.genius.mdsalutil.MetaDataUtil) IFibManager(org.opendaylight.netvirt.fibmanager.api.IFibManager) IpMapBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMapBuilder) GenerateVpnLabelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelOutput) LoggerFactory(org.slf4j.LoggerFactory) Flow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) IpMapKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMapKey) IpPortExternal(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.port.map.ip.port.mapping.intext.ip.protocol.type.ip.port.map.IpPortExternal) MDSALUtil(org.opendaylight.genius.mdsalutil.MDSALUtil) Routers(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.Routers) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) Ipv4Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address) GetTunnelInterfaceNameOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetTunnelInterfaceNameOutput) ExternalIpsCounter(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ExternalIpsCounter) Subnets(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.subnets.Subnets) ExternalIpCounter(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.ips.counter.external.counters.ExternalIpCounter) RouterToNaptSwitchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.napt.switches.RouterToNaptSwitchBuilder) Collection(java.util.Collection) LogicalDatastoreType(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions) WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) AllocateIdInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdInput) Objects(java.util.Objects) List(java.util.List) TunnelTypeBase(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase) NaptSwitches(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.NaptSwitches) ExtRouters(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ExtRouters) PostConstruct(javax.annotation.PostConstruct) ExternalIps(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.routers.ExternalIps) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) SubnetmapKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.SubnetmapKey) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) CreateFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInputBuilder) IntextIpProtocolType(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.port.map.ip.port.mapping.IntextIpProtocolType) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) ExternalCounters(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.ips.counter.ExternalCounters) RouterToNaptSwitch(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.napt.switches.RouterToNaptSwitch) HashMap(java.util.HashMap) Singleton(javax.inject.Singleton) InstructionWriteMetadata(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata) JdkFutureAdapters(com.google.common.util.concurrent.JdkFutureAdapters) HashSet(java.util.HashSet) Inject(javax.inject.Inject) RoutersKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.RoutersKey) ReadOnlyTransaction(org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction) CreateIdPoolInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolInputBuilder) RemoveVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInputBuilder) MatchTunnelId(org.opendaylight.genius.mdsalutil.matches.MatchTunnelId) RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) RouterIdsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.router.id.name.RouterIdsBuilder) MatchEthernetType(org.opendaylight.genius.mdsalutil.matches.MatchEthernetType) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) NatMode(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.config.rev170206.NatserviceConfig.NatMode) Nonnull(javax.annotation.Nonnull) IntextIpPortMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.IntextIpPortMap) Logger(org.slf4j.Logger) RouteOrigin(org.opendaylight.netvirt.fibmanager.api.RouteOrigin) Subnetmaps(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.Subnetmaps) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) IVpnManager(org.opendaylight.netvirt.vpnmanager.api.IVpnManager) IpPortMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.port.map.ip.port.mapping.intext.ip.protocol.type.IpPortMap) AsyncDataTreeChangeListenerBase(org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase) GroupEntity(org.opendaylight.genius.mdsalutil.GroupEntity) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) Inet6Address(java.net.Inet6Address) Port(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port) GenerateVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelInput) CentralizedSwitchScheduler(org.opendaylight.netvirt.natservice.api.CentralizedSwitchScheduler) MatchMplsLabel(org.opendaylight.genius.mdsalutil.matches.MatchMplsLabel) AllocateIdInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdInputBuilder) AsyncFunction(com.google.common.util.concurrent.AsyncFunction) BucketInfo(org.opendaylight.genius.mdsalutil.BucketInfo) Collections(java.util.Collections) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) RouterToNaptSwitchKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.napt.switches.RouterToNaptSwitchKey) ItmRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService) ProviderTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes) RemoveVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInput) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInputBuilder) RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) Future(java.util.concurrent.Future) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput)

Example 5 with RemoveFibEntryInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder in project netvirt by opendaylight.

the class VpnFloatingIpHandler method cleanupFibEntries.

@Override
public void cleanupFibEntries(final BigInteger dpnId, final String vpnName, final String externalIp, final long label, WriteTransaction removeFlowInvTx, ProviderTypes provType) {
    // Remove Prefix from BGP
    String rd = NatUtil.getVpnRd(dataBroker, vpnName);
    String fibExternalIp = NatUtil.validateAndAddNetworkMask(externalIp);
    NatUtil.removePrefixFromBGP(bgpManager, fibManager, rd, fibExternalIp, vpnName, LOG);
    // Remove custom FIB routes
    // Future<RpcResult<java.lang.Void>> removeFibEntry(RemoveFibEntryInput input);
    RemoveFibEntryInput input = new RemoveFibEntryInputBuilder().setVpnName(vpnName).setSourceDpid(dpnId).setIpAddress(fibExternalIp).setServiceId(label).setIpAddressSource(RemoveFibEntryInput.IpAddressSource.FloatingIP).build();
    Future<RpcResult<Void>> future = fibService.removeFibEntry(input);
    ListenableFuture<RpcResult<Void>> labelFuture = Futures.transformAsync(JdkFutureAdapters.listenInPoolThread(future), (AsyncFunction<RpcResult<Void>, RpcResult<Void>>) result -> {
        if (result.isSuccessful()) {
            Boolean removeTunnelFlow = Boolean.TRUE;
            if (NatUtil.isOpenStackVniSemanticsEnforcedForGreAndVxlan(elanService, provType)) {
                if (NatUtil.isFloatingIpPresentForDpn(dataBroker, dpnId, rd, vpnName, externalIp, false)) {
                    removeTunnelFlow = Boolean.FALSE;
                }
            }
            if (removeTunnelFlow) {
                removeTunnelTableEntry(dpnId, label, removeFlowInvTx);
            }
            removeLFibTableEntry(dpnId, label, removeFlowInvTx);
            RemoveVpnLabelInput labelInput = new RemoveVpnLabelInputBuilder().setVpnName(vpnName).setIpPrefix(externalIp).build();
            Future<RpcResult<Void>> labelFuture1 = vpnService.removeVpnLabel(labelInput);
            return JdkFutureAdapters.listenInPoolThread(labelFuture1);
        } else {
            String errMsg = String.format("onRemoveFloatingIp :RPC call to remove custom FIB entries " + "on dpn %s for prefix %s Failed - %s", dpnId, externalIp, result.getErrors());
            LOG.error(errMsg);
            return Futures.immediateFailedFuture(new RuntimeException(errMsg));
        }
    }, MoreExecutors.directExecutor());
    Futures.addCallback(labelFuture, new FutureCallback<RpcResult<Void>>() {

        @Override
        public void onFailure(@Nonnull Throwable error) {
            LOG.error("onRemoveFloatingIp : Error in removing the label or custom fib entries", error);
        }

        @Override
        public void onSuccess(@Nonnull RpcResult<Void> result) {
            if (result.isSuccessful()) {
                LOG.debug("onRemoveFloatingIp : Successfully removed the label for the prefix {} from VPN {}", externalIp, vpnName);
            } else {
                LOG.error("onRemoveFloatingIp : Error in removing the label for prefix {} from VPN {}, {}", externalIp, vpnName, result.getErrors());
            }
        }
    }, MoreExecutors.directExecutor());
}
Also used : SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) IFibManager(org.opendaylight.netvirt.fibmanager.api.IFibManager) GenerateVpnLabelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelOutput) InternalToExternalPortMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.router.ports.ports.InternalToExternalPortMap) FibRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.FibRpcService) LoggerFactory(org.slf4j.LoggerFactory) Flow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) SendArpRequestInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.SendArpRequestInput) ProviderTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes) Future(java.util.concurrent.Future) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) Optional(com.google.common.base.Optional) IBgpManager(org.opendaylight.netvirt.bgpmanager.api.IBgpManager) InterfaceAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.interfaces.InterfaceAddress) BigInteger(java.math.BigInteger) MDSALUtil(org.opendaylight.genius.mdsalutil.MDSALUtil) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) VpnRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.VpnRpcService) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress) Subnets(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.subnets.Subnets) ManagedNewTransactionRunner(org.opendaylight.genius.infra.ManagedNewTransactionRunner) LogicalDatastoreType(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput) WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) DataBroker(org.opendaylight.controller.md.sal.binding.api.DataBroker) List(java.util.List) SendArpRequestInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.SendArpRequestInputBuilder) ActionSetFieldEthernetDestination(org.opendaylight.genius.mdsalutil.actions.ActionSetFieldEthernetDestination) CreateFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInput) InterfaceAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.interfaces.InterfaceAddressBuilder) FloatingIpIdToPortMapping(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.port.info.FloatingIpIdToPortMapping) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) CreateFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) IElanService(org.opendaylight.netvirt.elanmanager.api.IElanService) Singleton(javax.inject.Singleton) JdkFutureAdapters(com.google.common.util.concurrent.JdkFutureAdapters) INeutronVpnManager(org.opendaylight.netvirt.neutronvpn.interfaces.INeutronVpnManager) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) RemoveVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInputBuilder) MatchTunnelId(org.opendaylight.genius.mdsalutil.matches.MatchTunnelId) RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) ManagedNewTransactionRunnerImpl(org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) MatchEthernetType(org.opendaylight.genius.mdsalutil.matches.MatchEthernetType) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) ActionPopMpls(org.opendaylight.genius.mdsalutil.actions.ActionPopMpls) Nonnull(javax.annotation.Nonnull) JdkFutures(org.opendaylight.infrautils.utils.concurrent.JdkFutures) Logger(org.slf4j.Logger) GenerateVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelInputBuilder) NatUtil.buildfloatingIpIdToPortMappingIdentifier(org.opendaylight.netvirt.natservice.internal.NatUtil.buildfloatingIpIdToPortMappingIdentifier) RouteOrigin(org.opendaylight.netvirt.fibmanager.api.RouteOrigin) IVpnManager(org.opendaylight.netvirt.vpnmanager.api.IVpnManager) RemoveVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInput) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) FutureCallback(com.google.common.util.concurrent.FutureCallback) ListenableFutures(org.opendaylight.infrautils.utils.concurrent.ListenableFutures) Futures(com.google.common.util.concurrent.Futures) GenerateVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelInput) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) IMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager) MatchMplsLabel(org.opendaylight.genius.mdsalutil.matches.MatchMplsLabel) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) AsyncFunction(com.google.common.util.concurrent.AsyncFunction) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) Collections(java.util.Collections) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) IpAddressBuilder(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder) OdlArputilService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.OdlArputilService) RemoveVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInput) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelInputBuilder) RemoveFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder) Future(java.util.concurrent.Future) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) RemoveFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput)

Aggregations

RemoveFibEntryInput (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput)5 RemoveFibEntryInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInputBuilder)5 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)5 BigInteger (java.math.BigInteger)3 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)3 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)3 Optional (com.google.common.base.Optional)2 AsyncFunction (com.google.common.util.concurrent.AsyncFunction)2 FutureCallback (com.google.common.util.concurrent.FutureCallback)2 Futures (com.google.common.util.concurrent.Futures)2 JdkFutureAdapters (com.google.common.util.concurrent.JdkFutureAdapters)2 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)2 MoreExecutors (com.google.common.util.concurrent.MoreExecutors)2 ArrayList (java.util.ArrayList)2 Collections (java.util.Collections)2 List (java.util.List)2 Future (java.util.concurrent.Future)2 Nonnull (javax.annotation.Nonnull)2 Inject (javax.inject.Inject)2 Singleton (javax.inject.Singleton)2