Search in sources :

Example 56 with Link

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link in project openflowplugin by opendaylight.

the class InventoryDataServiceUtilTest method testDataPathIdFromNodeId.

/**
 * Test method for {@link InventoryDataServiceUtil#dataPathIdFromNodeId(NodeId)}.
 */
@Test
public void testDataPathIdFromNodeId() {
    String string = "openflow:";
    NodeId[] nodeIds = new NodeId[] { // 0x00000000 000004d2
    new NodeId(string + "1234"), // 0x8db2089e 01391a86
    new NodeId(string + "10210232779920710278"), // 0xffffffff ffffffff
    new NodeId(string + "18446744073709551615") };
    long[] expectedDPIDs = new long[] { 1234L, -8236511293788841338L, -1L };
    for (int i = 0; i < nodeIds.length; i++) {
        BigInteger datapathId = InventoryDataServiceUtil.dataPathIdFromNodeId(nodeIds[i]);
        Assert.assertEquals(expectedDPIDs[i], datapathId.longValue());
    }
}
Also used : NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) BigInteger(java.math.BigInteger) Test(org.junit.Test)

Example 57 with Link

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link in project openflowplugin by opendaylight.

the class FlowUtils method createDirectMacToMacFlow.

/**
 * Returns a {@link FlowBuilder} forwarding all packets to controller port.
 */
public static FlowBuilder createDirectMacToMacFlow(final Short tableId, final int priority, final MacAddress srcMac, final MacAddress dstMac, final NodeConnectorRef dstPort) {
    FlowBuilder macToMacFlow = new FlowBuilder().setTableId(tableId).setFlowName("mac2mac");
    macToMacFlow.setId(new FlowId(Long.toString(macToMacFlow.hashCode())));
    EthernetMatch ethernetMatch = new EthernetMatchBuilder().setEthernetSource(new EthernetSourceBuilder().setAddress(srcMac).build()).setEthernetDestination(new EthernetDestinationBuilder().setAddress(dstMac).build()).build();
    MatchBuilder match = new MatchBuilder();
    match.setEthernetMatch(ethernetMatch);
    Uri outputPort = dstPort.getValue().firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId();
    Action outputToControllerAction = new ActionBuilder().setOrder(0).setAction(new OutputActionCaseBuilder().setOutputAction(new OutputActionBuilder().setMaxLength(Integer.valueOf(0xffff)).setOutputNodeConnector(outputPort).build()).build()).build();
    // Create an Apply Action
    ApplyActions applyActions = new ApplyActionsBuilder().setAction(ImmutableList.of(outputToControllerAction)).build();
    // Wrap our Apply Action in an Instruction
    Instruction applyActionsInstruction = new InstructionBuilder().setOrder(0).setInstruction(new ApplyActionsCaseBuilder().setApplyActions(applyActions).build()).build();
    // Put our Instruction in a list of Instructions
    macToMacFlow.setMatch(new MatchBuilder().setEthernetMatch(ethernetMatch).build()).setInstructions(new InstructionsBuilder().setInstruction(ImmutableList.of(applyActionsInstruction)).build()).setPriority(priority).setBufferId(OFConstants.OFP_NO_BUFFER).setHardTimeout(0).setIdleTimeout(0).setFlags(new FlowModFlags(false, false, false, false, false));
    return macToMacFlow;
}
Also used : OutputActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCaseBuilder) InstructionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) NodeConnector(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector) FlowModFlags(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) Uri(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) InstructionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder) FlowId(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId) EthernetDestinationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder) EthernetMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatch) FlowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder) EthernetSourceBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetSourceBuilder) ApplyActionsCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) ApplyActionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder) NodeConnectorKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey) ApplyActions(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActions)

Example 58 with Link

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link in project openflowplugin by opendaylight.

the class ReconcileUtil method resolveFlowDiffsInAllTables.

/**
 * Resolves flow differences in all tables.
 *
 * @param nodeId              target node
 * @param tableOperationalMap flow-tables resent on device
 * @param tablesConfigured    flow-tables configured for device
 * @param gatherUpdates       check content of pending item if present on device (and create update task eventually)
 * @return map : key={@link TableKey}, value={@link ItemSyncBox} of safe synchronization steps
 */
