Bump MRI upstreams
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / MultipartReplyMessageFactory.java
index 78496ea656f5bfc11f8a3fd879938b87d9d2b201..e56d4894c5641b980b84897ee85b26a442e8a65b 100644 (file)
@@ -31,7 +31,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
-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.next.table.related.table.feature.property.NextTableIds;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.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;
@@ -223,7 +223,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
 
     private static void writeFlags(final MultipartRequestFlags flags, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, flags.isOFPMPFREQMORE());
+        map.put(0, flags.getOFPMPFREQMORE());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeShort(bitmap);
     }
@@ -302,10 +302,9 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
     }
 
     private void writeExperimenterRelatedTableProperty(final ByteBuf output, final TableFeatureProperties property) {
-        long expId = property.augmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue()
-            .toJava();
+        Uint32 expId = property.augmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue();
         OFSerializer<TableFeatureProperties> serializer = registry.getSerializer(ExperimenterSerializerKeyFactory
-                .createMultipartRequestTFSerializerKey(EncodeConstants.OF13_VERSION_ID, expId));
+                .createMultipartRequestTFSerializerKey(EncodeConstants.OF_VERSION_1_3, expId));
         serializer.serialize(property, output);
     }
 
@@ -318,7 +317,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         List<MatchEntry> entries = property.augmentation(OxmRelatedTableFeatureProperty.class).getMatchEntry();
         if (entries != null) {
             TypeKeyMaker<MatchEntry> keyMaker = TypeKeyMakerFactory
-                    .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
+                    .createMatchEntriesKeyMaker(EncodeConstants.OF_VERSION_1_3);
             ListSerializer.serializeHeaderList(entries, keyMaker, registry, output);
         }
         int length = output.writerIndex() - startIndex;
@@ -334,7 +333,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         output.writeShort(EncodeConstants.EMPTY_LENGTH);
         List<Action> actions = property.augmentation(ActionRelatedTableFeatureProperty.class).getAction();
         if (actions != null) {
-            TypeKeyMaker<Action> keyMaker = TypeKeyMakerFactory.createActionKeyMaker(EncodeConstants.OF13_VERSION_ID);
+            TypeKeyMaker<Action> keyMaker = TypeKeyMakerFactory.createActionKeyMaker(EncodeConstants.OF_VERSION_1_3);
             ListSerializer.serializeHeaderList(actions, keyMaker, registry, output);
         }
         int length = output.writerIndex() - startIndex;
@@ -370,7 +369,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
                 .getInstruction();
         if (instructions != null) {
             TypeKeyMaker<Instruction> keyMaker = TypeKeyMakerFactory
-                    .createInstructionKeyMaker(EncodeConstants.OF13_VERSION_ID);
+                    .createInstructionKeyMaker(EncodeConstants.OF_VERSION_1_3);
             ListSerializer.serializeHeaderList(instructions, keyMaker, registry, output);
         }
         int length = output.writerIndex() - startIndex;
@@ -389,7 +388,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
 
     private static void writeTableConfig(final TableConfig tableConfig, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, tableConfig.isOFPTCDEPRECATEDMASK());
+        map.put(0, tableConfig.getOFPTCDEPRECATEDMASK());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
@@ -407,8 +406,8 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
 
     private static void writeBandTypes(final MeterBandTypeBitmap bandTypes, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, bandTypes.isOFPMBTDROP());
-        map.put(1, bandTypes.isOFPMBTDSCPREMARK());
+        map.put(0, bandTypes.getOFPMBTDROP());
+        map.put(1, bandTypes.getOFPMBTDSCPREMARK());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
@@ -451,10 +450,10 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
 
     private static void writeMeterFlags(final MeterFlags flags, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, flags.isOFPMFKBPS());
-        map.put(1, flags.isOFPMFPKTPS());
-        map.put(2, flags.isOFPMFBURST());
-        map.put(3, flags.isOFPMFSTATS());
+        map.put(0, flags.getOFPMFKBPS());
+        map.put(1, flags.getOFPMFPKTPS());
+        map.put(2, flags.getOFPMFBURST());
+        map.put(3, flags.getOFPMFSTATS());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeShort(bitmap);
     }
@@ -496,43 +495,43 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
 
     private static void writeActionType(final ActionType action, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, action.isOFPATOUTPUT());
-        map.put(1, action.isOFPATCOPYTTLOUT());
-        map.put(2, action.isOFPATCOPYTTLIN());
-        map.put(3, action.isOFPATSETMPLSTTL());
-        map.put(4, action.isOFPATDECMPLSTTL());
-        map.put(5, action.isOFPATPUSHVLAN());
-        map.put(6, action.isOFPATPOPVLAN());
-        map.put(7, action.isOFPATPUSHMPLS());
-        map.put(8, action.isOFPATPOPMPLS());
-        map.put(9, action.isOFPATSETQUEUE());
-        map.put(10, action.isOFPATGROUP());
-        map.put(11, action.isOFPATSETNWTTL());
-        map.put(12, action.isOFPATDECNWTTL());
-        map.put(13, action.isOFPATSETFIELD());
-        map.put(14, action.isOFPATPUSHPBB());
-        map.put(15, action.isOFPATPOPPBB());
-        map.put(16, action.isOFPATEXPERIMENTER());
+        map.put(0, action.getOFPATOUTPUT());
+        map.put(1, action.getOFPATCOPYTTLOUT());
+        map.put(2, action.getOFPATCOPYTTLIN());
+        map.put(3, action.getOFPATSETMPLSTTL());
+        map.put(4, action.getOFPATDECMPLSTTL());
+        map.put(5, action.getOFPATPUSHVLAN());
+        map.put(6, action.getOFPATPOPVLAN());
+        map.put(7, action.getOFPATPUSHMPLS());
+        map.put(8, action.getOFPATPOPMPLS());
+        map.put(9, action.getOFPATSETQUEUE());
+        map.put(10, action.getOFPATGROUP());
+        map.put(11, action.getOFPATSETNWTTL());
+        map.put(12, action.getOFPATDECNWTTL());
+        map.put(13, action.getOFPATSETFIELD());
+        map.put(14, action.getOFPATPUSHPBB());
+        map.put(15, action.getOFPATPOPPBB());
+        map.put(16, action.getOFPATEXPERIMENTER());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
 
     private static void writeGroupCapabilities(final GroupCapabilities capabilities, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, capabilities.isOFPGFCSELECTWEIGHT());
