Search in sources :

Example 26 with Order

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.order.tlv.Order in project netvirt by opendaylight.

the class NeutronTrunkChangeListener method createSubPortInterface.

private void createSubPortInterface(Trunk trunk, SubPorts subPort) {
    if (!NetworkTypeVlan.class.equals(subPort.getSegmentationType())) {
        LOG.warn("SegmentationType other than VLAN not supported for Trunk:SubPorts");
        return;
    }
    String portName = subPort.getPortId().getValue();
    String parentName = trunk.getPortId().getValue();
    InstanceIdentifier<Interface> interfaceIdentifier = NeutronvpnUtils.buildVlanInterfaceIdentifier(portName);
    // Should we use parentName?
    jobCoordinator.enqueueJob("PORT- " + portName, () -> {
        /*
            *  Build Port-to-Subport details first, irrespective of port being available or not.
            */
        PortIdToSubportBuilder portIdToSubportBuilder = new PortIdToSubportBuilder();
        Uuid subPortUuid = subPort.getPortId();
        portIdToSubportBuilder.withKey(new PortIdToSubportKey(subPortUuid)).setPortId(subPortUuid).setTrunkPortId(trunk.getPortId()).setVlanId(subPort.getSegmentationId());
        List<ListenableFuture<?>> futures = new ArrayList<>();
        futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
            tx.merge(NeutronvpnUtils.buildPortIdSubportMappingIdentifier(subPortUuid), portIdToSubportBuilder.build());
            LOG.trace("Creating PortIdSubportMapping for port{}", portName);
        }));
        Interface iface = ifMgr.getInterfaceInfoFromConfigDataStore(portName);
        if (iface == null) {
            /*
                 * Trunk creation requires NeutronPort to be present, by this time interface
                 * should've been created. In controller restart use case Interface would already be present.
                 * Clustering consideration:
                 *      This being same shard as NeutronPort, interface creation will be triggered on the same
                 *      node as this one. Use of DSJC helps ensure the order.
                 */
            LOG.warn("Interface not present for Trunk SubPort: {}", subPort);
            return futures;
        }
        InterfaceBuilder interfaceBuilder = new InterfaceBuilder();
        IfL2vlan ifL2vlan = new IfL2vlanBuilder().setL2vlanMode(IfL2vlan.L2vlanMode.TrunkMember).setVlanId(new VlanId(subPort.getSegmentationId().intValue())).build();
        ParentRefs parentRefs = new ParentRefsBuilder().setParentInterface(parentName).build();
        SplitHorizon splitHorizon = new SplitHorizonBuilder().setOverrideSplitHorizonProtection(true).build();
        interfaceBuilder.setName(portName).setType(L2vlan.class).addAugmentation(ifL2vlan).addAugmentation(parentRefs).addAugmentation(splitHorizon);
        Interface newIface = interfaceBuilder.build();
        /*
             * Interface is already created for parent NeutronPort. We're updating parent refs
             * and VLAN Information
             */
        ListenableFuture<?> future = txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, txn -> txn.merge(interfaceIdentifier, newIface));
        LoggingFutures.addErrorLogging(future, LOG, "createSubPortInterface: Failed for portName {}, parentName {}", portName, parentName);
        futures.add(future);
        return futures;
    });
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) SplitHorizon(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.SplitHorizon) LoggerFactory(org.slf4j.LoggerFactory) Executors(org.opendaylight.infrautils.utils.concurrent.Executors) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) NetworkTypeVlan(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.NetworkTypeVlan) Trunk(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.trunks.rev170118.trunks.attributes.trunks.Trunk) Singleton(javax.inject.Singleton) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) IfL2vlan(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlan) Neutron(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150712.Neutron) IfL2vlanBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlanBuilder) ArrayList(java.util.ArrayList) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface) Inject(javax.inject.Inject) PreDestroy(javax.annotation.PreDestroy) ParentRefs(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefs) SplitHorizonBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.SplitHorizonBuilder) Map(java.util.Map) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) SubPorts(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.trunks.rev170118.trunk.attributes.SubPorts) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) Trunks(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.trunks.rev170118.trunks.attributes.Trunks) Logger(org.slf4j.Logger) PortIdToSubportKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.port.id.subport.data.PortIdToSubportKey) AbstractAsyncDataTreeChangeListener(org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) Objects(java.util.Objects) List(java.util.List) ParentRefsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefsBuilder) InterfaceBuilder(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceBuilder) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) L2vlan(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.L2vlan) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) Preconditions(com.google.common.base.Preconditions) VlanId(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId) SubPortsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.trunks.rev170118.trunk.attributes.SubPortsKey) Collections(java.util.Collections) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) PortIdToSubportBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.port.id.subport.data.PortIdToSubportBuilder) IfL2vlan(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlan) L2vlan(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.L2vlan) SplitHorizonBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.SplitHorizonBuilder) ArrayList(java.util.ArrayList) InterfaceBuilder(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceBuilder) IfL2vlanBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlanBuilder) ParentRefsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefsBuilder) ParentRefs(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefs) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) PortIdToSubportBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.port.id.subport.data.PortIdToSubportBuilder) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) NetworkTypeVlan(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.NetworkTypeVlan) PortIdToSubportKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.port.id.subport.data.PortIdToSubportKey) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface) VlanId(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId) SplitHorizon(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.SplitHorizon) IfL2vlan(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlan)

