Search in sources :

Example 11 with Network

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network in project netvirt by opendaylight.

the class ExternalNetworksChangeListener method disassociateExternalNetworkFromVPN.

private void disassociateExternalNetworkFromVPN(Networks network, String vpnName) {
    List<Uuid> routerIds = network.getRouterIds();
    for (Uuid routerId : routerIds) {
        InstanceIdentifier<RouterPorts> routerPortsId = NatUtil.getRouterPortsId(routerId.getValue());
        Optional<RouterPorts> optRouterPorts = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, routerPortsId);
        if (!optRouterPorts.isPresent()) {
            LOG.debug("disassociateExternalNetworkFromVPN : Could not read Router Ports data object with id: {} " + "to handle disassociate ext nw {}", routerId, network.getId());
            continue;
        }
        RouterPorts routerPorts = optRouterPorts.get();
        List<Ports> interfaces = routerPorts.getPorts();
        WriteTransaction removeFlowInvTx = dataBroker.newWriteOnlyTransaction();
        for (Ports port : interfaces) {
            String portName = port.getPortName();
            BigInteger dpnId = NatUtil.getDpnForInterface(interfaceManager, portName);
            if (dpnId.equals(BigInteger.ZERO)) {
                LOG.debug("disassociateExternalNetworkFromVPN : DPN not found for {}," + "skip handling of ext nw {} disassociation", portName, network.getId());
                continue;
            }
            List<InternalToExternalPortMap> intExtPortMapList = port.getInternalToExternalPortMap();
            for (InternalToExternalPortMap intExtPortMap : intExtPortMapList) {
                floatingIpListener.removeNATFlowEntries(dpnId, portName, vpnName, routerId.getValue(), intExtPortMap, removeFlowInvTx);
            }
        }
        NatUtil.waitForTransactionToComplete(removeFlowInvTx);
    }
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) RouterPorts(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.RouterPorts) 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) BigInteger(java.math.BigInteger) InternalToExternalPortMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.router.ports.ports.InternalToExternalPortMap)

Example 12 with Network

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network in project netvirt by opendaylight.

the class ExternalNetworksChangeListener method associateExternalNetworkWithVPN.

private void associateExternalNetworkWithVPN(Networks network, WriteTransaction writeFlowInvTx) {
    List<Uuid> routerIds = network.getRouterIds();
    for (Uuid routerId : routerIds) {
        // long router = NatUtil.getVpnId(dataBroker, routerId.getValue());
        InstanceIdentifier<RouterPorts> routerPortsId = NatUtil.getRouterPortsId(routerId.getValue());
        Optional<RouterPorts> optRouterPorts = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, routerPortsId);
        if (!optRouterPorts.isPresent()) {
            LOG.debug("associateExternalNetworkWithVPN : Could not read Router Ports data object with id: {} " + "to handle associate ext nw {}", routerId, network.getId());
            continue;
        }
        RouterPorts routerPorts = optRouterPorts.get();
        List<Ports> interfaces = routerPorts.getPorts();
        for (Ports port : interfaces) {
            String portName = port.getPortName();
            BigInteger dpnId = NatUtil.getDpnForInterface(interfaceManager, portName);
            if (dpnId.equals(BigInteger.ZERO)) {
                LOG.debug("associateExternalNetworkWithVPN : DPN not found for {}, " + "skip handling of ext nw {} association", portName, network.getId());
                continue;
            }
            List<InternalToExternalPortMap> intExtPortMapList = port.getInternalToExternalPortMap();
            for (InternalToExternalPortMap ipMap : intExtPortMapList) {
                // remove all VPN related entries
                floatingIpListener.createNATFlowEntries(dpnId, portName, routerId.getValue(), network.getId(), ipMap, writeFlowInvTx);
            }
        }
    }
    // SNAT
    for (Uuid routerId : routerIds) {
        LOG.debug("associateExternalNetworkWithVPN() : for routerId {}", routerId);
        Uuid networkId = network.getId();
        if (networkId == null) {
            LOG.error("associateExternalNetworkWithVPN : networkId is null for the router ID {}", routerId);
            return;
        }
        final String vpnName = network.getVpnid().getValue();
        if (vpnName == null) {
            LOG.error("associateExternalNetworkWithVPN : No VPN associated with ext nw {} for router {}", networkId, routerId);
            return;
        }
        BigInteger dpnId = new BigInteger("0");
        InstanceIdentifier<RouterToNaptSwitch> routerToNaptSwitch = NatUtil.buildNaptSwitchRouterIdentifier(routerId.getValue());
        Optional<RouterToNaptSwitch> rtrToNapt = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, routerToNaptSwitch);
        if (rtrToNapt.isPresent()) {
            dpnId = rtrToNapt.get().getPrimarySwitchId();
        }
        LOG.debug("associateExternalNetworkWithVPN : got primarySwitch as dpnId{} ", dpnId);
        if (dpnId == null || dpnId.equals(BigInteger.ZERO)) {
            LOG.warn("associateExternalNetworkWithVPN : primary napt Switch not found for router {} on dpn: {}", routerId, dpnId);
            return;
        }
        Long routerIdentifier = NatUtil.getVpnId(dataBroker, routerId.getValue());
        InstanceIdentifierBuilder<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.IpMapping> idBuilder = InstanceIdentifier.builder(IntextIpMap.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.IpMapping.class, new org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.IpMappingKey(routerIdentifier));
        InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.IpMapping> id = idBuilder.build();
        Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.IpMapping> ipMapping = MDSALUtil.read(dataBroker, LogicalDatastoreType.OPERATIONAL, id);
        if (ipMapping.isPresent()) {
            List<IpMap> ipMaps = ipMapping.get().getIpMap();
            for (IpMap ipMap : ipMaps) {
                String externalIp = ipMap.getExternalIp();
                LOG.debug("associateExternalNetworkWithVPN : Calling advToBgpAndInstallFibAndTsFlows for dpnId {}," + "vpnName {} and externalIp {}", dpnId, vpnName, externalIp);
                if (natMode == NatMode.Controller) {
                    externalRouterListener.advToBgpAndInstallFibAndTsFlows(dpnId, NwConstants.INBOUND_NAPT_TABLE, vpnName, routerIdentifier, routerId.getValue(), externalIp, network.getId(), null, /* external-router */
                    writeFlowInvTx);
                }
            }
        } else {
            LOG.warn("associateExternalNetworkWithVPN : No ipMapping present fot the routerId {}", routerId);
        }
        long vpnId = NatUtil.getVpnId(dataBroker, vpnName);
        // Install 47 entry to point to 21
        if (natMode == NatMode.Controller) {
            externalRouterListener.installNaptPfibEntriesForExternalSubnets(routerId.getValue(), dpnId, writeFlowInvTx);
            if (vpnId != -1) {
                LOG.debug("associateExternalNetworkWithVPN : Calling externalRouterListener installNaptPfibEntry " + "for dpnId {} and vpnId {}", dpnId, vpnId);
                externalRouterListener.installNaptPfibEntry(dpnId, vpnId, writeFlowInvTx);
            }
        }
    }
}
Also used : RouterPorts(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.RouterPorts) IntextIpMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.IntextIpMap) InternalToExternalPortMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.info.router.ports.ports.InternalToExternalPortMap) RouterToNaptSwitch(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.napt.switches.RouterToNaptSwitch) 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) IpMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMap) IntextIpMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.IntextIpMap) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) BigInteger(java.math.BigInteger)

Example 13 with Network

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network in project netvirt by opendaylight.

the class ExternalRoutersListener method handleDisableSnat.