public static Map<TableKey, ItemSyncBox<Flow>> resolveFlowDiffsInAllTables(final NodeId nodeId, final Map<Short, Table> tableOperationalMap, final List<Table> tablesConfigured, final boolean gatherUpdates) {
    LOG.trace("resolving flows in tables for {}", nodeId.getValue());
    final Map<TableKey, ItemSyncBox<Flow>> tableFlowSyncBoxes = new HashMap<>();
    for (final Table tableConfigured : tablesConfigured) {
        final List<Flow> flowsConfigured = tableConfigured.getFlow();
        if (flowsConfigured == null || flowsConfigured.isEmpty()) {
            continue;
        }
        // lookup table (on device)
        final Table tableOperational = tableOperationalMap.get(tableConfigured.getId());
        // wrap existing (on device) flows in current table into map
        final Map<FlowDescriptor, Flow> flowOperationalMap = FlowCapableNodeLookups.wrapFlowsToMap(tableOperational != null ? tableOperational.getFlow() : null);
        final ItemSyncBox<Flow> flowsSyncBox = resolveFlowDiffsInTable(flowsConfigured, flowOperationalMap, gatherUpdates);
        if (!flowsSyncBox.isEmpty()) {
            tableFlowSyncBoxes.put(tableConfigured.getKey(), flowsSyncBox);
        }
    }
    return tableFlowSyncBoxes;
}
Also used : Table(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table) HashMap(java.util.HashMap) TableKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey) Flow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow)

Example 59 with Link

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link in project openflowplugin by opendaylight.

the class MultipartMatchFieldSerializerInjector method injectSerializers.

/**
 * Injects multipart match field serializers into provided
 * {@link org.opendaylight.openflowjava.protocol.api.extensibility.SerializerExtensionProvider}.
 *
 * @param provider OpenflowJava serializer extension provider
 */