Example 27 with Order

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.order.tlv.Order in project netvirt by opendaylight.

the class NeutronPortChangeListener method add.

@Override
public void add(InstanceIdentifier<Port> identifier, Port input) {
    LOG.trace("Received port add event: port={}", input);
    String portName = input.getUuid().getValue();
    LOG.trace("Adding Port : key: {}, value={}", identifier, input);
    Network network = neutronvpnUtils.getNeutronNetwork(input.getNetworkId());
    if (network == null || !NeutronvpnUtils.isNetworkTypeSupported(network)) {
        LOG.warn("neutron vpn received a port add() for a network without a provider extension augmentation " + "or with an unsupported network type for the port {} which is part of network {}", portName, network);
        return;
    }
    neutronvpnUtils.addToPortCache(input);
    String portStatus = NeutronUtils.PORT_STATUS_DOWN;
    if (!Strings.isNullOrEmpty(input.getDeviceOwner()) && !Strings.isNullOrEmpty(input.getDeviceId())) {
        if (NeutronConstants.DEVICE_OWNER_ROUTER_INF.equals(input.getDeviceOwner())) {
            handleRouterInterfaceAdded(input);
            NeutronUtils.createPortStatus(input.getUuid().getValue(), NeutronUtils.PORT_STATUS_ACTIVE, dataBroker);
            return;
        }
        if (NeutronConstants.DEVICE_OWNER_GATEWAY_INF.equals(input.getDeviceOwner())) {
            handleRouterGatewayUpdated(input, false);
            portStatus = NeutronUtils.PORT_STATUS_ACTIVE;
        } else if (NeutronConstants.DEVICE_OWNER_FLOATING_IP.equals(input.getDeviceOwner())) {
            handleFloatingIpPortUpdated(null, input);
            portStatus = NeutronUtils.PORT_STATUS_ACTIVE;
        }
    }
    // in order to validate the supported vnic types from the hostconfig
    if (input.getFixedIps() != null && !input.getFixedIps().isEmpty() && (!isPortTypeSwitchdev(input) || isPortBound(input))) {
        handleNeutronPortCreated(input);
    }
    NeutronUtils.createPortStatus(input.getUuid().getValue(), portStatus, dataBroker);
}
Also used : Network(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network)

Example 28 with Order

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.order.tlv.Order in project lispflowmapping by opendaylight.

the class MappingMergeUtil method getCommonLocatorRecords.

