X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fopenflow%2Fmd%2Fcore%2Ftranslator%2FMultipartReplyTranslator.java;h=56f2ebec56c37c3aa8f893869959975d8fa12202;hb=611180ac770b6038b526c54994701db16d1a8567;hp=77e4cf837fc2e108402e65bba015c488f6ebfd19;hpb=f5624594ff3d859e19d73baf33df02d0b399b714;p=openflowplugin.git diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/MultipartReplyTranslator.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/MultipartReplyTranslator.java index 77e4cf837f..56f2ebec56 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/MultipartReplyTranslator.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/MultipartReplyTranslator.java @@ -12,12 +12,13 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; -import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator; -import org.opendaylight.openflowplugin.openflow.md.core.SwitchConnectionDistinguisher; +import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator; +import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher; +import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext; +import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion; import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.FlowStatsResponseConvertor; import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.GroupStatsResponseConvertor; import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.MeterStatsResponseConvertor; -import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext; import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.Counter32; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.Counter64; @@ -26,7 +27,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.F import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsUpdateBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.flow.table.and.statistics.map.FlowTableAndStatisticsMap; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.flow.table.and.statistics.map.FlowTableAndStatisticsMapBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103.TransactionId; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev150304.TransactionId; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.queue.rev130925.QueueId; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupDescStatsUpdatedBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupFeaturesUpdatedBuilder; @@ -66,11 +67,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterConfigCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterFeaturesCase; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortStatsCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyQueueCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.aggregate._case.MultipartReplyAggregate; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow._case.MultipartReplyFlow; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortStatsCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.MultipartReplyGroup; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc._case.MultipartReplyGroupDesc; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.features._case.MultipartReplyGroupFeatures; @@ -116,6 +117,8 @@ public class MultipartReplyTranslator implements IMDMessageTranslator listDataObject = new CopyOnWriteArrayList(); + OpenflowVersion ofVersion = OpenflowVersion.get(sc.getPrimaryConductor().getVersion()); + if(msg instanceof MultipartReplyMessage){ MultipartReplyMessage mpReply = (MultipartReplyMessage)msg; NodeId node = this.nodeIdFromDatapathId(sc.getFeatures().getDatapathId()); @@ -128,7 +131,7 @@ public class MultipartReplyTranslator implements IMDMessageTranslator supportActionByGroups = new ArrayList(); for(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType supportedActions : actionsSupported){ long supportActionBitmap = 0; - supportActionBitmap |= supportedActions.isOFPATOUTPUT()?(1 << 0): ~(1 << 0); - supportActionBitmap |= supportedActions.isOFPATCOPYTTLOUT()?(1 << 11): ~(1 << 11); - supportActionBitmap |= supportedActions.isOFPATCOPYTTLIN()?(1 << 12): ~(1 << 12); - supportActionBitmap |= supportedActions.isOFPATSETMPLSTTL()?(1 << 15): ~(1 << 15); - supportActionBitmap |= supportedActions.isOFPATDECMPLSTTL()?(1 << 16): ~(1 << 16); - supportActionBitmap |= supportedActions.isOFPATPUSHVLAN()?(1 << 16): ~(1 << 16); - supportActionBitmap |= supportedActions.isOFPATPOPVLAN()?(1 << 17): ~(1 << 17); - supportActionBitmap |= supportedActions.isOFPATPUSHMPLS()?(1 << 18): ~(1 << 18); - supportActionBitmap |= supportedActions.isOFPATPOPMPLS()?(1 << 19): ~(1 << 19); - supportActionBitmap |= supportedActions.isOFPATSETQUEUE()?(1 << 20): ~(1 << 20); - supportActionBitmap |= supportedActions.isOFPATGROUP()?(1 << 21): ~(1 << 21); - supportActionBitmap |= supportedActions.isOFPATSETNWTTL()?(1 << 22): ~(1 << 22); - supportActionBitmap |= supportedActions.isOFPATDECNWTTL()?(1 << 23): ~(1 << 23); - supportActionBitmap |= supportedActions.isOFPATSETFIELD()?(1 << 24): ~(1 << 24); - supportActionBitmap |= supportedActions.isOFPATPUSHPBB()?(1 << 25): ~(1 << 25); - supportActionBitmap |= supportedActions.isOFPATPOPPBB()?(1 << 26): ~(1 << 26); - supportActionBitmap |= supportedActions.isOFPATEXPERIMENTER()?(1 << 27): ~(1 << 27); - supportActionByGroups.add(new Long(supportActionBitmap)); + supportActionBitmap |= supportedActions.isOFPATOUTPUT()?(1 << 0): 0; + supportActionBitmap |= supportedActions.isOFPATCOPYTTLOUT()?(1 << 11): 0; + supportActionBitmap |= supportedActions.isOFPATCOPYTTLIN()?(1 << 12): 0; + supportActionBitmap |= supportedActions.isOFPATSETMPLSTTL()?(1 << 15): 0; + supportActionBitmap |= supportedActions.isOFPATDECMPLSTTL()?(1 << 16): 0; + supportActionBitmap |= supportedActions.isOFPATPUSHVLAN()?(1 << 17): 0; + supportActionBitmap |= supportedActions.isOFPATPOPVLAN()?(1 << 18): 0; + supportActionBitmap |= supportedActions.isOFPATPUSHMPLS()?(1 << 19): 0; + supportActionBitmap |= supportedActions.isOFPATPOPMPLS()?(1 << 20): 0; + supportActionBitmap |= supportedActions.isOFPATSETQUEUE()?(1 << 21): 0; + supportActionBitmap |= supportedActions.isOFPATGROUP()?(1 << 22): 0; + supportActionBitmap |= supportedActions.isOFPATSETNWTTL()?(1 << 23): 0; + supportActionBitmap |= supportedActions.isOFPATDECNWTTL()?(1 << 24): 0; + supportActionBitmap |= supportedActions.isOFPATSETFIELD()?(1 << 25): 0; + supportActionBitmap |= supportedActions.isOFPATPUSHPBB()?(1 << 26): 0; + supportActionBitmap |= supportedActions.isOFPATPOPPBB()?(1 << 27): 0; + supportActionByGroups.add(Long.valueOf(supportActionBitmap)); } return supportActionByGroups; }