static void injectSerializers(final SerializerExtensionProvider provider) {
    // Inject new message serializers here using injector created by createInjector method
    final Function<Class<? extends MatchField>, Consumer<OFSerializer<SetFieldMatch>>> injector = createInjector(provider, EncodeConstants.OF13_VERSION_ID);
    injector.apply(ArpOp.class).accept(new ArpOpMatchFieldSerializer());
    injector.apply(ArpSha.class).accept(new ArpShaMatchFieldSerializer());
    injector.apply(ArpSpa.class).accept(new ArpSpaMatchFieldSerializer());
    injector.apply(ArpTha.class).accept(new ArpThaMatchFieldSerializer());
    injector.apply(ArpTpa.class).accept(new ArpTpaMatchFieldSerializer());
    injector.apply(EthDst.class).accept(new EthDstMatchFieldSerializer());
    injector.apply(EthSrc.class).accept(new EthSrcMatchFieldSerializer());
    injector.apply(EthType.class).accept(new EthTypeMatchFieldSerializer());
    injector.apply(Icmpv4Code.class).accept(new Icmpv4CodeMatchFieldSerializer());
    injector.apply(Icmpv4Type.class).accept(new Icmpv4TypeMatchFieldSerializer());
    injector.apply(Icmpv6Code.class).accept(new Icmpv6CodeMatchFieldSerializer());
    injector.apply(Icmpv6Type.class).accept(new Icmpv6TypeMatchFieldSerializer());
    injector.apply(InPhyPort.class).accept(new InPhyPortMatchFieldSerializer());
    injector.apply(InPort.class).accept(new InPortMatchFieldSerializer());
    injector.apply(IpDscp.class).accept(new IpDscpMatchFieldSerializer());
    injector.apply(IpEcn.class).accept(new IpEcnMatchFieldSerializer());
    injector.apply(IpProto.class).accept(new IpProtoMatchFieldSerializer());
    injector.apply(Ipv4Dst.class).accept(new Ipv4DstMatchFieldSerializer());
    injector.apply(Ipv4Src.class).accept(new Ipv4SrcMatchFieldSerializer());
    injector.apply(Ipv6Dst.class).accept(new Ipv6DstMatchFieldSerializer());
    injector.apply(Ipv6Exthdr.class).accept(new Ipv6ExtHdrMatchFieldSerializer());
    injector.apply(Ipv6Flabel.class).accept(new Ipv6FlabelMatchFieldSerializer());
    injector.apply(Ipv6NdSll.class).accept(new Ipv6NdSllMatchFieldSerializer());
    injector.apply(Ipv6NdTarget.class).accept(new Ipv6NdTargetMatchFieldSerializer());
    injector.apply(Ipv6NdTll.class).accept(new Ipv6NdTllMatchFieldSerializer());
    injector.apply(Ipv6Src.class).accept(new Ipv6SrcMatchFieldSerializer());
    injector.apply(Metadata.class).accept(new MetadataMatchFieldSerializer());
    injector.apply(MplsBos.class).accept(new MplsBosMatchFieldSerializer());
    injector.apply(MplsLabel.class).accept(new MplsLabelMatchFieldSerializer());
    injector.apply(MplsTc.class).accept(new MplsTcMatchFieldSerializer());
    injector.apply(PbbIsid.class).accept(new PbbIsidMatchFieldSerializer());
    injector.apply(SctpDst.class).accept(new SctpDstMatchFieldSerializer());
    injector.apply(SctpSrc.class).accept(new SctpSrcMatchFieldSerializer());
    injector.apply(TcpDst.class).accept(new TcpDstMatchFieldSerializer());
    injector.apply(TcpFlags.class).accept(new TcpFlagsMatchFieldSerializer());
    injector.apply(TcpSrc.class).accept(new TcpSrcMatchFieldSerializer());
    injector.apply(TunnelId.class).accept(new TunnelIdMatchFieldSerializer());
    // TODO: Finish implementation of Tunnel Ipv4 src and dst
    injector.apply(TunnelIpv4Dst.class).accept(new Ipv4DstMatchFieldSerializer());
    injector.apply(TunnelIpv4Src.class).accept(new Ipv4SrcMatchFieldSerializer());
    injector.apply(UdpDst.class).accept(new UdpDstMatchFieldSerializer());
    injector.apply(UdpSrc.class).accept(new UdpSrcMatchFieldSerializer());
    injector.apply(VlanPcp.class).accept(new VlanPcpMatchFieldSerializer());
    injector.apply(VlanVid.class).accept(new VlanVidMatchFieldSerializer());
}
Also used : ArpSpa(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpSpa) UdpDstMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.UdpDstMatchFieldSerializer) PbbIsidMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.PbbIsidMatchFieldSerializer) IpProto(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpProto) Ipv6Src(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Src) Ipv6ExtHdrMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6ExtHdrMatchFieldSerializer) ArpSha(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpSha) Icmpv6Type(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type) SctpSrcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.SctpSrcMatchFieldSerializer) Ipv4SrcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv4SrcMatchFieldSerializer) Ipv6NdSll(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdSll) Icmpv6TypeMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Icmpv6TypeMatchFieldSerializer) SctpDst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.SctpDst) Icmpv4CodeMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Icmpv4CodeMatchFieldSerializer) TunnelIdMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.TunnelIdMatchFieldSerializer) Consumer(java.util.function.Consumer) TcpFlagsMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.TcpFlagsMatchFieldSerializer) ArpShaMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.ArpShaMatchFieldSerializer) Icmpv4Type(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Type) TcpSrc(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TcpSrc) ArpThaMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.ArpThaMatchFieldSerializer) InPort(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPort) VlanVid(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.VlanVid) UdpDst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.UdpDst) TunnelIpv4Dst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Dst) InPhyPortMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.InPhyPortMatchFieldSerializer) TcpDstMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.TcpDstMatchFieldSerializer) Icmpv6CodeMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Icmpv6CodeMatchFieldSerializer) SetFieldMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch) Ipv6NdSllMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6NdSllMatchFieldSerializer) UdpSrcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.UdpSrcMatchFieldSerializer) EthType(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthType) EthTypeMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.EthTypeMatchFieldSerializer) EthSrcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.EthSrcMatchFieldSerializer) IpEcnMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.IpEcnMatchFieldSerializer) Ipv6DstMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6DstMatchFieldSerializer) TcpDst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TcpDst) MplsLabelMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.MplsLabelMatchFieldSerializer) Ipv6NdTllMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6NdTllMatchFieldSerializer) IpDscpMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.IpDscpMatchFieldSerializer) MplsTcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.MplsTcMatchFieldSerializer) PbbIsid(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.PbbIsid) TunnelIpv4Src(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Src) Ipv4Src(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv4Src) UdpSrc(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.UdpSrc) ArpTpa(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpTpa) Metadata(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Metadata) ArpOp(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpOp) TunnelIpv4Src(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Src) Ipv6FlabelMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6FlabelMatchFieldSerializer) ArpTha(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpTha) TunnelId(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelId) VlanPcpMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.VlanPcpMatchFieldSerializer) MatchField(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MatchField) MplsBosMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.MplsBosMatchFieldSerializer) Ipv6Exthdr(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Exthdr) Ipv6NdTll(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTll) TcpFlags(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TcpFlags) InPortMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.InPortMatchFieldSerializer) VlanVidMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.VlanVidMatchFieldSerializer) MplsBos(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsBos) MplsLabel(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsLabel) SctpDstMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.SctpDstMatchFieldSerializer) MplsTc(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsTc) EthDst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthDst) EthDstMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.EthDstMatchFieldSerializer) Icmpv6Code(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Code) Ipv4Dst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv4Dst) TunnelIpv4Dst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Dst) Ipv6SrcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6SrcMatchFieldSerializer) Ipv6Dst(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Dst) Ipv6NdTarget(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTarget) InPhyPort(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPhyPort) IpProtoMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.IpProtoMatchFieldSerializer) MetadataMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.MetadataMatchFieldSerializer) ArpTpaMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.ArpTpaMatchFieldSerializer) IpEcn(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpEcn) TcpSrcMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.TcpSrcMatchFieldSerializer) Icmpv4Code(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Code) SctpSrc(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.SctpSrc) Ipv6NdTargetMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv6NdTargetMatchFieldSerializer) Icmpv4TypeMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Icmpv4TypeMatchFieldSerializer) VlanPcp(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.VlanPcp) ArpOpMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.ArpOpMatchFieldSerializer) EthSrc(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthSrc) Ipv6Flabel(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Flabel) Ipv4DstMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.Ipv4DstMatchFieldSerializer) ArpSpaMatchFieldSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield.ArpSpaMatchFieldSerializer) IpDscp(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpDscp)