private static List<LocatorRecord> getCommonLocatorRecords(MappingRecord nbMapping, MappingRecord sbMapping) {
    // Return null when NB is a negative mapping
    if (nbMapping.getLocatorRecord() == null || nbMapping.getLocatorRecord().isEmpty()) {
        return null;
    }
    List<LocatorRecord> sbLocators = sbMapping.getLocatorRecord();
    // We assume locators are unique and don't show up several times (with different or identical p/w/mp/mw),
    // so we create a HashMap of the locators from the SB mapping record, keyed by the Rloc
    Map<Rloc, LocatorRecord> sbLocatorMap = new HashMap<Rloc, LocatorRecord>();
    for (LocatorRecord locator : sbLocators) {
        sbLocatorMap.put(locator.getRloc(), locator);
    }
    // Gradually building final list of common locators, in order that they appear in NB Mapping
    List<LocatorRecord> commonLocators = new ArrayList<LocatorRecord>();
    for (LocatorRecord nbLocator : nbMapping.getLocatorRecord()) {
        Rloc nbRloc = nbLocator.getRloc();
        if (sbLocatorMap.containsKey(nbRloc)) {
            if (sbLocatorMap.get(nbRloc).getPriority() == (short) 255) {
                // if SB locator has p == 255 then common locator takes all NB fields except for p
                // which must be set to 255
                LocatorRecordBuilder lrb = new LocatorRecordBuilder(nbLocator);
                lrb.setPriority((short) 255);
                commonLocators.add(lrb.build());
            } else {
                commonLocators.add(nbLocator);
            }
        }
    }
    return commonLocators;
}
Also used : LocatorRecordBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.locatorrecords.LocatorRecordBuilder) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Rloc(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.Rloc) ArrayList(java.util.ArrayList) LocatorRecord(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.locatorrecords.LocatorRecord)

Example 29 with Order

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.order.tlv.Order in project lispflowmapping by opendaylight.

the class MappingMergeUtil method mergeLocatorRecords.

private static void mergeLocatorRecords(MappingRecordBuilder mrb, MappingRecord newRecord) {
    List<LocatorRecord> locators = mrb.getLocatorRecord();
    // We assume locators are unique and sorted and don't show up several times (with different or identical
    // p/w/mp/mw), so we create a LinkedHashMap (which preserves order) of the locators from the existing merged
    // record, keyed by the Rloc
    Map<Rloc, LocatorRecord> locatorMap = new LinkedHashMap<Rloc, LocatorRecord>();
    // All locators to be added to the merge set are first stored in this list
    List<LocatorRecord> newLocatorList = new ArrayList<LocatorRecord>();
    for (LocatorRecord locator : locators) {
        locatorMap.put(locator.getRloc(), locator);
    }
    for (LocatorRecord newLocator : newRecord.getLocatorRecord()) {
        Rloc newRloc = newLocator.getRloc();
        if (locatorMap.containsKey(newRloc)) {
            // overlapping locator
            if (!locatorMap.get(newRloc).equals(newLocator)) {
                LocatorRecord mergedLocator = mergeLocators(locatorMap.get(newRloc), newLocator);
                newLocatorList.add(mergedLocator);
            }
        } else {
            // new locator
            newLocatorList.add(newLocator);
        }
    }
    // Build new merged and sorted locator set if need be
    if (!newLocatorList.isEmpty()) {
        List<LocatorRecord> mergedLocators = new ArrayList<LocatorRecord>();
        int mlocIt = 0;
        int locIt = 0;
        while (mlocIt < newLocatorList.size() && locIt < locators.size()) {
            int cmp = compareLocators(locators.get(locIt), newLocatorList.get(mlocIt));
            if (cmp < 0) {
                mergedLocators.add(locators.get(locIt));
                locIt++;
            } else if (cmp > 0) {
                mergedLocators.add(newLocatorList.get(mlocIt));
                mlocIt++;
            } else {
                // when a locator appears in both lists, keep the new (merged) one and skip the old
                mergedLocators.add(newLocatorList.get(mlocIt));
                mlocIt++;
                locIt++;
            }
        }
        while (locIt < locators.size()) {
            mergedLocators.add(locators.get(locIt));
            locIt++;
        }
        while (mlocIt < newLocatorList.size()) {
            mergedLocators.add(newLocatorList.get(mlocIt));
            mlocIt++;
        }
        mrb.setLocatorRecord(mergedLocators);
    }
}
Also used : Rloc(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.Rloc) ArrayList(java.util.ArrayList) LocatorRecord(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.locatorrecords.LocatorRecord) LinkedHashMap(java.util.LinkedHashMap)

Example 30 with Order

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.order.tlv.Order in project genius by opendaylight.

the class InterfaceManagerConfigurationTest method rebuildTerminationPoint.

