import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
-import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey;
import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.openflowjava.protocol.impl.util.CodeKeyMaker;
import org.opendaylight.openflowjava.protocol.impl.util.CodeKeyMakerFactory;
import org.opendaylight.openflowjava.util.ByteBufUtils;
import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
+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.rev130731.actions.grouping.Action;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortState;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableConfig;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.grouping.Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+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.grouping.Match;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.grouping.BucketsList;
case OFPMPAGGREGATE: builder.setMultipartReplyBody(setAggregate(rawMessage));
break;
case OFPMPTABLE: builder.setMultipartReplyBody(setTable(rawMessage));
- break;
+ break;
case OFPMPPORTSTATS: builder.setMultipartReplyBody(setPortStats(rawMessage));
break;
case OFPMPQUEUE: builder.setMultipartReplyBody(setQueue(rawMessage));
- break;
+ break;
case OFPMPGROUP: builder.setMultipartReplyBody(setGroup(rawMessage));
break;
case OFPMPGROUPDESC: builder.setMultipartReplyBody(setGroupDesc(rawMessage));
break;
case OFPMPEXPERIMENTER: builder.setMultipartReplyBody(setExperimenter(rawMessage));
break;
- default:
+ default:
break;
}
-
+
return builder.build();
}
-
+
private static MultipartReplyDescCase setDesc(ByteBuf input) {
MultipartReplyDescCaseBuilder caseBuilder = new MultipartReplyDescCaseBuilder();
MultipartReplyDescBuilder descBuilder = new MultipartReplyDescBuilder();
caseBuilder.setMultipartReplyDesc(descBuilder.build());
return caseBuilder.build();
}
-
+
private MultipartReplyFlowCase setFlow(ByteBuf input) {
MultipartReplyFlowCaseBuilder caseBuilder = new MultipartReplyFlowCaseBuilder();
MultipartReplyFlowBuilder flowBuilder = new MultipartReplyFlowBuilder();
caseBuilder.setMultipartReplyFlow(flowBuilder.build());
return caseBuilder.build();
}
-
+
private static FlowModFlags createFlowModFlagsFromBitmap(int input){
final Boolean fmfSENDFLOWREM = (input & (1 << 0)) != 0;
final Boolean fmfCHECKOVERLAP = (input & (1 << 1)) != 0;
- final Boolean fmfRESETCOUNTS = (input & (1 << 2)) != 0;
+ final Boolean fmfRESETCOUNTS = (input & (1 << 2)) != 0;
final Boolean fmfNOPKTCOUNTS = (input & (1 << 3)) != 0;
final Boolean fmfNOBYTCOUNTS = (input & (1 << 4)) != 0;
return new FlowModFlags(fmfCHECKOVERLAP, fmfNOBYTCOUNTS, fmfNOPKTCOUNTS, fmfRESETCOUNTS, fmfSENDFLOWREM);
}
-
+
private static MultipartReplyAggregateCase setAggregate(ByteBuf input) {
MultipartReplyAggregateCaseBuilder caseBuilder = new MultipartReplyAggregateCaseBuilder();
MultipartReplyAggregateBuilder builder = new MultipartReplyAggregateBuilder();
caseBuilder.setMultipartReplyAggregate(builder.build());
return caseBuilder.build();
}
-
+
private static MultipartReplyTableCase setTable(ByteBuf input) {
MultipartReplyTableCaseBuilder caseBuilder = new MultipartReplyTableCaseBuilder();
MultipartReplyTableBuilder builder = new MultipartReplyTableBuilder();
caseBuilder.setMultipartReplyTable(builder.build());
return caseBuilder.build();
}
-
+
private MultipartReplyTableFeaturesCase setTableFeatures(ByteBuf input) {
MultipartReplyTableFeaturesCaseBuilder caseBuilder = new MultipartReplyTableFeaturesCaseBuilder();
MultipartReplyTableFeaturesBuilder builder = new MultipartReplyTableFeaturesBuilder();
featuresBuilder.setMetadataWrite(metadataWrite);
featuresBuilder.setConfig(createTableConfig(input.readUnsignedInt()));
featuresBuilder.setMaxEntries(input.readUnsignedInt());
- featuresBuilder.setTableFeatureProperties(createTableFeaturesProperties(input,
+ featuresBuilder.setTableFeatureProperties(createTableFeaturesProperties(input,
length - MULTIPART_REPLY_TABLE_FEATURES_STRUCTURE_LENGTH));
features.add(featuresBuilder.build());
}
caseBuilder.setMultipartReplyTableFeatures(builder.build());
return caseBuilder.build();
}
-
+
private static TableConfig createTableConfig(long input) {
boolean deprecated = (input & 3) != 0;
return new TableConfig(deprecated);
}
-
+
private List<TableFeatureProperties> createTableFeaturesProperties(ByteBuf input, int length) {
List<TableFeatureProperties> properties = new ArrayList<>();
int tableFeaturesLength = length;
OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
CodeKeyMaker keyMaker = CodeKeyMakerFactory
.createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
- List<MatchEntries> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
+ List<MatchEntry> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
- oxmBuilder.setMatchEntries(entries);
+ oxmBuilder.setMatchEntry(entries);
builder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
} else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)
|| type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
}
return properties;
}
-
+
private static MultipartReplyPortStatsCase setPortStats(ByteBuf input) {
MultipartReplyPortStatsCaseBuilder caseBuilder = new MultipartReplyPortStatsCaseBuilder();
MultipartReplyPortStatsBuilder builder = new MultipartReplyPortStatsBuilder();
caseBuilder.setMultipartReplyPortStats(builder.build());
return caseBuilder.build();
}
-
+
private static MultipartReplyQueueCase setQueue(ByteBuf input) {
MultipartReplyQueueCaseBuilder caseBuilder = new MultipartReplyQueueCaseBuilder();
MultipartReplyQueueBuilder builder = new MultipartReplyQueueBuilder();
caseBuilder.setMultipartReplyQueue(builder.build());
return caseBuilder.build();
}
-
+
private static MultipartReplyGroupCase setGroup(ByteBuf input) {
MultipartReplyGroupCaseBuilder caseBuilder = new MultipartReplyGroupCaseBuilder();
MultipartReplyGroupBuilder builder = new MultipartReplyGroupBuilder();
bucketStatsBuilder.setByteCount(new BigInteger(1, byteCountBucket));
bucketStatsList.add(bucketStatsBuilder.build());
actualLength += BUCKET_COUNTER_LENGTH;
- }
+ }
groupStatsBuilder.setBucketStats(bucketStatsList);
groupStatsList.add(groupStatsBuilder.build());
}
caseBuilder.setMultipartReplyGroup(builder.build());
return caseBuilder.build();
}
-
+
private static MultipartReplyMeterFeaturesCase setMeterFeatures(ByteBuf input) {
MultipartReplyMeterFeaturesCaseBuilder caseBuilder = new MultipartReplyMeterFeaturesCaseBuilder();
MultipartReplyMeterFeaturesBuilder builder = new MultipartReplyMeterFeaturesBuilder();
caseBuilder.setMultipartReplyMeterFeatures(builder.build());
return caseBuilder.build();
}
-
+
private static MeterFlags createMeterFlags(long input){
final Boolean mfKBPS = (input & (1 << 0)) != 0;
final Boolean mfPKTPS = (input & (1 << 1)) != 0;
final Boolean mfSTATS = (input & (1 << 3)) != 0;
return new MeterFlags(mfBURST, mfKBPS, mfPKTPS, mfSTATS);
}
-
+
private static MeterBandTypeBitmap createMeterBandsBitmap(long input) {
final Boolean mbtDROP = (input & (1 << 1)) != 0;
final Boolean mbtDSCPREMARK = (input & (1 << 2)) != 0;
return new MeterBandTypeBitmap(mbtDROP, mbtDSCPREMARK);
}
-
+
private static MultipartReplyMeterCase setMeter(ByteBuf input) {
MultipartReplyMeterCaseBuilder caseBuilder = new MultipartReplyMeterCaseBuilder();
MultipartReplyMeterBuilder builder = new MultipartReplyMeterBuilder();
caseBuilder.setMultipartReplyMeter(builder.build());
return caseBuilder.build();
}
-
+
private MultipartReplyMeterConfigCase setMeterConfig(ByteBuf input) {
MultipartReplyMeterConfigCaseBuilder caseBuilder = new MultipartReplyMeterConfigCaseBuilder();
MultipartReplyMeterConfigBuilder builder = new MultipartReplyMeterConfigBuilder();
caseBuilder.setMultipartReplyMeterConfig(builder.build());
return caseBuilder.build();
}
-
+
private MultipartReplyExperimenterCase setExperimenter(ByteBuf input) {
return registry.getDeserializer(ExperimenterDeserializerKeyFactory.createMultipartReplyMessageDeserializerKey(
EncodeConstants.OF13_VERSION_ID, input.readUnsignedInt()));
}
-
+
private static MultipartReplyPortDescCase setPortDesc(ByteBuf input) {
MultipartReplyPortDescCaseBuilder caseBuilder = new MultipartReplyPortDescCaseBuilder();
MultipartReplyPortDescBuilder builder = new MultipartReplyPortDescBuilder();
caseBuilder.setMultipartReplyPortDesc(builder.build());
return caseBuilder.build();
}
-
+
private static PortConfig createPortConfig(long input){
final Boolean pcPortDown = ((input) & (1<<0)) != 0;
final Boolean pcNRecv = ((input) & (1<<2)) != 0;
final Boolean pcNPacketIn = ((input) & (1<<6)) != 0;
return new PortConfig(pcNFwd, pcNPacketIn, pcNRecv, pcPortDown);
}
-
+
private static PortState createPortState(long input){
final Boolean psLinkDown = ((input) & (1<<0)) != 0;
final Boolean psBlocked = ((input) & (1<<1)) != 0;
final Boolean psLive = ((input) & (1<<2)) != 0;
return new PortState(psBlocked, psLinkDown, psLive);
}
-
+
private static PortFeatures createPortFeatures(long input){
final Boolean pf10mbHd = ((input) & (1<<0)) != 0;
final Boolean pf10mbFd = ((input) & (1<<1)) != 0;
return new PortFeatures(pf100gbFd, pf100mbFd, pf100mbHd, pf10gbFd, pf10mbFd, pf10mbHd, pf1gbFd,
pf1gbHd, pf1tbFd, pf40gbFd, pfAutoneg, pfCopper, pfFiber, pfOther, pfPause, pfPauseAsym);
}
-
+
private static MultipartReplyGroupFeaturesCase setGroupFeatures(ByteBuf rawMessage) {
MultipartReplyGroupFeaturesCaseBuilder caseBuilder = new MultipartReplyGroupFeaturesCaseBuilder();
MultipartReplyGroupFeaturesBuilder featuresBuilder = new MultipartReplyGroupFeaturesBuilder();
caseBuilder.setMultipartReplyGroupFeatures(featuresBuilder.build());
return caseBuilder.build();
}
-
+
private static ActionType createActionBitmap(long input) {
final Boolean atOutput = ((input) & (1<<0)) != 0;
final Boolean atCopyTTLout = ((input) & (1<<11)) != 0;
final Boolean gtFF = ((input) & (1<<3)) != 0;
return new GroupTypes(gtAll, gtFF, gtIndirect, gtSelect);
}
-
+
private MultipartReplyGroupDescCase setGroupDesc(ByteBuf input) {
MultipartReplyGroupDescCaseBuilder caseBuilder = new MultipartReplyGroupDescCaseBuilder();
MultipartReplyGroupDescBuilder builder = new MultipartReplyGroupDescBuilder();