Example 60 with Link

use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link in project openflowplugin by opendaylight.

the class InstructionSerializerInjector method injectSerializers.

/**
 * Injects serializers into provided
 * {@link org.opendaylight.openflowjava.protocol.api.extensibility.SerializerExtensionProvider}.
 *
 * @param provider OpenflowJava serializer extension provider
 */
static void injectSerializers(final SerializerExtensionProvider provider) {
    // Inject new instruction serializers here using injector created by createInjector method
    final Function<Class<? extends Instruction>, Consumer<OFSerializer<? extends Instruction>>> injector = createInjector(provider, EncodeConstants.OF13_VERSION_ID);
    injector.apply(ApplyActionsCase.class).accept(new ApplyActionsInstructionSerializer());
    injector.apply(ClearActionsCase.class).accept(new ClearActionsInstructionSerializer());
    injector.apply(GoToTableCase.class).accept(new GoToTableInstructionSerializer());
    injector.apply(MeterCase.class).accept(new MeterInstructionSerializer());
    injector.apply(WriteActionsCase.class).accept(new WriteActionsInstructionSerializer());
    injector.apply(WriteMetadataCase.class).accept(new WriteMetadataInstructionSerializer());
}
Also used : GoToTableInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.GoToTableInstructionSerializer) WriteMetadataCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteMetadataCase) MeterCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.MeterCase) ClearActionsInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.ClearActionsInstructionSerializer) WriteActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteActionsCase) WriteMetadataInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.WriteMetadataInstructionSerializer) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction) ClearActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase) Consumer(java.util.function.Consumer) ApplyActionsInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.ApplyActionsInstructionSerializer) GoToTableCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.GoToTableCase) WriteActionsInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.WriteActionsInstructionSerializer) MeterInstructionSerializer(org.opendaylight.openflowplugin.impl.protocol.serialization.instructions.MeterInstructionSerializer) ApplyActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase)

Aggregations

Test (org.junit.Test)454 ByteBuf (io.netty.buffer.ByteBuf)138 ArrayList (java.util.ArrayList)71 BigInteger (java.math.BigInteger)58 Eid (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)54 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)51 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)45 VersionDatapathIdConvertorData (org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData)38 Ipv6Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)37 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)35 MatchEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry)35 InetAddress (java.net.InetAddress)33 SimpleAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress)33 MappingData (org.opendaylight.lispflowmapping.lisp.type.MappingData)32 MultipartReplyMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage)28 Inet4Address (java.net.Inet4Address)27 Inet6Address (java.net.Inet6Address)27 NoAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.NoAddress)27 LispAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.LispAddress)26 Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address)26