private TerminationPoint rebuildTerminationPoint(TerminationPoint tp) {
    // The problem we're fixing here is that, in MD-SAL binding v1, YANG lists are represented
    // as Java lists but they don't preserve order (unless they specify “ordered-by user”).
    // YANG keyed lists in particular are backed by maps, so you can store such a list in the
    // MD-SAL and get it back in a different order.
    // When comparing beans involving such lists, we need to sort the lists before comparing
    // them. Retrieving the augmentation gives a modifiable list, so it's tempting to just
    // sort that — but the list is re-created every time the augmentation is retrieved, so
    // the sort is lost.
    // To avoid all this, we rebuild instances of TerminationPoint, and sort the affected lists
    // in the augmentations, with full augmentation rebuilds too (since the lists in a built
    // augmentation might be unmodifiable).
    TerminationPointBuilder newTpBuilder = new TerminationPointBuilder(tp);
    OvsdbTerminationPointAugmentation ovsdbTpAugmentation = tp.getAugmentation(OvsdbTerminationPointAugmentation.class);
    if (ovsdbTpAugmentation != null) {
        OvsdbTerminationPointAugmentationBuilder newOvsdbTpAugmentationBuilder = new OvsdbTerminationPointAugmentationBuilder(ovsdbTpAugmentation);
        if (ovsdbTpAugmentation.getOptions() != null) {
            List<Options> options = new ArrayList<>(ovsdbTpAugmentation.getOptions());
            options.sort(Comparator.comparing(o -> o.getKey().toString()));
            newOvsdbTpAugmentationBuilder.setOptions(options);
        }
        if (ovsdbTpAugmentation.getInterfaceBfd() != null) {
            List<InterfaceBfd> interfaceBfd = new ArrayList<>(ovsdbTpAugmentation.getInterfaceBfd());
            interfaceBfd.sort(Comparator.comparing(o -> o.getKey().toString()));
            newOvsdbTpAugmentationBuilder.setInterfaceBfd(interfaceBfd);
        }
        newTpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, newOvsdbTpAugmentationBuilder.build());
    }
    return newTpBuilder.build();
}
Also used : Options(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.Options) InterfaceNameEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.dpn.to._interface.list.dpn.to._interface.InterfaceNameEntryKey) OvsdbTerminationPointAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation) Table(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table) GetEgressInstructionsForInterfaceInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressInstructionsForInterfaceInput) GetTunnelTypeOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetTunnelTypeOutput) TRUNK_INTERFACE_NAME(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.TRUNK_INTERFACE_NAME) GetDpnInterfaceListInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpnInterfaceListInputBuilder) BridgeRefEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.bridge.ref.info.BridgeRefEntry) PARENT_INTERFACE_1(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.PARENT_INTERFACE_1) ServiceIndex(org.opendaylight.genius.utils.ServiceIndex) Future(java.util.concurrent.Future) GuiceRule(org.opendaylight.infrautils.inject.guice.testutils.GuiceRule) FlowKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey) PARENT_INTERFACE(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.PARENT_INTERFACE) Optional(com.google.common.base.Optional) JobCoordinatorCountedEventsWaiter(org.opendaylight.genius.datastoreutils.testutils.JobCoordinatorCountedEventsWaiter) NodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId) PARENT_INTERFACE_2(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.PARENT_INTERFACE_2) EgressActionsForInterfaceOutput(org.opendaylight.genius.interfacemanager.test.xtend.EgressActionsForInterfaceOutput) BigInteger(java.math.BigInteger) ExpectedInterfaceState(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedInterfaceState) NodeconnectorIdFromInterfaceOutput(org.opendaylight.genius.interfacemanager.test.xtend.NodeconnectorIdFromInterfaceOutput) InterfaceTypeOutput(org.opendaylight.genius.interfacemanager.test.xtend.InterfaceTypeOutput) BoundServices(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices) GetNodeconnectorIdFromInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetNodeconnectorIdFromInterfaceInputBuilder) ExpectedOvsdbBridge(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedOvsdbBridge) GetInterfaceTypeInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetInterfaceTypeInput) TerminationPoint(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint) BoundServicesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServicesKey) TransactionCommitFailedException(org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException) DataBroker(org.opendaylight.controller.md.sal.binding.api.DataBroker) GetEgressInstructionsForInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressInstructionsForInterfaceInputBuilder) GetEndpointIpForDpnOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEndpointIpForDpnOutput) BridgeEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.bridge._interface.info.BridgeEntryKey) LogCaptureRule(org.opendaylight.infrautils.testutils.LogCaptureRule) ServicesInfoKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.ServicesInfoKey) DEFAULT_OPERATIONAL(org.opendaylight.genius.interfacemanager.renderer.ovs.utilities.BatchingUtils.EntityType.DEFAULT_OPERATIONAL) ServiceModeIngress(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeIngress) OdlInterfaceRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService) ServicesInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.ServicesInfo) TunnelTypeOutput(org.opendaylight.genius.interfacemanager.test.xtend.TunnelTypeOutput) MINUTES(java.util.concurrent.TimeUnit.MINUTES) TUNNEL_INTERFACE_NAME(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.TUNNEL_INTERFACE_NAME) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) IfL2vlan(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlan) ArrayList(java.util.ArrayList) INTERFACE_NAME_1(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.INTERFACE_NAME_1) INTERFACE_NAME_2(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.INTERFACE_NAME_2) GetDpidFromInterfaceInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpidFromInterfaceInput) GetPortFromInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetPortFromInterfaceOutput) BridgeRefEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.bridge.ref.info.BridgeRefEntryKey) InterfaceTypeVxlan(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeVxlan) GetPortFromInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetPortFromInterfaceInputBuilder) GetDpidFromInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpidFromInterfaceInputBuilder) Before(org.junit.Before) InterfaceInfo(org.opendaylight.genius.interfacemanager.globals.InterfaceInfo) GetEgressActionsForInterfaceInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInput) DpnToInterfaceList(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.DpnToInterfaceList) InterfaceManagerTestUtil.waitTillOperationCompletes(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.waitTillOperationCompletes) GetDpidFromInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpidFromInterfaceOutput) Test(org.junit.Test) ExpectedBoundServiceState(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedBoundServiceState) DpnToInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.dpn.to._interface.list.DpnToInterface) L2vlan(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.L2vlan) AsyncEventsWaiter(org.opendaylight.genius.datastoreutils.testutils.AsyncEventsWaiter) GetNodeconnectorIdFromInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetNodeconnectorIdFromInterfaceOutput) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) INTERFACE_NAME(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.INTERFACE_NAME) FlowBasedServicesUtils(org.opendaylight.genius.interfacemanager.servicebindings.flowbased.utilities.FlowBasedServicesUtils) Assert(org.junit.Assert) ExpectedInterfaceInfo(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedInterfaceInfo) PORT_NO_1(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.PORT_NO_1) Tunnel(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.Tunnel) TerminationPointBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) InterfaceChildEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._interface.child.info._interface.parent.entry.InterfaceChildEntry) InterfaceType(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType) MethodRule(org.junit.rules.MethodRule) ExpectedInterfaceChildEntry(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedInterfaceChildEntry) EndPointIpFromDpn(org.opendaylight.genius.interfacemanager.test.xtend.EndPointIpFromDpn) InterfaceParentEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._interface.child.info.InterfaceParentEntryKey) GetEndpointIpForDpnInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEndpointIpForDpnInputBuilder) CONFIGURATION(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION) Flow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow) JobCoordinatorTestModule(org.opendaylight.genius.datastoreutils.testutils.JobCoordinatorTestModule) GetInterfaceTypeInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetInterfaceTypeInputBuilder) GetTunnelTypeInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetTunnelTypeInputBuilder) GetPortFromInterfaceInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetPortFromInterfaceInput) OPERATIONAL(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.OPERATIONAL) ParentRefs(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefs) GetEndpointIpForDpnInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEndpointIpForDpnInput) ExpectedTerminationPoint(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedTerminationPoint) After(org.junit.After) GetEgressInstructionsForInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressInstructionsForInterfaceOutput) GetTunnelTypeInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetTunnelTypeInput) VLAN_INTERFACE_INGRESS_TABLE(org.opendaylight.genius.mdsalutil.NwConstants.VLAN_INTERFACE_INGRESS_TABLE) InterfaceBfd(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd) GetInterfaceTypeOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetInterfaceTypeOutput) LogicalDatastoreType(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType) PortFromInterfaceOutput(org.opendaylight.genius.interfacemanager.test.xtend.PortFromInterfaceOutput) Interfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.get.dpn._interface.list.output.Interfaces) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface) WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) List(java.util.List) ParentRefsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.ParentRefsBuilder) ExpectedServicesInfo(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedServicesInfo) InterfaceChildEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._interface.child.info._interface.parent.entry.InterfaceChildEntryKey) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) DpnToInterfaceKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.dpn.to._interface.list.DpnToInterfaceKey) BatchingUtils(org.opendaylight.genius.interfacemanager.renderer.ovs.utilities.BatchingUtils) FlowId(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId) ServiceBindings(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceBindings) Inject(javax.inject.Inject) TestableQueues(org.opendaylight.genius.interfacemanager.test.infra.TestableQueues) OvsdbTerminationPointAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentationBuilder) AssertDataObjects.assertEqualBeans(org.opendaylight.mdsal.binding.testutils.AssertDataObjects.assertEqualBeans) ExpectedFlowEntries(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedFlowEntries) ExpectedInterfaceConfig(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedInterfaceConfig) DEFAULT_EGRESS_SERVICE_INDEX(org.opendaylight.genius.mdsalutil.NwConstants.DEFAULT_EGRESS_SERVICE_INDEX) ExpectedInterfaceListFromDpn(org.opendaylight.genius.interfacemanager.test.xtend.ExpectedInterfaceListFromDpn) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) DpnFromInterfaceOutput(org.opendaylight.genius.interfacemanager.test.xtend.DpnFromInterfaceOutput) ServiceModeEgress(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeEgress) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) IfmUtil(org.opendaylight.genius.interfacemanager.IfmUtil) GetDpnInterfaceListInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpnInterfaceListInput) BridgeInterfaceEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.bridge._interface.info.bridge.entry.BridgeInterfaceEntry) TestableDataTreeChangeListenerModule(org.opendaylight.genius.datastoreutils.testutils.TestableDataTreeChangeListenerModule) TableKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey) BridgeInterfaceEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.bridge._interface.info.bridge.entry.BridgeInterfaceEntryKey) InterfaceNameEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.dpn.to._interface.list.dpn.to._interface.InterfaceNameEntryBuilder) LogRule(org.opendaylight.infrautils.testutils.LogRule) GetEgressActionsForInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceOutput) EgressInstructionsForInterfaceOutput(org.opendaylight.genius.interfacemanager.test.xtend.EgressInstructionsForInterfaceOutput) Rule(org.junit.Rule) GetNodeconnectorIdFromInterfaceInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetNodeconnectorIdFromInterfaceInput) Ignore(org.junit.Ignore) DPN_ID_1(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.DPN_ID_1) GetDpnInterfaceListOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpnInterfaceListOutput) DPN_ID_2(org.opendaylight.genius.interfacemanager.test.InterfaceManagerTestUtil.DPN_ID_2) InterfaceMetaUtils(org.opendaylight.genius.interfacemanager.commons.InterfaceMetaUtils) GetEgressActionsForInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInputBuilder) InterfaceMeta(org.opendaylight.genius.interfacemanager.test.xtend.InterfaceMeta) InterfaceNameEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406.dpn.to._interface.list.dpn.to._interface.InterfaceNameEntry) Comparator(java.util.Comparator) FlowAssertTestUtils(org.opendaylight.genius.mdsalutil.interfaces.testutils.FlowAssertTestUtils) Options(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.Options) OvsdbTerminationPointAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentationBuilder) ArrayList(java.util.ArrayList) InterfaceBfd(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceBfd) TerminationPointBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder) OvsdbTerminationPointAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation)

Aggregations

ArrayList (java.util.ArrayList)25 ActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder)19 OutputActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder)17 VisibleForTesting (com.google.common.annotations.VisibleForTesting)7 Test (org.junit.Test)6 ItemSyncBox (org.opendaylight.openflowplugin.applications.frsync.util.ItemSyncBox)5 LinkedHashMap (java.util.LinkedHashMap)4 Map (java.util.Map)4 Batch (org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.Batch)4 BatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.BatchBuilder)4 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)4 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)4 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)3 HashMap (java.util.HashMap)3 List (java.util.List)3 ExecutionException (java.util.concurrent.ExecutionException)3 Inject (javax.inject.Inject)3 Action (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action)3 FlowCapableNode (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode)3 TableKey (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey)3