// TODO Clean up the exception handling
@SuppressWarnings("checkstyle:IllegalCatch")
public void handleDisableSnat(Routers router, Uuid networkUuid, @Nonnull Collection<String> externalIps, boolean routerFlag, String vpnName, BigInteger naptSwitchDpnId, long routerId, WriteTransaction removeFlowInvTx) {
    LOG.info("handleDisableSnat : Entry");
    String routerName = router.getRouterName();
    try {
        if (routerFlag) {
            removeNaptSwitch(routerName);
        } else {
            updateNaptSwitch(routerName, BigInteger.ZERO);
        }
        LOG.debug("handleDisableSnat : Remove the ExternalCounter model for the router ID {}", routerId);
        naptManager.removeExternalCounter(routerId);
        LOG.debug("handleDisableSnat : got primarySwitch as dpnId {}", naptSwitchDpnId);
        if (naptSwitchDpnId == null || naptSwitchDpnId.equals(BigInteger.ZERO)) {
            LOG.error("handleDisableSnat : Unable to retrieve the primary NAPT switch for the " + "router ID {} from RouterNaptSwitch model", routerId);
            return;
        }
        ProviderTypes extNwProvType = NatEvpnUtil.getExtNwProvTypeFromRouterName(dataBroker, routerName, networkUuid);
        if (extNwProvType == null) {
            LOG.error("handleDisableSnat : External Network Provider Type missing");
            return;
        }
        Collection<Uuid> externalSubnetList = NatUtil.getExternalSubnetIdsFromExternalIps(router.getExternalIps());
        removeNaptFlowsFromActiveSwitch(routerId, routerName, naptSwitchDpnId, networkUuid, vpnName, externalIps, externalSubnetList, removeFlowInvTx, extNwProvType);
        removeFlowsFromNonActiveSwitches(routerId, routerName, naptSwitchDpnId, removeFlowInvTx);
        try {
            String externalSubnetVpn = null;
            for (Uuid externalSubnetId : externalSubnetList) {
                Optional<Subnets> externalSubnet = NatUtil.getOptionalExternalSubnets(dataBroker, externalSubnetId);
                // externalSubnet data model will exist for FLAT/VLAN external netowrk UCs.
                if (externalSubnet.isPresent()) {
                    externalSubnetVpn = externalSubnetId.getValue();
                    clrRtsFromBgpAndDelFibTs(naptSwitchDpnId, routerId, networkUuid, externalIps, externalSubnetVpn, router.getExtGwMacAddress(), removeFlowInvTx);
                }
            }
            if (externalSubnetVpn == null) {
                clrRtsFromBgpAndDelFibTs(naptSwitchDpnId, routerId, networkUuid, externalIps, vpnName, router.getExtGwMacAddress(), removeFlowInvTx);
            }
        } catch (Exception ex) {
            LOG.error("handleDisableSnat : Failed to remove fib entries for routerId {} in naptSwitchDpnId {}", routerId, naptSwitchDpnId, ex);
        }
        // Use the NaptMananager removeMapping API to remove the entire list of IP addresses maintained
        // for the router ID.
        LOG.debug("handleDisableSnat : Remove the Internal to external IP address maintained for the " + "router ID {} in the DS", routerId);
        naptManager.removeMapping(routerId);
    } catch (Exception ex) {
        LOG.error("handleDisableSnat : Exception while handling disableSNAT for router :{}", routerName, ex);
    }
    LOG.info("handleDisableSnat : Exit");
}
Also used : Subnets(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.subnets.Subnets) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) ProviderTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException)

Example 14 with Network

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network in project netvirt by opendaylight.

the class ExternalRoutersListener method advToBgpAndInstallFibAndTsFlows.

public void advToBgpAndInstallFibAndTsFlows(final BigInteger dpnId, final short tableId, final String vpnName, final long routerId, final String routerName, final String externalIp, final Uuid extNetworkId, final Routers router, final WriteTransaction writeFlowInvTx) {
    LOG.debug("advToBgpAndInstallFibAndTsFlows : entry for DPN ID {}, tableId {}, vpnname {} " + "and externalIp {}", dpnId, tableId, vpnName, externalIp);
    String nextHopIp = NatUtil.getEndpointIpAddressForDPN(dataBroker, dpnId);
    String rd = NatUtil.getVpnRd(dataBroker, vpnName);
    if (rd == null || rd.isEmpty()) {
        LOG.error("advToBgpAndInstallFibAndTsFlows : Unable to get RD for VPN Name {}", vpnName);
        return;
    }
    ProviderTypes extNwProvType = NatEvpnUtil.getExtNwProvTypeFromRouterName(dataBroker, routerName, extNetworkId);
    if (extNwProvType == null) {
        LOG.error("advToBgpAndInstallFibAndTsFlows : External Network Provider Type missing");
        return;
    }
    if (extNwProvType == ProviderTypes.VXLAN) {
        WriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
        evpnSnatFlowProgrammer.evpnAdvToBgpAndInstallFibAndTsFlows(dpnId, tableId, externalIp, vpnName, rd, nextHopIp, writeTx, routerId, routerName, writeFlowInvTx);
        return;
    }
    // Generate VPN label for the external IP
    GenerateVpnLabelInput labelInput = new GenerateVpnLabelInputBuilder().setVpnName(vpnName).setIpPrefix(externalIp).build();
    Future<RpcResult<GenerateVpnLabelOutput>> labelFuture = vpnService.generateVpnLabel(labelInput);
    // On successful generation of the VPN label, advertise the route to the BGP and install the FIB routes.
    ListenableFuture<RpcResult<Void>> future = Futures.transformAsync(JdkFutureAdapters.listenInPoolThread(labelFuture), (AsyncFunction<RpcResult<GenerateVpnLabelOutput>, RpcResult<Void>>) result -> {
        if (result.isSuccessful()) {
            LOG.debug("advToBgpAndInstallFibAndTsFlows : inside apply with result success");
            GenerateVpnLabelOutput output = result.getResult();
            final long label = output.getLabel();
            int externalIpInDsFlag = 0;
            List<IpMap> dbIpMaps = NaptManager.getIpMapList(dataBroker, routerId);
            if (dbIpMaps != null) {
                for (IpMap dbIpMap : dbIpMaps) {
                    String dbExternalIp = dbIpMap.getExternalIp();
                    if (dbExternalIp.contains(externalIp)) {
                        String dbInternalIp = dbIpMap.getInternalIp();
                        IpMapKey dbIpMapKey = dbIpMap.getKey();
                        LOG.debug("advToBgpAndInstallFibAndTsFlows : Setting label {} for internalIp {} " + "and externalIp {}", label, dbInternalIp, externalIp);
                        IpMap newIpm = new IpMapBuilder().setKey(dbIpMapKey).setInternalIp(dbInternalIp).setExternalIp(dbExternalIp).setLabel(label).build();
                        MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.OPERATIONAL, naptManager.getIpMapIdentifier(routerId, dbInternalIp), newIpm);
                        externalIpInDsFlag++;
                    }
                }
                if (externalIpInDsFlag <= 0) {
                    LOG.debug("advToBgpAndInstallFibAndTsFlows : External Ip {} not found in DS, " + "Failed to update label {} for routerId {} in DS", externalIp, label, routerId);
                    String errMsg = String.format("Failed to update label %s due to external Ip %s not" + " found in DS for router %s", label, externalIp, routerId);
                    return Futures.immediateFailedFuture(new Exception(errMsg));
                }
            } else {
                LOG.error("advToBgpAndInstallFibAndTsFlows : Failed to write label {} for externalIp {} for" + " routerId {} in DS", label, externalIp, routerId);
            }
            long l3vni = 0;
            if (NatUtil.isOpenStackVniSemanticsEnforcedForGreAndVxlan(elanManager, extNwProvType)) {
                l3vni = NatOverVxlanUtil.getInternetVpnVni(idManager, vpnName, l3vni).longValue();
            }
            Routers extRouter = router != null ? router : NatUtil.getRoutersFromConfigDS(dataBroker, routerName);
            Uuid externalSubnetId = NatUtil.getExternalSubnetForRouterExternalIp(externalIp, extRouter);
            NatUtil.addPrefixToBGP(dataBroker, bgpManager, fibManager, vpnName, rd, externalSubnetId, externalIp, nextHopIp, extRouter.getNetworkId().getValue(), null, label, l3vni, RouteOrigin.STATIC, dpnId);
            List<Instruction> tunnelTableCustomInstructions = new ArrayList<>();
            tunnelTableCustomInstructions.add(new InstructionGotoTable(tableId).buildInstruction(0));
            makeTunnelTableEntry(dpnId, label, l3vni, tunnelTableCustomInstructions, writeFlowInvTx, extNwProvType);
            makeLFibTableEntry(dpnId, label, tableId, writeFlowInvTx);
            List<Instruction> fibTableCustomInstructions = createFibTableCustomInstructions(tableId, routerName, externalIp);
            if (NatUtil.isOpenStackVniSemanticsEnforcedForGreAndVxlan(elanManager, extNwProvType)) {
                NatUtil.makePreDnatToSnatTableEntry(mdsalManager, dpnId, NwConstants.INBOUND_NAPT_TABLE, writeFlowInvTx);
            }
            String fibExternalIp = NatUtil.validateAndAddNetworkMask(externalIp);
            Optional<Subnets> externalSubnet = NatUtil.getOptionalExternalSubnets(dataBroker, externalSubnetId);
            String externalVpn = vpnName;
            if (externalSubnet.isPresent()) {
                externalVpn = externalSubnetId.getValue();
            }
            CreateFibEntryInput input = new CreateFibEntryInputBuilder().setVpnName(externalVpn).setSourceDpid(dpnId).setIpAddress(fibExternalIp).setServiceId(label).setIpAddressSource(CreateFibEntryInput.IpAddressSource.ExternalFixedIP).setInstruction(fibTableCustomInstructions).build();
            Future<RpcResult<Void>> future1 = fibService.createFibEntry(input);
            return JdkFutureAdapters.listenInPoolThread(future1);
        } else {
            LOG.error("advToBgpAndInstallFibAndTsFlows : inside apply with result failed");
            String errMsg = String.format("Could not retrieve the label for prefix %s in VPN %s, %s", externalIp, vpnName, result.getErrors());
            return Futures.immediateFailedFuture(new RuntimeException(errMsg));
        }
    }, MoreExecutors.directExecutor());
    Futures.addCallback(future, new FutureCallback<RpcResult<Void>>() {

        @Override
        public void onFailure(@Nonnull Throwable error) {
            LOG.error("advToBgpAndInstallFibAndTsFlows : Error in generate label or fib install process", error);
        }

        @Override
        public void onSuccess(@Nonnull RpcResult<Void> result) {
            if (result.isSuccessful()) {
                LOG.info("advToBgpAndInstallFibAndTsFlows : Successfully installed custom FIB routes for prefix {}", externalIp);
            } else {
                LOG.error("advToBgpAndInstallFibAndTsFlows : Error in rpc call to create custom Fib entries " + "for prefix {} in DPN {}, {}", externalIp, dpnId, result.getErrors());
            }
        }
    }, MoreExecutors.directExecutor());
}
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) GenerateVpnLabelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelOutput) IpMapKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMapKey) ArrayList(java.util.ArrayList) List(java.util.List) GenerateVpnLabelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelInputBuilder) GenerateVpnLabelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.GenerateVpnLabelInput) WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) Optional(com.google.common.base.Optional) Routers(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.Routers) ExtRouters(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ExtRouters) ProviderTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes) CreateFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) IpMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMap) CreateFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInput) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) Future(java.util.concurrent.Future) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) IpMapBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.intext.ip.map.ip.mapping.IpMapBuilder)