-        map.put(1, capabilities.isOFPGFCSELECTLIVENESS());
-        map.put(2, capabilities.isOFPGFCCHAINING());
-        map.put(3, capabilities.isOFPGFCCHAININGCHECKS());
+        map.put(0, capabilities.getOFPGFCSELECTWEIGHT());
+        map.put(1, capabilities.getOFPGFCSELECTLIVENESS());
+        map.put(2, capabilities.getOFPGFCCHAINING());
+        map.put(3, capabilities.getOFPGFCCHAININGCHECKS());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
 
     private static void writeGroupTypes(final GroupTypes types, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, types.isOFPGTALL());
-        map.put(1, types.isOFPGTSELECT());
-        map.put(2, types.isOFPGTINDIRECT());
-        map.put(3, types.isOFPGTFF());
+        map.put(0, types.getOFPGTALL());
+        map.put(1, types.getOFPGTSELECT());
+        map.put(2, types.getOFPGTINDIRECT());
+        map.put(3, types.getOFPGTFF());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
@@ -555,7 +554,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
                 bucketBuff.writeInt(bucket.getWatchGroup().intValue());
                 bucketBuff.writeZero(BUCKET_PADDING);
                 ListSerializer.serializeList(bucket.getAction(),
-                        TypeKeyMakerFactory.createActionKeyMaker(message.getVersion().toJava()), registry, bucketBuff);
+                        TypeKeyMakerFactory.createActionKeyMaker(message.getVersion()), registry, bucketBuff);
                 bucketBuff.setShort(BUCKET_LENGTH_INDEX, bucketBuff.readableBytes());
                 groupDescBuff.writeBytes(bucketBuff);
             }
@@ -664,10 +663,10 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
             flowStatsBuff.writeLong(flowStats.getPacketCount().longValue());
             flowStatsBuff.writeLong(flowStats.getByteCount().longValue());
             OFSerializer<Match> matchSerializer = registry.getSerializer(
-                    new MessageTypeKey<>(message.getVersion().toJava(), Match.class));
+                    new MessageTypeKey<>(message.getVersion(), Match.class));
             matchSerializer.serialize(flowStats.getMatch(), flowStatsBuff);
             ListSerializer.serializeList(flowStats.getInstruction(),
-                    TypeKeyMakerFactory.createInstructionKeyMaker(message.getVersion().toJava()), registry,
+                    TypeKeyMakerFactory.createInstructionKeyMaker(message.getVersion()), registry,
                     flowStatsBuff);
 
             flowStatsBuff.setShort(FLOW_STATS_LENGTH_INDEX, flowStatsBuff.readableBytes());
@@ -762,41 +761,41 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
 
     private static void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, config.isPortDown());
-        map.put(2, config.isNoRecv());
-        map.put(5, config.isNoFwd());
-        map.put(6, config.isNoPacketIn());
+        map.put(0, config.getPortDown());
+        map.put(2, config.getNoRecv());
+        map.put(5, config.getNoFwd());
+        map.put(6, config.getNoPacketIn());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
 
     private static void writePortState(final PortState state, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, state.isLinkDown());
-        map.put(1, state.isBlocked());
-        map.put(2, state.isLive());
+        map.put(0, state.getLinkDown());
+        map.put(1, state.getBlocked());
+        map.put(2, state.getLive());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
 
     private static void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
-        map.put(0, features.is_10mbHd());
-        map.put(1, features.is_10mbFd());
-        map.put(2, features.is_100mbHd());
-        map.put(3, features.is_100mbFd());
-        map.put(4, features.is_1gbHd());
-        map.put(5, features.is_1gbFd());
-        map.put(6, features.is_10gbFd());
-        map.put(7, features.is_40gbFd());
-        map.put(8, features.is_100gbFd());
-        map.put(9, features.is_1tbFd());
-        map.put(10, features.isOther());
-        map.put(11, features.isCopper());
-        map.put(12, features.isFiber());
-        map.put(13, features.isAutoneg());
-        map.put(14, features.isPause());
-        map.put(15, features.isPauseAsym());
+        map.put(0, features.get_10mbHd());
+        map.put(1, features.get_10mbFd());
+        map.put(2, features.get_100mbHd());
+        map.put(3, features.get_100mbFd());
+        map.put(4, features.get_1gbHd());
+        map.put(5, features.get_1gbFd());
+        map.put(6, features.get_10gbFd());
+        map.put(7, features.get_40gbFd());
+        map.put(8, features.get_100gbFd());
+        map.put(9, features.get_1tbFd());
+        map.put(10, features.getOther());
+        map.put(11, features.getCopper());
+        map.put(12, features.getFiber());
+        map.put(13, features.getAutoneg());
+        map.put(14, features.getPause());
+        map.put(15, features.getPauseAsym());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }