public void addFlowCapableNode(NodeKey nodeKey) {
Nodes nodes = new NodesBuilder().build();
- FlowCapableNodeBuilder fcnBuilder = new FlowCapableNodeBuilder();
NodeBuilder nodeBuilder = new NodeBuilder();
nodeBuilder.withKey(nodeKey);
- nodeBuilder.addAugmentation(FlowCapableNode.class, fcnBuilder.build());
+ nodeBuilder.addAugmentation(new FlowCapableNodeBuilder().build());
WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
writeTx.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Nodes.class), nodes);
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNodeConnectorBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.LinkId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
public static org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology
.topology.Node toTopologyNode(
final NodeId nodeId, final NodeRef invNodeRef) {
- return new NodeBuilder().setNodeId(nodeId).addAugmentation(InventoryNode.class, new InventoryNodeBuilder()
+ return new NodeBuilder().setNodeId(nodeId).addAugmentation(new InventoryNodeBuilder()
.setInventoryNodeRef(invNodeRef).build()).build();
}
public static TerminationPoint toTerminationPoint(final TpId id, final NodeConnectorRef invNodeConnectorRef) {
return new TerminationPointBuilder()
.setTpId(id)
- .addAugmentation(InventoryNodeConnector.class, new InventoryNodeConnectorBuilder()
+ .addAugmentation(new InventoryNodeConnectorBuilder()
.setInventoryNodeConnectorRef(invNodeConnectorRef)
.build())
.build();
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNodeBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder;
private static org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network
.topology.topology.Node prepareTopologyNode(
final NodeId nodeIdInTopology, final InstanceIdentifier<FlowCapableNode> iiToNodeInInventory) {
- final InventoryNode inventoryNode = new InventoryNodeBuilder()
- .setInventoryNodeRef(new NodeRef(iiToNodeInInventory.firstIdentifierOf(Node.class))).build();
-
- final NodeBuilder topologyNodeBuilder = new NodeBuilder();
- topologyNodeBuilder.setNodeId(nodeIdInTopology);
- topologyNodeBuilder.addAugmentation(InventoryNode.class, inventoryNode);
-
- return topologyNodeBuilder.build();
+ return new NodeBuilder()
+ .setNodeId(nodeIdInTopology)
+ .addAugmentation(new InventoryNodeBuilder()
+ .setInventoryNodeRef(new NodeRef(iiToNodeInInventory.firstIdentifierOf(Node.class)))
+ .build())
+ .build();
}
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.topology.inventory.rev131030.InventoryNodeConnectorBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId;
final
InstanceIdentifier<FlowCapableNodeConnector>
iiToNodeInInventory) {
- final InventoryNodeConnector inventoryNodeConnector = new InventoryNodeConnectorBuilder()
- .setInventoryNodeConnectorRef(
- new NodeConnectorRef(iiToNodeInInventory.firstIdentifierOf(NodeConnector.class))).build();
- final TerminationPointBuilder terminationPointBuilder = new TerminationPointBuilder();
- terminationPointBuilder.setTpId(terminationPointIdInTopology);
- terminationPointBuilder.addAugmentation(InventoryNodeConnector.class, inventoryNodeConnector);
- return terminationPointBuilder.build();
+ return new TerminationPointBuilder()
+ .setTpId(terminationPointIdInTopology)
+ .addAugmentation(new InventoryNodeConnectorBuilder()
+ .setInventoryNodeConnectorRef(
+ new NodeConnectorRef(iiToNodeInInventory.firstIdentifierOf(NodeConnector.class)))
+ .build())
+ .build();
}
private InstanceIdentifier<TerminationPoint> provideIIToTopologyTerminationPoint(
private static MatchEntry buildMatchEntry(MatchEntryBuilder matchEntryBuilder,
ExperimenterIdCaseBuilder experimenterIdCaseBuilder,
NxExpMatchEntryValue nxExpMatchEntryValue) {
- OfjAugNxExpMatch ofjAugNxExpMatch = new OfjAugNxExpMatchBuilder()
- .setNxExpMatchEntryValue(nxExpMatchEntryValue)
+ return matchEntryBuilder
+ .setMatchEntryValue(experimenterIdCaseBuilder.addAugmentation(new OfjAugNxExpMatchBuilder()
+ .setNxExpMatchEntryValue(nxExpMatchEntryValue)
+ .build())
+ .build())
.build();
- experimenterIdCaseBuilder.addAugmentation(OfjAugNxExpMatch.class, ofjAugNxExpMatch);
- matchEntryBuilder.setMatchEntryValue(experimenterIdCaseBuilder.build());
- return matchEntryBuilder.build();
}
@Override
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.OfjAugNxExpMatch;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.OfjAugNxExpMatchBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.experimenter.id._case.NxExpMatchEntryValue;
import org.opendaylight.yangtools.yang.common.Uint32;
assertEquals(EncodeConstants.EXPERIMENTER_VALUE, buffer.readUnsignedShort());
assertEquals(FIELD_CODE << 1 | 1, buffer.readUnsignedByte());
- assertEquals(EncodeConstants.SIZE_OF_INT_IN_BYTES + (VALUE_LENGTH * 2), buffer.readUnsignedByte());
+ assertEquals(EncodeConstants.SIZE_OF_INT_IN_BYTES + VALUE_LENGTH * 2, buffer.readUnsignedByte());
assertEquals(EXPERIMENTER_ID.longValue(), buffer.readUnsignedInt());
assertFalse(buffer.isReadable());
verify(testCodec).serializeValue(null, true, buffer);
}
static MatchEntry createMatchEntry(NxExpMatchEntryValue value, boolean hasMask) {
- OfjAugNxExpMatchBuilder ofjAugNxExpMatchBuilder = new OfjAugNxExpMatchBuilder();
- ofjAugNxExpMatchBuilder.setNxExpMatchEntryValue(value);
- ExperimenterBuilder experimenterBuilder = new ExperimenterBuilder();
- experimenterBuilder.setExperimenter(new ExperimenterId(EXPERIMENTER_ID));
- ExperimenterIdCaseBuilder experimenterIdCaseBuilder = new ExperimenterIdCaseBuilder();
- experimenterIdCaseBuilder.setExperimenter(experimenterBuilder.build());
- experimenterIdCaseBuilder.addAugmentation(OfjAugNxExpMatch.class, ofjAugNxExpMatchBuilder.build());
- MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
- matchEntryBuilder.setOxmClass(ExperimenterClass.class);
- matchEntryBuilder.setOxmMatchField(TestNxmField.class);
- matchEntryBuilder.setHasMask(hasMask);
- matchEntryBuilder.setMatchEntryValue(experimenterIdCaseBuilder.build());
- return matchEntryBuilder.build();
+ return new MatchEntryBuilder()
+ .setOxmClass(ExperimenterClass.class)
+ .setOxmMatchField(TestNxmField.class)
+ .setHasMask(hasMask)
+ .setMatchEntryValue(new ExperimenterIdCaseBuilder()
+ .setExperimenter(new ExperimenterBuilder()
+ .setExperimenter(new ExperimenterId(EXPERIMENTER_ID))
+ .build())
+ .addAugmentation(new OfjAugNxExpMatchBuilder().setNxExpMatchEntryValue(value).build())
+ .build())
+ .build();
}
static void writeBuffer(ByteBuf message, boolean hasMask) {
eqGroup.add(GeneralAugMatchNodesNodeTableFlow.class);
eqGroup.add(GeneralAugMatchNotifPacketIn.class);
- MatchBuilder mb1 = new MatchBuilder();
ExtensionList extension1 = new ExtensionListBuilder().setExtensionKey(JoachimTheBig.class).build();
- GeneralAugMatchNodesNodeTableFlow odlxxx1 = new GeneralAugMatchNodesNodeTableFlowBuilder()
- .setExtensionList(Collections.singletonList(extension1)).build();
- Match match1 = mb1.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, odlxxx1).build();
+ Match match1 = new MatchBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowBuilder()
+ .setExtensionList(Collections.singletonMap(extension1.key(), extension1))
+ .build())
+ .build();
org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.packet.received.MatchBuilder mb2 =
new org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service
.rev130709.packet.received.MatchBuilder();
ExtensionList extension2 = new ExtensionListBuilder().setExtensionKey(JoachimTheTiny.class).build();
- GeneralAugMatchNotifPacketIn odlxxx2 = new GeneralAugMatchNotifPacketInBuilder()
- .setExtensionList(Collections.singletonList(extension2)).build();
org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.packet.received.Match match2 =
- mb2.addAugmentation(GeneralAugMatchNotifPacketIn.class, odlxxx2).build();
+ mb2.addAugmentation(new GeneralAugMatchNotifPacketInBuilder()
+ .setExtensionList(Collections.singletonMap(extension2.key(), extension2)).build()).build();
Assert.assertEquals(JoachimTheBig.class,
eqGroup.getExtension(match1).get().nonnullExtensionList().values().iterator().next().getExtensionKey());
eqGroup.add(GeneralAugMatchNodesNodeTableFlow.class);
eqGroup.add(GeneralAugMatchRpcAddFlow.class);
- MatchBuilder mb1 = new MatchBuilder();
ExtensionList extension1 = new ExtensionListBuilder().setExtensionKey(JoachimTheBig.class).build();
- GeneralAugMatchNodesNodeTableFlow odlxxx1 = new GeneralAugMatchNodesNodeTableFlowBuilder()
- .setExtensionList(Collections.singletonList(extension1)).build();
- Match match1 = mb1.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, odlxxx1).build();
+ Match match1 = new MatchBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowBuilder()
+ .setExtensionList(Collections.singletonMap(extension1.key(), extension1))
+ .build())
+ .build();
- MatchBuilder mb2 = new MatchBuilder();
ExtensionList extension2 = new ExtensionListBuilder().setExtensionKey(JoachimTheTiny.class).build();
- GeneralAugMatchNodesNodeTableFlow odlxxx2 = new GeneralAugMatchNodesNodeTableFlowBuilder()
- .setExtensionList(Collections.singletonList(extension2)).build();
- Match match2 = mb2.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, odlxxx2).build();
+ Match match2 = new MatchBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowBuilder()
+ .setExtensionList(Collections.singletonMap(extension2.key(), extension2))
+ .build())
+ .build();
Assert.assertEquals(JoachimTheBig.class,
eqGroup.getExtension(match1).get().nonnullExtensionList().values().iterator().next().getExtensionKey());
eqGroup.add(GeneralAugMatchRpcAddFlowWriteActionsSetField.class);
eqGroup.add(GeneralAugMatchNodesNodeTableFlowWriteActionsSetField.class);
- SetFieldBuilder sb1 = new SetFieldBuilder();
ExtensionList extension1 = new ExtensionListBuilder().setExtensionKey(ZVendorExt1.class).build();
- GeneralAugMatchRpcAddFlowWriteActionsSetField odlxxx1 =
- new GeneralAugMatchRpcAddFlowWriteActionsSetFieldBuilder()
- .setExtensionList(Collections.singletonList(extension1)).build();
- SetField setField1 = sb1.addAugmentation(GeneralAugMatchRpcAddFlowWriteActionsSetField.class, odlxxx1).build();
+ SetField setField1 = new SetFieldBuilder()
+ .addAugmentation(new GeneralAugMatchRpcAddFlowWriteActionsSetFieldBuilder()
+ .setExtensionList(Collections.singletonMap(extension1.key(), extension1))
+ .build())
+ .build();
- SetFieldBuilder sb2 = new SetFieldBuilder();
ExtensionList extension2 = new ExtensionListBuilder().setExtensionKey(ZVendorExt2.class).build();
- GeneralAugMatchNodesNodeTableFlowWriteActionsSetField odlxxx2 =
- new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
- .setExtensionList(Collections.singletonList(extension2)).build();
- SetField setField2 = sb2.addAugmentation(GeneralAugMatchNodesNodeTableFlowWriteActionsSetField.class,
- odlxxx2).build();
+ SetField setField2 = new SetFieldBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
+ .setExtensionList(Collections.singletonMap(extension2.key(), extension2))
+ .build())
+ .build();
Assert.assertEquals(ZVendorExt1.class,
eqGroup.getExtension(setField1).get().nonnullExtensionList().values().iterator().next()
ExtensionListBuilder extListBld = null;
ExtensionBuilder extBld = new ExtensionBuilder();
- extBld.addAugmentation(extensionMatch.getAugmentationClass(), extensionMatch.getAugmentationObject());
+ extBld.addAugmentation(extensionMatch.getAugmentationObject());
extListBld = new ExtensionListBuilder();
extListBld.setExtension(extBld.build());
extListBld.setExtensionKey(extensionMatch.getKey());
- GeneralAugMatchNodesNodeTableFlowWriteActionsSetField ndOptionsTypeSetField =
- new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
- .setExtensionList(Collections.singletonList(extListBld.build())).build();
-
- SetFieldBuilder sb = new SetFieldBuilder();
- SetField setField = sb.addAugmentation(GeneralAugMatchNodesNodeTableFlowWriteActionsSetField.class,
- ndOptionsTypeSetField).build();
+ SetField setField = new SetFieldBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
+ .setExtensionList(Collections.singletonList(extListBld.build())).build())
+ .build();
Assert.assertEquals(Icmpv6NdOptionsTypeKey.class, eqGroup.getExtension(setField).get().nonnullExtensionList()
.values().iterator().next().getExtensionKey());
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.extension.vendor.eric.convertor.match;
import static org.junit.Assert.assertEquals;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.ExtensionBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionListBuilder;
import org.opendaylight.yangtools.yang.binding.Augmentation;
-
+import org.opendaylight.yangtools.yang.common.Uint32;
/**
* Test for {@link Icmpv6NDReservedConvertor}.
@Before
public void setUp() {
final EricOfIcmpv6NdReservedBuilder ericOfIcmpv6NdReservedBuilder = new EricOfIcmpv6NdReservedBuilder()
- .setIcmpv6NdReserved(1L);
+ .setIcmpv6NdReserved(Uint32.ONE);
final EricAugMatchNodesNodeTableFlowBuilder ericAugMatchNotifUpdateFlowStatsBuilder =
new EricAugMatchNodesNodeTableFlowBuilder();
ericAugMatchNotifUpdateFlowStatsBuilder.setEricOfIcmpv6NdReserved(ericOfIcmpv6NdReservedBuilder.build());
@Test
public void testConvert1() {
final Icmpv6NdReservedValuesBuilder icmpv6NdReservedValuesBuilder = new Icmpv6NdReservedValuesBuilder()
- .setIcmpv6NdReserved(10L);
+ .setIcmpv6NdReserved(Uint32.TEN);
final Icmpv6NdReservedCaseValueBuilder icmpv6NdReservedCaseValueBuilder = new Icmpv6NdReservedCaseValueBuilder()
.setIcmpv6NdReservedValues(icmpv6NdReservedValuesBuilder.build());
ExtensionAugment<? extends Augmentation<Extension>> extensionMatch
= new ExtensionAugment<>(EricAugMatchNodesNodeTableFlow.class,
new EricAugMatchNodesNodeTableFlowBuilder().setEricOfIcmpv6NdReserved(
- new EricOfIcmpv6NdReservedBuilder().setIcmpv6NdReserved(1L).build()).build(),
+ new EricOfIcmpv6NdReservedBuilder().setIcmpv6NdReserved(Uint32.ONE).build()).build(),
Icmpv6NdReservedKey.class);
ExtensionListBuilder extListBld = null;
ExtensionBuilder extBld = new ExtensionBuilder();
- extBld.addAugmentation(extensionMatch.getAugmentationClass(), extensionMatch.getAugmentationObject());
+ extBld.addAugmentation(extensionMatch.getAugmentationObject());
extListBld = new ExtensionListBuilder();
extListBld.setExtension(extBld.build());
extListBld.setExtensionKey(extensionMatch.getKey());
- GeneralAugMatchNodesNodeTableFlowWriteActionsSetField ndReservedSetField =
- new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
- .setExtensionList(Collections.singletonList(extListBld.build())).build();
-
- SetFieldBuilder sb = new SetFieldBuilder();
- SetField setField = sb.addAugmentation(GeneralAugMatchNodesNodeTableFlowWriteActionsSetField.class,
- ndReservedSetField).build();
+ SetField setField = new SetFieldBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
+ .setExtensionList(Collections.singletonList(extListBld.build()))
+ .build())
+ .build();
Assert.assertEquals(Icmpv6NdReservedKey.class, eqGroup.getExtension(setField).get().nonnullExtensionList()
.values().iterator().next().getExtensionKey());
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.MatchEntryValue;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.OfjAugNxExpMatch;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.OfjAugNxExpMatchBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.experimenter.id._case.NxExpMatchEntryValue;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.Extension;
final Class<? extends MatchField> matchField,
final Uint32 experimenterId,
final NxExpMatchEntryValue value) {
- ExperimenterBuilder experimenterBuilder = new ExperimenterBuilder();
- experimenterBuilder.setExperimenter(new ExperimenterId(experimenterId));
- ExperimenterIdCaseBuilder expCaseBuilder = new ExperimenterIdCaseBuilder();
- expCaseBuilder.setExperimenter(experimenterBuilder.build());
- OfjAugNxExpMatch ofjAugNxExpMatch = new OfjAugNxExpMatchBuilder().setNxExpMatchEntryValue(value).build();
- expCaseBuilder.addAugmentation(OfjAugNxExpMatch.class, ofjAugNxExpMatch);
- return createDefaultMatchEntryBuilder(matchField, ExperimenterClass.class, expCaseBuilder.build());
+ return createDefaultMatchEntryBuilder(matchField, ExperimenterClass.class, new ExperimenterIdCaseBuilder()
+ .setExperimenter(new ExperimenterBuilder().setExperimenter(new ExperimenterId(experimenterId)).build())
+ .addAugmentation(new OfjAugNxExpMatchBuilder().setNxExpMatchEntryValue(value).build())
+ .build());
}
public static Long ipv4ToLong(final Ipv4Address ipv4) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.extension.onf.deserializer;
import io.netty.buffer.ByteBuf;
import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdError;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdErrorBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ErrorType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
builder.setCodeString(UNKNOWN_CODE);
}
- builder.addAugmentation(ExperimenterIdError.class, new ExperimenterIdErrorBuilder()
+ builder.addAugmentation(new ExperimenterIdErrorBuilder()
.setExperimenter(new ExperimenterId(message.readUnsignedInt()))
.build());
import org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer;
import org.opendaylight.openflowjava.util.ByteBufUtils;
import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
tableFeaturesLength -= propertyLength;
if (type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONS)
|| type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS)) {
- InstructionRelatedTableFeaturePropertyBuilder insBuilder =
- new InstructionRelatedTableFeaturePropertyBuilder();
CodeKeyMaker keyMaker = CodeKeyMakerFactory.createInstructionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
List<Instruction> instructions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- insBuilder.setInstruction(instructions);
- builder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insBuilder.build());
+ builder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder()
+ .setInstruction(instructions)
+ .build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLES)
|| type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS)) {
propertyLength -= COMMON_PROPERTY_LENGTH;
- NextTableRelatedTableFeaturePropertyBuilder tableBuilder =
- new NextTableRelatedTableFeaturePropertyBuilder();
List<NextTableIds> ids = new ArrayList<>();
while (propertyLength > 0) {
NextTableIdsBuilder nextTableIdsBuilder = new NextTableIdsBuilder();
ids.add(nextTableIdsBuilder.build());
propertyLength--;
}
- tableBuilder.setNextTableIds(ids);
- builder.addAugmentation(NextTableRelatedTableFeatureProperty.class, tableBuilder.build());
+ builder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().setNextTableIds(ids).build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTWRITEACTIONS)
|| type.equals(TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYACTIONS)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS)) {
- ActionRelatedTableFeaturePropertyBuilder actionBuilder = new ActionRelatedTableFeaturePropertyBuilder();
CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
List<Action> actions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- actionBuilder.setAction(actions);
- builder.addAugmentation(ActionRelatedTableFeatureProperty.class, actionBuilder.build());
+ builder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTMATCH)
|| type.equals(TableFeaturesPropType.OFPTFPTWILDCARDS)
|| type.equals(TableFeaturesPropType.OFPTFPTWRITESETFIELD)
|| type.equals(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS)) {
- OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- CodeKeyMaker keyMaker = CodeKeyMakerFactory
- .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
+ CodeKeyMaker keyMaker = CodeKeyMakerFactory.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
List<MatchEntry> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- oxmBuilder.setMatchEntry(entries);
- builder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ builder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)
|| type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
long expId = input.readUnsignedInt();
import org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer;
import org.opendaylight.openflowjava.util.ByteBufUtils;
import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
tableFeaturesLength -= propertyLength;
if (type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONS)
|| type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS)) {
- InstructionRelatedTableFeaturePropertyBuilder insBuilder =
- new InstructionRelatedTableFeaturePropertyBuilder();
CodeKeyMaker keyMaker = CodeKeyMakerFactory.createInstructionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
List<Instruction> instructions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- insBuilder.setInstruction(instructions);
- builder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insBuilder.build());
+ builder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder()
+ .setInstruction(instructions)
+ .build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLES)
|| type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS)) {
propertyLength -= COMMON_PROPERTY_LENGTH;
- NextTableRelatedTableFeaturePropertyBuilder tableBuilder =
- new NextTableRelatedTableFeaturePropertyBuilder();
List<NextTableIds> ids = new ArrayList<>();
while (propertyLength > 0) {
NextTableIdsBuilder nextTableIdsBuilder = new NextTableIdsBuilder();
ids.add(nextTableIdsBuilder.build());
propertyLength--;
}
- tableBuilder.setNextTableIds(ids);
- builder.addAugmentation(NextTableRelatedTableFeatureProperty.class, tableBuilder.build());
+ builder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().setNextTableIds(ids).build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTWRITEACTIONS)
|| type.equals(TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYACTIONS)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS)) {
- ActionRelatedTableFeaturePropertyBuilder actionBuilder = new ActionRelatedTableFeaturePropertyBuilder();
CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
List<Action> actions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- actionBuilder.setAction(actions);
- builder.addAugmentation(ActionRelatedTableFeatureProperty.class, actionBuilder.build());
+ builder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTMATCH)
|| type.equals(TableFeaturesPropType.OFPTFPTWILDCARDS)
|| type.equals(TableFeaturesPropType.OFPTFPTWRITESETFIELD)
|| type.equals(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD)
|| type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS)) {
- OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
CodeKeyMaker keyMaker = CodeKeyMakerFactory.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
List<MatchEntry> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- oxmBuilder.setMatchEntry(entries);
- builder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ builder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)
|| type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
long expId = input.readUnsignedInt();
import java.util.List;
import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
propertiesLength -= input.readUnsignedShort();
input.skipBytes(PADDING_IN_QUEUE_PROPERTY_HEADER);
if (property.equals(QueueProperties.OFPQTMINRATE)) {
- RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
- rateBuilder.setRate(input.readUnsignedShort());
- propertiesBuilder.addAugmentation(RateQueueProperty.class, rateBuilder.build());
+ propertiesBuilder.addAugmentation(new RateQueuePropertyBuilder()
+ .setRate(input.readUnsignedShort())
+ .build());
input.skipBytes(PADDING_IN_RATE_QUEUE_PROPERTY);
}
propertiesList.add(propertiesBuilder.build());
import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
propertiesLength -= currentPropertyLength;
input.skipBytes(PADDING_IN_QUEUE_PROPERTY_HEADER);
if (property.equals(QueueProperties.OFPQTMINRATE) || property.equals(QueueProperties.OFPQTMAXRATE)) {
- RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
- rateBuilder.setRate(input.readUnsignedShort());
- propertiesBuilder.addAugmentation(RateQueueProperty.class, rateBuilder.build());
+ propertiesBuilder.addAugmentation(new RateQueuePropertyBuilder()
+ .setRate(input.readUnsignedShort())
+ .build());
input.skipBytes(PADDING_IN_RATE_QUEUE_PROPERTY);
} else if (property.equals(QueueProperties.OFPQTEXPERIMENTER)) {
long expId = input.readUnsignedInt();
import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlagsContainer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlagsContainerBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.oxm.container.match.entry.value.experimenter.id._case.TcpFlagsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCaseBuilder;
private static void addTcpFlagsAugmentation(ByteBuf input, ExperimenterIdCaseBuilder expCaseBuilder,
boolean hasMask) {
- TcpFlagsContainerBuilder flagsContainerBuilder = new TcpFlagsContainerBuilder();
TcpFlagsBuilder flagsBuilder = new TcpFlagsBuilder();
flagsBuilder.setFlags(input.readUnsignedShort());
if (hasMask) {
input.readBytes(mask);
flagsBuilder.setMask(mask);
}
- flagsContainerBuilder.setTcpFlags(flagsBuilder.build());
- expCaseBuilder.addAugmentation(TcpFlagsContainer.class, flagsContainerBuilder.build());
+ expCaseBuilder.addAugmentation(new TcpFlagsContainerBuilder().setTcpFlags(flagsBuilder.build()).build());
}
/**
package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
import io.netty.buffer.ByteBuf;
-import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table.features._case.multipart.request.table.features.TableFeaturesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeaturePropertiesBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
/**
* Unit tests for MultipartRequestTableFeaturesInputMessageFactory.
public List<TableFeatures> createTableFeaturesList() {
final List<TableFeatures> list = new ArrayList<>();
- TableFeaturesBuilder builder = new TableFeaturesBuilder();
- builder.setTableId((short) 1);
- builder.setName("Name");
- builder.setMetadataWrite(new BigInteger("1"));
- builder.setMetadataMatch(new BigInteger("1"));
- builder.setMaxEntries(1L);
- builder.setConfig(new TableConfig(false));
- builder.setTableFeatureProperties(createTableFeatureProperties());
- list.add(builder.build());
+ list.add(new TableFeaturesBuilder()
+ .setTableId(Uint8.ONE)
+ .setName("Name")
+ .setMetadataWrite(Uint64.ONE)
+ .setMetadataMatch(Uint64.ONE)
+ .setMaxEntries(Uint32.ONE)
+ .setConfig(new TableConfig(false))
+ .setTableFeatureProperties(createTableFeatureProperties())
+ .build());
return list;
}
public List<TableFeatureProperties> createTableFeatureProperties() {
final List<TableFeatureProperties> list = new ArrayList<>();
- TableFeaturePropertiesBuilder builder = new TableFeaturePropertiesBuilder();
- builder.setType(TableFeaturesPropType.forValue(0));
- InstructionRelatedTableFeaturePropertyBuilder insBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
- insBuilder.setInstruction(createInstructions());
- builder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insBuilder.build());
- list.add(builder.build());
-
- builder = new TableFeaturePropertiesBuilder();
- builder.setType(TableFeaturesPropType.forValue(2));
- NextTableRelatedTableFeaturePropertyBuilder nextBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
- nextBuilder.setNextTableIds(createNextTableIds());
- builder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextBuilder.build());
- list.add(builder.build());
-
- builder = new TableFeaturePropertiesBuilder();
- builder.setType(TableFeaturesPropType.forValue(4));
- ActionRelatedTableFeaturePropertyBuilder actionBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actionBuilder.setAction(createAction());
- builder.addAugmentation(ActionRelatedTableFeatureProperty.class, actionBuilder.build());
- list.add(builder.build());
-
- builder = new TableFeaturePropertiesBuilder();
- builder.setType(TableFeaturesPropType.forValue(8));
- OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- oxmBuilder.setMatchEntry(createMatchEntries());
- builder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
- list.add(builder.build());
+ list.add(new TableFeaturePropertiesBuilder()
+ .setType(TableFeaturesPropType.forValue(0))
+ .addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder()
+ .setInstruction(createInstructions())
+ .build())
+ .build());
+
+ list.add(new TableFeaturePropertiesBuilder()
+ .setType(TableFeaturesPropType.forValue(2))
+ .addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder()
+ .setNextTableIds(createNextTableIds())
+ .build())
+ .build());
+
+ list.add(new TableFeaturePropertiesBuilder()
+ .setType(TableFeaturesPropType.forValue(4))
+ .addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(createAction()).build())
+ .build());
+
+ list.add(new TableFeaturePropertiesBuilder()
+ .setType(TableFeaturesPropType.forValue(8))
+ .addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(createMatchEntries()).build())
+ .build());
return list;
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
import io.netty.buffer.ByteBuf;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.QueuesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
/**
* Unit tests for QueueGetConfigReplyMessageFactoryMulti.
private static List<Queues> createQueuesList() {
List<Queues> queuesList = new ArrayList<>();
for (int i = 1; i < 3; i++) {
- QueuesBuilder qb = new QueuesBuilder();
- qb.setQueueId(new QueueId((long) i));
- qb.setPort(new PortNumber((long) i));
- qb.setQueueProperty(createPropertiesList());
- queuesList.add(qb.build());
+ queuesList.add(new QueuesBuilder()
+ .setQueueId(new QueueId(Uint32.valueOf(i)))
+ .setPort(new PortNumber(Uint32.valueOf(i)))
+ .setQueueProperty(createPropertiesList())
+ .build());
}
return queuesList;
}
private static List<QueueProperty> createPropertiesList() {
final List<QueueProperty> propertiesList = new ArrayList<>();
- QueuePropertyBuilder pb = new QueuePropertyBuilder();
- pb.setProperty(QueueProperties.forValue(2));
- RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
- rateBuilder.setRate(5);
- pb.addAugmentation(RateQueueProperty.class, rateBuilder.build());
- propertiesList.add(pb.build());
+ propertiesList.add(new QueuePropertyBuilder()
+ .setProperty(QueueProperties.forValue(2))
+ .addAugmentation(new RateQueuePropertyBuilder().setRate(Uint16.valueOf(5)).build())
+ .build());
return propertiesList;
}
-
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
import io.netty.buffer.ByteBuf;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl;
import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueuePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.QueuesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
/**
* Unit tests for QueueGetConfigReplyMessageFactory.
private static List<Queues> createQueuesList() {
final List<Queues> queuesList = new ArrayList<>();
- QueuesBuilder qb = new QueuesBuilder();
- qb.setQueueId(new QueueId(1L));
- qb.setPort(new PortNumber(3L));
- qb.setQueueProperty(createPropertiesList());
- queuesList.add(qb.build());
+ queuesList.add(new QueuesBuilder()
+ .setQueueId(new QueueId(Uint32.ONE))
+ .setPort(new PortNumber(Uint32.valueOf(3)))
+ .setQueueProperty(createPropertiesList())
+ .build());
return queuesList;
}
private static List<QueueProperty> createPropertiesList() {
final List<QueueProperty> propertiesList = new ArrayList<>();
- QueuePropertyBuilder pb = new QueuePropertyBuilder();
- pb.setProperty(QueueProperties.forValue(2));
- RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
- rateBuilder.setRate(5);
- pb.addAugmentation(RateQueueProperty.class, rateBuilder.build());
- propertiesList.add(pb.build());
+ propertiesList.add(new QueuePropertyBuilder()
+ .setProperty(QueueProperties.forValue(2))
+ .addAugmentation(new RateQueuePropertyBuilder().setRate(Uint16.valueOf(5)).build())
+ .build());
return propertiesList;
}
}
import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
import org.opendaylight.openflowjava.util.ByteBufUtils;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.OutputActionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PopPbbCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeaturePropertiesBuilder;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
/**
* Unit tests for MultipartReplyMessageFactory.
tableFeaturesBuilder.setMaxEntries(65L);
TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTNEXTTABLES);
- NextTableRelatedTableFeaturePropertyBuilder nextPropBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
- List<NextTableIds> nextIds = new ArrayList<>();
- nextIds.add(new NextTableIdsBuilder().setTableId((short) 1).build());
- nextIds.add(new NextTableIdsBuilder().setTableId((short) 2).build());
- nextPropBuilder.setNextTableIds(nextIds);
- propBuilder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextPropBuilder.build());
+ propBuilder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder()
+ .setNextTableIds(List.of(
+ new NextTableIdsBuilder().setTableId(Uint8.ONE).build(),
+ new NextTableIdsBuilder().setTableId(Uint8.TWO).build()))
+ .build());
List<TableFeatureProperties> properties = new ArrayList<>();
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS);
- nextPropBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
- nextIds = new ArrayList<>();
- nextPropBuilder.setNextTableIds(nextIds);
- propBuilder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextPropBuilder.build());
+ propBuilder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTINSTRUCTIONS);
insBuilder = new InstructionBuilder();
insBuilder.setInstructionChoice(new GotoTableCaseBuilder().build());
insIds.add(insBuilder.build());
- InstructionRelatedTableFeaturePropertyBuilder insPropBuilder =
- new InstructionRelatedTableFeaturePropertyBuilder();
- insPropBuilder.setInstruction(insIds);
- propBuilder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insPropBuilder.build());
+ propBuilder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder().setInstruction(insIds).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS);
- insPropBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
insIds = new ArrayList<>();
insBuilder = new InstructionBuilder();
insBuilder.setInstructionChoice(new WriteMetadataCaseBuilder().build());
insBuilder = new InstructionBuilder();
insBuilder.setInstructionChoice(new GotoTableCaseBuilder().build());
insIds.add(insBuilder.build());
- insPropBuilder.setInstruction(insIds);
- propBuilder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insPropBuilder.build());
+ propBuilder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder().setInstruction(insIds).build());
properties.add(propBuilder.build());
tableFeaturesBuilder.setTableFeatureProperties(properties);
tableFeaturesList.add(tableFeaturesBuilder.build());
properties = new ArrayList<>();
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITEACTIONS);
- ActionRelatedTableFeaturePropertyBuilder actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
List<Action> actions = new ArrayList<>();
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setActionChoice(new OutputActionCaseBuilder().build());
actions.add(actionBuilder.build());
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actions = new ArrayList<>();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYACTIONS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actions = new ArrayList<>();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actions = new ArrayList<>();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTMATCH);
entriesBuilder.setOxmMatchField(InPort.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWILDCARDS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELD);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setOxmClass(OpenflowBasicClass.class);
entriesBuilder.setOxmMatchField(IpEcn.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
tableFeaturesBuilder.setTableFeatureProperties(properties);
tableFeaturesList.add(tableFeaturesBuilder.build());
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.QueuesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
/**
* Unit tests for OF10QueueGetConfigReplyMessageFactory.
public void testSerialize() throws Exception {
GetQueueConfigOutputBuilder builder = new GetQueueConfigOutputBuilder();
BufferHelper.setupHeader(builder, EncodeConstants.OF10_VERSION_ID);
- builder.setPort(new PortNumber(1L));
+ builder.setPort(new PortNumber(Uint32.ONE));
builder.setQueues(createQueues());
GetQueueConfigOutput message = builder.build();
private static List<Queues> createQueues() {
List<Queues> list = new ArrayList<>();
- QueuesBuilder builder = new QueuesBuilder();
- builder.setQueueId(new QueueId(1L));
- builder.setQueueProperty(createPropertiesList());
-
- list.add(builder.build());
+ list.add(new QueuesBuilder()
+ .setQueueId(new QueueId(Uint32.ONE))
+ .setQueueProperty(createPropertiesList())
+ .build());
return list;
}
private static List<QueueProperty> createPropertiesList() {
final List<QueueProperty> propertiesList = new ArrayList<>();
- QueuePropertyBuilder pb = new QueuePropertyBuilder();
- pb.setProperty(QueueProperties.forValue(1));
- RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
- rateBuilder.setRate(5);
- pb.addAugmentation(RateQueueProperty.class, rateBuilder.build());
- propertiesList.add(pb.build());
+ propertiesList.add(new QueuePropertyBuilder()
+ .setProperty(QueueProperties.forValue(1))
+ .addAugmentation(new RateQueuePropertyBuilder().setRate(Uint16.valueOf(5)).build())
+ .build());
return propertiesList;
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.get.config.reply.QueuesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
/**
* Unit tests for QueueGetConfigReplyMessageFactory.
private static List<Queues> createQueuesList() {
List<Queues> queuesList = new ArrayList<>();
for (int i = 1; i < 3; i++) {
- QueuesBuilder qb = new QueuesBuilder();
- qb.setQueueId(new QueueId((long) i));
- qb.setPort(new PortNumber((long) i));
- qb.setQueueProperty(createPropertiesList());
- queuesList.add(qb.build());
+ queuesList.add(new QueuesBuilder()
+ .setQueueId(new QueueId(Uint32.valueOf(i)))
+ .setPort(new PortNumber(Uint32.valueOf(i)))
+ .setQueueProperty(createPropertiesList())
+ .build());
}
return queuesList;
}
private static List<QueueProperty> createPropertiesList() {
final List<QueueProperty> propertiesList = new ArrayList<>();
- QueuePropertyBuilder pb = new QueuePropertyBuilder();
- pb.setProperty(QueueProperties.forValue(2));
- RateQueuePropertyBuilder rateBuilder = new RateQueuePropertyBuilder();
- rateBuilder.setRate(5);
- pb.addAugmentation(RateQueueProperty.class, rateBuilder.build());
- propertiesList.add(pb.build());
+ propertiesList.add(new QueuePropertyBuilder()
+ .setProperty(QueueProperties.forValue(2))
+ .addAugmentation(new RateQueuePropertyBuilder().setRate(Uint16.valueOf(5)).build())
+ .build());
return propertiesList;
}
}
import org.opendaylight.openflowjava.protocol.impl.serialization.factories.MultipartRequestInputFactoryTest;
import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
import org.opendaylight.openflowjava.util.ByteBufUtils;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
tableFeaturesBuilder.setMaxEntries(65L);
TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTNEXTTABLES);
- NextTableRelatedTableFeaturePropertyBuilder nextPropBuilder =
- new NextTableRelatedTableFeaturePropertyBuilder();
List<NextTableIds> nextIds = new ArrayList<>();
nextIds.add(new NextTableIdsBuilder().setTableId((short) 1).build());
nextIds.add(new NextTableIdsBuilder().setTableId((short) 2).build());
- nextPropBuilder.setNextTableIds(nextIds);
- propBuilder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextPropBuilder.build());
+ propBuilder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().setNextTableIds(nextIds).build());
List<TableFeatureProperties> properties = new ArrayList<>();
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS);
- nextPropBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
- nextIds = new ArrayList<>();
- nextPropBuilder.setNextTableIds(nextIds);
- propBuilder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextPropBuilder.build());
+ propBuilder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTINSTRUCTIONS);
insBuilder = new InstructionBuilder();
insBuilder.setInstructionChoice(new GotoTableCaseBuilder().build());
insIds.add(insBuilder.build());
- InstructionRelatedTableFeaturePropertyBuilder insPropBuilder =
- new InstructionRelatedTableFeaturePropertyBuilder();
- insPropBuilder.setInstruction(insIds);
- propBuilder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insPropBuilder.build());
+ propBuilder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder().setInstruction(insIds).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS);
- insPropBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
insIds = new ArrayList<>();
insBuilder = new InstructionBuilder();
insBuilder.setInstructionChoice(new WriteMetadataCaseBuilder().build());
insBuilder = new InstructionBuilder();
insBuilder.setInstructionChoice(new GotoTableCaseBuilder().build());
insIds.add(insBuilder.build());
- insPropBuilder.setInstruction(insIds);
- propBuilder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insPropBuilder.build());
+ propBuilder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder().setInstruction(insIds).build());
properties.add(propBuilder.build());
tableFeaturesBuilder.setTableFeatureProperties(properties);
List<TableFeatures> tableFeaturesList = new ArrayList<>();
properties = new ArrayList<>();
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITEACTIONS);
- ActionRelatedTableFeaturePropertyBuilder actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
List<Action> actions = new ArrayList<>();
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setActionChoice(new OutputActionCaseBuilder().build());
actions.add(actionBuilder.build());
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actions = new ArrayList<>();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYACTIONS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actions = new ArrayList<>();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actions = new ArrayList<>();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTMATCH);
entriesBuilder.setOxmMatchField(InPort.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWILDCARDS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELD);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setOxmClass(OpenflowBasicClass.class);
entriesBuilder.setOxmMatchField(IpEcn.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- entries = new ArrayList<>();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
tableFeaturesBuilder.setTableFeatureProperties(properties);
tableFeaturesList.add(tableFeaturesBuilder.build());
tableFeaturesBuilder.setMaxEntries(65L);
TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTEXPERIMENTER);
- ExperimenterIdTableFeaturePropertyBuilder expBuilder = new ExperimenterIdTableFeaturePropertyBuilder();
- expBuilder.setExperimenter(new ExperimenterId(42L));
- propBuilder.addAugmentation(ExperimenterIdTableFeatureProperty.class, expBuilder.build());
+ propBuilder.addAugmentation(new ExperimenterIdTableFeaturePropertyBuilder()
+ .setExperimenter(new ExperimenterId(42L))
+ .build());
List<TableFeatureProperties> properties = new ArrayList<>();
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS);
- expBuilder = new ExperimenterIdTableFeaturePropertyBuilder();
- expBuilder.setExperimenter(new ExperimenterId(43L));
- propBuilder.addAugmentation(ExperimenterIdTableFeatureProperty.class, expBuilder.build());
+ propBuilder.addAugmentation(new ExperimenterIdTableFeaturePropertyBuilder()
+ .setExperimenter(new ExperimenterId(43L))
+ .build());
properties.add(propBuilder.build());
tableFeaturesBuilder.setTableFeatureProperties(properties);
List<TableFeatures> tableFeaturesList = new ArrayList<>();
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowAndStatisticsMapList;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowStatisticsDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.statistics.FlowStatisticsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
statistics.nonnullFlowAndStatisticsMapList()
.forEach(stat -> {
final FlowBuilder flow = new FlowBuilder(stat)
- .addAugmentation(
- FlowStatisticsData.class,
- new FlowStatisticsDataBuilder()
+ .addAugmentation(new FlowStatisticsDataBuilder()
.setFlowStatistics(new FlowStatisticsBuilder(stat).build())
.build());
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.datastore.multipart;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceRegistry;
import org.opendaylight.openflowplugin.api.openflow.device.TxFacade;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.NodeGroupStatistics;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.NodeGroupStatisticsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupDescStatsReply;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
.child(Group.class, new GroupKey(stat.getGroupId())),
new GroupBuilder(stat)
.withKey(new GroupKey(stat.getGroupId()))
- .addAugmentation(NodeGroupStatistics.class, new NodeGroupStatisticsBuilder().build())
+ .addAugmentation(new NodeGroupStatisticsBuilder().build())
.build(),
withParents);
registry.getDeviceGroupRegistry().store(stat.getGroupId());
});
}
-
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.datastore.multipart;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.NodeMeterStatistics;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.NodeMeterStatisticsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterConfigStatsReply;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
.child(Meter.class, new MeterKey(stat.getMeterId())),
new MeterBuilder(stat)
.withKey(new MeterKey(stat.getMeterId()))
- .addAugmentation(NodeMeterStatistics.class, new NodeMeterStatisticsBuilder().build())
+ .addAugmentation(new NodeMeterStatisticsBuilder().build())
.build(),
withParents);
registry.getDeviceMeterRegistry().store(stat.getMeterId());
});
}
-
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.datastore.multipart;
import org.opendaylight.openflowplugin.api.openflow.device.TxFacade;
import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil;
import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnectorBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.multipart.reply.multipart.reply.body.MultipartReplyPortDesc;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.FlowCapableNodeConnectorStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.FlowCapableNodeConnectorStatisticsDataBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Uint32;
.child(NodeConnector.class, new NodeConnectorKey(id)),
new NodeConnectorBuilder()
.setId(id)
- .addAugmentation(
- FlowCapableNodeConnector.class,
- new FlowCapableNodeConnectorBuilder(stat).build())
- .addAugmentation(
- FlowCapableNodeConnectorStatisticsData.class,
- new FlowCapableNodeConnectorStatisticsDataBuilder().build())
+ .addAugmentation(new FlowCapableNodeConnectorBuilder(stat).build())
+ .addAugmentation(new FlowCapableNodeConnectorStatisticsDataBuilder().build())
.build(),
withParents);
});
}
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.FlowCapableNodeConnectorQueueStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.FlowCapableNodeConnectorQueueStatisticsDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.QueueIdAndStatisticsMap;
import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.flow.capable.node.connector.queue.statistics.FlowCapableNodeConnectorQueueStatisticsBuilder;
new QueueBuilder()
.withKey(new QueueKey(stat.getQueueId()))
.setQueueId(stat.getQueueId())
- .addAugmentation(
- FlowCapableNodeConnectorQueueStatisticsData.class,
- new FlowCapableNodeConnectorQueueStatisticsDataBuilder()
+ .addAugmentation(new FlowCapableNodeConnectorQueueStatisticsDataBuilder()
.setFlowCapableNodeConnectorQueueStatistics(
new FlowCapableNodeConnectorQueueStatisticsBuilder(stat)
.build())
withParents);
});
}
-
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.datastore.multipart;
import org.opendaylight.openflowplugin.api.openflow.device.TxFacade;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableFeatures;
.child(Table.class, new TableKey(stat.getTableId())),
new TableBuilder()
.setId(stat.getTableId())
- .addAugmentation(FlowTableStatisticsData.class, new FlowTableStatisticsDataBuilder()
- .build())
+ .addAugmentation(new FlowTableStatisticsDataBuilder().build())
.build(),
withParents);
});
}
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketIn;
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceivedBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.FlowCapableNodeConnectorStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.FlowCapableNodeConnectorStatisticsDataBuilder;
import org.opendaylight.yangtools.util.concurrent.NotificationManager;
import org.opendaylight.yangtools.yang.binding.DataContainer;
writeToTransaction(LogicalDatastoreType.OPERATIONAL, iiToNodeConnector, new NodeConnectorBuilder()
.withKey(iiToNodeConnector.getKey())
- .addAugmentation(FlowCapableNodeConnectorStatisticsData.class, new
- FlowCapableNodeConnectorStatisticsDataBuilder().build())
- .addAugmentation(FlowCapableNodeConnector.class, flowCapableNodeConnector)
+ .addAugmentation(new FlowCapableNodeConnectorStatisticsDataBuilder().build())
+ .addAugmentation(flowCapableNodeConnector)
.build());
syncSubmitTransaction();
if (PortReason.OFPPRDELETE.equals(portStatusMessage.getReason())) {
public <T> RequestContext<T> createRequestContext() {
final Long xid = deviceInfo.reserveXidForDeviceMessage();
- final AbstractRequestContext<T> abstractRequestContext = new AbstractRequestContext<T>(xid) {
+ final AbstractRequestContext<T> abstractRequestContext = new AbstractRequestContext<>(xid) {
@Override
public void close() {
requestContexts.remove(this);
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.CapabilitiesV10;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortGrouping;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.FlowCapableNodeConnectorStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.FlowCapableNodeConnectorStatisticsDataBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.slf4j.Logger;
port.getPortNo(),
OpenflowVersion.get(deviceInfo.getVersion()));
+ final NodeConnectorBuilder connectorBuilder = new NodeConnectorBuilder()
+ .setId(nodeConnectorId)
+ .addAugmentation(new FlowCapableNodeConnectorStatisticsDataBuilder().build());
+ final FlowCapableNodeConnector augment = translator.translate(port, deviceInfo, null);
+ if (augment != null) {
+ connectorBuilder.addAugmentation(augment);
+ }
+
try {
deviceContext.writeToTransaction(LogicalDatastoreType.OPERATIONAL,
deviceInfo
.getNodeInstanceIdentifier()
.child(NodeConnector.class, new NodeConnectorKey(nodeConnectorId)),
- new NodeConnectorBuilder()
- .setId(nodeConnectorId)
- .addAugmentation(
- FlowCapableNodeConnector.class,
- translator.translate(port, deviceInfo, null))
- .addAugmentation(
- FlowCapableNodeConnectorStatisticsData.class,
- new FlowCapableNodeConnectorStatisticsDataBuilder().build())
- .build());
+ connectorBuilder.build());
} catch (final Exception e) {
LOG.debug("Failed to write node {} to DS ", deviceInfo, e);
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.statistics.services.direct;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetFlowStatisticsOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowStatisticsDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.statistics.FlowStatisticsBuilder;
final FlowStatisticsDataBuilder flowStatisticsDataBld = new FlowStatisticsDataBuilder()
.setFlowStatistics(new FlowStatisticsBuilder(flowStatistics).build());
- final FlowBuilder flowBuilder = new FlowBuilder(flowStatistics)
- .addAugmentation(FlowStatisticsData.class, flowStatisticsDataBld.build());
+ final FlowBuilder flowBuilder = new FlowBuilder(flowStatistics).addAugmentation(flowStatisticsDataBld.build());
final FlowRegistryKey flowRegistryKey = FlowRegistryKeyFactory.create(getVersion(), flowBuilder.build());
OpenflowVersion.get(input.getVersion()), MatchPath.PACKET_RECEIVED_MATCH);
if (matchExtensionWrap != null) {
- matchBuilder.addAugmentation(matchExtensionWrap.getAugmentationClass(),
- matchExtensionWrap.getAugmentationObject());
+ matchBuilder.addAugmentation(matchExtensionWrap.getAugmentationObject());
}
return matchBuilder.build();
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsDataBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodesBuilder;
.child(Table.class, new TableKey((short) i)),
new TableBuilder()
.setId((short) i)
- .addAugmentation(
- FlowTableStatisticsData.class,
- new FlowTableStatisticsDataBuilder().build())
+ .addAugmentation(new FlowTableStatisticsDataBuilder().build())
.build());
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlowBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlowWriteActionsSetField;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifPacketIn;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifPacketInBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifSwitchFlowRemoved;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifSwitchFlowRemovedBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchNotifUpdateFlowStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchPacketInMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchPacketInMessageBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList;
final SetFieldBuilder matchBuilder = new SetFieldBuilder(match);
resolveExtensions(match).ifPresent(extensionLists -> matchBuilder
- .addAugmentation(GeneralAugMatchNodesNodeTableFlowWriteActionsSetField.class,
- new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowWriteActionsSetFieldBuilder()
.setExtensionList(extensionLists)
.build()));
final MatchBuilder matchBuilder = new MatchBuilder(match);
resolveExtensions(match).ifPresent(extensionLists -> matchBuilder
- .addAugmentation(GeneralAugMatchNotifUpdateFlowStats.class,
- new GeneralAugMatchNodesNodeTableFlowBuilder()
+ .addAugmentation(new GeneralAugMatchNodesNodeTableFlowBuilder()
.setExtensionList(extensionLists)
.build()));
.rev131026.flow.mod.removed.MatchBuilder(match);
resolveExtensions(match).ifPresent(extensionLists -> matchBuilder
- .addAugmentation(GeneralAugMatchNotifSwitchFlowRemoved.class,
- new GeneralAugMatchNotifSwitchFlowRemovedBuilder()
+ .addAugmentation(new GeneralAugMatchNotifSwitchFlowRemovedBuilder()
.setExtensionList(extensionLists)
.build()));
.rev130709.packet.received.MatchBuilder(match);
resolveExtensions(match).ifPresent(extensionLists -> matchBuilder
- .addAugmentation(GeneralAugMatchNotifPacketIn.class,
- new GeneralAugMatchNotifPacketInBuilder()
+ .addAugmentation(new GeneralAugMatchNotifPacketInBuilder()
.setExtensionList(extensionLists)
.build()));
.rev130709.packet.in.message.MatchBuilder(match);
resolveExtensions(match).ifPresent(extensionLists -> matchBuilder
- .addAugmentation(GeneralAugMatchPacketInMessage.class,
- new GeneralAugMatchPacketInMessageBuilder()
+ .addAugmentation(new GeneralAugMatchPacketInMessageBuilder()
.setExtensionList(extensionLists)
.build()));
import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil;
import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnectorUpdated;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnectorUpdatedBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortReason;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.flow.capable.port.State;
fcncub.setMaximumSpeed(port.getMaxSpeed());
fcncub.setName(port.getName());
fcncub.setPortNumber(OpenflowPortsUtil.getProtocolAgnosticPort(ofVersion, portNumber));
- builder.addAugmentation(FlowCapableNodeConnectorUpdated.class, fcncub.build());
- return builder.build();
+ return builder.addAugmentation(fcncub.build()).build();
}
public static NodeConnectorRemoved translatePortRemoved(final Short version, final Uint64 datapathId,
matchEntry, ofVersion, matchPath.name());
}
- matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, builder.build());
+ matchBuilder.addAugmentation(builder.build());
}
/**
ExtensionAugment<? extends Augmentation<Extension>> extensionMatch =
convertor.convert(matchEntry, matchPath);
ExtensionBuilder extBld = new ExtensionBuilder();
- extBld.addAugmentation(extensionMatch.getAugmentationClass(), extensionMatch.getAugmentationObject());
+ extBld.addAugmentation(extensionMatch.getAugmentationObject());
extListBld = new ExtensionListBuilder();
extListBld.setExtension(extBld.build());
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.band.type.band.type.Experimenter;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.MeterBandHeaders;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.meter.band.headers.MeterBandHeader;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMeterBand;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ExperimenterIdMeterBandBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterBandType;
Experimenter experimenter = (Experimenter) meterBandHeader.getBandType();
meterBandExperimenterBuilder.setBurstSize(experimenter.getExperimenterBurstSize());
meterBandExperimenterBuilder.setRate(experimenter.getExperimenterRate());
- ExperimenterIdMeterBandBuilder expBuilder = new ExperimenterIdMeterBandBuilder();
- expBuilder.setExperimenter(new ExperimenterId(experimenter.getExperimenter()));
- meterBandExperimenterBuilder.addAugmentation(ExperimenterIdMeterBand.class, expBuilder.build());
+ meterBandExperimenterBuilder.addAugmentation(new ExperimenterIdMeterBandBuilder()
+ .setExperimenter(new ExperimenterId(experimenter.getExperimenter()))
+ .build());
// TODO - implement / finish experimenter meter band translation
MeterBandExperimenterCaseBuilder experimenterCaseBuilder =
new MeterBandExperimenterCaseBuilder();
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlags;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
nextTableIdsList.add(nextTableId.build());
}
- NextTableRelatedTableFeaturePropertyBuilder propBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
- propBuilder.setNextTableIds(nextTableIdsList);
- builder.setType(type);
- builder.addAugmentation(NextTableRelatedTableFeatureProperty.class, propBuilder.build());
+ builder.setType(type).addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder()
+ .setNextTableIds(nextTableIdsList)
+ .build());
}
private static void setActionTableFeatureProperty(final TableFeaturePropertiesBuilder builder,
matchEntriesList.add(matchEntryBuilder.build());
}
- OxmRelatedTableFeaturePropertyBuilder propBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- propBuilder.setMatchEntry(matchEntriesList);
- builder.setType(type);
- builder.addAugmentation(OxmRelatedTableFeatureProperty.class, propBuilder.build());
+ builder.setType(type).addAugmentation(new OxmRelatedTableFeaturePropertyBuilder()
+ .setMatchEntry(matchEntriesList)
+ .build());
}
private static void setMatchEntry(final MatchEntryBuilder builder,
data.getMatchPath());
if (matchExtensionWrap != null) {
- matchBuilder.addAugmentation(matchExtensionWrap.getAugmentationClass(),
- matchExtensionWrap.getAugmentationObject());
+ matchBuilder.addAugmentation(matchExtensionWrap.getAugmentationObject());
}
salFlowStatsBuilder.setMatch(matchBuilder.build());
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.protocol.match.fields.Pbb;
import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlags;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlagsContainer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlagsContainerBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.oxm.container.match.entry.value.experimenter.id._case.TcpFlagsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.oxm.container.match.entry.value.ExperimenterIdCaseBuilder;
experimenterBuilder.setExperimenter(new ExperimenterId(OFApprovedExperimenterIds.MATCH_TCP_FLAGS_EXP_ID));
expIdCaseBuilder.setExperimenter(experimenterBuilder.build());
- expIdCaseBuilder.addAugmentation(TcpFlagsContainer.class, tcpFlagsContainerBuilder.build());
+ expIdCaseBuilder.addAugmentation(tcpFlagsContainerBuilder.build());
matchEntryBuilder.setMatchEntryValue(expIdCaseBuilder.build());
matchEntryList.add(matchEntryBuilder.build());
}
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTNEXTTABLES);
- NextTableRelatedTableFeaturePropertyBuilder nextPropBuilder =
- new NextTableRelatedTableFeaturePropertyBuilder();
List<NextTableIds> nextIds = new ArrayList<>();
nextIds.add(new NextTableIdsBuilder().setTableId((short) 1).build());
nextIds.add(new NextTableIdsBuilder().setTableId((short) 2).build());
- nextPropBuilder.setNextTableIds(nextIds);
- propBuilder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextPropBuilder.build());
+ propBuilder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().setNextTableIds(nextIds).build());
List<TableFeatureProperties> properties = new ArrayList<>();
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS);
- nextPropBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
nextIds = new ArrayList<>();
nextIds.add(new NextTableIdsBuilder().setTableId((short) 3).build());
- nextPropBuilder.setNextTableIds(nextIds);
- propBuilder.addAugmentation(NextTableRelatedTableFeatureProperty.class, nextPropBuilder.build());
+ propBuilder.addAugmentation(new NextTableRelatedTableFeaturePropertyBuilder().setNextTableIds(nextIds).build());
properties.add(propBuilder.build());
propBuilder = new TableFeaturePropertiesBuilder();
insBuilder.setInstructionChoice(gotoCaseBuilder.build());
insIds.add(insBuilder.build());
- InstructionRelatedTableFeaturePropertyBuilder insPropBuilder =
- new InstructionRelatedTableFeaturePropertyBuilder();
- insPropBuilder.setInstruction(insIds);
- propBuilder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insPropBuilder.build());
+ propBuilder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder().setInstruction(insIds).build());
properties.add(propBuilder.build());
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS);
- insPropBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
insIds = new ArrayList<>();
insBuilder = new InstructionBuilder();
WriteMetadataCaseBuilder writeMetadataCaseBuilder = new WriteMetadataCaseBuilder();
insBuilder.setInstructionChoice(gotoCaseBuilder2.build());
insIds.add(insBuilder.build());
- insPropBuilder.setInstruction(insIds);
- propBuilder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insPropBuilder.build());
+ propBuilder.addAugmentation(new InstructionRelatedTableFeaturePropertyBuilder().setInstruction(insIds).build());
properties.add(propBuilder.build());
featuresBuilder.setTableFeatureProperties(properties);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build()); //[0]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setOxmClass(OpenflowBasicClass.class);
entriesBuilder.setOxmMatchField(IpEcn.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());//[1]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELD);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setOxmClass(OpenflowBasicClass.class);
entriesBuilder.setOxmMatchField(VlanVid.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());//[2]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setOxmClass(OpenflowBasicClass.class);
entriesBuilder.setOxmMatchField(TcpSrc.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());//[3]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setOxmClass(OpenflowBasicClass.class);
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());//[4]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWILDCARDS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
entries = new ArrayList<>();
entriesBuilder = new MatchEntryBuilder();
entriesBuilder.setHasMask(false);
entries.add(entriesBuilder.build());
- oxmBuilder.setMatchEntry(entries);
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().setMatchEntry(entries).build());
properties.add(propBuilder.build());//[5]
/* -------------------------------------------------- */
actionBuilder.setActionChoice(createSetNwSrcAction());
actions.add(actionBuilder.build());
- ActionRelatedTableFeaturePropertyBuilder actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
properties.add(propBuilder.build());//[6]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
actions = new ArrayList<>();
actionBuilder = new ActionBuilder();
actionBuilder = new ActionBuilder();
actionBuilder.setActionChoice(createCopyTtlOutCase());
actions.add(actionBuilder.build());
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
properties.add(propBuilder.build());//[7]
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITEACTIONS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
actions = new ArrayList<>();
actionBuilder = new ActionBuilder();
actionBuilder = new ActionBuilder();
actionBuilder.setActionChoice(pushVlanCase());
actions.add(actionBuilder.build());
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
properties.add(propBuilder.build());
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS);
- actBuilder = new ActionRelatedTableFeaturePropertyBuilder();
actions = new ArrayList<>();
actionBuilder = new ActionBuilder();
actionBuilder = new ActionBuilder();
actionBuilder.setActionChoice(createEmptySetFieldCase());
actions.add(actionBuilder.build());
- actBuilder.setAction(actions);
- propBuilder.addAugmentation(ActionRelatedTableFeatureProperty.class, actBuilder.build());
+ propBuilder.addAugmentation(new ActionRelatedTableFeaturePropertyBuilder().setAction(actions).build());
properties.add(propBuilder.build());
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTEXPERIMENTER);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
/* -------------------------------------------------- */
propBuilder = new TableFeaturePropertiesBuilder();
propBuilder.setType(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS);
- oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
- propBuilder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
+ propBuilder.addAugmentation(new OxmRelatedTableFeaturePropertyBuilder().build());
properties.add(propBuilder.build());
/* -------------------------------------------------- */