Example 15 with Network

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network in project netvirt by opendaylight.

the class NatTunnelInterfaceStateListener method hndlTepAddOnNaptSwitch.

private boolean hndlTepAddOnNaptSwitch(BigInteger srcDpnId, String tunnelType, String srcTepIp, String destTepIp, String tunnelName, long routerId, Optional<Routers> routerData, String nextHopIp, Uuid vpnName, ProviderTypes extNwProvType, WriteTransaction writeFlowInvTx) {
    if (!routerData.isPresent()) {
        LOG.warn("hndlTepAddOnNaptSwitch: routerData is not present");
        return false;
    }
    Routers router = routerData.get();
    String routerName = router.getRouterName();
    LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Processing TEP add for the DPN {} having the router {} since " + "its THE NAPT switch for the TUNNEL TYPE {} b/w SRC IP {} and DST IP {} " + "and TUNNEL NAME {} ", srcDpnId, routerName, tunnelType, srcTepIp, destTepIp, tunnelName);
    Uuid networkId = router.getNetworkId();
    if (networkId == null) {
        LOG.warn("hndlTepAddOnNaptSwitch : SNAT -> Ignoring TEP add since the router {} is not associated to the " + "external network", routerName);
        return false;
    }
    LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Router {} is associated with Ext nw {}", routerId, networkId);
    Long vpnId;
    if (vpnName == null) {
        LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Internal VPN associated to router {}", routerId);
        vpnId = NatUtil.getNetworkVpnIdFromRouterId(dataBroker, routerId);
        if (vpnId == NatConstants.INVALID_ID) {
            LOG.error("hndlTepAddOnNaptSwitch : Invalid External VPN-ID returned for routerName {}", routerName);
            return false;
        }
        LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Retrieved External VPN-ID {} for router {}", vpnId, routerId);
    } else {
        LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Private BGP VPN associated to router {}", routerId);
        vpnId = NatUtil.getVpnId(dataBroker, vpnName.getValue());
        if (vpnId == null || vpnId == NatConstants.INVALID_ID) {
            LOG.error("hndlTepAddOnNaptSwitch : Invalid vpnId returned for routerName {}", routerName);
            return false;
        }
        LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Retrieved vpnId {} for router {}", vpnId, routerId);
    }
    /*1) Withdraw the old route to the external IP from the BGP which was having the
             next hop as the old TEP IP.
          2) Advertise to the BGP about the new route to the external IP having the
          new TEP IP as the next hop.
          3) Populate a new FIB entry with the next hop IP as the new TEP IP using the
          FIB manager.
        */
    // Withdraw the old route to the external IP from the BGP which was having the
    // next hop as the old TEP IP.
    final String externalVpnName = NatUtil.getAssociatedVPN(dataBroker, networkId);
    if (externalVpnName == null) {
        LOG.error("hndlTepAddOnNaptSwitch :  SNAT -> No VPN associated with ext nw {} in router {}", networkId, routerId);
        return false;
    }
    Collection<String> externalIps = NatUtil.getExternalIpsForRouter(dataBroker, routerId);
    LOG.debug("hndlTepAddOnNaptSwitch : Clearing the FIB entries but not the BGP routes");
    for (String externalIp : externalIps) {
        String rd = NatUtil.getVpnRd(dataBroker, externalVpnName);
        LOG.debug("hndlTepAddOnNaptSwitch : Removing Fib entry rd {} prefix {}", rd, externalIp);
        fibManager.removeFibEntry(rd, externalIp, null);
    }
    /*
        Advertise to the BGP about the new route to the external IP having the
        new TEP IP as the next hop.
        Populate a new FIB entry with the next hop IP as the new TEP IP using the
        FIB manager.
        */
    String rd = NatUtil.getVpnRd(dataBroker, externalVpnName);
    if (extNwProvType == null) {
        return false;
    }
    String gwMacAddress = null;
    long l3Vni = 0;
    if (extNwProvType == ProviderTypes.VXLAN) {
        // Get the External Gateway MAC Address which is Router gateway MAC address for SNAT
        gwMacAddress = NatUtil.getExtGwMacAddFromRouterName(dataBroker, routerName);
        if (gwMacAddress != null) {
            LOG.debug("hndlTepAddOnNaptSwitch : External Gateway MAC address {} found for External Router ID {}", gwMacAddress, routerId);
        } else {
            LOG.error("hndlTepAddOnNaptSwitch : No External Gateway MAC address found for External Router ID {}", routerId);
            return false;
        }
        // get l3Vni value for external VPN
        l3Vni = NatEvpnUtil.getL3Vni(dataBroker, rd);
        if (l3Vni == NatConstants.DEFAULT_L3VNI_VALUE) {
            LOG.debug("hndlTepAddOnNaptSwitch : 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, externalVpnName, routerId).longValue();
        }
    }
    for (final String externalIp : externalIps) {
        long serviceId = 0;
        String fibExternalIp = NatUtil.validateAndAddNetworkMask(externalIp);
        if (extNwProvType == ProviderTypes.VXLAN) {
            LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Advertise the route to the externalIp {} " + "having nextHopIp {}", externalIp, nextHopIp);
            NatEvpnUtil.addRoutesForVxLanProvType(dataBroker, bgpManager, fibManager, externalVpnName, rd, externalIp, nextHopIp, l3Vni, tunnelName, gwMacAddress, writeFlowInvTx, RouteOrigin.STATIC, srcDpnId);
            serviceId = l3Vni;
        } else {
            Long label = externalRouterListner.checkExternalIpLabel(routerId, externalIp);
            if (label == null || label == NatConstants.INVALID_ID) {
                LOG.error("hndlTepAddOnNaptSwitch : SNAT->Unable to advertise to the DC GW " + "since label is invalid");
                return false;
            }
            LOG.debug("hndlTepAddOnNaptSwitch : SNAT -> Advertise the route to the externalIp {} " + "having nextHopIp {}", externalIp, nextHopIp);
            long l3vni = 0;
            if (NatUtil.isOpenStackVniSemanticsEnforcedForGreAndVxlan(elanManager, extNwProvType)) {
                l3vni = NatOverVxlanUtil.getInternetVpnVni(idManager, externalVpnName, l3vni).longValue();
            }
            Uuid externalSubnetId = NatUtil.getExternalSubnetForRouterExternalIp(externalIp, router);
            NatUtil.addPrefixToBGP(dataBroker, bgpManager, fibManager, externalVpnName, rd, externalSubnetId, fibExternalIp, nextHopIp, networkId.getValue(), null, /* mac-address */
            label, l3vni, RouteOrigin.STATIC, srcDpnId);
            serviceId = label;
        }
        LOG.debug("hndlTepAddOnNaptSwitch: SNAT -> Install custom FIB routes " + "(Table 21 -> Push MPLS label to Tunnel port");
        List<Instruction> customInstructions = new ArrayList<>();
        int customInstructionIndex = 0;
        long externalSubnetVpnId = NatUtil.getExternalSubnetVpnIdForRouterExternalIp(dataBroker, externalIp, router);
        if (externalSubnetVpnId != NatConstants.INVALID_ID) {
            LOG.debug("hndlTepAddOnNaptSwitch : Will install custom FIB router with external subnet VPN ID {}", externalSubnetVpnId);
            BigInteger subnetIdMetaData = MetaDataUtil.getVpnIdMetadata(externalSubnetVpnId);
            customInstructions.add(new InstructionWriteMetadata(subnetIdMetaData, MetaDataUtil.METADATA_MASK_VRFID).buildInstruction(customInstructionIndex));
            customInstructionIndex++;
        }
        customInstructions.add(new InstructionGotoTable(NwConstants.INBOUND_NAPT_TABLE).buildInstruction(customInstructionIndex));
        CreateFibEntryInput input = new CreateFibEntryInputBuilder().setVpnName(externalVpnName).setSourceDpid(srcDpnId).setInstruction(customInstructions).setIpAddress(fibExternalIp).setServiceId(serviceId).setInstruction(customInstructions).build();
        Future<RpcResult<Void>> future = fibRpcService.createFibEntry(input);
        ListenableFuture<RpcResult<Void>> listenableFuture = JdkFutureAdapters.listenInPoolThread(future);
        Futures.addCallback(listenableFuture, new FutureCallback<RpcResult<Void>>() {

            @Override
            public void onFailure(@Nonnull Throwable error) {
                LOG.error("hndlTepAddOnNaptSwitch : SNAT->Error in generate label or fib install process", error);
            }

            @Override
            public void onSuccess(@Nonnull RpcResult<Void> result) {
                if (result.isSuccessful()) {
                    LOG.info("hndlTepAddOnNaptSwitch : SNAT -> Successfully installed custom FIB routes " + "for prefix {}", externalIp);
                } else {
                    LOG.error("hndlTepAddOnNaptSwitch : SNAT -> Error in rpc call to create custom Fib entries " + "for prefix {} in DPN {}, {}", externalIp, srcDpnId, result.getErrors());
                }
            }
        }, MoreExecutors.directExecutor());
    }
    return true;
}
Also used : InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) Routers(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.Routers) CreateFibEntryInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInputBuilder) ArrayList(java.util.ArrayList) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) CreateFibEntryInput(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.CreateFibEntryInput) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) BigInteger(java.math.BigInteger) InstructionWriteMetadata(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata)

Aggregations

Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)93 ArrayList (java.util.ArrayList)46 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)33 BigInteger (java.math.BigInteger)31 Network (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network)31 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)26 ProviderTypes (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes)19 Subnetmap (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap)19 Port (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port)19 ReadFailedException (org.opendaylight.controller.md.sal.common.api.data.ReadFailedException)17 TransactionCommitFailedException (org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException)15 ElanInstance (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance)12 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)11 ExecutionException (java.util.concurrent.ExecutionException)10 ExternalNetworks (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ExternalNetworks)10 Networks (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.networks.Networks)10 QosPolicy (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.qos.rev160613.qos.attributes.qos.policies.QosPolicy)10 Routers (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.Routers)9 HashSet (java.util.HashSet)8 Nonnull (javax.annotation.Nonnull)8